Beispiel #1
0
 private void lblStrat1_Click(object sender, EventArgs e)
 {
     if (Strat1 == null)
     {
         return;
     }
     Clp.ClopNum = 100;
     Clp.ResetGame();
     Clp.PlayRecord(Strat1, 100);
     ClpDraw.Refresh();
 }
Beispiel #2
0
        public void Stage1_Array()
        {
            #region Pre-battle array forming
            beginning = true;
            while ((ClpWar.turn == side) & beginning)
            {
                //Analyse field: what's happening (beginning of the game or battle)
                beginning = true;
                for (int i = 0; (i < ClopWar.FieldW); i++)
                {
                    for (int j = 0; (j < ClopWar.FieldH); j++)
                    {
                        //if (((ClpWar.field[i,j].state==cell.DEAD) & (ClpWar.field[i,j].owner!=cell.EMPTY)) | ((ClpWar.field[i,j].avail)&(ClpWar.field[i,j].owner==xside)))
                        if ((ClpWar.field[i, j].owner == side) & CheckNeighbours(i, j, (int)(ClpWar.clopNum / 3)))
                        {
                            beginning = false;
                        }
                    }
                }

                //Prepare pre-battle array
                if (beginning)
                {
                    if (StrategyFile != null)
                    {
                        if (ClpWar.PlayRecord(StrategyFile, 1) == 0)
                        {
                            break;
                        }
                    }
                    else
                    {
                        break;
                    }
                }