Class GameTurnChangeEvent

All Implemented Interfaces:
Serializable

public class GameTurnChangeEvent extends GamePlayerEvent
Instances of this class are sent when Game turn changes. This even keeps track of the player who will be taking the new turn as well as the player who took the turn that triggered this event.
See Also:
  • Constructor Details

    • GameTurnChangeEvent

      public GameTurnChangeEvent(Object source, Player currPlayer, int prevPlayerId)
      Parameters:
      source - The Game instance
      currPlayer - The player for whom the new turn is for.
      prevPlayerId - The id of the player who took the turn that triggered this event.
  • Method Details

    • fireEvent

      public void fireEvent(GameListener gl)
      Description copied from class: GameEvent
      Sub-classed events implement this method to call their specific method on a GameListener instance that their event has been fired.
      Specified by:
      fireEvent in class GameEvent
      Parameters:
      gl - GameListener recipient.
    • getEventName

      public String getEventName()
      Specified by:
      getEventName in class GameEvent
    • getPreviousPlayerId

      public int getPreviousPlayerId()