diff --git a/src/othello/Main.java b/src/othello/Main.java index c1b0194..49b1afe 100644 --- a/src/othello/Main.java +++ b/src/othello/Main.java @@ -1,5 +1,8 @@ package othello; +import java.awt.Point; +import java.util.ArrayList; + public class Main { @@ -11,6 +14,10 @@ public class Main { int player = game.getCurrentPlayer(); } + ArrayList a = new ArrayList(); + a.add(new Point(3,3)); + System.out.println(game.getMove(p1).toString()); + System.out.println(a.get(0).toString()); } public static int[][] initialize(int p1, int p2){ diff --git a/src/othello/State.java b/src/othello/State.java index a545822..13515d2 100644 --- a/src/othello/State.java +++ b/src/othello/State.java @@ -21,7 +21,7 @@ public class State { return false; } - public ArrayList getMove(String player) { + public ArrayList getMove(int player) { ArrayList moves = null; // Clonage @@ -30,12 +30,15 @@ public class State { for (int j=0; j= 0) && (i+k < 7 ) && (j+l >= 0) && (j+l < 7 ) ) { + System.out.println("jadd"); moves.add(new Point(i+k, j+l)); } } @@ -51,7 +54,7 @@ public class State { return moves; } - public int getScore(String player) { + public int getScore(int player) { return 0; }