2021-01-27 12:24:17 +01:00
|
|
|
package othello;
|
|
|
|
|
2021-01-27 18:27:28 +01:00
|
|
|
import java.awt.Point;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
2021-01-27 12:24:17 +01:00
|
|
|
public class Main {
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
2021-02-10 09:48:23 +01:00
|
|
|
for (int k=-1; k<2;k++) {
|
|
|
|
for (int l=-1; l<2; l++) {
|
|
|
|
if (k!=0 || l!=0) {
|
|
|
|
System.out.println(k+";"+l);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-01-27 16:55:50 +01:00
|
|
|
int p1 = 1, p2 = 2;
|
|
|
|
int[][] board = initialize(p1, p2);
|
2021-02-02 09:14:10 +01:00
|
|
|
State game = new State(board, p1, p2,0,0);
|
2021-02-10 10:21:26 +01:00
|
|
|
//while(!game.isOver()) {
|
2021-01-27 16:55:50 +01:00
|
|
|
int player = game.getCurrentPlayer();
|
2021-01-27 12:24:17 +01:00
|
|
|
|
2021-02-10 10:21:26 +01:00
|
|
|
//}
|
2021-01-27 18:27:28 +01:00
|
|
|
ArrayList<Point> a = new ArrayList<Point>();
|
|
|
|
a.add(new Point(3,3));
|
|
|
|
System.out.println(game.getMove(p1).toString());
|
2021-02-10 10:21:26 +01:00
|
|
|
//System.out.println(a.get(0).toString());
|
2021-01-27 12:24:17 +01:00
|
|
|
}
|
|
|
|
|
2021-01-27 16:55:50 +01:00
|
|
|
public static int[][] initialize(int p1, int p2){
|
|
|
|
int[][] board = new int[7][7];
|
2021-01-27 12:24:17 +01:00
|
|
|
board[0][0] = p2;
|
|
|
|
board[0][6] = p1;
|
|
|
|
board[6][0] = p1;
|
|
|
|
board[6][6] = p2;
|
|
|
|
return board;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|