Class: TicTacToe::TUI::Cursor
- Inherits:
-
Object
- Object
- TicTacToe::TUI::Cursor
- Defined in:
- lib/tic_tac_toe/tui/cursor.rb
Constant Summary collapse
- X_SPACING =
2
- X_MARGIN =
1
- Y_SPACING =
4
- Y_MARGIN =
2
Instance Method Summary collapse
-
#initialize(window) ⇒ Cursor
constructor
A new instance of Cursor.
- #update(field, hidden: false) ⇒ Object
Constructor Details
#initialize(window) ⇒ Cursor
Returns a new instance of Cursor.
10 11 12 |
# File 'lib/tic_tac_toe/tui/cursor.rb', line 10 def initialize(window) @window = window end |
Instance Method Details
#update(field, hidden: false) ⇒ Object
14 15 16 17 |
# File 'lib/tic_tac_toe/tui/cursor.rb', line 14 def update(field, hidden: false) update_position(field) update_visibility(hidden) end |