commit | 1d592026770847ac93fda5817bd0897c72ffffed | [log] [tgz] |
---|---|---|
author | Dw <lo.dawid@gmail.com> | Tue Mar 18 00:26:16 2014 +0100 |
committer | Dw <lo.dawid@gmail.com> | Tue Mar 18 00:26:16 2014 +0100 |
tree | d0801fe355cdf5ec05efc3a924d7fa3838936310 | |
parent | f3e48d5264a25fc499d04bcd17f19d7395b2ed77 [diff] |
refacto: renaming variables and functions
______ _ _ _ _ _ | ___ \ | | | | | | | | (_) | |_/ / __ _| |_| |_| | ___ ___| |__ _ _ __ | ___ \/ _` | __| __| |/ _ \/ __| '_ \| | '_ \ | |_/ / (_| | |_| |_| | __/\__ \ | | | | |_) | \____/ \__,_|\__|\__|_|\___||___/_| |_|_| .__/ | | ______ ______ ______ |_| |______|______|______|
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