Package org.apache.wicket.examples.hangman

Examples of org.apache.wicket.examples.hangman.Game.newGame()


   * @throws Exception
   */
  public void test_1() throws Exception
  {
    Game hangman = new Game();
    hangman.newGame(5, new WordGenerator(new String[] { "testing" }));

    Assert.assertEquals(5, hangman.getGuessesRemaining());
    Assert.assertFalse(hangman.isWon());
    Assert.assertFalse(hangman.isLost());

View Full Code Here


   * @throws Exception
   */
  public void testHangmanLoseGame() throws Exception
  {
    Game hangman = new Game();
    hangman.newGame(2, new WordGenerator(new String[] { "foo" }));

    Assert.assertEquals(2, hangman.getGuessesRemaining());
    Assert.assertFalse(hangman.isWon());
    Assert.assertFalse(hangman.isLost());

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.