General information:
- Card deck is 52 cards. Suits - diamonds, hearts, spades, clubs. Each suit has cards values from 2 two ACE. Each face card has value of ten.
- Each time server takes card from card deck, card deck size is reduced.
- When card deck becomes empty game is over.
- Cards in the deck must be shuffled.
Game flow:
- Server must have startup option to be started in automated or manual mode:
- automatic mode. Server will automatically control game flow as described below
- manual mode. Server will accept commands from command line.
- Command 1 - Start round. Mandatory parameter - base card. Server will send this card to player.
- Command 2 - Finish round. Mandatory parameter - result card. Server will use this to calculate win and send result to player.
- When round is started server sends to player StartRoundRequest. Client must display base card from StartRoundRequest.
- Client has 10 seconds to make an action. During this time player has a choice of three actions - 'higher', 'lower' or 'equal'.
- Client must display countdown values to player.
- When countdown reaches zero client stops accepting actions
- If player does not make an action, go to point 7
- Server checks internally player action and compares base card value to result card. - If player action was correct, player wins - If player action was incorrect, player loses
- Server sends FinishRoundRequest to client
- Client must display win result to player
- Previous result card became new 'base card'
- Repeat steps 1 to 10.