Exemplo n.º 1
0
        public void TestPickTeam([Range(0, 2)] int x, [Range(3, 5)] int y, [Range(6, 8)] int z)
        {
            game.Start(players);
            int[] team = { x, y, z };
            playerEventManager.PickTeam(team);
            Assert.That(game.CurrentPhase, Is.EqualTo(Phase.TeamVoting));
            var currentTeamIDs = game.CurrentTeam.Select((p) => p.ID);

            Assert.That(currentTeamIDs, Is.EqualTo(team));
        }
Exemplo n.º 2
0
        public void OnTeamPicked(List <string> pickedUserIDs)
        {
            List <int> ids = new List <int>();

            foreach (string userID in pickedUserIDs)
            {
                var player = GetPlayerByUserId(userID);
                ids.Add(player.ID);
            }
            _pem.PickTeam(ids);
        }