Beispiel #1
0
        public static CPass[] createCPasses()
        {
            int lineCount = File.ReadLines("cpasses.txt").Count();

            CPass[]      ret  = new CPass[lineCount];
            StreamReader file = new StreamReader("cpasses.txt");

            for (int i = 0; i < lineCount; i++)
            {
                string  answer = file.ReadLine();
                string  temp   = file.ReadLine();
                Boolean isElim;
                if (temp == "0")
                {
                    isElim = false;
                }
                else
                {
                    isElim = true;
                }
                ret[i] = new CPass(i + 1, answer, true, isElim);
            }
            file.Close();
            return(ret);
        }
Beispiel #2
0
        private void nextButton_Click(object sender, RoutedEventArgs e)
        {
            GameIO.game2Round++;
            CPass.saveCPasses(cpasses);
            GameIO.save(allPlayersAsGame2, 2);
            MusicalChairsResultsPage page = new MusicalChairsResultsPage();

            this.Content = page;
        }
Beispiel #3
0
        private void nextButton_Click(object sender, RoutedEventArgs e)
        {
            CPass.saveCPasses(cpasses);
            Game2Form form = new Game2Form();
            Game2Form win  = (Game2Form)Window.GetWindow(this);

            win.Close();
            form.Show();
        }