change player name file

This commit is contained in:
Aubin DORIVAL
2025-03-31 08:36:31 +02:00
parent 646fe6b9f1
commit b32e9146b7
3 changed files with 11 additions and 1 deletions

42
src/Player.java Normal file
View 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);
}