public string rps_game_winner(List <List <string> > game) { _gameValidator.Validate(game); var winner = _engine.GetWinner(game[0], game[1]); return(FormatWinnerResponse.Format(winner)); }
public List <string> PlayBracket(List <List <List <string> > > bracket) { var subBracketWinner = new List <List <string> >(); foreach (var subBracket in bracket) { _gameValidator.Validate(subBracket); subBracketWinner.Add(_engine.GetWinner(subBracket[0], subBracket[1])); } if (subBracketWinner.Count > 1) { return(PlayBracket(MakeNewBracket(subBracketWinner))); } return(subBracketWinner[0]); }