Class BlankGameFrame

  • All Implemented Interfaces:
    GameFrame

    public class BlankGameFrame
    extends java.lang.Object
    implements GameFrame
    • Constructor Summary

      Constructors 
      Constructor Description
      BlankGameFrame()  
    • Method Summary

      Modifier and Type Method Description
      void displayBoard​(Board board)
      Called when the board's state is updated and so need to be displayed again.
      void displayGameOver()
      Called when game is stopped: displays the result.
      void displayTetromino​(Tetromino tetromino)
      Called when the falling tetromino's state is updated and so need to be displayed again.
      void registerEventListeners​(TetrisGame game, java.util.Map<javafx.scene.input.KeyCode,​Command> keys)
      Registers handlers for user inputs.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BlankGameFrame

        public BlankGameFrame()
    • Method Detail

      • registerEventListeners

        public void registerEventListeners​(TetrisGame game,
                                           java.util.Map<javafx.scene.input.KeyCode,​Command> keys)
        Description copied from interface: GameFrame
        Registers handlers for user inputs. When one of the specificed keys is pressed, sends the corresponding command to game.
        Specified by:
        registerEventListeners in interface GameFrame
        Parameters:
        game - The game which will recieve a command on user input.
        keys - List of keys which are used to control the falling tetromino.
      • displayTetromino

        public void displayTetromino​(Tetromino tetromino)
        Description copied from interface: GameFrame
        Called when the falling tetromino's state is updated and so need to be displayed again.
        Specified by:
        displayTetromino in interface GameFrame
        Parameters:
        tetromino - The falling tetromino to display.
      • displayBoard

        public void displayBoard​(Board board)
        Description copied from interface: GameFrame
        Called when the board's state is updated and so need to be displayed again.
        Specified by:
        displayBoard in interface GameFrame
        Parameters:
        board - The board to display.
      • displayGameOver

        public void displayGameOver()
        Description copied from interface: GameFrame
        Called when game is stopped: displays the result.
        Specified by:
        displayGameOver in interface GameFrame