Exemple #1
0
        public Status(Typeconstructor type)
        {
            if (type == Typeconstructor.Arranged)
            {
                // sắp xếp các quân cờ
                Map[0, 0] = new AllChessman.Xe(Team.Computer, new Index(0, 0), this);
                Map[0, 1] = new AllChessman.Ngua(Team.Computer, new Index(0, 1), this);
                Map[0, 2] = new AllChessman.Tuong(Team.Computer, new Index(0, 2), this);
                Map[0, 3] = new AllChessman.Hau(Team.Computer, new Index(0, 3), this);
                Map[0, 4] = new AllChessman.Vua(Team.Computer, new Index(0, 4), this);
                Map[0, 5] = new AllChessman.Tuong(Team.Computer, new Index(0, 5), this);
                Map[0, 6] = new AllChessman.Ngua(Team.Computer, new Index(0, 6), this);
                Map[0, 7] = new AllChessman.Xe(Team.Computer, new Index(0, 7), this);

                for (int i = 0; i < 8; i++)
                {
                    Map[1, i] = new AllChessman.Tot(Team.Computer, new Index(1, i), this);
                    Map[6, i] = new AllChessman.Tot(Team.Man, new Index(6, i), this);
                }

                Map[7, 0] = new AllChessman.Xe(Team.Man, new Index(7, 0), this);
                Map[7, 1] = new AllChessman.Ngua(Team.Man, new Index(7, 1), this);
                Map[7, 2] = new AllChessman.Tuong(Team.Man, new Index(7, 2), this);
                Map[7, 3] = new AllChessman.Hau(Team.Man, new Index(7, 3), this);
                Map[7, 4] = new AllChessman.Vua(Team.Man, new Index(7, 4), this);
                Map[7, 5] = new AllChessman.Tuong(Team.Man, new Index(7, 5), this);
                Map[7, 6] = new AllChessman.Ngua(Team.Man, new Index(7, 6), this);
                Map[7, 7] = new AllChessman.Xe(Team.Man, new Index(7, 7), this);
                Luot      = Team.Computer;
                Finished  = false;
            }
        }
Exemple #2
0
        public override Quanco GetCopy()
        {
            Tot rttot = new Tot(team, index.GetCopy(), Owner);

            rttot.moved = moved;
            return(rttot);
        }