How leuzthiam/chessgame works
ChessGame is a .NET chess application with a cross-platform MAUI interface, chess rules and match management in Core, and EF Core persistence in Infrastructure. The main workflow is a player interacting with the board UI, which delegates game actions to the match service; the service applies rules to the chess state and can save or load games. The graph also shows move history, AI, and user services. Some relationships are supported only by the README or source index; unsampled implementation details are not inferred.
Main entry points: ServicePartie.cs Match service · Echiquier.cs Chessboard state · ChessDbContext.cs EF Core context · UtilisateurService.cs User service
Components 21
MAUI interface
- Board view
ChessGameMAUI/Presentation/Views/EchiquierView.xaml.cs - Game info viewmodel
ChessGameMAUI/Presentation/ViewModels/InfoPartieViewModel.cs
Chess gameplay
- Match service
ChessGame.Core/Core/Application/Services/ServicePartie.cs - Move validator
ChessGame.Core/Core/Application/Services/ValidateurCoup.cs - Game rules
ChessGame.Core/Core/Application/Services/ReglesJeu.cs - Move generator
ChessGame.Core/Core/Application/Services/GenerateurCoups.cs - Chessboard state
ChessGame.Core/Core/Domain/Models/Echiquier.cs - Chess pieces
ChessGame.Core/Core/Domain/Models/Pieces - Match state
ChessGame.Core/Core/Domain/Models/EtatPartie.cs - Move history
ChessGame.Core/Core/Application/Services/HistoriquesCoups.cs
Move assistance
- Minimax engine
ChessGame.Core/Core/Application/Services/MoteurMinimax.cs - Position evaluation
ChessGame.Core/Core/Application/Services/EvaluationPosition.cs - Simple AI
ChessGame.Core/Core/Application/Services/SimpleAi.cs
Persistence and users
- Match repository
ChessGame.Infrastructure/Infrastructure/Persistence/Repositories/PartieRepository.cs - Game save/load
ChessGame.Infrastructure/Infrastructure/Persistence/Sauvegardeur.cs - EF Core context
ChessGame.Infrastructure/Infrastructure/Persistence/Data/ChessDbContext.cs - Persistence entities
ChessGame.Infrastructure/Infrastructure/Persistence/Entities - Database
- User service
ChessGame.Infrastructure/Infrastructure/Services/UtilisateurService.cs - User records
ChessGame.Infrastructure/Infrastructure/Persistence/Entities/UtilisateurEntity.cs
Other components
- Player
Connections 21
- Player → Board view: plays through
README.md - Board view → Match service: requests game actions
ChessGameMAUI/Presentation/Views/EchiquierView.xaml.cs - Game info viewmodel → Match service: uses match service
ChessGameMAUI/Presentation/ViewModels/InfoPartieViewModel.cs - Match service → Move validator: validates moves
ChessGame.Core/Core/Application/Services/ServicePartie.cs - Match service → Game rules: checks rules
ChessGame.Core/Core/Application/Services/ServicePartie.cs - Match service → Move generator: requests possible moves
ChessGame.Core/Core/Application/Services/ServicePartie.cs - Match service → Chessboard state: updates game state
ChessGame.Core/Core/Application/Services/ServicePartie.cs - Chessboard state → Chess pieces: tracks pieces
ChessGame.Core/Core/Domain/Models/Echiquier.cs - Chessboard state → Match state: holds match state
ChessGame.Core/Core/Domain/Models/Echiquier.cs - Match service → Match state: manages state
ChessGame.Core/Core/Application/Services/ServicePartie.cs - Match service → Move history: updates history
ChessGame.Core/Core/Application/Services/ServicePartie.cs - Match service → Game save/load: saves or loads
ChessGame.Core/Core/Application/Services/ServicePartie.cs - Match service → Match repository: uses repository
ChessGame.Core/Core/Application/Services/ServicePartie.cs - Minimax engine → Position evaluation: evaluates positions
- Simple AI → Minimax engine: may delegate
- Match repository → EF Core context: queries and persists
ChessGame.Infrastructure/Infrastructure/Persistence/Repositories/PartieRepository.cs - Game save/load → Chessboard state: serializes game state
ChessGame.Infrastructure/Infrastructure/Persistence/Sauvegardeur.cs - EF Core context → Persistence entities: maps entities
ChessGame.Infrastructure/Infrastructure/Persistence/Data/ChessDbContext.cs - EF Core context → Database: stores records
- User service → EF Core context: uses context
ChessGame.Infrastructure/Infrastructure/Services/UtilisateurService.cs - User service → User records: manages users
ChessGame.Infrastructure/Infrastructure/Services/UtilisateurService.cs