Fixed accidentally building the board from player2 perspective.

This commit is contained in:
2021-04-06 19:52:02 -05:00
parent 2d5c6b20b9
commit 05a9c71499
45 changed files with 441 additions and 276 deletions

View File

@@ -31,7 +31,7 @@ namespace Gameboard.ShogiUI.Sockets.Controllers
var isPlayer1 = await manager.IsPlayer1(request.SessionName, userName);
if (isPlayer1)
{
var code = (await repository.PostJoinCode(request.SessionName, userName)).JoinCode;
var code = await repository.PostJoinCode(request.SessionName, userName);
return new CreatedResult("", new PostGameInvitationResponse(code));
}
else
@@ -49,7 +49,7 @@ namespace Gameboard.ShogiUI.Sockets.Controllers
var isPlayer1 = manager.IsPlayer1(request.SessionName, request.GuestId);
if (isGuest && await isPlayer1)
{
var code = (await repository.PostJoinCode(request.SessionName, request.GuestId)).JoinCode;
var code = await repository.PostJoinCode(request.SessionName, request.GuestId);
return new CreatedResult("", new PostGameInvitationResponse(code));
}
else