private static void PrepareMatchTieBreakGameMatch(MatchRuleStandalone matchRule, out PlayerStandalone playerA, out PlayerStandalone playerB, out SinglesTeam teamA, out SinglesTeam teamB, out MatchStandalone <SinglesTeam> match) { playerA = new PlayerStandalone(Guid.NewGuid(), "Nozomi Tojo", Gender.Female, 159.0, 60, Hands.Right, new Color(1.0f, 1.0f, 0.0f)); playerB = new PlayerStandalone(Guid.NewGuid(), "Kotori Minami", Gender.Female, 159.0, 54, Hands.Right, new Color(0.0f, 1.0f, 1.0f)); teamA = new SinglesTeam(playerA, Guid.NewGuid()); teamB = new SinglesTeam(playerB, Guid.NewGuid()); var pcf = TieBrakingPointCounter.CreateFactory(2, 2); var gcf = AdvantageSetGameCounter.CreateFactory(pcf, matchRule.GamesPerSet, 2); match = new MatchStandalone <SinglesTeam>(teamA, teamB, matchRule, EnumTeams.TeamA, new MatchTieBreakSetCounter(gcf, matchRule.Sets * 2 - 1, 7, 2, EnumTeams.TeamA)); }
public TieBreakSetSetupPageViewModel(INavigationService navigationService) { CommandNext = ReactiveCommand.Create(async() => { try { var fpc = FifteenBasedPointCounter.CreateFactory(HasDeuceOnNormalGames); var ftpc = TieBrakingPointCounter.CreateFactory(TieBreakGameLeastWinningPoint, TieBreakGameLeastWinningPointDifference); var fgc = TieBreakSetGameCounter.CreateFactory(fpc, ftpc, MatchSetupParameters.GamesPerSet, LeastWinningGameDifference); var sc = MatchSetupParameters.SetCounterFactory.Create(fgc); var n = new RuleSetupParameters(MatchSetupParameters, sc); var p = new NavigationParameters { { "P", n } }; _ = await navigationService.NavigateAsync(nameof(PlayerSetupPage), p); } catch (Exception e) { Debug.WriteLine(e.ToString()); throw; } }); }