specs fr
This commit is contained in:
parent
a159776681
commit
db5afc8c67
|
@ -32,9 +32,7 @@
|
|||
|
||||
<h3>Message vous demandant de jouer (seulement un tour)</h3>
|
||||
<p>L'arène vous envoie par exemple le message suivant:</p>
|
||||
<pre>
|
||||
{"game-id":"1126","action":"play-turn","game":"tictactoe","players":2,"board":{"0-0":"","0-1":"","0-2":"","1-0":"","1-1":"","1-2":"","2-0":"","2-1":"","2-2":""},"you":"X","player-index":0}
|
||||
</pre>
|
||||
<pre>{"game-id":"1126","action":"play-turn","game":"tictactoe","players":2,"board":{"0-0":"","0-1":"","0-2":"","1-0":"","1-1":"","1-2":"","2-0":"","2-1":"","2-2":""},"you":"X","player-index":0}</pre>
|
||||
<ul>
|
||||
<li><i>game-id</i> string identifiant la partie</li>
|
||||
<li><i>action</i> string identifiant la phase, <i>play-turn</i> tout de suite, qui vous indique que vous devez jouer</li>
|
||||
|
@ -45,94 +43,109 @@
|
|||
<li><i>player-index</i>int, L'ordre de votre bot dans les tours de jeu. Le premier joueur a la valeur 0, le deuxième 1.</li>
|
||||
</ul>
|
||||
<h4>la map</h4>
|
||||
|
||||
<p>Elle est représenté par un sous-tableau. Les index correspondent aux coordonnées x-y de la case. les valeurs peuvent être:</p>
|
||||
<ul>
|
||||
<li>Vide, personne n'a joué à cette case</li>
|
||||
<li>"X" ou "O", le joueur ayant ce symbole a déjà joué cette case.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Exemple de partie</h2>
|
||||
<pre>
|
||||
<pre class="arrenaMessage">
|
||||
{"game-id":"1126","action":"init","game":"tictactoe","players":2,"board":"","player-index":0}
|
||||
|
||||
</pre>
|
||||
<pre class="botResponse">
|
||||
{"name":"moul-tictactoe","play":null,"error":null}
|
||||
|
||||
</pre>
|
||||
<pre class="arrenaMessage">
|
||||
{"game-id":"1126","action":"init","game":"tictactoe","players":2,"board":"","player-index":1}
|
||||
|
||||
</pre>
|
||||
<pre class="botResponse">
|
||||
{"name":"moul-tictactoe","play":null,"error":null}
|
||||
|
||||
</pre>
|
||||
<pre class="arrenaMessage">
|
||||
{"game-id":"1126","action":"play-turn","game":"tictactoe","players":2,"board":{"0-0":"","0-1":"","0-2":"","1-0":"","1-1":"","1-2":"","2-0":"","2-1":"","2-2":""},"you":"X","player-index":0}
|
||||
|
||||
</pre>
|
||||
<pre class="botResponse">
|
||||
{"name":"","play":"0-1","error":null}
|
||||
|
||||
</pre>
|
||||
moul2 joue en 0-1 la nouvelle grille est
|
||||
X
|
||||
|
||||
|
||||
|
||||
<pre class="arrenaMessage">
|
||||
{"game-id":"1126","action":"play-turn","game":"tictactoe","players":2,"board":{"0-0":"","0-1":"X","0-2":"","1-0":"","1-1":"","1-2":"","2-0":"","2-1":"","2-2":""},"you":"O","player-index":1}
|
||||
|
||||
</pre>
|
||||
<pre class="botResponse">
|
||||
{"name":"","play":"1-1","error":null}
|
||||
|
||||
</pre>
|
||||
moul2 joue en 1-1 la nouvelle grille est
|
||||
X
|
||||
O
|
||||
|
||||
|
||||
<pre class="arrenaMessage">
|
||||
{"game-id":"1126","action":"play-turn","game":"tictactoe","players":2,"board":{"0-0":"","0-1":"X","0-2":"","1-0":"","1-1":"O","1-2":"","2-0":"","2-1":"","2-2":""},"you":"X","player-index":0}
|
||||
|
||||
</pre>
|
||||
<pre class="botResponse">
|
||||
{"name":"","play":"0-0","error":null}
|
||||
|
||||
</pre>
|
||||
moul2 joue en 0-0 la nouvelle grille est
|
||||
X X
|
||||
O
|
||||
|
||||
|
||||
<pre class="arrenaMessage">
|
||||
{"game-id":"1126","action":"play-turn","game":"tictactoe","players":2,"board":{"0-0":"X","0-1":"X","0-2":"","1-0":"","1-1":"O","1-2":"","2-0":"","2-1":"","2-2":""},"you":"O","player-index":1}
|
||||
|
||||
</pre>
|
||||
<pre class="botResponse">
|
||||
{"name":"","play":"0-2","error":null}
|
||||
|
||||
</pre>
|
||||
moul2 joue en 0-2 la nouvelle grille est
|
||||
X X O
|
||||
O
|
||||
|
||||
|
||||
<pre class="arrenaMessage">
|
||||
{"game-id":"1126","action":"play-turn","game":"tictactoe","players":2,"board":{"0-0":"X","0-1":"X","0-2":"O","1-0":"","1-1":"O","1-2":"","2-0":"","2-1":"","2-2":""},"you":"X","player-index":0}
|
||||
|
||||
</pre>
|
||||
<pre class="botResponse">
|
||||
{"name":"","play":"2-0","error":null}
|
||||
|
||||
</pre>
|
||||
moul2 joue en 2-0 la nouvelle grille est
|
||||
X X O
|
||||
O
|
||||
X
|
||||
|
||||
<pre class="arrenaMessage">
|
||||
{"game-id":"1126","action":"play-turn","game":"tictactoe","players":2,"board":{"0-0":"X","0-1":"X","0-2":"O","1-0":"","1-1":"O","1-2":"","2-0":"X","2-1":"","2-2":""},"you":"O","player-index":1}
|
||||
|
||||
</pre>
|
||||
<pre class="botResponse">
|
||||
{"name":"","play":"1-0","error":null}
|
||||
|
||||
</pre>
|
||||
moul2 joue en 1-0 la nouvelle grille est
|
||||
X X O
|
||||
O O
|
||||
X
|
||||
|
||||
<pre class="arrenaMessage">
|
||||
{"game-id":"1126","action":"play-turn","game":"tictactoe","players":2,"board":{"0-0":"X","0-1":"X","0-2":"O","1-0":"O","1-1":"O","1-2":"","2-0":"X","2-1":"","2-2":""},"you":"X","player-index":0}
|
||||
|
||||
</pre>
|
||||
<pre class="botResponse">
|
||||
{"name":"","play":"1-2","error":null}
|
||||
|
||||
</pre>
|
||||
moul2 joue en 1-2 la nouvelle grille est
|
||||
X X O
|
||||
O O X
|
||||
X
|
||||
|
||||
<pre class="arrenaMessage">
|
||||
{"game-id":"1126","action":"play-turn","game":"tictactoe","players":2,"board":{"0-0":"X","0-1":"X","0-2":"O","1-0":"O","1-1":"O","1-2":"X","2-0":"X","2-1":"","2-2":""},"you":"O","player-index":1}
|
||||
|
||||
</pre>
|
||||
<pre class="botResponse">
|
||||
{"name":"","play":"2-1","error":null}
|
||||
|
||||
</pre>
|
||||
moul2 joue en 2-1 la nouvelle grille est
|
||||
X X O
|
||||
O O X
|
||||
X O
|
||||
|
||||
<pre class="arrenaMessage">
|
||||
{"game-id":"1126","action":"play-turn","game":"tictactoe","players":2,"board":{"0-0":"X","0-1":"X","0-2":"O","1-0":"O","1-1":"O","1-2":"X","2-0":"X","2-1":"O","2-2":""},"you":"X","player-index":0}
|
||||
|
||||
</pre>
|
||||
<pre class="botResponse">
|
||||
{"name":"","play":"2-2","error":null}
|
||||
|
||||
</pre>
|
||||
moul2 joue en 2-2 la nouvelle grille est
|
||||
X X O
|
||||
O O X
|
||||
|
|
|
@ -2,4 +2,6 @@ td {min-width: 10px; height: 10px;}
|
|||
.cellj0{border-bottom: 1px dotted black;}
|
||||
.cellj2{border-top:1px dotted black;}
|
||||
.celli0{border-right:1px dotted black;}
|
||||
.celli2{border-left:1px dotted black;}
|
||||
.celli2{border-left:1px dotted black;}
|
||||
.arrenaMessage{color: green;}
|
||||
.botResponse{color: red;}
|
Loading…
Reference in New Issue
Block a user