Fixed accidentally building the board from player2 perspective.
This commit is contained in:
27
Gameboard.ShogiUI.Sockets/Models/Piece.cs
Normal file
27
Gameboard.ShogiUI.Sockets/Models/Piece.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Types;
|
||||
using BoardStatePiece = Gameboard.ShogiUI.Rules.Pieces.Piece;
|
||||
|
||||
namespace Gameboard.ShogiUI.Sockets.Models
|
||||
{
|
||||
public class Piece
|
||||
{
|
||||
public WhichPiece WhichPiece { get; set; }
|
||||
|
||||
public bool IsPromoted { get; set; }
|
||||
|
||||
public Piece(BoardStatePiece piece)
|
||||
{
|
||||
WhichPiece = (WhichPiece)piece.WhichPiece;
|
||||
IsPromoted = piece.IsPromoted;
|
||||
}
|
||||
|
||||
public ServiceModels.Socket.Types.Piece ToServiceModel()
|
||||
{
|
||||
return new ServiceModels.Socket.Types.Piece
|
||||
{
|
||||
IsPromoted = IsPromoted,
|
||||
WhichPiece = WhichPiece
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user