diff --git a/README.md b/README.md index 6d9e00a..59b493e 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,35 @@ - Move timeout: 10s. Game is finished if timeout ocurrs. +## Game States + +```plantuml +hide empty description + +state "Start Game" as StartGame +state "Move" as MovePlayer: Destination reached? +state "Destination Reached" as DestinationReached +state "Product Selection" as ProductSelection: Enable product selection for winning player +state "Product Selected" as ProductSelected +state "Selection Timeout" as SelectionTimeout +state "End Player's Game" as EndPlayer +state "Lock Game" as LockGame <> +state "End Game" as EndGame <> +state "Unlock game" as UnlockGame <> + +[*] -> StartGame +StartGame -> MovePlayer +MovePlayer <-- MovePlayer: NO +MovePlayer --> DestinationReached: YES +DestinationReached --> ProductSelection +DestinationReached -> LockGame: Lock game for all other players +ProductSelection --> ProductSelected +ProductSelection --> SelectionTimeout +ProductSelected --> EndGame: End game\nfor all players +SelectionTimeout -> EndPlayer +EndPlayer --> UnlockGame: Unlock game\n for all players +``` + ## FairHopper Game Server Requirements: @@ -137,7 +166,7 @@ end - Move right - Move up - Move down -- Get current position +- Get player info - Get board info Check REST API interface on [FastAPI docs](http://localhost:8010/docs).