From fa1ad5f6d0363a23932e23be5250f2380b45de8e Mon Sep 17 00:00:00 2001 From: Lucas Morgan Date: Thu, 31 Oct 2024 18:56:51 -0500 Subject: [PATCH] Yep --- Shogi.Api/Application/ShogiApplication.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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(); }