%\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 %%%%%%%%%%%%%%%%%%%%%
\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]

\section*{Arène : le graphe du jeu}
\subsection*{Exemple : jeu de Chomp}

\begin{frame} 
%%%%%%%%%%%%%%%%%%%%% Arène %%%%%%%%%%%%%%%%%%%%%
\begin{center}
\begin{tikzpicture}[sgraphet]
 \begin{scope}[tablette, scale=0.25, yshift=24cm]
  % [3, 3]
  % □ □ □ 
  % ■ □ □ 
  \node[poison] at (0.5,0.5) {};
  \draw[step=1cm] (0, 0) grid (3, 2);
 \end{scope}
 \node[sommets] (s0) at (0.0+.37, 6.0+.25) {};

\pause
 \begin{scope}[tablette, scale=0.25, xshift=-12cm, yshift=18cm]
  % [3, 1]
  % □ 
  % ■ □ □ 
  \node[poison] at (0.5,0.5) {};
  \draw[step=1cm] (0, 0) grid (1, 2);
  \draw[step=1cm] (0, 0) grid (3, 1);
 \end{scope}
 \node[sommets] (s1) at (-3.0+.37, 4.5+.25) {};

 \path[->] (s0) edge (s1);
\pause
 \begin{scope}[tablette, scale=0.25, yshift=18cm]
  % [3, 2]
  % □ □ 
  % ■ □ □ 
  \node[poison] at (0.5,0.5) {};
  \draw[step=1cm] (0, 0) grid (2, 2);
  \draw[step=1cm] (0, 0) grid (3, 1);
 \end{scope}
 \node[sommets] (s2) at (0.0+.37, 4.5+.25) {};

 \path[->] (s0) edge (s2);
 \pause
 \path[->] (s2) edge (s1);
\pause
 \begin{scope}[tablette, scale=0.25, xshift=12cm, yshift=18cm]
  % [2, 2]
  % □ □ 
  % ■ □ 
  \node[poison] at (0.5,0.5) {};
  \draw[step=1cm] (0, 0) grid (2, 2);
 \end{scope}
 \node[sommets] (s3) at (3.0+.37, 4.5+.25) {};

 \path[->] (s0) edge (s3);
 \pause
 \path[->] (s2) edge (s3);
\pause
 \begin{scope}[tablette, scale=0.25, xshift=-6cm, yshift=12cm]
  % [3]
  % ■ □ □ 
  \node[poison] at (0.5,0.5) {};
  \draw[step=1cm] (0, 0) grid (3, 1);
 \end{scope}
 \node[sommets] (s4) at (-1.5+.37, 3.0+.25) {};

 \path[->] (s0) edge (s4);
 \pause
 \path[->] (s1) edge (s4);
 \pause
 \path[->] (s2) edge (s4);
\pause
 \begin{scope}[tablette, scale=0.25, xshift=6cm, yshift=12cm]
  % [1, 1]
  % □ 
  % ■ 
  \node[poison] at (0.5,0.5) {};
  \draw[step=1cm] (0, 0) grid (1, 2);
 \end{scope}
 \node[sommets] (s5) at (1.5+.37, 3.0+.25) {};

 \path[->] (s0) edge (s5);
 \pause
 \path[->] (s1) edge (s5);
 \pause
 \path[->] (s2) edge (s5);
 \pause
 \path[->] (s3) edge (s5);
\pause
 \begin{scope}[tablette, scale=0.25, xshift=-12cm, yshift=6cm]
  % [2, 1]
  % □ 
  % ■ □ 
  \node[poison] at (0.5,0.5) {};
  \draw[step=1cm] (0, 0) grid (1, 2);
  \draw[step=1cm] (0, 0) grid (2, 1);
 \end{scope}
 \node[sommets] (s6) at (-3.0+.37, 1.5+.25) {};

 \path[->] (s1) edge (s6);
 \pause
 \path[->] (s3) edge (s6);
 \pause
 \path[->] (s6) edge (s5);
