diff --git a/Shogi.Api/Application/ShogiApplication.cs b/Shogi.Api/Application/ShogiApplication.cs index 926f18c..0851b50 100644 --- a/Shogi.Api/Application/ShogiApplication.cs +++ b/Shogi.Api/Application/ShogiApplication.cs @@ -95,7 +95,7 @@ public class ShogiApplication( } else { - var isPromotion = command.IsPromotion.HasValue ? command.IsPromotion.Value : false; + var isPromotion = command.IsPromotion ?? false; session.Board.Move(command.From!, command.To, isPromotion); } } @@ -109,7 +109,6 @@ public class ShogiApplication( await gameHubContext.Emit_PieceMoved(sessionId); return new NoContentResult(); - } public async Task JoinSession(string sessionId, string player2Id) @@ -120,12 +119,9 @@ public class ShogiApplication( if (string.IsNullOrEmpty(session.Player2)) { session.AddPlayer2(player2Id); - await sessionRepository.SetPlayer2(sessionId, player2Id); - var player2Email = this.GetUsername(player2Id); await gameHubContext.Emit_SessionJoined(sessionId); - return new OkResult(); }