Class: Player

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

Direct Known Subclasses

Players::Computer, Players::Human

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token) ⇒ Player

Returns a new instance of Player.



7
8
9
10
# File 'lib/player.rb', line 7

def initialize(token)
  @token = token
  @@all << self
end

Instance Attribute Details

#tokenObject (readonly)

Returns the value of attribute token.



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

def token
  @token
end