public class DummyPlayer3 extends ReversiPlayer
Modifier and Type | Field and Description |
---|---|
private int |
RANDOM_MOVES_NUMBER
Constant defining maximum number of tried moves.
|
height, myColor, opponentColor, width
Constructor and Description |
---|
DummyPlayer3() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Returns name of the reversi player.
|
boolean |
isCorrectMove(int[][] board,
ReversiPlayer player,
ReversiMove move) |
private boolean |
isCorrectMoveInDirection(int[][] board,
int player,
int dirX,
int dirY,
int x,
int y) |
ReversiMove |
makeNextMove(int[][] board)
makeNextTurn is called by the reversi server when the player has to compute the next move.
|
endGame, getEmptySquareColor, getMyColor, getOpponentColor, init, toString
private final int RANDOM_MOVES_NUMBER
public java.lang.String getName()
ReversiPlayer
getName
in interface ReversiPlayerInterface
getName
in class ReversiPlayer
public ReversiMove makeNextMove(int[][] board)
ReversiPlayer
ReversiMove
class encapsulating the coordinates of the stone to be put on the board.makeNextMove
in interface ReversiPlayerInterface
makeNextMove
in class ReversiPlayer
board
- - contains actual map of the board represented by two-dimensional matrix.
Each sqaure contains number of -1 representing empty square and number 0 and 1 representing players' stones.public boolean isCorrectMove(int[][] board, ReversiPlayer player, ReversiMove move)
private boolean isCorrectMoveInDirection(int[][] board, int player, int dirX, int dirY, int x, int y)