Class: Condition

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

Overview

Das Ergebnis eines Spieles. Ist im `GameState#condition` zu finden, wenn das Spiel beendet wurde.

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 Spieler, der das Spiel gewonnen hat.

Returns:

  • (Player)

    Spieler, der das Spiel gewonnen hat.


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

def winner
  @winner
end