How terki0n/simple-match3 works
Simple Match-3 is a configurable Unity game: players swap adjacent gems, matches are detected and cleared, gems collapse and refill, and cascades resolve automatically. The graph preserves those documented gameplay stages and includes the configuration and model/view layer. Source excerpts were unavailable, so links reflect README-described gameplay rather than verified method calls; implementation paths are taken from the repository tree.
Main entry points: GameFlowController.cs Game Flow · MatchDetector.cs Match Detector · GemInputController.cs Gem Input · GemSwapper.cs Gem Swapper
Components 20
Gameplay
- Gem Input
Assets/Scripts/GamePlay/GemInputController.cs - Gem Swapper
Assets/Scripts/GamePlay/GemSwapper.cs - Game Flow
Assets/Scripts/GamePlay/GameFlowController.cs - Match Detector
Assets/Scripts/Match Logic/MatchDetector.cs - Match Result
Assets/Scripts/Match Logic/MatchResult.cs - Board Collapse
Assets/Scripts/GamePlay/BoardCollapseSystem.cs - Board Refill
Assets/Scripts/GamePlay/BoardRefillSystem.cs - Board Generator
Assets/Scripts/GamePlay/BoardGenerator.cs
Board And Gems
- Board Model
Assets/Scripts/Core/Board/BoardModel.cs - Board Cell
Assets/Scripts/Core/Board/BoardCell.cs - Board Position
Assets/Scripts/Core/Board/BoardPosition.cs - Gem Model
Assets/Scripts/Core/Gem/GemModel.cs - Gem Type
Assets/Scripts/Core/Gem/GemType.cs
Configuration And View
- Board Config
Assets/Scripts/Config/BoardConfig.cs - Gem Config
Assets/Scripts/Config/GemConfig.cs - Board Settings
Assets/ScriptableObjects/Board1.asset - Gem Definitions
Assets/ScriptableObjects - Board View
Assets/Scripts/View/BoardView.cs - Gem View
Assets/Scripts/View/GemView.cs
Other components
- Player
Connections 12
- Player → Gem Input: swipes
- Gem Input → Gem Swapper: requests swap
- Gem Swapper → Match Detector: tests matches
- Match Detector → Match Result: produces matches
- Game Flow → Match Detector: resolves matches
- Game Flow → Board Collapse: clears and collapses
- Game Flow → Board Refill: refills board
- Game Flow → Match Detector: checks cascades
- Board Settings → Board Config: configures board
- Gem Definitions → Gem Config: defines gems
- Board View → Board Model: presents board
- Gem View → Gem Model: presents gems