debut d'une ia par point
This commit is contained in:
@@ -10,15 +10,20 @@ abstract class Player{
|
||||
/** The name of the Player */
|
||||
private String name;
|
||||
|
||||
/** The color of the Player */
|
||||
protected Color color;
|
||||
|
||||
|
||||
//------------------Constructors--------------------------
|
||||
|
||||
/**
|
||||
* The constructor of the Player.
|
||||
* @param name The name of the player.
|
||||
* @param color The color of the player.
|
||||
*/
|
||||
public void Player(String name){
|
||||
public void Player(String name,Color color){
|
||||
this.name = name;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
//------------------Gets--------------------------
|
||||
@@ -28,7 +33,14 @@ abstract class Player{
|
||||
* @return The name of the player.
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
return this.name;
|
||||
}
|
||||
/**
|
||||
* Return the color of the player.
|
||||
* @return The color of the player.
|
||||
*/
|
||||
public Color getColor() {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
//------------------Methods--------------------------
|
||||
@@ -36,7 +48,7 @@ abstract class Player{
|
||||
/**
|
||||
* Return the coordinate of the move played by the player.
|
||||
* @param Board The actual Gomoku board.
|
||||
* @return The coordinate of the move played.
|
||||
* @return The cell of the move played.
|
||||
*/
|
||||
public abstract GomokuCell chooseMove(GomokuBoard board);
|
||||
}
|
||||
Reference in New Issue
Block a user