Beispiel #1
0
        public GameTests()
        {
            var people = new People(this.Session);

            this.player1 = people.FindBy(M.Person.UserName, "speler1");
            this.player2 = people.FindBy(M.Person.UserName, "speler2");
            this.player3 = people.FindBy(M.Person.UserName, "speler3");
            this.player4 = people.FindBy(M.Person.UserName, "speler4");

            this.scoreboard = new ScoreboardBuilder(this.Session)
                              .WithPlayer(player1)
                              .WithPlayer(player2)
                              .WithPlayer(player3)
                              .WithPlayer(player4)
                              .Build();

            this.GameTypes = new GameTypes(this.Session);

            this.Session.Derive();
        }
        public SoloAndSoloSlimAndAbondanceTests()
        {
            var people = new People(this.Session);

            this.player1 = people.FindBy(M.Person.UserName, "player1");
            this.player2 = people.FindBy(M.Person.UserName, "player2");
            this.player3 = people.FindBy(M.Person.UserName, "player3");
            this.player4 = people.FindBy(M.Person.UserName, "player4");

            this.scoreboard = new ScoreboardBuilder(this.Session)
                              .WithPlayer(this.player1)
                              .WithPlayer(this.player2)
                              .WithPlayer(this.player3)
                              .WithPlayer(this.player4)
                              .Build();

            this.gameTypes = new GameTypes(this.Session);

            this.Session.Derive();
        }
        public static bool ZeroTest(this Scoreboard @this)
        {
            var games = @this.Games;

            foreach (Game game in games)
            {
                var scores = game.Scores;
                var som    = 0;

                foreach (var score in scores.Where(v => v.ExistValue))
                {
                    som += score.Value.Value;
                }

                if (som != 0)
                {
                    return(false);
                }
            }

            return(true);
        }