Ejemplo n.º 1
0
 // Internal Start
 public void StartRound(InternalSimulator TestSim, bool ThisIsBeingBad)
 {
     TestSim.Start();
     //if (PlayMode == 0)
     // The reason this will never run is becaus it seems to make everything worse. It will most likely be added back in in a later version, but for now it is obsolete
     if (false)
     {
         if (PlayerMode == 1)
         {
             for (int i = 0; i < CC.Length - 1; i++)
             {
                 if (Rnd.Next(0, 101) == 0)
                 {
                     int Random = RandomInput.ReturnRandomIntInRange(0, RandomInput.ReturnDecisionCount());
                     CC[i].InitializeRound(Random);
                 }
                 else
                 {
                     CC[i].InitializeRound(0);
                 }
             }
         }
         else
         {
             foreach (CommandCenter e in CC)
             {
                 if (Rnd.Next(0, 101) == 0)
                 {
                     int Random = RandomInput.ReturnRandomIntInRange(0, RandomInput.ReturnDecisionCount());
                     e.InitializeRound(Random);
                 }
                 else
                 {
                     e.InitializeRound(0);
                 }
             }
         }
     }
     else
     {
         if (CC != null)
         {
             if (PlayerMode == 1)
             {
                 for (int i = 0; i < CC.Length - 1; i++)
                 {
                     CC[i].InitializeRound(i + 2);
                 }
             }
             else
             {
                 for (int i = 0; i < CC.Length; i++)
                 {
                     CC[i].InitializeRound(i + 1);
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
 public void StartRound(InternalSimulator TestSim, int CCN, int PlayerID)
 {
     TestSim.Start();
     if (false)
     {
         int Random = RandomInput.ReturnRandomIntInRange(0, RandomInput.ReturnDecisionCount());
         CC[CCN].InitializeRound(Random);
     }
     else if (CCN >= 0)
     {
         CC[CCN].InitializeRound(PlayerID);
     }
     else if (CCN == -1)
     {
         BaseL.InitializeRound(PlayerID);
     }
 }
Ejemplo n.º 3
0
        public void AiVRandom(InternalSimulator TestSim, int RunCount)
        {
            if (CC != null)
            {
                for (int j = 0; j < CC.Length; j++)
                {
                    for (int i = 0; i < RunCount; i++)
                    {
                        if (PlayMode == 0)
                        {
                            CC[j].SetDecisionMode(RandomInput.ReturnRandomIntInRange(0, 3));
                        }

                        TestSim.Start();

                        int Turn1 = TestSim.Turn();
                        StartRound(j, Turn1);

                        while (!TestSim.Finished())
                        {
                            SingleCCTurn(TestSim, j, Turn1);
                            RandomizerTurn(TestSim);
                        }
                        if ((i + 1) % 50 == 0)
                        {
                            UILog(this, "" + (i + 1));
                        }
                        EndRound(TestSim, Turn1, j);
                    }
                    for (int i = 0; i < RunCount; i++)
                    {
                        if (PlayMode == 0)
                        {
                            CC[j].SetDecisionMode(RandomInput.ReturnRandomIntInRange(0, 3));
                        }
                        TestSim.Start();

                        int Turn1 = TestSim.Turn();
                        int Turn2 = TestSim.GetPlayerCount() - Turn1;

                        if (Turn2 == 0)
                        {
                            Turn2++;
                        }
                        StartRound(j, Turn2);

                        while (!TestSim.Finished())
                        {
                            RandomizerTurn(TestSim);
                            SingleCCTurn(TestSim, j, Turn2);
                        }
                        if ((i + 1) % 50 == 0)
                        {
                            UILog(this, "" + (i + 1));
                        }
                        EndRound(TestSim, Turn2, j);
                    }
                    UILog(this, "CC[" + j + "] finished.");
                }
            }
        }
Ejemplo n.º 4
0
 public void StartRound(InternalSimulator TestSim)
 {
     TestSim.Start();
 }
Ejemplo n.º 5
0
 public void StartRound(InternalSimulator TestSim, int FirstPlayer)
 {
     TestSim.Start(FirstPlayer);
 }