// returns an array of valid next moves for the given board private List <Move> ValidMovesForBoard(GameBoardViewModel viewModel) { List <Move> moves = new List <Move>(); for (int row = 0; row < 8; row++) { for (int col = 0; col < 8; col++) { if (viewModel.IsValidMove(row, col)) { moves.Add(new Move() { Row = row, Column = col }); } } } return(moves); }
// returns an array of valid next moves for the given board private List<Move> ValidMovesForBoard(GameBoardViewModel viewModel) { List<Move> moves = new List<Move>(); for (int row = 0; row < 8; row++) { for (int col = 0; col < 8; col++) { if (viewModel.IsValidMove(row, col)) { moves.Add(new Move() { Row = row, Column = col }); } } } return moves; }