%\documentclass[12pt,a4paper,handout]{beamer}
\PassOptionsToPackage{table}{xcolor}
 \documentclass[12pt,a4paper]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[table]{xcolor}
% \usepackage [latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsfonts,amsmath,amsthm,amscd,amssymb,oldgerm,mathrsfs,enumerate,latexsym}
% \usepackage{tikz}
%\usetikzlibrary{patterns}
%\usetikzlibrary{shapes}
\usepackage{fancyvrb}
\usepackage{multirow}
\usepackage{tabularx}
%\usepackage{lscape}
\usepackage{tikz}
\usetikzlibrary{shapes}
\usepackage[french]{babel}
\usetheme{AnnArbor}
%\usetheme{Goettingen}

%\definecolor{gris}{gray}{0.8}
%\definecolor{bleu}{rgb}{0.79,0.81,1}
\definecolor{bleu2}{rgb}{0.58,0.6,0.8}

 \newenvironment{attention}{\smallskip \noindent \colorbox{bleu2}{\textcolor{white}{\bf Attention !}} }{ \medskip }

\def\z{\zeta}
\def\a{\alpha}
\def\r{\rho}
\def\t{\tau}
\def\b{\beta}
\def\g{\gamma}
\def\l{\lambda}
\def\s{\sigma}
\def\o{\omega}
\def\p{\varphi}
\def\phi{\varphi}
\def\x{\xi}
\def\n{\mu}
\def\e{\varepsilon}
\def\ee{\mathrm{e}}

\def\v{\wedge}
\def\m{\mathsf{m}}
\def\w{\mathsf{w}}
\def\f{\mathsf{f}}

\def\d{\text{\rm d}}
%\def\d{\partial}

\def\P{\mathcal{P}}
\def\M{\mathcal{M}}
\def\B{\mathcal{B}}
\def\L{\mathcal{L}}
\def\X{\mathcal{X}}

\def\U{\mathbb{U}}
\def\N{\mathbb{N}}
\def\C{\mathbb{C}}
\def\K{\mathbb{K}}
\def\R{\mathbb{R}}
\def\Z{\mathbb{Z}}
\def\Q{\mathbb{Q}}
\def\E{\mathbb{E}}
\def\V{\mathbb{V}}

\def\S{\mathfrak{S}}


\def\Ker{\mathop{\rm Ker}\nolimits}
\def\rg{\mathop{\rm rg }\nolimits}
\def\End{\mathop{ \rm End }\nolimits}
\def\Id{\mathop{ \rm Id }\nolimits}
\def\Im{\mathop{ \rm Im }\nolimits}
\def\Tr{\mathop{ \rm Tr }\nolimits}
\def\dx{\mathop{\rm dx}\nolimits}
\def\dt{\mathop{\rm dt}\nolimits}
\def\du{\mathop{\rm du}\nolimits}
\def\dv{\mathop{\rm dv}\nolimits}
%-------------------------------------------------------
        \AtBeginSubsection[]
        {
                  \begin{frame}<beamer>
                        \transblindsvertical
                        \frametitle{Plan}
                        \tableofcontents[currentsection,currentsubsection]
                  \end{frame}
        }
%-------------------------------------------------------
        \AtBeginSection[]
        {
                \begin{frame}<beamer>
                        \transblindsvertical
                        \frametitle{Plan}
                        \tableofcontents[currentsection]
                \end{frame}
        }


        %-------------------------------------------------------
        % Format de la page
        %-------------------------------------------------------
%        \paperheight=29.7cm
        \paperwidth=18cm
%        \topmargin= -1.5cm 
        \textwidth= 16.7cm
%        \textheight= 25cm 
%        \oddsidemargin= -1.3cm 
%        \evensidemargin= -1.5cm


\usefonttheme[onlymath]{serif}
\usepackage{calrsfs}
\usepackage{fourier}

\newcounter{th}


\theoremstyle{plain}

\newtheorem{cor}[th]{Corollaire}


\newtheorem{defi}[th]{Définition}

