Class: PlayerColor
- Inherits:
-
TypesafeEnum::Base
- Object
- TypesafeEnum::Base
- PlayerColor
- Defined in:
- lib/software_challenge_client/player_color.rb
Class Method Summary collapse
-
.opponentColor(color) ⇒ PlayerColor
Returns the opponents Color.
Class Method Details
.opponentColor(color) ⇒ PlayerColor
Returns the opponents Color
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/software_challenge_client/player_color.rb', line 14 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 |