Ejemplo n.º 1
0
        // Choose a minigame from the minigames we haven't played and have a WIN round on yet
        public void PickMinigame()
        {
            Console.WriteLine("Picking random minigame...");
            List <Minigame> UnplayedMinigames = new List <Minigame>();

            foreach (Minigame m in AllMinigames)
            {
                if (!PlayedMinigames.Contains(m))
                {
                    UnplayedMinigames.Add(m);
                }
            }

            // Randomly choose a minigame
            var Random = new Random();

            CurrentMinigame = UnplayedMinigames[Random.Next(UnplayedMinigames.Count)];
            PlayedMinigames.Add(CurrentMinigame);
        }
Ejemplo n.º 2
0
 // Stops a game and resets all variables
 public void StopGame()
 {
     StopRoundTimer();
     StopGenericTimer();
     Round               = Team1Score = Team2Score = 0;
     RoundResult         = 0;
     CurrentCurePosition = -1;
     AllPlayers.Clear();
     Team1.Clear();
     Team2.Clear();
     Cure.Clear();
     PlayedMinigames.Clear();
     Team1Lead          = Team2Lead = null;
     VoiceChannel       = null;
     CurrentMinigame    = null;
     RoundInProgress    = GenericTimerActive = false;
     LastColorIndexUsed = -1;
     LastColorUsed      = DiscordColor.None;
 }