public IActionResult Login([FromBody] string username) { if (username?.Length > Limits.MAX_USERNAME) { throw new InputValueTooLargeException(); } return(new JsonResult(ChessService.Login(PwdManService, GetToken(), username))); }
public IActionResult PlayAgainstComputer() { return(new JsonResult(ChessService.PlayAgainstComputer(GetTicket()))); }
public IActionResult StartNewGame([FromBody] StartGameModel startGameModel) { return(new JsonResult(ChessService.StartNewGame(GetTicket(), startGameModel))); }
public IActionResult ConfirmNextGame([FromBody] bool ok) { return(new JsonResult(ChessService.ConfirmNextGame(GetTicket(), ok))); }
public IActionResult StartNextGame() { return(new JsonResult(ChessService.StartNextGame(GetTicket()))); }
public IActionResult GetModel() { return(new JsonResult(ChessService.GetChessModel(GetTicket()))); }
public IActionResult Logout() { return(new JsonResult(ChessService.Logout(GetTicket()))); }
public IActionResult GetState() { return(new JsonResult(ChessService.GetState())); }
public IActionResult Place([FromBody] PlaceModel value) { return(new JsonResult(ChessService.Place(GetTicket(), value))); }
public IActionResult GiveUp() { return(new JsonResult(ChessService.GiveUp(GetTicket()))); }
public IActionResult EndGame() { return(new JsonResult(ChessService.EndGame(GetTicket()))); }