Esempio n. 1
0
 public static boolean testDiagonalTwo() {
   Field f = new Field(4, 4);
   f.parseFromString("0,0,0,0;2,1,2,1;1,2,1,1;1,1,2,1");
   f.addDisc(0, 1);
   boolean passed = (f.isTerminal() == true);
   return passed;
 }
Esempio n. 2
0
 public static boolean testHorizontalWin() {
   Field f = new Field(4, 4);
   f.parseFromString("0,0,0,0;0,0,0,0;1,1,0,1;1,2,2,1");
   f.addDisc(2, 1);
   boolean passed = (f.isTerminal() == true);
   return passed;
 }
Esempio n. 3
0
 public static boolean testVerticalWin() {
   Field f = new Field(4, 4);
   f.parseFromString("0,0,0,2;2,2,0,1;1,2,2,1;1,2,2,1");
   f.addDisc(1, 2);
   boolean passed = (f.isTerminal() == true);
   return passed;
 }
Esempio n. 4
0
 public static boolean testEmptyField() {
   Field f = new Field(4, 4);
   f.parseFromString("0,0,0,0;0,0,0,0;0,0,0,0;0,0,0,0");
   f.addDisc(2, 1);
   boolean passed = (f.isTerminal() == false);
   return passed;
 }
Esempio n. 5
0
 public static boolean testFull() {
   Field f = new Field(4, 4);
   f.parseFromString("1,2,2,1;1,2,2,1;2,2,1,1;2,1,2,2");
   boolean passed = (f.isTerminal() == true);
   return passed;
 }