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; }
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); }