Class: Human

Inherits:
Player show all
Defined in:
lib/human.rb

Instance Method Summary collapse

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