UTests pass with Pathfinder2D
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
using System.Diagnostics;
|
||||
using PathFinding;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Gameboard.ShogiUI.BoardState
|
||||
{
|
||||
[DebuggerDisplay("{WhichPiece} {Owner}")]
|
||||
public class Piece
|
||||
public abstract class Piece : IPlanarElement
|
||||
{
|
||||
public WhichPiece WhichPiece { get; }
|
||||
public WhichPlayer Owner { get; private set; }
|
||||
@@ -48,7 +50,7 @@ namespace Gameboard.ShogiUI.BoardState
|
||||
: WhichPlayer.Player1;
|
||||
}
|
||||
|
||||
public void Promote() => IsPromoted = true;
|
||||
public void Promote() => IsPromoted = CanPromote;
|
||||
|
||||
public void Demote() => IsPromoted = false;
|
||||
|
||||
@@ -57,5 +59,11 @@ namespace Gameboard.ShogiUI.BoardState
|
||||
ToggleOwnership();
|
||||
Demote();
|
||||
}
|
||||
|
||||
public abstract ICollection<Path> GetPaths();
|
||||
|
||||
public abstract Piece DeepClone();
|
||||
|
||||
public bool IsUpsideDown => Owner == WhichPlayer.Player2;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user