There should be a button with the text "Create new game" or similar at the root path, which calls the server endpoint /new-game. This endpoint is used to create a new game of hit or miss.
After pressing this button in the UI, the new game's creator should be redirected to a page such as /game/w2eguang3ydfp/lobby where "w2eguang3ydfp" is the unique id of the game. A game id is a base32-encoded random Java long, generated by the server.
The game's creator will be henceforth referred to as the "host" of the game. In future iterations, the role of host may be held by multiple participants in a game, so keep that in mind. For now though, there is no need to ensure that a game can have multiple hosts.
The page that users are redirected to will be known as the "pre-game lobby", or just "lobby". As development progresses, the lobby will become the place where the host can configure the game, admit new players into the game, and start the game. Initially, the lobby is a mostly empty web page with a "Start game" button that does nothing.
There should be a button with the text "Create new game" or similar at the root path, which calls the server endpoint
/new-game
. This endpoint is used to create a new game of hit or miss.After pressing this button in the UI, the new game's creator should be redirected to a page such as
/game/w2eguang3ydfp/lobby
where "w2eguang3ydfp" is the unique id of the game. A game id is a base32-encoded random Javalong
, generated by the server.The game's creator will be henceforth referred to as the "host" of the game. In future iterations, the role of host may be held by multiple participants in a game, so keep that in mind. For now though, there is no need to ensure that a game can have multiple hosts.
The page that users are redirected to will be known as the "pre-game lobby", or just "lobby". As development progresses, the lobby will become the place where the host can configure the game, admit new players into the game, and start the game. Initially, the lobby is a mostly empty web page with a "Start game" button that does nothing.
Review
https://github.com/codeday-hom/hit-or-miss/pull/21
Tests
<< Name of test classes / files containing test code >>