Class: Player

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

Direct Known Subclasses

Human, Minimax

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(team) ⇒ Player

Returns a new instance of Player.



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

def initialize(team)
  @team = team
end

Instance Attribute Details

#teamObject (readonly)

Returns the value of attribute team.



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

def team
  @team
end

Instance Method Details

#computer?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/nick_tac_toe/player.rb', line 8

def computer?
  false
end