Beispiel #1
0
 public JokenpoResult Play(JokenpoPlay play)
 {
     _logger.LogInformation($"Playing new game");
     _logger.LogInformation($"Player [{play.PlayerOne.Name}] chose [{play.PlayerOne.ChosenJokenpoSymbol}]");
     _logger.LogInformation($"Player [{play.PlayerTwo.Name}] chose [{play.PlayerTwo.ChosenJokenpoSymbol}]");
     return(_jokenpoService.Play(play));
 }
Beispiel #2
0
 public ActionResult <string> Play(string namePlayer1, string namePlayer2)
 {
     try
     {
         _logger.LogInformation("Game started");
         return(_service.Play(namePlayer1, namePlayer2));
     }
     catch (Exception)
     {
         _logger.LogError("Error playing jokenpo");
         return(StatusCode(500, "Internal server error"));
     }
 }