Esempio n. 1
0
        private void GameOver()
        {
            if (score.Value > score.RecordScore)
            {
                score.RecordScore = score.Value;

                pause = true;

                Record record = new Record();
                //record.ShowDialog ();

                score.RecordPlayer = record.Player;

                using (StreamWriter writer = File.CreateText("record.dat")) {
                    writer.WriteLine(score.RecordPlayer);
                    writer.WriteLine(score.RecordScore);
                }

                pause = false;
            }
            board.Initialize();
            score.Initialize();
        }
Esempio n. 2
0
        private void GameOver()
        {
            if (score.Value > score.RecordScore)
            {
                score.RecordScore = score.Value;

                pause = true;

                Record record = new Record();
                record.ShowDialog();

                score.RecordPlayer = record.Player;

                using (StreamWriter writer = File.CreateText("record.dat"))
                {
                    writer.WriteLine(score.RecordPlayer);
                    writer.WriteLine(score.RecordScore);
                }

                pause = false;
            }
            board.Initialize();
            score.Initialize();
        }