How nikolayit/belotgameengine works
Belot Game Engine is both a reusable trick-taking rules engine and the core of a MAUI game where a person plays South against configurable opponents. The engine runs bids, declarations, legal card play, tricks, and scoring; player implementations supply decisions. The app presents the match and retains local rating and history. The README documents several AI styles, though not all are represented by sampled source. Edges reflect README claims or source-index references; unsampled UI and AI wiring is left unverified.
Main entry points: RoundManager.cs Round orchestration · IPlayer.cs Player interface · StartPage.xaml.cs Game interface · App.xaml.cs App entry
Components 20
Game engine
- Match orchestration
src/Belot.Engine/BelotGame.cs - Round orchestration
src/Belot.Engine/GameMechanics/RoundManager.cs - Bidding and contract
src/Belot.Engine/GameMechanics/ContractManager.cs - Announcements
src/Belot.Engine/Game/Announce.cs - Trick play
src/Belot.Engine/GameMechanics/TricksManager.cs - Valid plays
src/Belot.Engine/GameMechanics/ValidAnnouncesService.cs - Round scoring
src/Belot.Engine/GameMechanics/ScoreManager.cs - Card collection
src/Belot.Engine/Cards/CardCollection.cs - Player interface
src/Belot.Engine/Players/IPlayer.cs
Player strategies
- Smart strategy
src/AI/Belot.AI.SmartPlayer/SmartPlayer.cs - Neural player
src/AI/Belot.AI.ClaudePlayer/ClaudePlayerNeural.cs - Heuristic player
src/AI/Belot.AI.ClaudePlayer/Heuristic/HeuristicCardPlay.cs - Neural search
src/AI/Belot.AI.ClaudePlayer/Neural/NeuralSearch.cs - Random player
src/AI/Belot.AI.DummyPlayer/RandomPlayer.cs - Master profile
src/AI/Belot.AI.ClaudePlayer
Mobile app
- App entry
src/UI/Belot.UI/App.xaml.cs - Game session
src/UI/Belot.UI/Game/GameSession.cs - Game interface
src/UI/Belot.UI/Pages/StartPage.xaml.cs
Local game records
- Player records
src/UI/Belot.UI/Game
Other components
- Human player
Connections 21
- Human player → Game interface: plays through
- Game interface → Game session: starts match
- Game session → Match orchestration: runs
- Match orchestration → Round orchestration: plays rounds
- Round orchestration → Bidding and contract: requests bids
- Round orchestration → Announcements: records declarations
- Round orchestration → Trick play: plays tricks
- Round orchestration → Round scoring: scores round
- Round orchestration → Card collection: uses cards
src/Belot.Engine/GameMechanics/RoundManager.cs - Round orchestration → Player interface: drives players
src/Belot.Engine/GameMechanics/RoundManager.cs - Trick play → Valid plays: checks plays
- Round scoring → Round orchestration: reads round result
src/Belot.Engine/GameMechanics/ScoreManager.cs - Player interface → Smart strategy: implemented by
- Player interface → Neural player: implemented by
- Player interface → Heuristic player: implemented by
- Player interface → Random player: implemented by
- Neural player → Neural search: search-enhanced option
- Player interface → Master profile: profile variant
- App entry → Game interface: opens
- App entry → Player records: retains ratings
- App entry → Game interface: localizes app
src/UI/Belot.UI/App.xaml.cs