21 lines
579 B
C#
21 lines
579 B
C#
|
|
namespace Chessistics.Engine.Model;
|
||
|
|
|
||
|
|
public static class PieceRules
|
||
|
|
{
|
||
|
|
public static int GetSocialStatus(PieceKind kind) => kind switch
|
||
|
|
{
|
||
|
|
PieceKind.Rook => 5,
|
||
|
|
PieceKind.Bishop => 3,
|
||
|
|
PieceKind.Knight => 3,
|
||
|
|
_ => throw new ArgumentOutOfRangeException(nameof(kind))
|
||
|
|
};
|
||
|
|
|
||
|
|
public static int GetMaxRange(PieceKind kind) => kind switch
|
||
|
|
{
|
||
|
|
PieceKind.Rook => 2,
|
||
|
|
PieceKind.Bishop => 2,
|
||
|
|
PieceKind.Knight => 0, // Knight uses L-shape, not range
|
||
|
|
_ => throw new ArgumentOutOfRangeException(nameof(kind))
|
||
|
|
};
|
||
|
|
}
|