Beispiel #1
0
        static void Main(string[] args)
        {
            Player p = new Player();
            Monster minion = new Monster(1, false, "LittleDude");
            Monster boss = new Monster(2, true, "BigDude");
            int damagetaken;
            bool monsterdead = false;
            bool playerdead = false;
            List<Room> RoomList = new List<Room>();
            string filename = "D:/Rooms.txt";

            parseRooms(filename, ref RoomList);

            Console.WriteLine("The number of rooms created is: " + RoomList.Count);
            for (int i = 0; i < RoomList.Count; i++)
            {
                Console.WriteLine("RoomName is: " + RoomList[i].RoomName);
            }
                //while (monsterdead == false && playerdead == false)
                //{
                //    damagetaken = p.attack();
                //    Console.WriteLine("Player attacks for: " + damagetaken);
                //    monsterdead = boss.DamageFromPlayer(damagetaken);
                //    if (monsterdead == true)
                //    {
                //        Console.WriteLine("Player won");
                //        break;
                //    }
                //    damagetaken = boss.generateDamage();
                //    Console.WriteLine("Boss attack for: " + damagetaken);
                //    playerdead = p.takeDamage(damagetaken);
                //    if (playerdead == true)
                //    {
                //        Console.WriteLine("Player Lost");
                //        break;
                //    }
                //    System.Threading.Thread.Sleep(3000);
                //}

            Console.WriteLine("Curr HP IS: " + p.currHP);
        }