Cf. paper version, done in the Excel document. Probably outdated and incomplete.
Here is an example of a minimalistic full game scenario. We will split the phase in X :
- preparation
- game
- end
Player 1 create a game A Player 2 joins the game A Player 1 start the game A
This use case should cover all the different cases :
Server picks a random players to start. Player 2 starts Player 2 throws the dices Player 2 looose // case 1 : loose Player 1 turn Player 1 throws the dices Player 1 scores 300 Player 1 keep score // case 2 : direct score Player 2 turn Player 2 throws the dices Player 2 score 50 Player 2 choose to continue Player 2 throws the remaining dices Player 2 score 100 // case 3 : cumulative score Player 2 choose to continue Player 2 score 200 Player 2 throw the dices // special case player is forced to throw all the dices Player 2 loose ... etc...
Player 2 score > 5000 // last turn Player 1 turn Player 1 loose Server ends the game
- startGame
- John starts!
- timer player start
- activePLayer -> throwDices
- otherPlayers -> wait
- throwDice
- allPlayer -> watchDices
- score
- if dice score
- continue
- activePlayer -> chooseDices
- activePlayer -> throwDices
- otherPlayers -> wait
- keep score
- save score
- nextPlayer
- continue
- if dice score
- How to prevent player from cheating?
- Detect when player close the browser or switch off his smartphone
- Add CSS transitions with https://github.com/groupbuddies/meteor-bender
Added Mocha for automated testing. Cf http://mochajs.org and http://chaijs.com/api/assert for more info.
Uses the very nice dice-js & teal dice & teal dice src lib!