예제 #1
0
        public Move(GameEngine engine, Board board, Square fromSquare, Square toSquare, Piece pieceToTest)
        {
            _engine = engine;
            _board = board;
            FromSquare = fromSquare;
            ToSquare = toSquare;
            PieceMoved = pieceToTest;

            IsValidMove = TestMove();
        }
예제 #2
0
        public Move(GameEngine engine, Board board, Square fromSquare, Square toSquare, Piece pieceMoved, Piece pieceCaptured, bool isPacketMove, Piece.PieceType piecePromoted)
        {
            _engine = engine;
            _board = board;
            FromSquare = fromSquare;
            ToSquare = toSquare;
            PieceMoved = pieceMoved;
            PiecePromoted = piecePromoted;
            PieceCaptured = pieceCaptured;

            ProcessMove(isPacketMove);
        }
예제 #3
0
 public static void Init( Board board)
 {
     _board = board;
     HasWhiteKingMoved = false;
     HasBlackKingMoved = false;
     HasBlackRookAMoved = false;
     HasBlackRookHMoved = false;
     HasWhiteRookAMoved = false;
     HasWhiteRookHMoved = false;
 }
예제 #4
0
        public virtual void Initialize()
        {
            GameBoard = new Board(_IsAnimated);

            TimeWhite = TimeSpan.FromHours(1);
            TimeBlack = TimeSpan.FromHours(1);

            #region Cameras
            CamWhite = new Camera("camWhite",
                new Vector3(1, 60, 60),
                new Vector3(1, 5, 4),
                _aspectRatio);

            CamBlack = new Camera("camBlack",
                new Vector3(0, 60, -61),
                new Vector3(0, 5, -5),
                _aspectRatio);

            Engine.Cameras.AddCamera(CamWhite);
            Engine.Cameras.AddCamera(CamBlack);

            #endregion

            GameBoard.Squares[CurrentI, CurrentJ].IsHover = true;
            foreach (GameObject3D t in SceneObjects)
                t.Initialise();

            MoveGen.Init(GameBoard);
            BitboardHelper.Initialize();
        }