Sha256: 07e3f3115205c75d295c0552d8660db79c5984610560b1c1f078203dfe662a5f
Contents?: true
Size: 575 Bytes
Versions: 4
Compression:
Stored size: 575 Bytes
Contents
# encoding: UTF-8 require_relative 'player' # Das Ergebnis eines Spieles. Ist im `GameState#condition` zu finden, wenn das Spiel beendet wurde. class Condition # @!attribute [r] winner # @return [Player] Spieler, der das Spiel gewonnen hat. attr_reader :winner # @!attribute [r] reason # @return [String] Grund fuer Spielende attr_reader :reason # Initializes the winning Condition with a player # @param winer [Player] winning player def initialize(winner, reason) @winner = winner @reason = reason end def draw? @winner.nil? end end
Version data entries
4 entries across 4 versions & 1 rubygems