Class AbstractLabyrinthPanel

All Implemented Interfaces:
KeyListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, UIKeyListener, Drawable2D
Direct Known Subclasses:
LabyrinthPanel

public abstract class AbstractLabyrinthPanel extends AbstractPanel implements UIKeyListener
An abstract class that extends AbstractPanel and implements the UIKeyListener interface. This class serves as a foundation for panels that represent labyrinths and handle keyboard events.

It includes functionality for key press events, inherited from UIKeyListener, as well as providing a seed value for randomization. The KeyListener.keyPressed(KeyEvent) method must be implemented by subclasses to handle key events specific to the labyrinth panel.

See Also:
  • Constructor Details

    • AbstractLabyrinthPanel

      public AbstractLabyrinthPanel(int width, int height, int dimension, int quantityOfLights, long seed, KeyLogic keyLogic)
      Constructs an AbstractLabyrinthPanel with the specified parameters.
      Parameters:
      width - the width of the panel
      height - the height of the panel
      dimension - the dimension of the labyrinth
      quantityOfLights - the number of lights in the labyrinth
      seed - the seed used for randomization
      keyLogic - the KeyLogic instance to handle key events