Skip to content

API Documentation for Game State

Jeffrey Leung edited this page Feb 2, 2019 · 1 revision

Get Current State

Description

Returns the current state of the game.

See the possible game states.

Request

Method

GET

Mapping

/gamestate

Response

Codes

HTTP Status Code Meanings
200 OK Retrieved game state successfully
500 Internal Server Error The server crapped itself

JSON body

{
	"state" : "INITIALIZING"
}

Example cURL call

Get Game Score

Description

Retrieves the current game score.

  • An eaten Pacdot is worth 10 points.
  • An eaten Powerdot is worth 50 points.
  • An eaten Ghost is worth 50 points.

Request

Method

GET

Mapping

/gamestate/score

Response

Codes

HTTP Status Code Meanings
200 OK Retrieved game score succesfully
500 Internal Server Error An error occurred which could not be resolved

JSON body

{
	"score" : 60
}

Example cURL call