示例#1
0
        public static void Fight(IFighter player, IFighter rival, Queue <Fighter> rivalsQueue)
        {
            RoundVerdict         roundVerdict = new RoundVerdict();
            FightVerdictOnPoints fightVerdict = new FightVerdictOnPoints();

            string gameStatus            = "continues";
            int    getVerdictDeterminant = 0;

            FightHeader.Animation();

            FightersInfo.Compare(player, rival);

            CountingDown.CountBeforeFight();

            Contracts.Display(player);

            for (int i = 1; i <= 3; i++)
            {
                RoundHeader.Display(i);

                Round(player, rival, i, ref gameStatus, ref roundVerdict);

                if (gameStatus == "Winn")
                {
                    rivalsQueue.Dequeue();
                    break;
                }
                else if (gameStatus == "Loss")
                {
                    break;
                }

                getVerdictDeterminant += 1;
            }

            if (getVerdictDeterminant == 3)
            {
                fightVerdict.GetFightVerdict(roundVerdict, rivalsQueue, player);
            }
        }
示例#2
0
        static void DisplayMenu()
        {
            Console.Clear();

            Console.WriteLine("\n  >>> Na początek wybierz zadownika z listy według kategorii wagowej i zatwierdź klawiszem Enter <<<\n");
            Console.WriteLine(" __________________________________________________________________________________________________________________");

            for (int i = 0; i < 5; i++)
            {
                Console.Write(Weights[i]);
            }

            Console.Write("\n|                       ||                      ||                    ||                   ||                      |\n");

            for (int j = 0; j < 5; j++)
            {
                for (int i = 5 * j; i < 5 * j + 5; i++)
                {
                    if (i + 1 == activePosition)
                    {
                        Console.BackgroundColor = ConsoleColor.Gray;
                        Console.ForegroundColor = ConsoleColor.Black;
                        Console.Write("{0,-10}", ChoseFighterMenuPositions[i]);
                        Console.BackgroundColor = ConsoleColor.Black;
                        Console.ForegroundColor = ConsoleColor.White;
                    }
                    else
                    {
                        Console.Write(ChoseFighterMenuPositions[i]);
                    }
                }

                Console.WriteLine();
            }

            Console.Write("|_______________________||______________________||____________________||___________________||______________________|\n");

            FightersInfo.Display(FightersList.AllFightersList[activePosition - 1]);
        }