Package hu.klenium.tetris.view
Class BlankGameFrame
- java.lang.Object
-
- hu.klenium.tetris.view.BlankGameFrame
-
-
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.
-
-
-
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 togame
.- Specified by:
registerEventListeners
in interfaceGameFrame
- 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 interfaceGameFrame
- 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 interfaceGameFrame
- 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 interfaceGameFrame
-
-