Class: TTT::Player

Inherits:
Shared::Player show all
Defined in:
lib/games/tictactoe/player.rb

Instance Attribute Summary collapse

Attributes inherited from Shared::Player

#difficulty_level, #name, #type

Instance Method Summary collapse

Methods inherited from Shared::Player

#initialize

Constructor Details

This class inherits a constructor from Shared::Player

Instance Attribute Details

#valueObject

Returns the value of attribute value.



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

def value
  @value
end

Instance Method Details

#post_initialize(args = {}) ⇒ Object



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

def post_initialize(args = {})
  @value = args.fetch(:value, "X")
end