SHARE
TWEET

Untitled

a guest Feb 27th, 2020 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class CrapsPlay {
  2.     /**
  3.      * The dice used in the game.
  4.      */
  5.     private Die die1, die2;
  6.     private Scanner scan;
  7.    
  8.     /**
  9.      * Store whether the current game was a win or a loss.
  10.      */
  11.     private boolean won;
  12.    
  13.     /**
  14.      * Store whether the current game is finished or not.
  15.      */
  16.     private boolean finished = false;
  17.    
  18.     /**
  19.      * Store the number of rolls in the current game.
  20.      */
  21.     private int rolls;
  22.    
  23.     /**
  24.      * Store the first roll of the game.
  25.      */
  26.     private int firstRoll;
  27.    
  28.     /**
  29.      * Sum of the faces of the dice.
  30.      */
  31.     private int sumOfRoll;
  32.    
  33.     /**
  34.      * Store the total number of won games.
  35.      */
  36.     private int wonGames;
  37.    
  38.     /**
  39.      * Store the total number of games played.
  40.      */
  41.     private int gamesPlayed;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top