示例#1
0
        public PassiveGame(string id)
            : base()
        {
            _id = id;

            for (int i = 0; i < BoardSize; i++)
            {
                for (int j = 0; j < BoardSize; j++)
                {
                    _pieces[i, j] = new Piece(Type.Blank, Color.White);
                }
            }

            _turn = Color.White;

            BoardChanged += OnBoardChanged;
            TurnChanged += OnTurnChanged;
        }
示例#2
0
 protected void OnBoardChanged(int x, int y, Type type, Color side)
 {
     _pieces[x, y] = new Piece(type, side);
 }