before deleting Rules
This commit is contained in:
26
Gameboard.ShogiUI.Rules/Pieces/Lance.cs
Normal file
26
Gameboard.ShogiUI.Rules/Pieces/Lance.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using PathFinding;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Gameboard.ShogiUI.Rules.Pieces
|
||||
{
|
||||
public class Lance : Piece
|
||||
{
|
||||
private static readonly List<PathFinding.Move> Moves = new(1)
|
||||
{
|
||||
new PathFinding.Move(Direction.Up, Distance.MultiStep),
|
||||
};
|
||||
|
||||
public Lance(WhichPlayer owner) : base(WhichPiece.Lance, owner)
|
||||
{
|
||||
moveSet = new MoveSet(this, Moves);
|
||||
promotedMoveSet = new MoveSet(this, GoldenGeneral.Moves);
|
||||
}
|
||||
|
||||
public override Piece DeepClone()
|
||||
{
|
||||
var clone = new Lance(Owner);
|
||||
if (IsPromoted) clone.Promote();
|
||||
return clone;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user