Class: RubyTerminalGames::Hangman::Board
- Defined in:
- lib/ruby_terminal_games/hangman/board.rb
Instance Attribute Summary
Attributes inherited from Board
Instance Method Summary collapse
-
#initialize(width: nil, height: nil) ⇒ Board
constructor
A new instance of Board.
- #print_world!(game) ⇒ Object
Methods inherited from Board
#clear!, #draw_border!, #move_cursor, #write
Constructor Details
#initialize(width: nil, height: nil) ⇒ Board
Returns a new instance of Board.
4 5 6 7 |
# File 'lib/ruby_terminal_games/hangman/board.rb', line 4 def initialize(width: nil, height: nil) super @height = 10 end |
Instance Method Details
#print_world!(game) ⇒ Object
9 10 11 12 13 |
# File 'lib/ruby_terminal_games/hangman/board.rb', line 9 def print_world!(game) print_placeholders(game.word) print_wrong_guesses(game.wrong_guesses) print_exit_instruction end |