Пример #1
0
        public static void showRate(Info player, Info enemy)
        {
            TextRPG TextRPG = new TextRPG();

            double count = 0;

            // 1000번 실행
            for (int i = 0; i < 1000; i++)
            {
                TextRPG.RandPlayer(player);

                // 10마리 잡음
                for (int j = 0; j < 10; j++)
                {
                    TextRPG.RandEnemy(enemy);

                    while (enemy.health > 0 && player.health > 0)
                    {
                        battle(player, enemy);
                    }

                    if (player.health <= 0)
                    {
                        break;
                    }
                }
                if (player.health > 0)
                {
                    count++;
                }
            }

            Console.WriteLine("승률: " + count / 10 + "%");
        }
Пример #2
0
        public void SetPlayer(Info player)
        {
            Interface Interface = new Interface();
            Commands  Commands  = new Commands();
            TextRPG   TextRPG   = new TextRPG();

            TextRPG.RandPlayer(player);          // 능력치 돌리고
            Interface.PlayerStatInterface();     // 명령어 보여주고
            Interface.PlayerInterface(player);   // 능력치 보여주고
            Commands.PlayerStatCommands(player); // 입력 받음
        }