Class: TicTacToe::Human
- Inherits:
-
Object
- Object
- TicTacToe::Human
- Defined in:
- lib/ttt/human.rb
Instance Attribute Summary collapse
-
#mark ⇒ Object
readonly
Returns the value of attribute mark.
Instance Method Summary collapse
-
#initialize(mark) ⇒ Human
constructor
A new instance of Human.
- #make_move(space, board) ⇒ Object
Constructor Details
#initialize(mark) ⇒ Human
Returns a new instance of Human.
5 6 7 |
# File 'lib/ttt/human.rb', line 5 def initialize(mark) @mark = mark end |
Instance Attribute Details
#mark ⇒ Object (readonly)
Returns the value of attribute mark.
3 4 5 |
# File 'lib/ttt/human.rb', line 3 def mark @mark end |
Instance Method Details
#make_move(space, board) ⇒ Object
9 10 11 |
# File 'lib/ttt/human.rb', line 9 def make_move(space, board) board.place_move(@mark, space) end |