Text user interface view of a Game.
More...
|
|
static GameView | create () |
| | Construct a view.
|
Text user interface view of a Game.
Renders the game in a terminal using Unicode characters. The interface is controlled using a keyboard.
Controls
Game
- h: Move cursor left.
- j: Move cursor down.
- k: Move cursor up.
- l: Move cursor right.
- Space: Uncover cell.
- /: Flag/mark/reset cell. Skips marking if marks are disabled.
- m: Open menu.
- q: Quit the game.
Menu
- j: Move selection down.
- k: Move selection up.
- Space: Confirm selected option.
Options
- New game: Start a new game.
- Edit game: Start a new game with changed parameters.
- Leaderboard: View leaderboard.
- Change player name: Change current player name.
- Disable marks / Enable marks: Toggle marks.
- Quit: Quit the game.
- Back: Exit from the menu.
◆ run()
Give control to the view.
Renders the game and accepts user input. Gives control back once the user decides to quit.
- Parameters
-
| game | Game model to interact with. |
| interface | User interface model to use. |
| console | Console to use for input/output. |
The documentation for this class was generated from the following file: