Commander Overview
This section provides a high-level overview of the Commander format implementation in our game engine.
Contents
- Format Rules - Core rules specific to the Commander format
- Architecture - Overview of the implementation architecture
- Implementation Approach - General approach to implementing the Commander format
Format Summary
The Commander format is a multiplayer variant of Magic: The Gathering with special rules including:
- Each player begins the game with a designated legendary creature as their "commander"
- Players start with 40 life
- A player can cast their commander from the command zone for its mana cost, plus an additional 2 mana for each previous time it's been cast
- If a commander would be put into a library, hand, graveyard or exile, its owner may choose to move it to the command zone
- A player who has been dealt 21 or more combat damage by the same commander loses the game
Implementation Principles
Our implementation of the Commander format follows these key principles:
- Rule Accuracy - Faithful implementation of the official Commander rules
- Performance - Optimized for multiplayer games with complex board states
- Extensibility - Designed to easily incorporate new Commander-specific cards and mechanics
- Testability - Comprehensive test suite for validating format-specific rules
See the Implementation Approach document for more detailed information on how these principles are applied in our codebase.
Related Sections
- Game Mechanics - For detailed mechanics implementation
- Combat - For Commander damage tracking and combat interactions
- Game Zones - For Command Zone implementation details