class WrongNumberOfPlayersError < StandardError ; end
class NoSuchStrategyError < StandardError ; end
def rps_game_winner(game)
raise WrongNumberOfPlayersError unless game.length == 2
# your code here
end
def rps_tournament_winner(tournament)
# your code here
end
game = [ [ "Armando", "P" ], [ "Dave", "S" ] ]
tournament = [
[
[ ["Armando", "P"], ["Dave", "S"] ],
[ ["Richard", "R"], ["Michael", "S"] ],
],
[
[ ["Allen", "S"], ["Omer", "P"] ],
[ ["David E.", "R"], ["Richard X.", "P"] ]
]
]
puts rps_game_winner(game).inspect
puts ' Should Be ["Dave", "S"]'
puts rps_tournament_winner(tournament).inspect
puts ' Should Be ["Richard","R"]'