Class: TakaTicTacToe::Human

Inherits:
Object
  • Object
show all
Defined in:
lib/taka_tic_tac_toe/human.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mark) ⇒ Human

Returns a new instance of Human.



5
6
7
# File 'lib/taka_tic_tac_toe/human.rb', line 5

def initialize(mark)
  @mark = mark
end

Instance Attribute Details

#markObject

Returns the value of attribute mark.



3
4
5
# File 'lib/taka_tic_tac_toe/human.rb', line 3

def mark
  @mark
end

Instance Method Details

#make_move(index, board) ⇒ Object



9
10
11
# File 'lib/taka_tic_tac_toe/human.rb', line 9

def make_move(index, board)
  board.set_move(@mark, index)
end