checkpoint

This commit is contained in:
2021-11-21 10:07:35 -06:00
parent cf3fbbbc1d
commit 433ab2772a
23 changed files with 1556 additions and 1487 deletions

View File

@@ -8,11 +8,11 @@ namespace Gameboard.ShogiUI.Sockets.Models
public class Piece : IPlanarElement
{
public WhichPiece WhichPiece { get; }
public WhichPlayer Owner { get; private set; }
public WhichPerspective Owner { get; private set; }
public bool IsPromoted { get; private set; }
public bool IsUpsideDown => Owner == WhichPlayer.Player2;
public bool IsUpsideDown => Owner == WhichPerspective.Player2;
public Piece(WhichPiece piece, WhichPlayer owner, bool isPromoted = false)
public Piece(WhichPiece piece, WhichPerspective owner, bool isPromoted = false)
{
WhichPiece = piece;
Owner = owner;
@@ -28,9 +28,9 @@ namespace Gameboard.ShogiUI.Sockets.Models
public void ToggleOwnership()
{
Owner = Owner == WhichPlayer.Player1
? WhichPlayer.Player2
: WhichPlayer.Player1;
Owner = Owner == WhichPerspective.Player1
? WhichPerspective.Player2
: WhichPerspective.Player1;
}
public void Promote() => IsPromoted = CanPromote;