Sha256: 521f70fd42c9b8ad1c7548db8b0b2d5936d3afe88e1eade64aac16aa9f41d78d
Contents?: true
Size: 549 Bytes
Versions: 3
Compression:
Stored size: 549 Bytes
Contents
# encoding: UTF-8 # @author Ralf-Tobias Diekert #player color constants module PlayerColor NONE = 1 RED = 2 BLUE = 4 # Returns the opponents Color # # @param color [PlayerColor] The player's color, whose opponent needs to be found # @return [PlayerColor] the opponent's color def self.opponentColor(color) if color == PlayerColor::RED return PlayerColor::BLUE end if color == PlayerColor::BLUE return PlayerColor::RED end if color == PlayerColor::NONE return PlayerColor::NONE end end end
Version data entries
3 entries across 3 versions & 1 rubygems