A Feudal Hierarchy Chess Variant with RPG Elements.
| Attribute | Details |
|---|---|
| Status | 🚧 Phase 15: Frontend Integration (In Progress) |
| Core Logic | ✅ Standard + Medieval + AI Engines (Minimax/Greedy) |
| API | ✅ ASP.NET Core 9 / SignalR / AI Integration |
| Frontend | ✅ 3D/2D Hybrid Board + Rich Narrative Log + AI Visualization |
| License | Custom (Educational Use w/ Attribution) |
| Docs | Architecture • Ruleset • Security |
Medieval Chess re-imagines the classic game by enforcing the social structures of the Middle Ages onto the board. Pieces are not just units; they are lords and vassals bound by loyalty, capable of defection, promotion, and performing tactical RPG-style abilities.
- Feudal Loyalty System: Dynamic chains of command. Capturing a Lord (Queen/Bishop/Rook) causes their Vassals to waver or defect.
- RPG Progression: Pieces gain XP, level up, and unlock ability trees (e.g., Knights learn "Charge", Bishops learn "Sanctify").
- Asymmetric War: "King's Court" (Defensive) vs "Queen's Court" (Offensive) bonuses.
- AI Opponents: Integrated Minimax Bot with "Thinking" visualization.
- Game Modes:
- Standard: Instant capture, focus on positioning.
- Attrition: HP-based combat (activates late-game).
This project follows Clean Architecture and Domain-Driven Design (DDD) principles.
- Pure C# 12, zero external dependencies.
- Entities:
Game,Piece,Board,LoyaltyRelationship,ActiveEffect,PieceAbility. - Value Objects:
Position,LoyaltyValue. - Services:
LoyaltyManager,AbilityManager,EngineService.
- CQRS: MediatR pattern (
CreateGameCommand,GetGameQuery). - REST API: Exposes game state management.
- Infrastructure: In-Memory persistence (Repository Pattern).
- Dependencies: References
MedievalChess.Enginefor AI logic.
- React 18 + Vite: Fast SPA framework.
- React Three Fiber: Declarative 3D rendering.
- Zustand: Lightweight state management.
- .NET 9.0 SDK
- Node.js 20+
Open a terminal in the root folder:
dotnet run --project src/MedievalChess.Api/MedievalChess.Api.csprojThe API will start on http://localhost:5267 (or similar).
Open a new terminal in the client/ folder:
cd client
npm run devOpen the URL shown (e.g., http://localhost:5173). The game will automatically create a new match and load the board.
Current Status: Phase 15 (Frontend Integration).
For the full detailed project roadmap and phase tracking, please see Roadmap.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/Games |
Create a new game |
| GET | /api/Games/{id} |
Get game state (pieces, moves, check status) |
| POST | /api/Games/{id}/moves |
Execute a move (with optional promotion piece) |
| POST | /api/Games/{id}/ai-move |
Request AI to calculate and execute a move |
| GET | /api/Games/{id}/legal-moves/{from} |
Get legal destinations for a piece |
| POST | /api/Games/{id}/resign |
Resign the game |
| POST | /api/Games/{id}/offer-draw |
Offer a draw |