\pause
 \begin{scope}[tablette, scale=0.25, xshift=12cm, yshift=6cm]
  % [2]
  % ■ □ 
  \node[poison] at (0.5,0.5) {};
  \draw[step=1cm] (0, 0) grid (2, 1);
 \end{scope}
 \node[sommets] (s7) at (3.0+.37, 1.5+.25) {};

 \path[->] (s3) edge (s7);
 \pause
 \path[->] (s4) edge (s7);
 \pause
 \path[->] (s6) edge (s7);
\pause
 \begin{scope}[tablette, scale=0.25]
  % [1]
  % ■ 
  \node[poison] at (0.5,0.5) {};
  \draw[step=1cm] (0, 0) grid (1, 1);
 \end{scope}
 \node[sommets] (s8) at (0.0+.37, 0.0+.25) {};

 \path[->] (s4) edge (s8);
 \pause
 \path[->] (s5) edge (s8);
 \pause
 \path[->] (s7) edge (s8);
\pause % sommets dans $\N$
 \node[snum] at (s0) {$0$};
\pause
 \node[snum] at (s1) {$1$};
\pause
 \node[snum] at (s2) {$2$};
\pause
 \node[snum] at (s3) {$3$};
\pause
 \node[snum] at (s4) {$4$};
\pause
 \node[snum] at (s5) {$5$};
\pause
 \node[snum] at (s6) {$6$};
\pause
 \node[snum] at (s7) {$7$};
\pause
 \node[snum] at (s8) {$8$};
\end{tikzpicture} 
\end{center}
\end{frame}


\begin{frame} 
%%%%%%%%%%%%%%%%%%%%% Graphe biparti %%%%%%%%%%%%%%%%%%%%%
\begin{center}
\begin{tikzpicture}[sgraphe, scale=.7]
 \node[sommets] (s0) at (0.0+.37, 6.0+.25) {};
 \node[sommets] (s1) at (-3.0+.37, 4.5+.25) {};
 \path[->] (s0) edge (s1);
 \node[sommets] (s2) at (0.0+.37, 4.5+.25) {};
 \path[->] (s0) edge (s2);
 \path[->] (s2) edge (s1);
 \node[sommets] (s3) at (3.0+.37, 4.5+.25) {};
 \path[->] (s0) edge (s3);
 \path[->] (s2) edge (s3);
 \node[sommets] (s4) at (-1.5+.37, 3.0+.25) {};
 \path[->] (s0) edge (s4); 
 \path[->] (s1) edge (s4); 
 \path[->] (s2) edge (s4); 
\node[sommets] (s5) at (1.5+.37, 3.0+.25) {};
 \path[->] (s0) edge (s5); 
 \path[->] (s1) edge (s5); 
 \path[->] (s2) edge (s5); 
 \path[->] (s3) edge (s5);
 \node[sommets] (s6) at (-3.0+.37, 1.5+.25) {};
 \path[->] (s1) edge (s6); 
 \path[->] (s3) edge (s6); 
 \path[->] (s6) edge (s5);
 \node[sommets] (s7) at (3.0+.37, 1.5+.25) {};
 \path[->] (s3) edge (s7);
  \path[->] (s4) edge (s7);
  \path[->] (s6) edge (s7);
 \node[sommets] (s8) at (0.0+.37, 0.0+.25) {};
 \path[->] (s4) edge (s8);
  \path[->] (s5) edge (s8);
  \path[->] (s7) edge (s8);
  % Sommets dans $\N$
 \node[snum] at (s0) {$0$};
 \node[snum] at (s1) {$1$};
 \node[snum] at (s2) {$2$};
 \node[snum] at (s3) {$3$};
 \node[snum] at (s4) {$4$};
 \node[snum] at (s5) {$5$};
 \node[snum] at (s6) {$6$};
 \node[snum] at (s7) {$7$};
 \node[snum] at (s8) {$8$};
