Class: Minesweeper::Core::Elements::FlaggedState
- Inherits:
-
Object
- Object
- Minesweeper::Core::Elements::FlaggedState
- Defined in:
- lib/minesweeper/core/elements/flagged_state.rb
Instance Method Summary collapse
Instance Method Details
#reveal(cell) ⇒ Object
5 6 7 8 |
# File 'lib/minesweeper/core/elements/flagged_state.rb', line 5 def reveal(cell) cell.current_state = CellState::REVEALED_STATE cell.trigger end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/minesweeper/core/elements/flagged_state.rb', line 14 def to_s "F" end |
#unflag(cell) ⇒ Object
10 11 12 |
# File 'lib/minesweeper/core/elements/flagged_state.rb', line 10 def unflag(cell) cell.current_state = CellState::HIDDEN_STATE end |