public static List<Move> GetValidMoves(GridModel<ShapeViewDrawable> gridModel) { List<Move> possibleMoves = GetPossibleMoves(gridModel); List<Move> validMoves = new List<Move>(); foreach (Move move in possibleMoves) { if (gridModel.IsValidMove(move)) { validMoves.Add(move); } } return validMoves; }