Ejemplo n.º 1
0
        public void playGameAsStandard(int wepChoice)
        {
            StandardModelTerminator terminator = new StandardModelTerminator();
            Enemy enemy = new Enemy();

            Console.WriteLine("An enemy has appeared with {0} health", enemy.health);
            while (terminator.health > 0)
            {
                Console.WriteLine("make a move! 1 to shoot, 2 to walk closer");
                int choice = Convert.ToInt32(Console.ReadLine());
                if (choice == 1)
                {
                    int enemyHealth = enemy.health -= terminator.shoot(wepChoice);
                    Console.WriteLine("Enemy took {0} damage and now has {1} health", terminator.shoot(wepChoice), enemyHealth);
                }
                else
                {
                    terminator.walk();
                }
            }
        }
Ejemplo n.º 2
0
        public void playGameAsStandard(int wepChoice)
        {
            StandardModelTerminator terminator = new StandardModelTerminator();
            Enemy enemy = new Enemy();
            Console.WriteLine("An enemy has appeared with {0} health", enemy.health);
            while (terminator.health>0)
            {
                Console.WriteLine("make a move! 1 to shoot, 2 to walk closer");
                int choice = Convert.ToInt32(Console.ReadLine());
                if (choice == 1)
                {

                    int enemyHealth = enemy.health -= terminator.shoot(wepChoice);
                    Console.WriteLine("Enemy took {0} damage and now has {1} health",terminator.shoot(wepChoice), enemyHealth);

                }
                else
                {
                    terminator.walk();
                }
            }
        }