Class: TakaTicTacToe::Human
- Inherits:
-
Object
- Object
- TakaTicTacToe::Human
- Defined in:
- lib/taka_tic_tac_toe/human.rb
Instance Attribute Summary collapse
-
#mark ⇒ Object
Returns the value of attribute mark.
Instance Method Summary collapse
-
#initialize(mark) ⇒ Human
constructor
A new instance of Human.
- #make_move(index, board) ⇒ Object
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
#mark ⇒ Object
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 |