28 lines
636 B
C#
28 lines
636 B
C#
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
|
|
};
|
|
}
|
|
}
|
|
}
|