private void EnterMatch(Match match) { while (!match.Finished) { ShowCurrentLegDetails(match); var throwResult = ui.Prompt("Enter next throw result", ThrowResult.IsValid, ThrowResult.Parse, ""); match.AddThrow(throwResult); } Console.WriteLine("Match is finished! Player {0} wins!", match.Winner); MatchSummaryView.Show(match); Console.WriteLine(); }
public void Execute() { ListMatches(); var id = ui.Prompt("Enter match id"); var match = repo.FindMatchById(id); if (match == null) { Console.WriteLine("Unknown match with id " + id); } else { MatchSummaryView.Show(match); } }