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; }
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; }
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; }
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; }
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; }