Package a5.util

Class PlayerRole

java.lang.Object
a5.util.PlayerRole

public class PlayerRole extends Object
A class representing player roles. In an (m, n, k) game, there are two player roles: the first player and the second player.
  • Field Details

    • FIRST_PLAYER

      public static final PlayerRole FIRST_PLAYER
    • SECOND_PLAYER

      public static final PlayerRole SECOND_PLAYER
  • Method Details

    • nextPlayer

      public PlayerRole nextPlayer()
      Returns: the role of the next player when this is the current player.
    • boardValue

      public int boardValue()