Class: NeuroGammon::BasePlayer

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

Direct Known Subclasses

BaseNeuralPlayer, LazyPlayer, RandomPlayer

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBasePlayer

Returns a new instance of BasePlayer.



12
13
14
15
# File 'lib/neuro_gammon/base_player.rb', line 12

def initialize
  @id=UUIDTools::UUID.random_create.to_s
  @name=self.class.name
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



9
10
11
# File 'lib/neuro_gammon/base_player.rb', line 9

def id
  @id
end

#nameObject

Returns the value of attribute name.



10
11
12
# File 'lib/neuro_gammon/base_player.rb', line 10

def name
  @name
end