Class: Mineswiper::Player
- Inherits:
-
Object
- Object
- Mineswiper::Player
- Defined in:
- lib/mineswiper/player.rb
Instance Attribute Summary collapse
-
#display ⇒ Object
readonly
Returns the value of attribute display.
Instance Method Summary collapse
-
#initialize(board) ⇒ Player
constructor
A new instance of Player.
- #move ⇒ Object
Constructor Details
Instance Attribute Details
#display ⇒ Object (readonly)
Returns the value of attribute display.
5 6 7 |
# File 'lib/mineswiper/player.rb', line 5 def display @display end |
Instance Method Details
#move ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/mineswiper/player.rb', line 11 def move result = nil until result @display.render result = @display.get_input end result end |