Class NineSwitchesGameSwitch

All Implemented Interfaces:
UseListener, Killer, Cloneable, Iterable<String>, Serializable

public class NineSwitchesGameSwitch extends UseableEntity
A switch in the 9 switches game
Author:
hendrik
  • Constructor Details

    • NineSwitchesGameSwitch

      public NineSwitchesGameSwitch(NineSwitchesGameBoard board)
      creates a new Switch for the 9 switches game.
      Parameters:
      board -
  • Method Details

    • onUsed

      public boolean onUsed(RPEntity user)
      someone clicked a switch.
      Parameters:
      user - the RPEntity who uses the object
      Returns:
      true if successful
    • toggle

      public void toggle()
      toggles the state of the switch.