Пример #1
0
        public void ShouldCountNumberOfOrangesEatenThisYear()
        {
            orangeTree.OneYearPasses();
            orangeTree.OneYearPasses();
            orangeTree.EatOrange(1);

            Assert.AreEqual(1, orangeTree.OrangesEaten);

            orangeTree.EatOrange(3);
            Assert.AreEqual(4, orangeTree.OrangesEaten);

            Assert.AreEqual(5, orangeTree.NumOranges);
        }
Пример #2
0
        static void EatOranges()
        {
            if (!gameActive)
            {
                Menu();
            }

            Console.WriteLine("How many Oranges do you want to eat?");
            int EatOranges = int.Parse(Console.ReadLine());

            OT.EatOrange(EatOranges);

            WaitForKey();
            Menu();
        }