From ba1067b215bcabbfa942e6458cc0398027e44b14 Mon Sep 17 00:00:00 2001 From: Sailesh Date: Mon, 3 Apr 2017 14:11:18 -0400 Subject: [PATCH 01/11] Change move to match interface --- src/CheckersGameState3.java | 67 +++++++++++++++++++++++++++++++++++++ src/Move.java | 1 - src/Move3.java | 16 ++++----- 3 files changed, 75 insertions(+), 9 deletions(-) diff --git a/src/CheckersGameState3.java b/src/CheckersGameState3.java index 3b6ba66..ad06c10 100644 --- a/src/CheckersGameState3.java +++ b/src/CheckersGameState3.java @@ -11,6 +11,65 @@ public class CheckersGameState3{ this.board = board; } + public CheckersGameState3(int player, String[] board){ + this.player = player; + this.board = to_array(board); + } + + public int convert(String s){ + if(s.equals("-")){ + return 0; + } + else if(s.equals("b")){ + return 1; + } + else if(s.equals("w")){ + return 2; + } + else if(s.equals("B")){ + return 3; + } + else{ + return 4; + } + } + + public int[] to_array(String[] board){ + int[] b = new int[35]; + int i = 0; + int j = 0; + int added = 0; + boolean leading = false; + while(i < 35 ){ + if(i % 9 == 8){ + b[i] = 0; + } + else if(leading){ + b[i] = convert(board[j]); + } + else{ + b[i] =convert(board[j+1]); + } + if(i % 9 == 8){ + + i++; + continue; + } + j = j + 2; + i++; + added++; + if(added == 4){ + added = 0; + leading = !leading; + } + if(j == 35){ + added =0; + leading = false; + } + } + return b; + } + String player(){ if(this.player == 1){ return "black"; @@ -134,24 +193,32 @@ public class CheckersGameState3{ int jump = orig + 2 * delta1; int[] b2 = b.clone(); b2[orig + delta1] = 0; + b2[orig + 2 * delta1] = b2 [orig]; + b2[orig] = 0; calculate_jumps(path + "," + jump, b2, jump, delta1, delta2, jumps, king); } if(can_jump(orig, delta2, b)){ int jump = orig + 2 * delta2; int[] b3 = b.clone(); b3[orig + delta2] = 0; + b3[orig + 2 * delta2] = b3[orig]; + b3[orig] = 0; calculate_jumps(path + "," + jump, b3, jump, delta1, delta2, jumps, king); } if(king && can_jump(orig, -1 * delta1, b)){ int jump = orig + -2 * delta1; int[] b4 = b.clone(); b4[orig + (-1 * delta1)] = 0; + b4[orig + (-2 * delta1)] = b4[orig]; + b4[orig] = 0; calculate_jumps(path + "," + jump, b4, jump, delta1, delta2, jumps, king); } if(king && can_jump(orig, -1 * delta2, b)){ int jump = orig + -2 * delta2; int[] b5 = b.clone(); b5[orig + -1 * delta2] = 0; + b5[orig + (-2 * delta2)] = b5[orig]; + b5[orig] = 0; calculate_jumps(path + "," + jump, b5, jump, delta1, delta2, jumps, king); } } diff --git a/src/Move.java b/src/Move.java index 41820a8..07d5fa4 100644 --- a/src/Move.java +++ b/src/Move.java @@ -1,7 +1,6 @@ public interface Move { // Starting and ending Positions - public int src, dest; // Returns a list of captured positions public int[] captures(); // Returns the string representation of a move diff --git a/src/Move3.java b/src/Move3.java index da66283..8c3ce5f 100644 --- a/src/Move3.java +++ b/src/Move3.java @@ -1,6 +1,6 @@ -public class Move3{ +public class Move3 implements Move{ - int origin, destination; + int src, dest; String[] steps; int[] kills; String check; @@ -8,13 +8,13 @@ public class Move3{ public Move3(String steps){ String[] s = steps.split(","); this.steps = s; - this.origin = Integer.parseInt(s[0]); - this.destination = Integer.parseInt(s[s.length - 1]); + this.src = Integer.parseInt(s[0]); + this.dest = Integer.parseInt(s[s.length - 1]); kills = calculate_kills(s); } public int[] calculate_kills(String[] steps){ - int diff = this.origin - this.destination; + int diff = this.src - this.dest; if(Math.abs(diff) == 4 || Math.abs(diff) == 5){ return null; } @@ -26,14 +26,14 @@ public class Move3{ } public int origin(){ - return origin; + return src; } public int destination(){ - return destination; + return dest; } - public int[] kills(){ + public int[] captures(){ return kills; } From c88d3a37a08e69f859dce24f4f17fec5c964ddea Mon Sep 17 00:00:00 2001 From: Sailesh Date: Mon, 3 Apr 2017 14:12:52 -0400 Subject: [PATCH 02/11] Make testfile --- src/Test.java | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/Test.java diff --git a/src/Test.java b/src/Test.java new file mode 100644 index 0000000..a4d760d --- /dev/null +++ b/src/Test.java @@ -0,0 +1,29 @@ +import java.util.Arrays; + +public class Test{ + + public static void main(String[] args){ + String[] b = {"-", "b", "-", "b", "-", "b", "-", "b", + "-", "-", "-", "-", "B", "-", "b", "-", + "-", "w", "-", "w", "-", "b", "-", "-", + "-", "-", "-", "-", "b", "-", "w", "-", + "-", "-", "-", "-", "-", "-", "-", "-", + "w", "-", "w", "-", "w", "-", "w", "-", + "-", "w", "-", "-", "-", "w", "-", "w", + "w", "-", "w", "-", "w", "-", "w", "-"}; + String[] b2 = {"-", "-", "-", "b", "-", "b", "-", "b", + "b", "-", "w", "-", "b", "-", "b", "-", + "-", "b", "-", "B", "-", "b", "-", "b", + "-", "-", "w", "-", "w", "-", "-", "-", + "-", "-", "-", "-", "-", "-", "-", "-", + "w", "-", "w", "-", "w", "-", "w", "-", + "-", "w", "-", "-", "-", "w", "-", "w", + "w", "-", "w", "-", "w", "-", "w", "-"}; + + CheckersGameState3 s2 = new CheckersGameState3(1, b2); + s2.printState(); + for(Move3 m: s2.actions()){ + System.out.println(m); + } + } +} From 20e5b1bcf291b01c805122053d737c2733f3e65c Mon Sep 17 00:00:00 2001 From: Sailesh Date: Mon, 3 Apr 2017 14:14:40 -0400 Subject: [PATCH 03/11] Change Move3 to Move --- src/CheckersGameState3.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/CheckersGameState3.java b/src/CheckersGameState3.java index ad06c10..fe7956c 100644 --- a/src/CheckersGameState3.java +++ b/src/CheckersGameState3.java @@ -129,9 +129,9 @@ public class CheckersGameState3{ return backward || forward; } - public List actions(){ - LinkedList moves = new LinkedList(); - LinkedList jumps = new LinkedList(); + public List actions(){ + LinkedList moves = new LinkedList(); + LinkedList jumps = new LinkedList(); for(int i = 0; i < this.board.length; i++){ if(current_player(i, this.board)){ if(this.player == 1){ @@ -159,7 +159,7 @@ public class CheckersGameState3{ } - private void generate_moves(int origin, int delta1, int delta2, List moves, List jumps, boolean king){ + private void generate_moves(int origin, int delta1, int delta2, List moves, List jumps, boolean king){ calculate_jumps("" + origin, this.board, origin, delta1, delta2, jumps, king); if(jumps.isEmpty()){ if(can_move(origin, delta1, this.board)){ @@ -224,7 +224,7 @@ public class CheckersGameState3{ } - CheckersGameState3 result(Move3 x){ + CheckersGameState3 result(Move x){ int[] newState = this.board.clone(); newState[x.destination()] = this.board[x.origin()]; newState[x.origin()] = 0; From 154c5311adda4fbbd507e4eb3a1f84b760d5cae0 Mon Sep 17 00:00:00 2001 From: Sailesh Date: Mon, 3 Apr 2017 14:22:16 -0400 Subject: [PATCH 04/11] Interface doesn't allow for variable declarations --- src/CheckersGameState3.java | 12 ++++++------ src/Move.java | 3 ++- src/Move3.java | 2 +- src/Test.java | 3 ++- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/CheckersGameState3.java b/src/CheckersGameState3.java index fe7956c..a078802 100644 --- a/src/CheckersGameState3.java +++ b/src/CheckersGameState3.java @@ -182,7 +182,7 @@ public class CheckersGameState3{ } - private void calculate_jumps(String path, int[] b, int orig, int delta1, int delta2, List jumps, boolean king){ + private void calculate_jumps(String path, int[] b, int orig, int delta1, int delta2, List jumps, boolean king){ if(!any_jumps(orig, delta1, delta2, b, king)){ if(path.contains(",")){ jumps.add(new Move3(path)); @@ -226,16 +226,16 @@ public class CheckersGameState3{ CheckersGameState3 result(Move x){ int[] newState = this.board.clone(); - newState[x.destination()] = this.board[x.origin()]; - newState[x.origin()] = 0; - if(x.destination < 4 && this.player == 2){ + newState[x.destination()] = this.board[x.source()]; + newState[x.source()] = 0; + if(x.destination() < 4 && this.player == 2){ newState[x.destination()] = 4; } else if(x.destination() > 30 && this.player == 1){ newState[x.destination()] = 3; } - if(x.kills() != null){ - for(int k: x.kills()){ + if(x.captures() != null){ + for(int k: x.captures()){ newState[k] = 0; } } diff --git a/src/Move.java b/src/Move.java index 07d5fa4..6f0e41b 100644 --- a/src/Move.java +++ b/src/Move.java @@ -1,6 +1,7 @@ public interface Move { - // Starting and ending Positions + public int source(); + public int destination(); // Returns a list of captured positions public int[] captures(); // Returns the string representation of a move diff --git a/src/Move3.java b/src/Move3.java index 8c3ce5f..6b13bbc 100644 --- a/src/Move3.java +++ b/src/Move3.java @@ -25,7 +25,7 @@ public class Move3 implements Move{ return k; } - public int origin(){ + public int source(){ return src; } diff --git a/src/Test.java b/src/Test.java index a4d760d..27e9925 100644 --- a/src/Test.java +++ b/src/Test.java @@ -22,7 +22,8 @@ public class Test{ CheckersGameState3 s2 = new CheckersGameState3(1, b2); s2.printState(); - for(Move3 m: s2.actions()){ + s2.result(s2.actions().get(1)).printState(); + for(Move m: s2.actions()){ System.out.println(m); } } From ed02e2081f5a56c5a4463f64d3855b5d18035cb1 Mon Sep 17 00:00:00 2001 From: Sailesh Date: Tue, 4 Apr 2017 00:21:52 -0400 Subject: [PATCH 05/11] Fix toString of move --- src/Move3.java | 53 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 7 deletions(-) diff --git a/src/Move3.java b/src/Move3.java index 6b13bbc..5c89bd3 100644 --- a/src/Move3.java +++ b/src/Move3.java @@ -47,14 +47,53 @@ public class Move3 implements Move{ // else if(pos < 17){ // int x = // - public String toString(){ - String move = "(" + this.steps[0] + ":" + this.steps[1] + ")"; - if(this.steps.length > 2){ - for(int i = 1; i < this.steps.length - 1; i++){ - move += ":(" + this.steps[i] + ":" + this.steps[i+1] + ")"; - } + + private String convert(int position) { + // Converts a position to the correct String + int row = position / 4; + int col = (position % 4) * 2; + if(row % 2 == 0){ + col++; } - return move; + return "("+(7-row)+":"+col+")"; } + private int shift(int position){ + int row, column; + int new_pos = position; + if(position >= 27){ + return (position - 3); + } + else if(position >= 18){ + return (position - 2); + } + else if(position >= 9){ + return (position - 1); + } + else{ + return position; + } + } + + + + +// public String toString(){ +// String move = "(" + this.steps[0] + ":" + this.steps[1] + ")"; +// if(this.steps.length > 2){ +// for(int i = 1; i < this.steps.length - 1; i++){ +// move += ":(" + this.steps[i] + ":" + this.steps[i+1] + ")"; +// } +// } +// return move; +// } +// + public String toString() { + String output = ""; + for(int i = 0; i Date: Tue, 4 Apr 2017 00:28:50 -0400 Subject: [PATCH 06/11] Added tests --- src/Test.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Test.java b/src/Test.java index 27e9925..cb03b95 100644 --- a/src/Test.java +++ b/src/Test.java @@ -19,10 +19,20 @@ public class Test{ "w", "-", "w", "-", "w", "-", "w", "-", "-", "w", "-", "-", "-", "w", "-", "w", "w", "-", "w", "-", "w", "-", "w", "-"}; + String[] b3 = {"-", "-", "-", "b", "-", "b", "-", "b", + "b", "-", "b", "-", "b", "-", "b", "-", + "-", "b", "-", "w", "-", "b", "-", "b", + "-", "-", "w", "-", "w", "-", "-", "-", + "-", "-", "-", "-", "-", "-", "-", "-", + "w", "-", "b", "-", "w", "-", "w", "-", + "-", "-", "-", "-", "-", "w", "-", "w", + "-", "-", "w", "-", "w", "-", "w", "-"}; + - CheckersGameState3 s2 = new CheckersGameState3(1, b2); + CheckersGameState3 s2 = new CheckersGameState3(2, b3); s2.printState(); - s2.result(s2.actions().get(1)).printState(); + System.out.println(s2.actions().get(0)); + s2.result(s2.actions().get(0)).printState(); for(Move m: s2.actions()){ System.out.println(m); } From 1f29842bd33480e27f6e15db13bfe3c2bf21640f Mon Sep 17 00:00:00 2001 From: Sailesh Date: Tue, 4 Apr 2017 11:49:48 -0400 Subject: [PATCH 07/11] Added more tests --- src/CheckersGameState3.java | 8 ++++---- src/Test.java | 31 ++++++++++++++++++++++--------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/CheckersGameState3.java b/src/CheckersGameState3.java index a078802..4b89228 100644 --- a/src/CheckersGameState3.java +++ b/src/CheckersGameState3.java @@ -1,7 +1,7 @@ import java.util.List; import java.util.LinkedList; -public class CheckersGameState3{ +public class CheckersGameState3 implements CheckersGameState{ int player; int[] board; @@ -70,7 +70,7 @@ public class CheckersGameState3{ return b; } - String player(){ + public String player(){ if(this.player == 1){ return "black"; } @@ -224,7 +224,7 @@ public class CheckersGameState3{ } - CheckersGameState3 result(Move x){ + public CheckersGameState3 result(Move x){ int[] newState = this.board.clone(); newState[x.destination()] = this.board[x.source()]; newState[x.source()] = 0; @@ -242,7 +242,7 @@ public class CheckersGameState3{ return new CheckersGameState3(1 - this.player, newState); } - void printState(){ + public void printState(){ boolean leading = false; int printed = 0; for(int i = 0; i < this.board.length; i++){ diff --git a/src/Test.java b/src/Test.java index cb03b95..e12304d 100644 --- a/src/Test.java +++ b/src/Test.java @@ -4,13 +4,14 @@ public class Test{ public static void main(String[] args){ String[] b = {"-", "b", "-", "b", "-", "b", "-", "b", - "-", "-", "-", "-", "B", "-", "b", "-", - "-", "w", "-", "w", "-", "b", "-", "-", - "-", "-", "-", "-", "b", "-", "w", "-", + "b", "-", "b", "-", "b", "-", "b", "-", + "-", "b", "-", "b", "-", "b", "-", "b", + "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "w", "-", "w", "-", "w", "-", "w", "-", - "-", "w", "-", "-", "-", "w", "-", "w", + "-", "w", "-", "w", "-", "w", "-", "w", "w", "-", "w", "-", "w", "-", "w", "-"}; + String[] b2 = {"-", "-", "-", "b", "-", "b", "-", "b", "b", "-", "w", "-", "b", "-", "b", "-", "-", "b", "-", "B", "-", "b", "-", "b", @@ -19,6 +20,7 @@ public class Test{ "w", "-", "w", "-", "w", "-", "w", "-", "-", "w", "-", "-", "-", "w", "-", "w", "w", "-", "w", "-", "w", "-", "w", "-"}; + String[] b3 = {"-", "-", "-", "b", "-", "b", "-", "b", "b", "-", "b", "-", "b", "-", "b", "-", "-", "b", "-", "w", "-", "b", "-", "b", @@ -29,11 +31,22 @@ public class Test{ "-", "-", "w", "-", "w", "-", "w", "-"}; - CheckersGameState3 s2 = new CheckersGameState3(2, b3); - s2.printState(); - System.out.println(s2.actions().get(0)); - s2.result(s2.actions().get(0)).printState(); - for(Move m: s2.actions()){ + CheckersGameState s1 = new CheckersGameState3(1, b); + CheckersGameState s2 = new CheckersGameState3(2, b); + CheckersGameState s3 = new CheckersGameState3(1, b2); + CheckersGameState s4 = new CheckersGameState3(2, b2); + CheckersGameState s5 = new CheckersGameState3(2, b3); + printMoves(s1); + printMoves(s2); + printMoves(s3); + printMoves(s4); + printMoves(s5); + s5.result(s5.actions().get(0)).printState(); + } + + static void printMoves(CheckersGameState s){ + s.printState(); + for(Move m: s.actions()){ System.out.println(m); } } From f989e92442a390c756ce6e893a7754b3fa00f424 Mon Sep 17 00:00:00 2001 From: Sailesh Date: Tue, 4 Apr 2017 11:54:27 -0400 Subject: [PATCH 08/11] Modify bug in test --- src/Test.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Test.java b/src/Test.java index e12304d..1938235 100644 --- a/src/Test.java +++ b/src/Test.java @@ -24,10 +24,10 @@ public class Test{ String[] b3 = {"-", "-", "-", "b", "-", "b", "-", "b", "b", "-", "b", "-", "b", "-", "b", "-", "-", "b", "-", "w", "-", "b", "-", "b", - "-", "-", "w", "-", "w", "-", "-", "-", - "-", "-", "-", "-", "-", "-", "-", "-", + "-", "-", "b", "-", "w", "-", "-", "-", + "-", "-", "-", "b", "-", "-", "-", "-", "w", "-", "b", "-", "w", "-", "w", "-", - "-", "-", "-", "-", "-", "w", "-", "w", + "-", "w", "-", "-", "-", "w", "-", "w", "-", "-", "w", "-", "w", "-", "w", "-"}; @@ -35,13 +35,16 @@ public class Test{ CheckersGameState s2 = new CheckersGameState3(2, b); CheckersGameState s3 = new CheckersGameState3(1, b2); CheckersGameState s4 = new CheckersGameState3(2, b2); - CheckersGameState s5 = new CheckersGameState3(2, b3); + CheckersGameState s5 = new CheckersGameState3(1, b3); + CheckersGameState s6 = new CheckersGameState3(2, b3); printMoves(s1); printMoves(s2); printMoves(s3); printMoves(s4); printMoves(s5); s5.result(s5.actions().get(0)).printState(); + printMoves(s6); + s6.result(s6.actions().get(0)).printState(); } static void printMoves(CheckersGameState s){ From 0d2954c0475fae0872daf29519de560cbdc4c7db Mon Sep 17 00:00:00 2001 From: Sailesh Date: Tue, 4 Apr 2017 12:00:55 -0400 Subject: [PATCH 09/11] Fix bug in result --- src/CheckersGameState3.java | 3 ++- src/Test.java | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/CheckersGameState3.java b/src/CheckersGameState3.java index 4b89228..c46313b 100644 --- a/src/CheckersGameState3.java +++ b/src/CheckersGameState3.java @@ -226,8 +226,9 @@ public class CheckersGameState3 implements CheckersGameState{ public CheckersGameState3 result(Move x){ int[] newState = this.board.clone(); - newState[x.destination()] = this.board[x.source()]; + int type = this.board[x.source()]; newState[x.source()] = 0; + newState[x.destination()] = type; if(x.destination() < 4 && this.player == 2){ newState[x.destination()] = 4; } diff --git a/src/Test.java b/src/Test.java index 1938235..7cc7957 100644 --- a/src/Test.java +++ b/src/Test.java @@ -14,7 +14,7 @@ public class Test{ String[] b2 = {"-", "-", "-", "b", "-", "b", "-", "b", "b", "-", "w", "-", "b", "-", "b", "-", - "-", "b", "-", "B", "-", "b", "-", "b", + "-", "-", "-", "B", "-", "-", "-", "b", "-", "-", "w", "-", "w", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "w", "-", "w", "-", "w", "-", "w", "-", @@ -30,6 +30,16 @@ public class Test{ "-", "w", "-", "-", "-", "w", "-", "w", "-", "-", "w", "-", "w", "-", "w", "-"}; + String[] b4 = {"-", "-", "-", "b", "-", "b", "-", "b", + "b", "-", "-", "-", "b", "-", "b", "-", + "-", "-", "-", "B", "-", "-", "-", "b", + "-", "-", "w", "-", "w", "-", "-", "-", + "-", "-", "-", "-", "-", "-", "-", "-", + "w", "-", "w", "-", "w", "-", "w", "-", + "-", "w", "-", "-", "-", "w", "-", "w", + "w", "-", "w", "-", "w", "-", "w", "-"}; + + CheckersGameState s1 = new CheckersGameState3(1, b); CheckersGameState s2 = new CheckersGameState3(2, b); @@ -37,6 +47,7 @@ public class Test{ CheckersGameState s4 = new CheckersGameState3(2, b2); CheckersGameState s5 = new CheckersGameState3(1, b3); CheckersGameState s6 = new CheckersGameState3(2, b3); + CheckersGameState s7 = new CheckersGameState3(1, b4); printMoves(s1); printMoves(s2); printMoves(s3); @@ -45,6 +56,8 @@ public class Test{ s5.result(s5.actions().get(0)).printState(); printMoves(s6); s6.result(s6.actions().get(0)).printState(); + printMoves(s7); + s7.result(s7.actions().get(0)).printState(); } static void printMoves(CheckersGameState s){ From a1d62d0345878fccdd8f4b741b2c3ea0aabb9e33 Mon Sep 17 00:00:00 2001 From: Sailesh Date: Tue, 4 Apr 2017 12:07:19 -0400 Subject: [PATCH 10/11] Fix formatting for tests --- src/Test.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Test.java b/src/Test.java index 7cc7957..c31cf42 100644 --- a/src/Test.java +++ b/src/Test.java @@ -48,15 +48,25 @@ public class Test{ CheckersGameState s5 = new CheckersGameState3(1, b3); CheckersGameState s6 = new CheckersGameState3(2, b3); CheckersGameState s7 = new CheckersGameState3(1, b4); + System.out.println("State 1"); printMoves(s1); + System.out.println("State 2"); printMoves(s2); + System.out.println("State 3"); printMoves(s3); + System.out.println("State 4"); printMoves(s4); + System.out.println("State 5"); printMoves(s5); + System.out.println("Result of State 5"); s5.result(s5.actions().get(0)).printState(); + System.out.println("State 6"); printMoves(s6); + System.out.println("Result of State 6"); s6.result(s6.actions().get(0)).printState(); + System.out.println("State 7"); printMoves(s7); + System.out.println("Result of State 7"); s7.result(s7.actions().get(0)).printState(); } @@ -65,5 +75,6 @@ public class Test{ for(Move m: s.actions()){ System.out.println(m); } + System.out.println(); } } From 7202456859bbc4a92c301a6a1eb39fae2b51a709 Mon Sep 17 00:00:00 2001 From: Sailesh Date: Tue, 4 Apr 2017 12:08:01 -0400 Subject: [PATCH 11/11] output.txt --- src/output.txt | 141 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 src/output.txt diff --git a/src/output.txt b/src/output.txt new file mode 100644 index 0000000..104b822 --- /dev/null +++ b/src/output.txt @@ -0,0 +1,141 @@ +State 1 +-b-b-b-b +b-b-b-b- +-b-b-b-b +-------- +-------- +w-w-w-w- +-w-w-w-w +w-w-w-w- + +(5:1):(4:0) +(5:1):(4:2) +(5:3):(4:2) +(5:3):(4:4) +(5:5):(4:4) +(5:5):(4:6) +(5:7):(4:6) + +State 2 +-b-b-b-b +b-b-b-b- +-b-b-b-b +-------- +-------- +w-w-w-w- +-w-w-w-w +w-w-w-w- + +(2:0):(3:1) +(2:2):(3:3) +(2:2):(3:1) +(2:4):(3:5) +(2:4):(3:3) +(2:6):(3:7) +(2:6):(3:5) + +State 3 +---b-b-b +b-w-b-b- +---B---b +--w-w--- +-------- +w-w-w-w- +-w---w-w +w-w-w-w- + +(7:3):(5:1):(3:3) +(5:3):(3:1):(1:3):(3:5):(5:3):(7:1) +(5:3):(3:5):(1:3):(3:1):(5:3):(7:1) +(5:3):(7:1) + +State 4 +---b-b-b +b-w-b-b- +---B---b +--w-w--- +-------- +w-w-w-w- +-w---w-w +w-w-w-w- + +(6:2):(7:1) +(4:2):(5:1) +(4:4):(5:5) +(2:0):(3:1) +(2:2):(3:3) +(2:2):(3:1) +(2:4):(3:5) +(2:4):(3:3) +(2:6):(3:7) +(2:6):(3:5) +(0:2):(1:3) +(0:4):(1:3) + +State 5 +---b-b-b +b-b-b-b- +-b-w-b-b +--b-w--- +---b---- +w-b-w-w- +-w---w-w +--w-w-w- + +(2:2):(0:0) + +Result of State 5 +---b-b-b +b-b-b-b- +-b-w-b-b +--b-w--- +---b---- +w---w-w- +-----w-w +B-w-w-w- + +State 6 +---b-b-b +b-b-b-b- +-b-w-b-b +--b-w--- +---b---- +w-b-w-w- +-w---w-w +--w-w-w- + +(5:3):(7:1) + +Result of State 6 +-W-b-b-b +b---b-b- +-b---b-b +--b-w--- +---b---- +w-b-w-w- +-w---w-w +--w-w-w- + +State 7 +---b-b-b +b---b-b- +---B---b +--w-w--- +-------- +w-w-w-w- +-w---w-w +w-w-w-w- + +(5:3):(3:1):(1:3):(3:5):(5:3) +(5:3):(3:5):(1:3):(3:1):(5:3) + +Result of State 7 +---b-b-b +b---b-b- +---B---b +-------- +-------- +w-----w- +-w---w-w +w-w-w-w- +