Class Player


  • public class Player
    extends Object
    Class that is used to store general player's information
    • Constructor Detail

      • Player

        public Player​(String username)
        Create a Player instance with a username
        Parameters:
        username - player's username
        Throws:
        NullPointerException - if username is null
      • Player

        public Player​(Player player)
        Create a Player's instance from a Player instance
        Parameters:
        player - Player's instance
        Throws:
        NullPointerException - if player is null
    • Method Detail

      • setStatusPlayer

        public void setStatusPlayer​(StatusPlayer status)
        Set player's status
        Parameters:
        status - status to set
        Throws:
        NullPointerException - if status is null
      • getStatusPlayer

        public StatusPlayer getStatusPlayer()
        Get player's status
        Returns:
        player's status
      • setColor

        public void setColor​(Color color)
        Set player color
        Parameters:
        color - color to be set
        Throws:
        NullPointerException - if color is null
      • getColor

        public Color getColor()
        Get Player's color
        Returns:
        player's color
      • setGod

        public void setGod​(God god)
        Set player's god
        Parameters:
        god - god to be set
        Throws:
        NullPointerException - if god is null
      • placeWoker

        public int placeWoker()
        Delete a worker to place
        Returns:
        remaining number of workers to place
      • getGod

        public God getGod()
        Get player's god
        Returns:
        player's god
      • getUsername

        public String getUsername()
        Get player's username
        Returns:
        player's username