public IActionResult Login([FromBody] string username) { if (username?.Length > Limits.MAX_USERNAME) { throw new InputValueTooLargeException(); } return(new JsonResult(BackgammonService.Login(PwdManService, GetToken(), username))); }
public IActionResult StartNextGame() { return(new JsonResult(BackgammonService.StartNextGame(GetTicket()))); }
public IActionResult GiveUp() { return(new JsonResult(BackgammonService.GiveUp(GetTicket()))); }
public IActionResult Roll() { return(new JsonResult(BackgammonService.Roll(GetTicket()))); }
public IActionResult GetModel() { return(new JsonResult(BackgammonService.GetBackgammonModel(GetTicket()))); }
public IActionResult Logout() { return(new JsonResult(BackgammonService.Logout(GetTicket()))); }
public IActionResult GetState() { return(new JsonResult(BackgammonService.GetState())); }
public IActionResult Move([FromBody] MoveModel move) { return(new JsonResult(BackgammonService.Move(GetTicket(), move))); }
public IActionResult ConfirmNextGame([FromBody] bool ok) { return(new JsonResult(BackgammonService.ConfirmNextGame(GetTicket(), ok))); }