Class: Player

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, symbol) ⇒ Player

Returns a new instance of Player.



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

def initialize(name, symbol)
  @name = name
  @symbol = symbol
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#symbolObject

Returns the value of attribute symbol.



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

def symbol
  @symbol
end