public void DisplayWinner() { PokerJudge pokerJudge = new PokerJudge(); string winner = pokerJudge.GetWinner(_fiveCommunityCards, _twoHoleCardsPerPlayer); Console.WriteLine(); Console.WriteLine("WINNER IS: " + winner + "with " + pokerJudge.WinningHandDisplayString); }
public void Run(string input, TextWriter output) { StringReader reader = new StringReader(input); string appendedInput = null; string line = reader.ReadLine(); while (line != null) { appendedInput += line; if (line == string.Empty) { InputParser inputParser = new InputParser(appendedInput); PokerJudge pokerJudge = new PokerJudge(); string winner = pokerJudge.GetWinner(inputParser.CommunityCards, inputParser.PlayerCards); output.Write(winner); return; } line = reader.ReadLine(); } }