From 3591aa7a4ab42e20ae0e15009eda01ee0874020d Mon Sep 17 00:00:00 2001 From: Gnieark Date: Sat, 4 Jun 2016 21:35:48 +0200 Subject: [PATCH] google translate sucks --- src/arenas/tictactoe/doc-en.html | 214 ++++++++++++++++++++++++++----- 1 file changed, 179 insertions(+), 35 deletions(-) diff --git a/src/arenas/tictactoe/doc-en.html b/src/arenas/tictactoe/doc-en.html index c2a66fb..55a9bcd 100644 --- a/src/arenas/tictactoe/doc-en.html +++ b/src/arenas/tictactoe/doc-en.html @@ -3,40 +3,184 @@ Do not trust the animated GIF of the site's home page.
It's the illustration of the overall operation of the arena, but it is wrong : the tictactoe only needs to send 10 variables to the bots.
The choice was therefore made to pass them by GET parameters and not by POST as shown in the animation. -

-

Requirements : GET variables and HTML return

-

- Your program does not have to manage a whole part of noughts and crosses, just one lap. -

-

- The arbitrator program (the arena) build a request as follows : -

-
-    https://votreUrl/?you=O&0-0=&0-1=O&0-2=X&1-0=X&1-1=X&1-2=O&2-0=O&2-1=&2-2=X
+
+

requests from BotsArena to your bot

+

To talk, botsarena (the server hosting botsarena) execute a POST request on your bot's http(s) server with the json as body

+

Your bot responds with a JSON array

+

Message initating the game

+ BotsArena sends: +
{"game-id":"1126","action":"init","game":"tictactoe","players":2,"board":"","player-index":0}
+

Explanation of each parameters:

+ +

Your bot should return his name JSON format:

+
+  {"name":"botName"}
+  
+ +

The arena currently does not check this response, the init step was included to ensure compatibility with Bolosseum . + If your bot returns a blank page at this step (action = init), it will work.

+

Message asking you to play (only one turn)

+

The Arena sends as example the following message:

+
{"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}
+ +

The map

+

It is represented by a sub-array. The index corresponds to x-y coordinates of the box. x and y are between 0 and 2. Vaues can be:

+ + +

Exemple de partie

+
+{"game-id":"1126","action":"init","game":"tictactoe","players":2,"board":"","player-index":0}
 
-

- The GET parameter "you" indicate what is your symbol in the noughts and crosses grid
- Classically : "X" or "O" -

-

- For each box of the noughts and crosses grid, a GET parameter corresponding to the coordinates ("0-0", "0-1", etc ...) is indicated to you.
- He can be : -

-