示例#1
0
 public override IEnumerable<Board> PossibleMoves(Board currentBoard, byte row, byte col)
 {
     var currentLoc = new Loc(row, col);
     var boards = new List<Board>();
     foreach (var loc in TilesCovered(currentBoard, row, col))
     {
         if (!currentBoard.IsCovered(IsWhite, loc))
         {
             boards.Add(currentBoard.WithNewLocation(currentLoc, loc));
         }
     }
     return boards;
 }
示例#2
0
        public override IEnumerable <Board> PossibleMoves(Board currentBoard, byte row, byte col)
        {
            var currentLoc = new Loc(row, col);
            var boards     = new List <Board>();

            foreach (var loc in TilesCovered(currentBoard, row, col))
            {
                if (!currentBoard.IsCovered(IsWhite, loc))
                {
                    boards.Add(currentBoard.WithNewLocation(currentLoc, loc));
                }
            }
            return(boards);
        }