specs
This commit is contained in:
parent
edaa05ab90
commit
a53303f279
|
@ -74,33 +74,25 @@ Chaque navire est défini par les coordonnées de ses extrémités.</p>
|
||||||
<li>Les entiers; ordonnée et abscisses définissant un point sont séparés d'une virgule ",".</li>
|
<li>Les entiers; ordonnée et abscisses définissant un point sont séparés d'une virgule ",".</li>
|
||||||
<li>Les deux points définissant les extrémités d'un navire sont séparés par un tiret "-".</li>
|
<li>Les deux points définissant les extrémités d'un navire sont séparés par un tiret "-".</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h4>Exemple:</h4>
|
<h4>Exemple de placement de 5 bateaux tailles respectives 5, 4, 3, 3, 2 cases:</h4>
|
||||||
<pre>
|
<pre>
|
||||||
["3,3-3,7","2,1-2,4","0,1-0,3","7,3-7,1","8,8-7,8"]
|
["3,3-3,7","2,1-2,4","0,1-0,3","7,3-7,1","8,8-7,8"]
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<p>Bien évidemment si vos bateaux se chevauchent, ou si leur nombre et leur longueur ne correspond pas à la demande de l'arène, vous perdez la partie</p>
|
||||||
|
<p>L'ordre des bateaux n'a pas d'importance. De la même manière, pour un bateau l'ordre de ses points n'importe pas non plus.</p>
|
||||||
|
<p>Vu sur la grille, l'exemple précédent donnerait:</p>
|
||||||
<table class="battleshipGrid nofloat" id="tbl1">
|
<table class="battleshipGrid nofloat" id="tbl1">
|
||||||
<tr><td></td><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td></tr>
|
<tr><td></td><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td></tr>
|
||||||
<tr><td>0</td><td class="empty" id="bot1-0-0"></td><td class="shipOn" id="bot1-0-1"></td><td class="empty" id="bot1-0-2"></td><td class="empty" id="bot1-0-3"></td><td class="empty" id="bot1-0-4"></td><td class="empty" id="bot1-0-5"></td><td class="empty" id="bot1-0-6"></td><td class="empty" id="bot1-0-7"></td><td class="empty" id="bot1-0-8"></td><td class="empty" id="bot1-0-9"></td></tr>
|
<tr><td>0</td><td class="empty" id="bot1-0-0"></td><td class="shipOn" id="bot1-0-1"></td><td class="shipOn" id="bot1-0-2"></td><td class="shipOn" id="bot1-0-3"></td><td class="empty" id="bot1-0-4"></td><td class="empty" id="bot1-0-5"></td><td class="empty" id="bot1-0-6"></td><td class="empty" id="bot1-0-7"></td><td class="empty" id="bot1-0-8"></td><td class="empty" id="bot1-0-9"></td></tr>
|
||||||
<tr><td>1</td><td class="empty" id="bot1-1-0"></td><td class="shipOn" id="bot1-1-1"></td><td class="empty" id="bot1-1-2"></td><td class="empty" id="bot1-1-3"></td><td class="empty" id="bot1-1-4"></td><td class="empty" id="bot1-1-5"></td><td class="empty" id="bot1-1-6"></td><td class="empty" id="bot1-1-7"></td><td class="empty" id="bot1-1-8"></td><td class="empty" id="bot1-1-9"></td></tr>
|
<tr><td>1</td><td class="empty" id="bot1-1-0"></td><td class="empty" id="bot1-1-1"></td><td class="empty" id="bot1-1-2"></td><td class="empty" id="bot1-1-3"></td><td class="empty" id="bot1-1-4"></td><td class="empty" id="bot1-1-5"></td><td class="empty" id="bot1-1-6"></td><td class="empty" id="bot1-1-7"></td><td class="empty" id="bot1-1-8"></td><td class="empty" id="bot1-1-9"></td></tr>
|
||||||
<tr><td>2</td><td class="empty" id="bot1-2-0"></td><td class="shipOn" id="bot1-2-1"></td><td class="empty" id="bot1-2-2"></td><td class="empty" id="bot1-2-3"></td><td class="empty" id="bot1-2-4"></td><td class="empty" id="bot1-2-5"></td><td class="empty" id="bot1-2-6"></td><td class="empty" id="bot1-2-7"></td><td class="empty" id="bot1-2-8"></td><td class="empty" id="bot1-2-9"></td></tr>
|
<tr><td>2</td><td class="empty" id="bot1-2-0"></td><td class="shipOn" id="bot1-2-1"></td><td class="shipOn" id="bot1-2-2"></td><td class="shipOn" id="bot1-2-3"></td><td class="shipOn" id="bot1-2-4"></td><td class="empty" id="bot1-2-5"></td><td class="empty" id="bot1-2-6"></td><td class="empty" id="bot1-2-7"></td><td class="empty" id="bot1-2-8"></td><td class="empty" id="bot1-2-9"></td></tr>
|
||||||
<tr><td>3</td><td class="empty" id="bot1-3-0"></td><td class="shipOn" id="bot1-3-1"></td><td class="empty" id="bot1-3-2"></td><td class="empty" id="bot1-3-3"></td><td class="empty" id="bot1-3-4"></td><td class="empty" id="bot1-3-5"></td><td class="empty" id="bot1-3-6"></td><td class="empty" id="bot1-3-7"></td><td class="empty" id="bot1-3-8"></td><td class="empty" id="bot1-3-9"></td></tr>
|
<tr><td>3</td><td class="empty" id="bot1-3-0"></td><td class="empty" id="bot1-3-1"></td><td class="empty" id="bot1-3-2"></td><td class="shipOn" id="bot1-3-3"></td><td class="shipOn" id="bot1-3-4"></td><td class="shipOn" id="bot1-3-5"></td><td class="shipOn" id="bot1-3-6"></td><td class="shipOn" id="bot1-3-7"></td><td class="empty" id="bot1-3-8"></td><td class="empty" id="bot1-3-9"></td></tr>
|
||||||
<tr><td>4</td><td class="empty" id="bot1-4-0"></td><td class="empty" id="bot1-4-1"></td><td class="shipOn" id="bot1-4-2"></td><td class="shipOn" id="bot1-4-3"></td><td class="empty" id="bot1-4-4"></td><td class="empty" id="bot1-4-5"></td><td class="empty" id="bot1-4-6"></td><td class="empty" id="bot1-4-7"></td><td class="empty" id="bot1-4-8"></td><td class="empty" id="bot1-4-9"></td></tr>
|
<tr><td>4</td><td class="empty" id="bot1-4-0"></td><td class="empty" id="bot1-4-1"></td><td class="empty" id="bot1-4-2"></td><td class="empty" id="bot1-4-3"></td><td class="empty" id="bot1-4-4"></td><td class="empty" id="bot1-4-5"></td><td class="empty" id="bot1-4-6"></td><td class="empty" id="bot1-4-7"></td><td class="empty" id="bot1-4-8"></td><td class="empty" id="bot1-4-9"></td></tr>
|
||||||
<tr><td>5</td><td class="empty" id="bot1-5-0"></td><td class="empty" id="bot1-5-1"></td><td class="empty" id="bot1-5-2"></td><td class="empty" id="bot1-5-3"></td><td class="empty" id="bot1-5-4"></td><td class="empty" id="bot1-5-5"></td><td class="empty" id="bot1-5-6"></td><td class="empty" id="bot1-5-7"></td><td class="empty" id="bot1-5-8"></td><td class="empty" id="bot1-5-9"></td></tr>
|
<tr><td>5</td><td class="empty" id="bot1-5-0"></td><td class="empty" id="bot1-5-1"></td><td class="empty" id="bot1-5-2"></td><td class="empty" id="bot1-5-3"></td><td class="empty" id="bot1-5-4"></td><td class="empty" id="bot1-5-5"></td><td class="empty" id="bot1-5-6"></td><td class="empty" id="bot1-5-7"></td><td class="empty" id="bot1-5-8"></td><td class="empty" id="bot1-5-9"></td></tr>
|
||||||
<tr><td>6</td><td class="empty" id="bot1-6-0"></td><td class="empty" id="bot1-6-1"></td><td class="empty" id="bot1-6-2"></td><td class="shipOn" id="bot1-6-3"></td><td class="shipOn" id="bot1-6-4"></td><td class="shipOn" id="bot1-6-5"></td><td class="empty" id="bot1-6-6"></td><td class="empty" id="bot1-6-7"></td><td class="empty" id="bot1-6-8"></td><td class="empty" id="bot1-6-9"></td></tr>
|
<tr><td>6</td><td class="empty" id="bot1-6-0"></td><td class="empty" id="bot1-6-1"></td><td class="empty" id="bot1-6-2"></td><td class="empty" id="bot1-6-3"></td><td class="empty" id="bot1-6-4"></td><td class="empty" id="bot1-6-5"></td><td class="empty" id="bot1-6-6"></td><td class="empty" id="bot1-6-7"></td><td class="empty" id="bot1-6-8"></td><td class="empty" id="bot1-6-9"></td></tr>
|
||||||
<tr><td>7</td><td class="empty" id="bot1-7-0"></td><td class="empty" id="bot1-7-1"></td><td class="empty" id="bot1-7-2"></td><td class="empty" id="bot1-7-3"></td><td class="empty" id="bot1-7-4"></td><td class="empty" id="bot1-7-5"></td><td class="empty" id="bot1-7-6"></td><td class="empty" id="bot1-7-7"></td><td class="empty" id="bot1-7-8"></td><td class="empty" id="bot1-7-9"></td></tr>
|
<tr><td>7</td><td class="empty" id="bot1-7-0"></td><td class="shipOn" id="bot1-7-1"></td><td class="shipOn" id="bot1-7-2"></td><td class="shipOn" id="bot1-7-3"></td><td class="empty" id="bot1-7-4"></td><td class="empty" id="bot1-7-5"></td><td class="empty" id="bot1-7-6"></td><td class="empty" id="bot1-7-7"></td><td class="shipOn" id="bot1-7-8"></td><td class="empty" id="bot1-7-9"></td></tr>
|
||||||
<tr><td>8</td><td class="empty" id="bot1-8-0"></td><td class="empty" id="bot1-8-1"></td><td class="empty" id="bot1-8-2"></td><td class="empty" id="bot1-8-3"></td><td class="empty" id="bot1-8-4"></td><td class="empty" id="bot1-8-5"></td><td class="empty" id="bot1-8-6"></td><td class="empty" id="bot1-8-7"></td><td class="empty" id="bot1-8-8"></td><td class="empty" id="bot1-8-9"></td></tr>
|
<tr><td>8</td><td class="empty" id="bot1-8-0"></td><td class="empty" id="bot1-8-1"></td><td class="empty" id="bot1-8-2"></td><td class="empty" id="bot1-8-3"></td><td class="empty" id="bot1-8-4"></td><td class="empty" id="bot1-8-5"></td><td class="empty" id="bot1-8-6"></td><td class="empty" id="bot1-8-7"></td><td class="shipOn" id="bot1-8-8"></td><td class="empty" id="bot1-8-9"></td></tr>
|
||||||
<tr><td>9</td><td class="empty" id="bot1-9-0"></td><td class="empty" id="bot1-9-1"></td><td class="empty" id="bot1-9-2"></td><td class="empty" id="bot1-9-3"></td><td class="empty" id="bot1-9-4"></td><td class="empty" id="bot1-9-5"></td><td class="empty" id="bot1-9-6"></td><td class="empty" id="bot1-9-7"></td><td class="empty" id="bot1-9-8"></td><td class="empty" id="bot1-9-9"></td></tr>
|
<tr><td>9</td><td class="empty" id="bot1-9-0"></td><td class="empty" id="bot1-9-1"></td><td class="empty" id="bot1-9-2"></td><td class="empty" id="bot1-9-3"></td><td class="empty" id="bot1-9-4"></td><td class="empty" id="bot1-9-5"></td><td class="empty" id="bot1-9-6"></td><td class="empty" id="bot1-9-7"></td><td class="empty" id="bot1-9-8"></td><td class="empty" id="bot1-9-9"></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<p>largeur; 10, hauteur 10; 3 bateaux:</p>
|
|
||||||
<ul>
|
|
||||||
<li>Bateau de 4 cases ayant pour extrémités 1,0 et 1,3. sera noté "1,0-1,3" ou "1,3-1,0"</li>
|
|
||||||
<li>Bateau de 2 cases ayant pour extrémités 2,4 et 3,4. sera noté "2,4-3,4" ou "3,4-2,4"</li>
|
|
||||||
<li>Bateau de 3 cases ayant pour extrémités 3,6 et 5,6. sera noté "3,6-5,6" ou "5,6-3,6"</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>Pour placer ces 3 bateaux, vous devez retourner au format JSON le tableau suivant:</p>
|
|
||||||
<pre>
|
|
||||||
["1,0-1,3","2,4-3,4","3,6-5,6"]
|
|
||||||
</pre>
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user