Card Game

Model card game rules with zones, turn phases, and LIFO effect resolution in C#.

Updated May 6, 2026
One-click install
npx skills add https://github.com/BasarEkinci/memory-card-game --skill card-game-basarekinci
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Card Game
Source: https://github.com/BasarEkinci/memory-card-game/tree/main/.claude/skills/genre/card-game
Command: npx skills add https://github.com/BasarEkinci/memory-card-game --skill card-game-basarekinci

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the challenge of designing consistent, expandable card game rules (cards, zones, turns, and effects) without creating tangled game logic or UI desync.

Core Features & Use Cases

  • Zone & Turn Architecture: Model cards moving between deck/hand/battlefield/graveyard/exile, and drive gameplay with a clear turn phase state machine (draw/main/combat/end).
  • Effect Resolution & Targeting: Define effects with timing and targeting modes, resolve chains reliably with a LIFO effect stack, and generate target sets (single, all, random) in a deterministic way when needed.
  • Deck/Hand Operations: Support Fisher-Yates shuffling, drawing with hand-cap behavior (burn/overdraw), and mulligan flows for opening hands.
  • Unity-Friendly Separation: Keep game logic in plain C# systems while Unity views observe models and render UI/animations using event-driven updates (e.g., MessagePipe) and DI wiring (e.g., VContainer).

Quick Start

Ask your AI to generate a Unity-friendly card game rules core using plain C# systems, including CardDefinition/CardInstance, a zone transfer system, a turn phase state machine, an effect stack resolver with targeting modes, and deterministic deck drawing.

Frequently Asked Questions about Card Game

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a turn phase state machine for a card game in Unity?

A LIFO effect stack resolves card effect chains reliably by executing triggers safely and predictably. It processes effects in last-in, first-out order, ensuring timing and targeting modes generate deterministic target sets for consistent behavior.

Can I use plain C# card game logic with Unity UI and dependency injection?

Model zones using a capacity-aware zone transfer system to move cards between deck, hand, battlefield, graveyard, and exile. This manages card locations safely, preventing invalid transfers and maintaining strict battlefield capacity limits.

What's the best way to implement deterministic shuffling and targeting in a deck builder?

Handle overdraw and mulligan flows by applying hand-cap behavior, which can burn excess drawn cards, and supporting mulligan flows for opening hands. This manages deck and hand operations without breaking game state.

Does this card game architecture support deck builder and TCG mechanics in Unity C#?

Card effects are defined with specific timing and targeting modes, then resolved reliably through the stack-based effect resolver. This generates deterministic target sets, ensuring effect chaining executes triggers safely and predictably.