Пример #1
0
        protected void Clear()
        {
            AllBlocks = new List <GoBlockBase>();

            GoEmptyBlock lEmptyBlock = new GoEmptyBlock(this);

            UndoStack = new UndoStack(this);

            Turn                 = Color.Black;
            ZobrishHashes        = new Dictionary <ZobristHash, int>();
            LastMove             = CoordinateSystem.PASS;
            MoveList             = new List <KeyValuePair <Color, int> >();
            SimpleKoPoint        = CoordinateSystem.PASS;
            MoveNbr              = 0;
            Komi                 = 0;
            GameOver             = false;
            CapturedStoneCnt     = new int[2];
            ColorEnclosedRegions = null;
            SafetyStatusMap      = null;

            ZobristHash = new ZobristHash();
            Cells       = new GoCell[Coord.BoardArea];

            for (int i = 0; i < Coord.BoardArea; i++)
            {
                Cells[i] = new GoCell(i, this, lEmptyBlock);
            }

            for (int i = 0; i < Coord.BoardArea; i++)
            {
                Cells[i].SetNeighbors();
            }
        }
Пример #2
0
 public GoCellUndoChange(GoCell pGoCell)
 {
     // save changable properties of original object
     Cell = pGoCell;
     Block = pGoCell.Block;
 }
Пример #3
0
        protected void Clear()
        {
            AllBlocks = new List<GoBlockBase>();

            GoEmptyBlock lEmptyBlock = new GoEmptyBlock(this);

            UndoStack = new UndoStack(this);

            Turn = Color.Black;
            ZobrishHashes = new Dictionary<ZobristHash, int>();
            LastMove = CoordinateSystem.PASS;
            MoveList = new List<KeyValuePair<Color, int>>();
            SimpleKoPoint = CoordinateSystem.PASS;
            MoveNbr = 0;
            Komi = 0;
            GameOver = false;
            CapturedStoneCnt = new int[2];
            ColorEnclosedRegions = null;
            SafetyStatusMap = null;

            ZobristHash = new ZobristHash();
            Cells = new GoCell[Coord.BoardArea];

            for (int i = 0; i < Coord.BoardArea; i++)
                Cells[i] = new GoCell(i, this, lEmptyBlock);

            for (int i = 0; i < Coord.BoardArea; i++)
                Cells[i].SetNeighbors();
        }
 public GoCellUndoChange(GoCell pGoCell)
 {
     // save changable properties of original object
     Cell  = pGoCell;
     Block = pGoCell.Block;
 }