using Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Types; namespace Gameboard.ShogiUI.Sockets.Repositories.CouchModels { public class Piece { public bool IsPromoted { get; set; } public WhichPlayer Owner { get; set; } public WhichPiece WhichPiece { get; set; } /// /// Default constructor and setters are for deserialization. /// public Piece() { } public Piece(Models.Piece piece) { IsPromoted = piece.IsPromoted; Owner = piece.Owner; WhichPiece = piece.WhichPiece; } public Models.Piece ToDomainModel() => new(IsPromoted, Owner, WhichPiece); } }