Class Player

Direct Known Subclasses:
GomokuAI, Human

abstract class Player extends Object
  • Field Details

    • name

      private String name
      The name of the Player
    • color

      protected Color color
      The color of the Player
  • Constructor Details

    • Player

      Player()
  • Method Details

    • Player

      public void Player(String name, Color color)
      The constructor of the Player.
      Parameters:
      name - The name of the player.
      color - The color of the player.
    • getName

      public String getName()
      Return the name of the player.
      Returns:
      The name of the player.
    • getColor

      public Color getColor()
      Return the color of the player.
      Returns:
      The color of the player.
    • chooseMove

      public abstract GomokuCell chooseMove(GomokuBoard board)
      Return the coordinate of the move played by the player.
      Parameters:
      board - The actual Gomoku board.
      Returns:
      The cell of the move played.