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 voiddisplayBoard(Board board)Called when the board's state is updated and so need to be displayed again.voiddisplayGameOver()Called when game is stopped: displays the result.voiddisplayTetromino(Tetromino tetromino)Called when the falling tetromino's state is updated and so need to be displayed again.voidregisterEventListeners(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:GameFrameRegisters handlers for user inputs. When one of the specificed keys is pressed, sends the corresponding command togame.- Specified by:
registerEventListenersin 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:GameFrameCalled when the falling tetromino's state is updated and so need to be displayed again.- Specified by:
displayTetrominoin interfaceGameFrame- Parameters:
tetromino- The falling tetromino to display.
-
displayBoard
public void displayBoard(Board board)
Description copied from interface:GameFrameCalled when the board's state is updated and so need to be displayed again.- Specified by:
displayBoardin interfaceGameFrame- Parameters:
board- The board to display.
-
displayGameOver
public void displayGameOver()
Description copied from interface:GameFrameCalled when game is stopped: displays the result.- Specified by:
displayGameOverin interfaceGameFrame
-
-