Пример #1
0
        public string WallDoorMonsterCheck(int x, int y, string[,] map, bool key)
        {
            if (map[x, y] == "0")
            {
                return("wall");
            }
            else if (map[x, y] == "D")
            {
                return("door");
            }
            else if (map[x, y] == "M")
            {
                FightClub club = new FightClub();
                club.RandomFight();
                //club.ChoosenCreturesFight();
                key = true;
                Console.WriteLine($"Now you have a key!");
                Console.ReadLine();

                return(" ");
            }
            else
            {
                return(" ");
            }
        }
        public string WallDoorMonsterStairsCheck(int x, int y, string[,] map, Hero hero)
        {
            if (!hero.HeroAlive)
            {
                return("dead");
            }
            if (map[x, y] == "0")
            {
                return("wall");
            }
            else if (map[x, y] == "D")
            {
                if (hero.KeyAvailability == false)
                {
                    return("door");
                }
                else
                {
                    hero.KeyAvailability = false;
                    return(" ");
                }
            }
            else if (map[x, y] == "M")
            {
                FightClub club = new FightClub();
                club.RandomFight();
                hero.KeyAvailability = true;
                Console.WriteLine($"Now you have a key!");
                Console.ReadLine();
                Console.Clear();

                return(" ");
            }
            else if (map[x, y] == "P")
            {
                Win.CloseProgram();
                return(" ");
            }
            else if (map[x, y] == "S")
            {
                return("stairs");
            }
            else
            {
                return(" ");
            }
        }
Пример #3
0
        static void Main(string[] args)
        {
            CreatureFromFileReader creatureTable = new CreatureFromFileReader();

            creatureTable.CreateCreatureList();
            //TryLINQ tryLINQ = new TryLINQ();
            //tryLINQ.ShowCreaturesNames();
            //tryLINQ.MaxArmorClass();
            //tryLINQ.SortByClaws();
            //tryLINQ.CreatureSearch();
            //tryLINQ.ShowCreatureDemage();
            //tryLINQ.MaxDemage();
            //tryLINQ.AverageDemage();
            //tryLINQ.SortByLevelAndHitpoints();
            //tryLINQ.SumHPOf1LvlCreatures();
            FightClub club = new FightClub();

            //club.RandomFight();
            club.ChoosenCreturesFight();
            Console.ReadLine();
        }