示例#1
0
        void PlayAgainPrompt()
        {
            DialogResult dialog = MessageBox.Show("Do you want to play again?", "You lost!", MessageBoxButtons.YesNo);

            if (dialog == DialogResult.Yes)
            {
                game = new FarmerLogic();
            }
            else if (dialog == DialogResult.No)
            {
                Application.Exit();
            }
        }
示例#2
0
 private void newGameToolStripMenuItem_Click(object sender, EventArgs e)
 {
     game = new FarmerLogic();
     DisableAll();
     EnableAll();
 }
示例#3
0
        public Form1()
        {
            InitializeComponent();

            game = new FarmerLogic();
        }