Class GetPlayerTurnController

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

@RestController @CrossOrigin @RequestMapping("/getPlayerTurn") public class GetPlayerTurnController extends Object
This class handles the API-call to get the player who is currently on the turn.
Author:
Hannes Stuetzer
  • Constructor Details

    • GetPlayerTurnController

      @Autowired public GetPlayerTurnController(GetPlayerTurnService playerTurnService)
  • Method Details

    • getPlayerTurn

      @GetMapping public GetPlayerTurnObject getPlayerTurn(@RequestParam("gameID") int gameID)
      Method that is called on a get request.
      Parameters:
      gameID - the id of the current game (as params).
      Returns:
      a GetPlayerTurnObject containing the id of the game and the name of the player.