How a-eloiza/jogodaonca works
jogoDaOnca implements the Jogo da Onça board game, with a Redis-backed controller coordinating players and an AI player using minimax search. The main runtime loop sends the current game state to the active side, receives a move, validates and applies it, then checks for a winner and advances the turn. The game module also handles move generation and message formatting; the AI evaluates candidate moves using a heuristic. The excerpts show Redis list operations and the main calls, but do not establish how example clients are used.
Main entry points: jogo.c Rules and moves · jogador.c AI player · minimax.c Minimax search · controlador.c Game controller
Components 7
Game coordination
- Game controller
src/controlador.c
Player client
- AI player
src/jogador.c - Board transport
src/tabuleiro/tabuleiro.c
Game rules
- Rules and moves
src/jogo/jogo.c
AI strategy
- Minimax search
src/minimax/minimax.c - Position heuristic
src/heuristica/heuristica.c
Other components
- Redis lists
Connections 9
- Game controller → Redis lists: reads and writes
src/controlador.c - Game controller → Rules and moves: validates and applies
src/controlador.c - AI player → Board transport: exchanges state
src/jogador.c - Board transport → Redis lists: reads and writes
src/tabuleiro/tabuleiro.c - AI player → Rules and moves: parses and formats
src/jogador.c - AI player → Minimax search: selects move
src/jogador.c - Minimax search → Rules and moves: generates and applies
src/minimax/minimax.c - Minimax search → Position heuristic: scores positions
src/minimax/minimax.c - Position heuristic → Rules and moves: counts generated moves
src/heuristica/heuristica.c