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(color, name) ⇒ Player

Konstruktor


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

def initialize(color, name)
  @color = color
  @name = name
end

Instance Attribute Details

#colorPlayerColor (readonly)


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

def color
  @color
end

#nameString (readonly)


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

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object


21
22
23
# File 'lib/software_challenge_client/player.rb', line 21

def ==(other)
  color == other.color
end