Switch to Vector2
This commit is contained in:
@@ -52,7 +52,7 @@ namespace Gameboard.ShogiUI.Sockets.Managers.ClientActionHandlers
|
||||
|
||||
communicationManager.SubscribeToGame(sessionModel, userName);
|
||||
var boardMoves = moveModels.Select(_ => _.ToBoardModel()).ToList();
|
||||
boardManager.Add(getGameResponse.Session.Name, new ShogiBoard(boardMoves));
|
||||
boardManager.Add(getGameResponse.Session.Name, ShogiBoard.ConstructWithMoves(boardMoves));
|
||||
|
||||
var response = new LoadGameResponse(ClientAction.LoadGame)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Gameboard.ShogiUI.BoardState;
|
||||
using Microsoft.FSharp.Core;
|
||||
using System;
|
||||
using System.Numerics;
|
||||
using ShogiApi = Gameboard.Shogi.Api.ServiceModels.Types;
|
||||
|
||||
namespace Gameboard.ShogiUI.Sockets.Models
|
||||
@@ -77,10 +78,10 @@ namespace Gameboard.ShogiUI.Sockets.Models
|
||||
{
|
||||
return new BoardState.Move
|
||||
{
|
||||
From = new BoardVector(From.X, From.Y),
|
||||
From = new Vector2(From.X, From.Y),
|
||||
IsPromotion = IsPromotion,
|
||||
PieceFromCaptured = Enum.TryParse<WhichPiece>(PieceFromCaptured, out var whichPiece) ? whichPiece : null,
|
||||
To = new BoardVector(To.X, To.Y)
|
||||
To = new Vector2(To.X, To.Y)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user