Class NineSwitchesGameBoard

java.lang.Object
games.stendhal.server.entity.mapstuff.game.NineSwitchesGameBoard
All Implemented Interfaces:
TurnListener

public class NineSwitchesGameBoard extends Object implements TurnListener
The game board for the 9 switches game.
Author:
hendrik
  • Constructor Details

    • NineSwitchesGameBoard

      public NineSwitchesGameBoard(StendhalRPZone zone, int x, int y)
      creates a new NineSwitcheGameBoard.
      Parameters:
      zone - zone the board is placed into
      x - x-coordinate
      y - y-coordinate
  • Method Details

    • usedSwitch

      public void usedSwitch(RPEntity user, NineSwitchesGameSwitch gameSwitch)
      use the specified switch.
      Parameters:
      user - player who used the switch
      gameSwitch - switch which was used
    • setPlayerName

      public void setPlayerName(String playerName)
      sets the name of the active player or null if no game is active.
      Parameters:
      playerName - name of player
    • getPlayerName

      public String getPlayerName()
      gets the name of the active player.
      Returns:
      name of player, or null if no game is active.
    • setNPC

      public void setNPC(SpeakerNPC npc)
      sets the SpeakerNPC who manages this game.
      Parameters:
      npc - SpeakerNPC
    • onTurnReached

      public void onTurnReached(int currentTurn)
      Description copied from interface: TurnListener
      This method is called when the turn number is reached.
      Specified by:
      onTurnReached in interface TurnListener
      Parameters:
      currentTurn - current turn number
    • remove

      public void remove()
      removes the game board with all its switches from the world