39 lines
738 B
Java
39 lines
738 B
Java
|
|
public abstract class Player {
|
|
protected boolean myTurn;
|
|
protected boolean isServer;
|
|
protected boolean waitingForResponse;
|
|
protected Player enemy;
|
|
protected String name;
|
|
protected Board board;
|
|
|
|
public Player() {}
|
|
|
|
public void createBoard(int size) {
|
|
this.board = new Board(size);
|
|
}
|
|
|
|
public abstract void receiveShoot(Point point);
|
|
|
|
public abstract void receiveHit(HitResponse hitResponse);
|
|
|
|
public void click(Point point) {
|
|
|
|
}
|
|
|
|
public void beginTrun() {
|
|
|
|
}
|
|
|
|
public void setEnemy(Player enemy) {
|
|
this.enemy = enemy;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
public String getName() {
|
|
return this.name;
|
|
}
|
|
}
|