コード例 #1
0
        public void Should_GenerateOneMoveWest()
        {
            // execute
            ChessPosition position = _mover.West(ChessPosition.B1);

            // verify
            Assert.AreEqual(ChessPosition.A1, position);
        }
コード例 #2
0
        private void GenerateWestMoves(IBoardState boardState, IChessPieceMover cpm)
        {
            ChessPosition nextMove = cpm.West(Location);

            if (!boardState.Contains(nextMove))
            {
                MoveSet.Add(nextMove);
            }
        }
コード例 #3
0
        private void GenerateWestSouthWestMove(IBoardState boardState, IChessPieceMover cpm)
        {
            ChessPosition move = cpm.West(cpm.SouthWest(Location));

            if (!boardState.Contains(move))
            {
                MoveSet.Add(move);
            }
        }
コード例 #4
0
        private void GenerateWestCaptures(IBoardState enemyBoardState, IChessPieceMover cpm)
        {
            ChessPosition capture = cpm.West(Location);

            AddCaptureToCaptureSet(capture, enemyBoardState);
        }