commit | 433e35e013bc95ba91641941e44ad0d7351edeb6 | [log] [tgz] |
---|---|---|
author | Dw <lo.dawid@gmail.com> | Thu Mar 20 01:43:27 2014 +0100 |
committer | Dw <lo.dawid@gmail.com> | Thu Mar 20 01:43:27 2014 +0100 |
tree | 23296aaa4a15eef555fd526a73941dce58df8805 | |
parent | 02c16dba68da18f1844eb824482063575b725a92 [diff] |
doc: reformatting documentation
______ _ _ _ _ _ | ___ \ | | | | | | | | (_) | |_/ / __ _| |_| |_| | ___ ___| |__ _ _ __ | ___ \/ _` | __| __| |/ _ \/ __| '_ \| | '_ \ | |_/ / (_| | |_| |_| | __/\__ \ | | | | |_) | \____/ \__,_|\__|\__|_|\___||___/_| |_|_| .__/ | | ______ ______ ______ |_| |______|______|______|
This game targets all developers, no matter the language they use. The idea behind is to make each developer write small programs and get challenged against other developers.
It's a contest game. To win, players must shoot as much enemies as they can. NB: They are not shooting each others !!!
To play this game you must know about:
The Battleship game is based on a REST client-server architecture. The server side is already developed and hosts the game logic. It is available at this url: http://battleship.dwlo.cloudbees.net. So all your requests will address that server.
This part is at your charge. You have to code your own REST client using the following APIs:
This request is made once per game play and shared with other players as game identifier.
Method : POST
URI : /games
RESPONSE :
{ "game-id": "32060218-5c1b-4b00-8b11-be49b1479c89" }
Method : PUT
URI : /games/game-id/players/player-id/fire
RESPONSE :
{ "fire-status": "success|failure", "game-status": "running|over", "score": { "D": 1, "L": 1 } }
Method : GET
URI : /games/game-id/battlefield
RESPONSE :
-|-|-|-|- -|D|-|-|- -|-|-|L|- -|-|-|-|- -|-|-|-|-
This is a sample to quickly test the game and write your own client. Once done you can share your implementation and send me a pull request. Find the BASH REST client here How to play ? Fetch the repository, go to the bin directory and execute the battleship-client