Exemple #1
0
        void AddRun(TRuns Runs, int dir)
        {
            TCell  Near;
            TCheck Who;
            TCheck W2;
            TRun   R2;

            Near = Pos.Near(dir);
            if (Pole.Who(Near, out Who))
            {
                if (Who == null)
                {
                    Runs.Add(new TRun(this, Near));
                }
                else
                {
                    if (Who.C != C)
                    {
                        Near = Who.Pos.Near(dir);
                        if (Pole.Who(Near, out W2))
                        {
                            if (W2 == null)
                            {
                                R2 = new TRun(this, Near);
                                R2.Killed.Add(Who);
                                Runs.Add(R2);
                            }
                        }
                    }
                }
            }
        }
Exemple #2
0
        public void AddRuns(TCheck Check, ref TRuns Runs)
        {
            for (int i = 0; i < Lists.Count; i++)
            {
                TNode Node = (TNode)Lists[i];

                TRun Run = new TRun(Check, Node.Pos);

                ArrayList arr = Up(Node);

                for (int j = 0; j < arr.Count; j++)
                {
                    Run.Killed.Add(((TNode)arr[j]).Killed);
                }

                Runs.Add(Run);

                TCell[] Addition = Node.Pos.NearsDama(Node.dir, Pole);

                for (int k = 1; k < Addition.Count(); k++)
                {
                    TRun ARun = new TRun(Check, Addition[k]);

                    for (int j = 0; j < Run.Killed.Count; j++)
                    {
                        ARun.Killed.Add(Run.Killed[j]);
                    }

                    Runs.Add(ARun);
                }
            }
        }
Exemple #3
0
        void AddRunDama(TRuns Runs, int dir)
        {
            TCell[] Nears = Pos.NearsDama(dir, Pole);

            for (int i = 1; i < Nears.Count(); i++)
            {
                Runs.Add(new TRun(this, Nears[i]));
            }
        }