Esempio n. 1
0
 public IActionResult Login([FromBody] string username)
 {
     if (username?.Length > Limits.MAX_USERNAME)
     {
         throw new InputValueTooLargeException();
     }
     return(new JsonResult(ChessService.Login(PwdManService, GetToken(), username)));
 }
Esempio n. 2
0
 public IActionResult PlayAgainstComputer()
 {
     return(new JsonResult(ChessService.PlayAgainstComputer(GetTicket())));
 }
Esempio n. 3
0
 public IActionResult StartNewGame([FromBody] StartGameModel startGameModel)
 {
     return(new JsonResult(ChessService.StartNewGame(GetTicket(), startGameModel)));
 }
Esempio n. 4
0
 public IActionResult ConfirmNextGame([FromBody] bool ok)
 {
     return(new JsonResult(ChessService.ConfirmNextGame(GetTicket(), ok)));
 }
Esempio n. 5
0
 public IActionResult StartNextGame()
 {
     return(new JsonResult(ChessService.StartNextGame(GetTicket())));
 }
Esempio n. 6
0
 public IActionResult GetModel()
 {
     return(new JsonResult(ChessService.GetChessModel(GetTicket())));
 }
Esempio n. 7
0
 public IActionResult Logout()
 {
     return(new JsonResult(ChessService.Logout(GetTicket())));
 }
Esempio n. 8
0
 public IActionResult GetState()
 {
     return(new JsonResult(ChessService.GetState()));
 }
Esempio n. 9
0
 public IActionResult Place([FromBody] PlaceModel value)
 {
     return(new JsonResult(ChessService.Place(GetTicket(), value)));
 }
Esempio n. 10
0
 public IActionResult GiveUp()
 {
     return(new JsonResult(ChessService.GiveUp(GetTicket())));
 }
Esempio n. 11
0
 public IActionResult EndGame()
 {
     return(new JsonResult(ChessService.EndGame(GetTicket())));
 }