Class: Human
Instance Method Summary collapse
- #get_move(position, moves) ⇒ Object
-
#initialize(game) ⇒ Human
constructor
A new instance of Human.
Constructor Details
#initialize(game) ⇒ Human
Returns a new instance of Human.
4 5 6 |
# File 'lib/human.rb', line 4 def initialize game @game = game end |
Instance Method Details
#get_move(position, moves) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/human.rb', line 8 def get_move position, moves game = @game.class.new game.reload_position moves print game.show_board move = gets.chop end |