Chessistics/chessistics-engine/Model/PieceRules.cs
Samuel Bouchet e6eaae43ab Initial commit: Chessistics prototype v0.3
Black box sim engine (commands in, events out) with 3 piece types
(Rook, Bishop, Knight), cargo transfer system with social status
priority, collision detection, and victory/defeat conditions.

57 tests covering rules, simulation, loading, and solvability.
Godot 4 presentation layer scaffolding.
2026-04-10 14:58:03 +02:00

20 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))
};
}