Class: TTT::Interface::CLI::Player

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/ttt/interface/cli/players.rb

Direct Known Subclasses

ComputerPlayer, HumanPlayer

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(game, cli, marker) ⇒ Player

Returns a new instance of Player.



15
16
17
18
19
# File 'lib/ttt/interface/cli/players.rb', line 15

def initialize(game, cli, marker)
  self.game   = game
  self.cli    = cli
  self.marker = marker
end

Instance Attribute Details

#cliObject

Returns the value of attribute cli.



10
11
12
# File 'lib/ttt/interface/cli/players.rb', line 10

def cli
  @cli
end

#gameObject

Returns the value of attribute game.



10
11
12
# File 'lib/ttt/interface/cli/players.rb', line 10

def game
  @game
end

#markerObject

Returns the value of attribute marker.



10
11
12
# File 'lib/ttt/interface/cli/players.rb', line 10

def marker
  @marker
end