game-state
Installation
SKILL.md
Game State Management Skill
Overview
This skill provides expertise for managing complex game state in digital board games. It covers state structure design, action validation, phase management, and patterns for implementing intricate game rules reliably.
Core Principles
Immutable State
Always treat game state as immutable. Create new state objects rather than mutating existing ones:
// BAD: Mutating state
function addMoney(state, playerId, amount) {
state.players[playerId].money += amount;
return state;
}