getSingleGame method

  1. @Operation('hints')
Future<Response> getSingleGame(
  1. @Bind('hints') int hints
)

Implementation

@Operation.get('hints')
Future<Response> getSingleGame(@Bind.path('hints') int hints) async {
  if (hints < 17 || hints > 81) {
    return Response.badRequest(body: 'hints must be within [17,81]');
  } else {
    final boards = await getBoards(hints, 1);
    return Response.ok({'boards': boards});
  }
}