\newtheorem{prop}[th]{Proposition}
%\newcommand{\prop}[2][]{\@ifmtarg{#1}{\begin{propo} #2\end{propo}}{\begin{propo}[#1] #2\end{propo}}}

\makeatletter
\def\th@mystylexo{%
    \normalfont % body font
    \setbeamercolor{block title example}{bg=teal,fg=white}
    \setbeamercolor{block body example}{bg=teal!10,fg=black}
        \setbeamercolor{item}{fg=teal}    
    \def\inserttheoremblockenv{exampleblock}
  }
\def\th@remark{%
    \normalfont % body font
    \setbeamercolor{block title example}{bg=cyan,fg=white}
    \setbeamercolor{block body example}{bg=cyan!10,fg=black}
%\setbeamercolor{block title example}{bg=teal,fg=white}
    %\setbeamercolor{block body example}{bg=teal!10,fg=black}
    %    \setbeamercolor{item}{fg=teal}    
    \def\inserttheoremblockenv{exampleblock}
  }
\def\th@mystylered{%
    \normalfont % body font
    \setbeamercolor{block title example}{bg=purple,fg=white}
    \setbeamercolor{block body example}{bg=purple!10,fg=black}
        \setbeamercolor{item}{fg=purple}    
    \def\inserttheoremblockenv{exampleblock}
  }
\makeatother

\theoremstyle{remark}
\newtheorem{rmq}[th]{Remarque}
\newtheorem{ex}[th]{Exemple}
\newtheorem*{exsuite}{Exemple (suite)}



\theoremstyle{mystylexo}
\newtheorem{exo}[th]{Exercice}


\theoremstyle{mystylered}
\newtheorem{theo}[th]{Théorème}


%\setbeamertemplate{theorems}[numbered]
\setbeamertemplate{theorems}[ams style]
 \resetcounteronoverlays{th}




 \title{Arène}
  \author{D. CONDUCHÉ}\institute{Spé PC, Avignon}


\begin{document}
%--------------------------------------------------------------------------------------
%\begin{frame}%[label=current]
%\titlepage
%\end{frame}




\shorthandoff{:} 
%%%%%%%%%%%%%%%%%%%%% Styles %%%%%%%%%%%%%%%%%%%%%
\usetikzlibrary {shadows,shapes.symbols}
% \pgfdeclarelayer{background}
% \pgfsetlayers{background,main}


%   % Dessin des tablettes 
% \tikzstyle{tablette}=[carre/.style={minimum size=.25cm-\pgflinewidth, outer sep=0pt,rectangle},
%     choix/.style={color=white, circle, draw, fill, minimum size=2pt}] 
%                                          % dessin d'une tablette
% \tikzstyle{poison}=[carre, fill=black!10!white] % carré empoisonné
% \tikzstyle{cnormal}=[carre, fill=brown]         % carré normal couleur
% \tikzstyle{cpoison}=[carre, fill=black!60!red]  % carré empoisonné couleur
%   % Sommet GRAPHE Tablettes
% \tikzstyle{sgraphet}=[>=stealth, sommets/.style={circle, minimum
%   size=10mm,node distance=20mm}]                % style graphe avec tablettes
% \tikzstyle{sgraphe}=[>=stealth, sommets/.style={circle, inner sep=2pt, minimum
%   size=5mm, node distance=5mm}]                 % style graphe sans tablette
% \tikzstyle{snum}=[draw, sommets, fill=black!7!white]  
%                                                 % sommet du graphe [[0, n[[

%   % style pour arène, parcours biparti
% \tikzstyle{snumj1plus}=[draw, sommets, fill=blue!15]  % sommet contrôlé par J1
% \tikzstyle{snumj2plus}=[draw, sommets, fill=red!15]
%      % Flèches active:
% \tikzstyle{fl}=[-,style=nearly transparent,line width=6pt]
% \tikzstyle{flj1}=[fl ,color=black!50!blue]  % J1 joue
% \tikzstyle{flj2}=[fl ,color=black!50!red]  % J2 joue
%   % style pour biparti
% \tikzstyle{snumi}=[sommets, fill=black!2, %
%                    draw=black!50, text=black!50]  % sommet inactif
% \tikzstyle{snumj1i}=[snumi, fill=blue!5]  % sommets j1 inactif
% \tikzstyle{snumj2i}=[snumi, fill=red!5]  % sommets j2 inactif
% \tikzstyle{snumj1}=[draw, sommets, fill=blue!5]  % sommets j1
% \tikzstyle{snumj2}=[draw, sommets, fill=red!5]   % sommets j2
% \tikzstyle{snumj1a}=[sommets, draw=blue, text=blue, fill=blue!5]%sommets j1 actif
% \tikzstyle{snumj2a}=[sommets, draw=red, text=red, fill=blue!5] % sommets j2 actif
%   % style pour commentaire avec \pause (hack)
% \tikzstyle{txtcom}=[inner sep=0pt, fill=white, anchor=west]


\tikzstyle{trouBas}=[draw=blue, thick, fill=white, 
                  drop shadow={shadow scale=1.08, 
                               shadow xshift=.2ex, 
                               shadow yshift=-.2ex, 
                               fill=black, 
                               path fading={circle with fuzzy edge 15 percent},
                               opacity=.6},
                  minimum size=.85cm, 
                  circle]
\tikzstyle{trouHaut}=[draw=blue, thick, fill=white, 
                  drop shadow={shadow scale=1.1, 
                               shadow xshift=-.2ex, 
                               shadow yshift=.2ex, 
                               fill=white, 
                               path fading={circle with fuzzy edge 15 percent},
                               opacity=.6},
                  minimum size=.85cm, 
                  circle]
\tikzstyle{jetonBas}=[fill=yellow!70!red, 
                  drop shadow={shadow scale=1.1, 
                               shadow xshift=.1ex, 
                               shadow yshift=-.1ex, 
                               fill=white, 
                               path fading={circle with fuzzy edge 15 percent},
                               opacity=.7},
                  minimum size=.7cm, 
                  circle]
\tikzstyle{jetonHaut}=[fill=yellow!70!red, 
                  drop shadow={shadow scale=1.1, 
                               shadow xshift=-.1ex, 
                               shadow yshift=.1ex, 
                               fill=black, 
                               path fading={circle with fuzzy edge 15 percent},
                               opacity=.5},
                  minimum size=.7cm, 
                  circle]

\tikzstyle{jeton}=[fill=yellow!70!red,
                   minimum size=.81cm, 
                   circle]

\section*{Dessiner un puissance 4}
\subsection*{Exemple : 2D simple}

\begin{frame} 
\begin{tikzpicture}[baseline=4cm]
\path[xshift=-.5cm, yshift=-.54cm, fill=blue, draw=blue!25] (0,0) rectangle (7,6);
\foreach \x in {0,...,6}
 \foreach \y in {0,...,5}
  \node[trouBas] at (\x, \y) {};
\foreach \x in {0,...,6}
 \foreach \y in {0,...,5}
  \node[trouHaut] at (\x, \y) {};
\end{tikzpicture} 
\qquad
\begin{minipage}[t]{.35\linewidth}
On joue au puissance 4 : le but du jeu est d'aligner $4$ pion.
\end{minipage}
\end{frame}

\begin{frame} 
\begin{tikzpicture}[baseline=4cm]
\path[xshift=-.5cm, yshift=-.54cm, fill=blue, draw=blue!25] (0,0) rectangle (7,6);
\foreach \x in {0,...,6}
 \foreach \y in {0,...,5}
  \node[trouBas] at (\x, \y) {};
\foreach \x in {0,...,6}
 \foreach \y in {0,...,5}
  \node[trouHaut] at (\x, \y) {};
  \node  at (0,5)  {$3$};
  \node  at (1,5)  {$4$};
  \node  at (2,5)  {$5$};
  \node  at (3,5)  {$7$};
  \node  at (4,5)  {$5$};
  \node  at (5,5)  {$4$};
  \node  at (6,5)  {$3$};
  \node  at (0,4)  {$4$};
  \node  at (1,4)  {$6$};
  \node  at (2,4)  {$8$};
  \node  at (3,4)  {$10$};
  \node  at (4,4)  {$8$};
  \node  at (5,4)  {$6$};
  \node  at (6,4)  {$4$};
  \node  at (0,3)  {$5$};
  \node  at (1,3)  {$8$};
  \node  at (2,3)  {$11$};
  \node  at (3,3)  {$13$};
  \node  at (4,3)  {$11$};
  \node  at (5,3)  {$8$};
  \node  at (6,3)  {$5$};
  \node  at (0,2)  {$5$};
  \node  at (1,2)  {$8$};
  \node  at (2,2)  {$11$};
  \node  at (3,2)  {$13$};
  \node  at (4,2)  {$11$};
  \node  at (5,2)  {$8$};
  \node  at (6,2)  {$5$};
  \node  at (0,1)  {$4$};
  \node  at (1,1)  {$6$};
  \node  at (2,1)  {$8$};
  \node  at (3,1)  {$10$};
  \node  at (4,1)  {$8$};
  \node  at (5,1)  {$6$};
  \node  at (6,1)  {$4$};
  \node  at (0,0)  {$3$};
  \node  at (1,0)  {$4$};
  \node  at (2,0)  {$5$};
  \node  at (3,0)  {$7$};
  \node  at (4,0)  {$5$};
  \node  at (5,0)  {$4$};
  \node  at (6,0)  {$3$};
\end{tikzpicture} 
\qquad
\begin{minipage}[t]{.35\linewidth}
La valeur de chaque case est le nombre d'alignements possibles de 4
pions passant par cette case.\\
\pause
La valeur d'une position, pour le joueur $1$, est la somme des valeurs des
cases occupées par $J_1$, \pause
 moins la somme des valeurs des cases occupées par
$J_2$.
\end{minipage}
\end{frame}

\begin{frame} 
\begin{tikzpicture}[baseline=4cm]
\path[xshift=-.5cm, yshift=-.54cm, fill=blue, draw=blue!25] (0,0) rectangle (7,6);
\foreach \x in {0,...,6}
 \foreach \y in {0,...,5}
  \node[trouBas] at (\x, \y) {};
\foreach \x in {0,...,6}
 \foreach \y in {0,...,5}
  \node[trouHaut] at (\x, \y) {};
%% J1 joue en (3, 0), valeur 7
\node[jeton, fill=red] at (3, 0) {};
\node[jetonBas, fill=red] at (3, 0) {};
\node[jetonHaut, fill=red] at (3, 0) {};
  \node  at (0,5)  {$3$};
  \node  at (1,5)  {$4$};
  \node  at (2,5)  {$5$};
  \node  at (3,5)  {$7$};
  \node  at (4,5)  {$5$};
  \node  at (5,5)  {$4$};
  \node  at (6,5)  {$3$};
  \node  at (0,4)  {$4$};
  \node  at (1,4)  {$6$};
  \node  at (2,4)  {$8$};
  \node  at (3,4)  {$10$};
  \node  at (4,4)  {$8$};
  \node  at (5,4)  {$6$};
  \node  at (6,4)  {$4$};
  \node  at (0,3)  {$5$};
  \node  at (1,3)  {$8$};
  \node  at (2,3)  {$11$};
  \node  at (3,3)  {$13$};
  \node  at (4,3)  {$11$};
  \node  at (5,3)  {$8$};
  \node  at (6,3)  {$5$};
  \node  at (0,2)  {$5$};
  \node  at (1,2)  {$8$};
  \node  at (2,2)  {$11$};
  \node  at (3,2)  {$13$};
  \node  at (4,2)  {$11$};
  \node  at (5,2)  {$8$};
  \node  at (6,2)  {$5$};
  \node  at (0,1)  {$4$};
  \node  at (1,1)  {$6$};
  \node  at (2,1)  {$8$};
  \node  at (3,1)  {$10$};
  \node  at (4,1)  {$8$};
  \node  at (5,1)  {$6$};
  \node  at (6,1)  {$4$};
  \node  at (0,0)  {$3$};
  \node  at (1,0)  {$4$};
  \node  at (2,0)  {$5$};
  \node  at (3,0)  {$7$};
  \node  at (4,0)  {$5$};
  \node  at (5,0)  {$4$};
  \node  at (6,0)  {$3$};
\end{tikzpicture} 
\qquad
\begin{minipage}[t]{.35\linewidth}
La valeur d'une position, pour le joueur $1$, est la somme des valeurs des
cases occupées par $J_1$, moins la somme des valeurs des cases occupées par
$J_2$.\\
\pause
Ici, la position vaut $7$.
\end{minipage}
\end{frame}

\begin{frame} 
\begin{tikzpicture}[baseline=4cm]
\path[xshift=-.5cm, yshift=-.54cm, fill=blue, draw=blue!25] (0,0) rectangle (7,6);
\foreach \x in {0,...,6}
 \foreach \y in {0,...,5}
  \node[trouBas] at (\x, \y) {};
\foreach \x in {0,...,6}
 \foreach \y in {0,...,5}
  \node[trouHaut] at (\x, \y) {};
%% J1 joue en (3, 0), valeur 7
\node[jeton, fill=red] at (3, 0) {};
\node[jetonBas, fill=red] at (3, 0) {};
\node[jetonHaut, fill=red] at (3, 0) {};
%% J2 joue en (3, 1), valeur 10
\node[jeton] at (3, 1) {};
\node[jetonBas] at (3, 1) {};
\node[jetonHaut] at (3, 1) {};
  \node  at (0,5)  {$3$};
  \node  at (1,5)  {$4$};
  \node  at (2,5)  {$5$};
  \node  at (3,5)  {$7$};
  \node  at (4,5)  {$5$};
  \node  at (5,5)  {$4$};
  \node  at (6,5)  {$3$};
  \node  at (0,4)  {$4$};
  \node  at (1,4)  {$6$};
  \node  at (2,4)  {$8$};
  \node  at (3,4)  {$10$};
  \node  at (4,4)  {$8$};
  \node  at (5,4)  {$6$};
  \node  at (6,4)  {$4$};
  \node  at (0,3)  {$5$};
  \node  at (1,3)  {$8$};
  \node  at (2,3)  {$11$};
  \node  at (3,3)  {$13$};
  \node  at (4,3)  {$11$};
  \node  at (5,3)  {$8$};
  \node  at (6,3)  {$5$};
  \node  at (0,2)  {$5$};
  \node  at (1,2)  {$8$};
  \node  at (2,2)  {$11$};
  \node  at (3,2)  {$13$};
  \node  at (4,2)  {$11$};
  \node  at (5,2)  {$8$};
  \node  at (6,2)  {$5$};
  \node  at (0,1)  {$4$};
  \node  at (1,1)  {$6$};
  \node  at (2,1)  {$8$};
  \node  at (3,1)  {$10$};
  \node  at (4,1)  {$8$};
  \node  at (5,1)  {$6$};
  \node  at (6,1)  {$4$};
  \node  at (0,0)  {$3$};
  \node  at (1,0)  {$4$};
  \node  at (2,0)  {$5$};
  \node  at (3,0)  {$7$};
  \node  at (4,0)  {$5$};
  \node  at (5,0)  {$4$};
  \node  at (6,0)  {$3$};
\end{tikzpicture} 
\qquad
\begin{minipage}[t]{.35\linewidth}
La valeur d'une position, pour le joueur $1$, est la somme des valeurs des
cases occupées par $J_1$, moins la somme des valeurs des cases occupées par
$J_2$.\\
\pause
Ici, la position vaut $7-10 = -3$.
\end{minipage}
\end{frame}








\end{document}
%%% Local Variables:                                                            
%%% mode: latex                                                                 
%%% TeX-PDF-mode: t                                                             
%%% End:                                                                        




