Switch to Vector2

This commit is contained in:
2021-02-26 17:11:08 -06:00
parent 640db4f4a2
commit 715b328ef5
9 changed files with 154 additions and 219 deletions

View File

@@ -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)
};
}
}