package makise.othello; import othello.*; import java.awt.Point; /* 置ける場所を見つけるとそこに置くという最も簡単なプレーヤー */ public class TekitouPlayer implements OthelloPlayer { private int myColor; public void init(int color, boolean first, String param) { myColor = color; } public Point nextHand(OthelloBoard board) { for (int y = 0; y < 8; y++) { for (int x = 0; x < 8; x++) { if (board.canPut(x, y, myColor)) return new Point(x, y); } } throw new RuntimeException("Not reachable"); } }