Class: Condition

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

Overview

Represents the winning condition received from the server when the game ended.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(winner) ⇒ Condition

Initializes the winning Condition with a player

Parameters:

  • winer (Player)

    winning player



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

def initialize(winner)
  @winner = winner
end

Instance Attribute Details

#winnerPlayer (readonly)

Returns winning player.

Returns:



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

def winner
  @winner
end