\pause
%%%%%%% Initialisation: sommets du graphe biparti %%%%%%%
\node[txtcom] at (-3, -1) {Reprenons les sommets de l'arène (graphe précédent).};
\pause
\node[snumi]   (0a)  at (12,9.1)  {$0$\hphantom{$_a$}};
\node[snumi]   (1a)   at   (12, 7.8)   {$1$\hphantom{$_a$}};
\node[snumi]   (2a)   at   (12, 6.5)   {$2$\hphantom{$_a$}};
\node[snumi]   (3a)   at   (12, 5.2)   {$3$\hphantom{$_a$}};
\node[snumi]   (4a)   at   (12, 3.9)   {$4$\hphantom{$_a$}};
\node[snumi]   (5a)   at   (12, 2.6)   {$5$\hphantom{$_a$}};
\node[snumi]   (6a)   at   (12, 1.3)   {$6$\hphantom{$_a$}};
\node[snumi]   (7a)   at   (12, 0.0)   {$7$\hphantom{$_a$}};
\node[snumi]   (8a)   at   (12, -1.3)  {$8$\hphantom{$_a$}};
\pause
\node[txtcom] at (-3, -1.7) {Dédoublons-les,};
\pause
\node[snumi]   (0b)   at   (18, 9.1)   {$0$\hphantom{$_b$}};
\node[snumi]   (1b)   at   (18, 7.8)   {$1$\hphantom{$_b$}};
\node[snumi]   (2b)   at   (18, 6.5)   {$2$\hphantom{$_b$}};
\node[snumi]   (3b)   at   (18, 5.2)   {$3$\hphantom{$_b$}};
\node[snumi]   (4b)   at   (18, 3.9)   {$4$\hphantom{$_b$}};
\node[snumi]   (5b)   at   (18, 2.6)   {$5$\hphantom{$_b$}};
\node[snumi]   (6b)   at   (18, 1.3)   {$6$\hphantom{$_b$}};
\node[snumi]   (7b)   at   (18, 0.0)   {$7$\hphantom{$_b$}};
\node[snumi]   (8b)   at   (18, -1.3)   {$8$\hphantom{$_b$}};
\pause
\node[txtcom] at (-3, -1.7) {Dédoublons-les, selon le joueur qui les contrôle: };
\pause
\node[txtcom] at (-3, -1.7) {Dédoublons-les, selon le joueur qui les contrôle: $J_1$};
\pause
% Légende :
  \node[label={left:Positions contrôlées\hphantom{$J_1$:}}]   ()  at (10,7.5)
  {\hphantom{a}};
\pause
  \node[snumj1, label={left:par $J_1$:}]   ()  at (10,6.5)  {};
\pause
\node[snumj1i]   (0a)   at   (12, 9.1)   {$0_a$};
\node[snumj1i]   (1a)   at   (12, 7.8)   {$1_a$};
\node[snumj1i]   (2a)   at   (12, 6.5)   {$2_a$};
\node[snumj1i]   (3a)   at   (12, 5.2)   {$3_a$};
\node[snumj1i]   (4a)   at   (12, 3.9)   {$4_a$};
\node[snumj1i]   (5a)   at   (12, 2.6)   {$5_a$};
\node[snumj1i]   (6a)   at   (12, 1.3)   {$6_a$};
\node[snumj1i]   (7a)   at   (12, 0.0)   {$7_a$};
\node[snumj1i]   (8a)   at   (12, -1.3)   {$8_a$};
\pause
\node[txtcom] at (-3, -1.7) {Dédoublons-les, selon le joueur qui les contrôle:  $J_1$ ou $J_2$.};
% Légende :
  \node[snumj2, label={left:par $J_2$:}]   ()  at (10,5.5)  {$ $};
\pause
\node[snumj2i]   (0b)   at   (18, 9.1)   {$0_b$};
\node[snumj2i]   (1b)   at   (18, 7.8)   {$1_b$};
\node[snumj2i]   (2b)   at   (18, 6.5)   {$2_b$};
\node[snumj2i]   (3b)   at   (18, 5.2)   {$3_b$};
\node[snumj2i]   (4b)   at   (18, 3.9)   {$4_b$};
\node[snumj2i]   (5b)   at   (18, 2.6)   {$5_b$};
\node[snumj2i]   (6b)   at   (18, 1.3)   {$6_b$};
\node[snumj2i]   (7b)   at   (18, 0.0)   {$7_b$};
\node[snumj2i]   (8b)   at   (18, -1.3)   {$8_b$};
\pause  % On efface les commentaires précédents
\node[txtcom, inner sep=1pt] at (-3, -1) {\phantom{Reprenons les sommets de l'arène (graphe précédent)}};
\node[txtcom, inner sep=1pt] at (-3, -1.7) {\phantom{Dédoublons-les, selon le joueur qui les contrôle:  $J_1$ ou $J_2$.}};
\pause
%%%%%%% Flèches du graphe biparti %%%%%%%
\node[txtcom, anchor=north west, text width=4.5cm] at (4.4, 3) {Construction des flèches: };
\pause
\node[txtcom, anchor=north west, text width=4.6cm] at (4.4, 3) {Construction
  des flèches: un {\em parcours en profondeur} de l'arène.};
\pause
%%%% Flèche depuis 0a %%%%
\node[txtcom] at (-3, -1) {$J_1$ joue depuis $0$};
\pause
 \node[snumj1plus] at (s0) {$0$};
 \node[snumj1a] at (0a) {$0_a$};
\pause
\node[txtcom] at (-3, -1) {$J_1$ joue depuis $0$ vers $1$.};
%\begin{pgfonlayer}{background} cap=round,
  \draw[flj1] (s0) to (s1) ;
 \node[snumj2plus] at (s1) {$1$};
%\end{pgfonlayer}
  \draw[->] (0a) to (1b) ;
 \node[snumj2] at (1b) {$1_b$};
% \pause
%   \node[txtcom] at (-3, -1) {Flèches : $J_1$ joue depuis $0$ vers $1$, $2$};
%   \draw[flj1] (s0) to (s2) ;
%  \node[snumj2plus] at (s2) {$2$};
%   \draw[->] (0a) to (2b) ;
%  \node[snumj2] at (2b) {$2_b$};
%%%% Flèche depuis 1b %%%%
\pause
%\node[txtcom, inner sep=1pt] at (-3, -1) {\phantom{$J_1$ joue depuis $0$ vers $1$.}};
\node[txtcom] at (-3, -1.7) {$J_2$ joue depuis $1$};
 \node[snumj2a] at (1b) {$1_b$};
\pause
\node[txtcom] at (-3, -1.7) {$J_2$ joue depuis $1$ vers $4$.};


% flèches soulignées.
\pause  % On efface les commentaires précédents
\node[txtcom, inner sep=1pt] at (-3, -1) {\phantom{Reprenons les sommets de l'arène (graphe précédent)}};
\node[txtcom, inner sep=1pt] at (-3, -1.7) {\phantom{Dédoublons-les, selon le joueur qui les contrôle:  $J_1$ ou $J_2$.}};
\pause
  \node[txtcom] at (-3, -1) {On efface les sommets non atteints:};
\pause
  \node[txtcom] at (-3, -1) {On efface les sommets non atteints: $0_b$};
  \node[sommets, fill=white] at (0b) {\phantom{$10_b$}};
\pause
  \node[txtcom] at (-3, -1) {On efface les sommets non atteints: $0_b$ et
    $2_a$.}; 
  \node[sommets, fill=white] at (2a) {\phantom{$10_b$}};
\end{tikzpicture} 
\end{center}
\end{frame}






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




