Bohnenspiel

API Documentation

[domain] = http://bohnenspiel.informatik.uni-mannheim.de/api

URI Operation Parameter Accept Effect
[domain]/creategame/ GET name e.g. 'Test' returns the gameid
[domain]/check/ GET gameid/name e.g. '1/Test' returns the state
  • 0: The game can be started
  • -1: It's your turn
  • -2: The game is finished
  • -3: It's not your turn
  • -4: Player 2 is missing
  • 1-12: The last move of your opponent
[domain]/opengames/ GET - - returns all game urls as a string (delimiter ';')
[domain]/joingame/ GET gameid/name e.g. '1/Test' returns the result
  • 0: Cannot enter the game
  • 1: successfully joined
[domain]/state/ GET gameid e.g. '1' returns state of the game
  • 0: waiting
  • 1: running
  • 2: finished
[domain]/statemsg/ GET gameid e.g. '1' returns a description/explanation of the current state (/api/state/)
[domain]/move/ GET gameid/name/fieldID e.g. '1/Test/6' returns nothing

Examples

create a game: [domain]/creategame/magic (magic is the name of the new game)
make a move: [domain]/move/magic/max/3 (max is your player name and '3' represents a valid bean-bowl (1-12))

Runnable Client

java client: Main.java
API Documentation