Class GameState

  • All Implemented Interfaces:
    BeanInfo

    public class GameState
    extends java.lang.Object
    implements BeanInfo
    Java class for concept GameState of blackjack_beans ontology.
    • Field Detail

      • dealer

        protected Player dealer
        Attribute for slot dealer.
      • players

        protected java.util.List players
        Attribute for slot players.
    • Constructor Detail

      • GameState

        public GameState()
        Default Constructor. GameState.
      • GameState

        public GameState​(Player dealer,
                         Player[] players)
        Default Constructor. GameState.
    • Method Detail

      • getDealer

        public Player getDealer()
        Get the dealer of this GameState.
        Returns:
        dealer
      • setDealer

        public void setDealer​(Player dealer)
        Set the dealer of this GameState.
        Parameters:
        dealer - the value to be set
      • updateDealer

        public void updateDealer​(Player dealer)
        Update the dealer of this GameState.
        Parameters:
        dealer - the value to be set
      • getPlayers

        public Player[] getPlayers()
        Get the players of this GameState.
        Returns:
        players
      • setPlayers

        public void setPlayers​(Player[] players)
        Set the players of this GameState.
        Parameters:
        players - the value to be set
      • getPlayer

        public Player getPlayer​(int idx)
        Get an players of this GameState.
        Parameters:
        idx - The index.
        Returns:
        players
      • setPlayer

        public void setPlayer​(int idx,
                              Player player)
        Set a player to this GameState.
        Parameters:
        idx - The index.
        player - a value to be added
      • addPlayer

        public void addPlayer​(Player player)
        Add a player to this GameState.
        Parameters:
        player - a value to be removed
      • removePlayer

        public boolean removePlayer​(Player player)
        Remove a player from this GameState.
        Parameters:
        player - a value to be removed
        Returns:
        True when the players have changed.
      • updateOrAddPlayer

        public void updateOrAddPlayer​(Player player)
        Add a player to this GameState.
        Parameters:
        player - a value to be removed
      • getPlayer

        public Player getPlayer​(java.lang.String name)
        Get a player per name.
        Parameters:
        name - The name.
        Returns:
        The player.
      • getDefaultPropertyIndex

        public int getDefaultPropertyIndex()
        Get the default property index.
        Specified by:
        getDefaultPropertyIndex in interface BeanInfo
        Returns:
        The property index.
      • getDefaultEventIndex

        public int getDefaultEventIndex()
        Get the default event index.
        Specified by:
        getDefaultEventIndex in interface BeanInfo
        Returns:
        The default event index.
      • getAdditionalBeanInfo

        public BeanInfo[] getAdditionalBeanInfo()
        Get additional bean info.
        Specified by:
        getAdditionalBeanInfo in interface BeanInfo
        Returns:
        Get additional bean info.
      • getIcon

        public java.awt.Image getIcon​(int iconKind)
        Get the icon.
        Returns:
        The icon.
      • loadImage

        public java.awt.Image loadImage​(java.lang.String resourceName)
        Load the image.
        Returns:
        The image.
      • addPropertyChangeListener

        public void addPropertyChangeListener​(PropertyChangeListener listener)
        Add a PropertyChangeListener to the listener list. The listener is registered for all properties.
        Parameters:
        listener - The PropertyChangeListener to be added.
      • removePropertyChangeListener

        public void removePropertyChangeListener​(PropertyChangeListener listener)
        Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
        Parameters:
        listener - The PropertyChangeListener to be removed.
      • toString

        public java.lang.String toString()
        Get a string representation of this GameState.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string representation.