Class GetChessboardController

java.lang.Object
com.chess.backend.restController.controller.GetChessboardController

@RestController @CrossOrigin @RequestMapping("/getChessboard") public class GetChessboardController extends Object
This class handles the API-call to get the current chessboard.
Author:
Hannes Stuetzer
  • Constructor Details

    • GetChessboardController

      @Autowired public GetChessboardController(GetChessboardService getChessboardService)
  • Method Details

    • getChessboard

      @GetMapping public ChessboardObject getChessboard(@RequestParam("gameID") int gameID)
      Method that is called on a get request.
      Parameters:
      gameID - the id of the current game (as params).
      Returns:
      a ChessboardObject containing the current chessboard.