Class: TTT::Player
- Inherits:
-
Object
- Object
- TTT::Player
- Defined in:
- lib/ttt/player.rb
Instance Attribute Summary collapse
-
#side ⇒ Object
Returns the value of attribute side.
Instance Method Summary collapse
- #==(other_player) ⇒ Object
-
#initialize(options) ⇒ Player
constructor
A new instance of Player.
- #move ⇒ Object
Constructor Details
#initialize(options) ⇒ Player
Returns a new instance of Player.
4 5 6 |
# File 'lib/ttt/player.rb', line 4 def initialize() self.side = .fetch(:side) end |
Instance Attribute Details
#side ⇒ Object
Returns the value of attribute side.
3 4 5 |
# File 'lib/ttt/player.rb', line 3 def side @side end |
Instance Method Details
#==(other_player) ⇒ Object
10 11 12 13 |
# File 'lib/ttt/player.rb', line 10 def ==(other_player) self.class == other_player.class && side == other_player.side end |
#move ⇒ Object
8 |
# File 'lib/ttt/player.rb', line 8 def move; end |