Package dojo.trivia.a20120505cr4.runner

Examples of dojo.trivia.a20120505cr4.runner.GameRunner


   }

   // reorder sequence
   // extract method
   public static void play(Random rand) {
      Game aGame = new Game();

      aGame.addPlayer("Chet");
      aGame.addPlayer("Pat");
      aGame.addPlayer("Sue");

      do {

         int diceCast = rand.nextInt(5) + 1;
         aGame.moveCurrentPlayerWith(diceCast);

         boolean correctAnswer = rand.nextInt(9) != 7;
         if (correctAnswer) {
            notAWinner = aGame.currentPlayerGaveCorrectAnswer();
         } else {
            notAWinner = aGame.currentPlayerGaveWrongAnswer();
         }

      } while (notAWinner);
   }
View Full Code Here

TOP

Related Classes of dojo.trivia.a20120505cr4.runner.GameRunner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.