Upgrade to .net 5

Address breaking changes from Shogi.API nuget
This commit is contained in:
2021-01-23 18:11:19 -06:00
parent 1bbab8fe8f
commit 2c8e692d38
15 changed files with 71 additions and 99 deletions

View File

@@ -41,18 +41,18 @@ namespace Websockets.Managers.ClientActionHandlers
}
else
{
var player1 = getGameResponse.Players[0];
var session = getGameResponse.Session;
response.Game = new Game
{
GameName = getGameResponse.GameName,
Players = getGameResponse.Players
GameName = session.Name,
Players = new[] { session.Player1, session.Player2 }
};
response.Moves = userName.Equals(player1)
response.Moves = userName.Equals(session.Player1)
? getMovesResponse.Moves.Select(_ => Mapper.Map(_))
: getMovesResponse.Moves.Select(_ => Move.ConvertPerspective(Mapper.Map(_)));
communicationManager.SubscribeToGame(socket, getGameResponse.GameName, userName);
communicationManager.SubscribeToGame(socket, session.Name, userName);
}
var serialized = JsonConvert.SerializeObject(response);