Пример #1
0
        public void Should_GenerateOneMoveEast()
        {
            // execute
            ChessPosition position = _mover.East(ChessPosition.B1);

            // verify
            Assert.AreEqual(ChessPosition.C1, position);
        }
Пример #2
0
        private void GenerateEastMoves(IBoardState boardState, IChessPieceMover cpm)
        {
            ChessPosition nextMove = cpm.East(Location);

            if (!boardState.Contains(nextMove))
            {
                MoveSet.Add(nextMove);
            }
        }
Пример #3
0
        private void GenerateEastNorthEastMove(IBoardState boardState, IChessPieceMover cpm)
        {
            ChessPosition move = cpm.East(cpm.NorthEast(Location));

            if (!boardState.Contains(move))
            {
                MoveSet.Add(move);
            }
        }
Пример #4
0
        private void GenerateEastCaptures(IBoardState enemyBoardState, IChessPieceMover cpm)
        {
            ChessPosition capture = cpm.East(Location);

            AddCaptureToCaptureSet(capture, enemyBoardState);
        }