Class: HumanPlayer
- Inherits:
-
Object
- Object
- HumanPlayer
- Defined in:
- lib/human_player.rb
Instance Attribute Summary collapse
-
#symbol ⇒ Object
readonly
Returns the value of attribute symbol.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(symbol) ⇒ HumanPlayer
constructor
A new instance of HumanPlayer.
- #make_move(board) ⇒ Object
Constructor Details
#initialize(symbol) ⇒ HumanPlayer
Returns a new instance of HumanPlayer.
5 6 7 8 |
# File 'lib/human_player.rb', line 5 def initialize symbol @symbol = symbol @type = :human end |
Instance Attribute Details
#symbol ⇒ Object (readonly)
Returns the value of attribute symbol.
3 4 5 |
# File 'lib/human_player.rb', line 3 def symbol @symbol end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/human_player.rb', line 3 def type @type end |
Instance Method Details
#make_move(board) ⇒ Object
10 11 12 |
# File 'lib/human_player.rb', line 10 def make_move board true end |