Module: PlayerColor
- Defined in:
- lib/software_challenge_client/player_color.rb
Overview
player color constants
Constant Summary collapse
- NONE =
1- RED =
2- BLUE =
4
Class Method Summary collapse
-
.opponentColor(color) ⇒ PlayerColor
Returns the opponents Color.
Class Method Details
.opponentColor(color) ⇒ PlayerColor
Returns the opponents Color
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/software_challenge_client/player_color.rb', line 12 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 |