change player name file
This commit is contained in:
42
src/Player.java
Normal file
42
src/Player.java
Normal file
@@ -0,0 +1,42 @@
|
||||
|
||||
|
||||
|
||||
abstract class Player{
|
||||
|
||||
/**
|
||||
* This class is an abstract class to choose between player and Gomoku AI.
|
||||
*/
|
||||
|
||||
/** The name of the Player */
|
||||
private String name;
|
||||
|
||||
|
||||
//------------------Constructors--------------------------
|
||||
|
||||
/**
|
||||
* The constructor of the Player.
|
||||
* @param name The name of the player.
|
||||
*/
|
||||
public void Player(String name){
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
//------------------Gets--------------------------
|
||||
|
||||
/**
|
||||
* Return the name of the player.
|
||||
* @return The name of the player.
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
//------------------Methods--------------------------
|
||||
|
||||
/**
|
||||
* Return the coordinate of the move played by the player.
|
||||
* @param Board The actual Gomoku board.
|
||||
* @return The coordinate of the move played.
|
||||
*/
|
||||
public abstract Coordinate chooseMove(GomokuBoard board);
|
||||
}
|
||||
Reference in New Issue
Block a user