Esempio n. 1
0
 private void ProcessChoice(string moving)
 {
     if (moving == "")
     {
         MessageBox.Show("Select something to move.");
     }
     else if (farmer.NorthBank.Contains(moving) && farmer.Farmer == FarmerGame.Direction.North ||
              farmer.SouthBank.Contains(moving) && farmer.Farmer == FarmerGame.Direction.South ||
              moving == "NOTHING")
     {
         farmer.Move(moving);
     }
     else
     {
         MessageBox.Show("The " + moving + " is not on the same side as the FARMER!");
     }
 }
Esempio n. 2
0
        public void ProcessChoice(string choice)
        {
            theGame.Move(choice);

            if (theGame.AnimalAteFood() == false)
            {
                bool userWon = theGame.DetermineWin();

                if (userWon == true)
                {
                    MessageBox.Show("YOU WON!");
                }
            }
            else
            {
                MessageBox.Show("GAME OVER!");
                ResetLocations();
            }
        }