English subtitles

← 05-06 Hold And Roll

dummy description

Get Embed Code
1 Language

Showing Revision 1 created 05/13/2012 by Amara Bot.

  1. Now you're probably itching to write some code by now--so let's get started.
  2. What I want you to do first is write these two action functions, hold and role,
  3. which take a state and return a state.
  4. Here the state that results from holding.
  5. Here the state that results from rolling and getting a d.
  6. A state is represented by this four tuple of p, the player.
  7. It's either zero or one.
  8. The subsequent state would remain the same if the player continues
  9. and would swap between one and the other otherwise.
  10. Me and you, two integers indicating the score, the score of the player to play
  11. and the score of the other player, and then pending,
  12. which is score accumulated so far but not yet put onto the scoreboard.
  13. Go ahead and write those functions.