Class: Player

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, token = "X") ⇒ Player

Returns a new instance of Player.



5
6
7
8
# File 'lib/player.rb', line 5

def initialize(name, token = "X")
  @name = name
  @token = token
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#tokenObject

Returns the value of attribute token.



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

def token
  @token
end