![]() Stream = new FileStream(kDATA_FILE, FileMode.Open) įor ( int i=count i ![]() Each overrides OnPaint() for its custom display. Supporting the main form are two custom control classes: SingleDie and ScoringBox. The following forms comprise the user interface for the application:Ĭontains the application entry point and functions as the game playing surface.Äialog for displaying recorded high scores.Īpplication about box uses the reflection method Assembly.GetName() for displaying version information.Äialog for requesting text entry from the user. NET Compact Framework, includes four form classes and several other supporting classes. The game is over when all scoring boxes have been used. When scoring, an Ace is considered to have a value of one. In addition to the points above, a Bonus value of 35 points is added if the sum of the Aces through Sixes scores total 63 or more. Score 80 if the five dice share the same suit and form an A-2-3-4-5, 2-3-4-5-6, or 3-4-5-6-A straight score 0 otherwise Score 50 points if all five dice show the same value if not, score 0 Score the sum of the five dice values provided they all share a black suit otherwise score 0 Score the sum of the five dice values provided they all share a red suit otherwise score 0 Score 40 if the five dice share the same suit otherwise score 0 Score 40 if the five dice represent a straight in poker in this variant, an Ace may be treated as low or high, so possible straights include A-2-3-4-5, 2-3-4-5-6, and 3-4-5-6-A 3 of a Kind) and the other two share a value (i.e. ![]() Score 25 if three of the dice share a value (i.e. Score the sum of the five dice values if at least four dice share the same value if not, score 0 Score the sum of the five dice values if at least three dice share the same value if not, score 0 Points are awarded for a score according to the following table: If following a third roll, the player must choose an available scoring box. A scoring box may be used only once in a game. Tapping a die toggles whether the die is locked or unlocked.įollowing any of the three rolls, the player may choose to score by tapping any available scoring box. Clicking the Roll button rolls all "unlocked" dice. On a second or third roll, the player may re-roll any or all of the dice. On each turn the player is allowed up to three rolls of five dice. PocketDice is a variant on the dice game Yacht with the twist that the dice values are suited like playing cards (clubs, hearts, diamonds, and spades). Code examples for persisting high scores and displaying online help are presented following a description of the game. PocketDice, a variant of the dice game Yacht, is offered here as an entry for the Mobile Development Competition and to offer PocketPC owners a few free diversionary minutes. I enjoy having some simple, small games on my PDA to offer a few minutes of distraction when needed.
0 Comments
Leave a Reply. |