Package main.arrays_06.aufgabe2

Examples of main.arrays_06.aufgabe2.GameBoard


import org.junit.Test;

public class Aufgabe1Test {
  @Test
  public void testManually() throws Exception {
    new Aufgabe1().run();
  }
View Full Code Here


public class Aufgabe2Test {


  @Test
  public void testEasyGame() throws Exception {
    GameBoard b = new GameBoard(new int[][] {
        new int[] { 1, 0, 2, 3 },
        new int[] { 4, 5, 6, 7 },
        new int[] { 8, 9, 10, 11 },
        new int[] { 12, 13, 14, 15 }
    });
    b.startGame();
    Assert.assertFalse(b.isSolved());
    b.play(5);
    Assert.assertFalse(b.isSolved());
    b.play(5);
    b.play(1);
    Assert.assertFalse(b.isSolved());
  }
View Full Code Here

    Assert.assertFalse(b.isSolved());
  }
 
  @Test
  public void testEasyGameWithModifiedVictoryCondition() throws Exception {
    GameBoard b = new GameBoard(new int[][] {
        new int[] { 1, 2, 3, 4 },
        new int[] { 5, 6, 7, 8 },
        new int[] { 9, 10, 11, 12 },
        new int[] { 13, 14, 0, 15 }
    });
    b.startGame();
    Assert.assertFalse(b.isSolved());
    b.play(15);
    Assert.assertTrue(b.isSolved());
  }
View Full Code Here

TOP

Related Classes of main.arrays_06.aufgabe2.GameBoard

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.