Class: Player

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

Overview

Ein Spieler

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(team, name, fishes = 0) ⇒ Player

Konstruktor



22
23
24
25
26
# File 'lib/software_challenge_client/player.rb', line 22

def initialize(team, name, fishes = 0)
  @team = team
  @name = name
  @fishes = fishes
end

Instance Attribute Details

#fishesInteger



16
17
18
# File 'lib/software_challenge_client/player.rb', line 16

def fishes
  @fishes
end

#nameString (readonly)



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

def name
  @name
end

#teamTeam (readonly)



12
13
14
# File 'lib/software_challenge_client/player.rb', line 12

def team
  @team
end

Instance Method Details

#==(other) ⇒ Object



28
29
30
# File 'lib/software_challenge_client/player.rb', line 28

def ==(other)
  team == other.team
end