Пример #1
0
 private void NeedCups(player player)
 {
 }
Пример #2
0
 private void NeedIce(player player)
 {
 }
Пример #3
0
 private void NeedLemons(player player)
 {
 }
Пример #4
0
 private void NeedSugar(player player)
 {
 }
Пример #5
0
        private static void Main(string[] args)
        {
            //string userInput = "\0";
            //string zombieType="\0";
            //Console.WriteLine("Plants vs Zombies by SHW");
            //while (userInput != "q")

            //{

            //    Console.WriteLine("\n1. Create Zombies?");
            //    Console.WriteLine("2. What type of attack?");
            //    Console.WriteLine("q for quit");
            //    userInput = Console.ReadLine();
            //    switch (userInput)
            //    {

            //        case "1":

            //                Console.WriteLine(
            //                    "What kind of zombie do you want?\n1. Regular\n2. Cone\n3. Bucket\n4. Screendoor\n");

            //                zombieType = Console.ReadLine();
            //                zombieList.Add(factory.CreateZombie(zombieType));

            //                break;

            //        case "2":
            //            while(zombieList.Count!=0)
            //            {

            //            Console.WriteLine("1. Peashooters (-25)\n2. Watermelons (-30 to zombie)\n3.Magnet-shrooms (removes accessory)");
            //            var userInput2 = Console.ReadLine();
            //            switch (userInput2)
            //                {
            //                    case "1":
            //                        if (zombieList.First().isAlive())
            //                        {
            //                            zombieList.First().GetZombieInfo();
            //                            zombieList.First().TakeDamage(20);
            //                        }
            //                            case "2":
            //                        while (zombieList.Count != 0)
            //                            if (zombieList.First().isAlive()) //defaults to true
            //                            {
            //                                zombieList.First().GetZombieInfo();
            //                                zombieList.First().TakeDamage(30);

            //                                //Console.WriteLine("Ouch, i've taken damage");
            //                            }
            //                            else //zombie has died
            //                            {
            //                                zombieList.RemoveAt(0); //removing first zombie which is first element in the list
            //                                                        //Console.WriteLine("Ive died");
            //                            }
            //                    case "3":
            //                }
            //            }



            //            }

            //            int newDamage = Convert.ToInt32(Console.ReadLine());
            //            while (zombieList.Count != 0)
            //                if (zombieList.First().isAlive()) //defaults to true
            //                {
            //                    zombieList.First().GetZombieInfo();
            //                    zombieList.First().TakeDamage(newDamage);

            //                    //Console.WriteLine("Ouch, i've taken damage");
            //                }
            //                else //zombie has died
            //                {
            //                    zombieList.RemoveAt(0); //removing first zombie which is first element in the list
            //                    //Console.WriteLine("Ive died");
            //                }

            //            break;
            //    }

            //}


            //Zombie z1 = new Zombie();
            //Zombie z2 = new Zombie();
            //Zombie z3 = new Zombie();
            //var b1 = new Bucket();
            //var s1=new Screendoor();
            //var c1=new Cone();

            //zombieList.Add(z1);
            //z1.AddItemToZombie(b1); //now z1 has a bucket
            //zombieList.Add(z2);
            //z2.AddItemToZombie(s1);
            //zombieList.Add(z3);
            //z3.AddItemToZombie(c1);

            GameObjectManager game      = new GameObjectManager();
            player            ourPlayer = new player();

            game.MakeZombies();
            ourPlayer.Subscribe(game);
            ourPlayer.PlayGame();
        }