Skip to content

About

A production-quality Match-3 puzzle game built with Unity 6, Clean Architecture, dependency injection, and automated tests.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

Match-3 — Portfolio Project

A production-quality Match-3 puzzle game built with Unity 6.

Architecture

Clean Architecture (Domain / Application / Infrastructure / Presentation)

  • DI: VContainer
  • Pattern: State Machine + EventBus + Object Pool
  • Animations: DOTween
  • Tests: EditMode unit tests (NUnit)

Project Structure

Assets/Scripts/ ├── Domain/ # Pure C# — zero Unity dependency │ ├── Board/ # BoardModel, CellType │ ├── Common/ # GoalData, shared value objects │ ├── Events/ # EventBus, GameEvents │ ├── Match/ # IMatchStrategy, MatchGroup, MatchResult │ ├── Rules/ # BoardGenerator, GravitySystem, ShuffleService, SpecialTileRule │ └── Tiles/ # TileModel, TileColor, TileSpecialType ├── Application/ # Use cases, state machine, services │ ├── DTOs/ # SwapResult │ ├── Services/ # GoalService, ScoreService, MoveService, SceneService │ ├── StateMachine/# GameStateMachine + States │ └── UseCases/ # SwapTilesUseCase, InitializeBoardUseCase ├── Infrastructure/ # Unity implementations │ ├── Audio/ # AudioService, AudioConfig │ ├── Config/ # LevelConfig, TileViewConfig │ ├── DI/ # GameInstaller (VContainer LifetimeScope) │ ├── Factories/ # TileFactory, TileViewConfig │ ├── Input/ # InputHandler (Unity Input System) │ └── Pool/ # ObjectPool ├── Presentation/ # Views, animations, UI │ ├── Animation/ # AnimationSequencer │ ├── Board/ # TileView, BoardView, BoardController │ ├── HUD/ # HUDView, GoalEntryUI, UIManager │ ├── Popups/ # BasePopup, WinPopup, LosePopup, PausePopup │ └── VFX/ # VFXService └── Tests/ ├── Unit/ # BoardModelTests, MatchFinderTests, │ # GravitySystemTests, ShuffleServiceTests └── Integration/ # SwapTilesUseCaseTests

Features

✅ Implemented

  • Domain layer — pure C#, zero Unity dependency
  • BoardModel with bounds validation and cell type support
  • Match detection — horizontal, vertical, L/T shape, 4+, 5+
  • Special tile rules — Bomb (3x3), RocketH, RocketV, ColorBomb
  • Board generation — no-match initial fill
  • Gravity system — tile fall + refill
  • Shuffle service — deadlock detection + Fisher-Yates
  • Game state machine — Idle / Swap / Match / Fall / Win / Lose
  • SwapTilesUseCase — adjacency validation + match check
  • InitializeBoardUseCase — board generate + service init
  • Goal system — track X of color
  • Score system — base score + combo multiplier
  • Move limit system
  • EventBus — type-safe, loose coupling
  • VContainer DI — GameInstaller with full dependency graph
  • ObjectPool — generic MonoBehaviour pooling
  • InputHandler — Unity Input System (mouse + touch)
  • AudioService — BGM loop + SFX oneshot
  • LevelConfig — ScriptableObject driven level data
  • TileFactory — pool-backed tile view creation
  • TileView — DOTween animations (swap, match, fall, spawn, special upgrade)
  • BoardView — grid layout, world↔grid position conversion
  • BoardController — input → usecase → animation game loop
  • AnimationSequencer — chained animation helper
  • VFXService — EventBus-driven particle effects
  • HUDView — move counter, animated score, goal tracker
  • GoalEntryUI — per-goal progress with completion animation
  • UIManager — coordinates all UI elements
  • BasePopup — DOTween show/hide base class
  • WinPopup — level complete screen with star animation
  • LosePopup — out of moves screen
  • PausePopup — pause menu with audio sliders
  • SceneService — scene transition management
  • 36 EditMode unit & integration tests — zero Unity dependencies in Unit layer

Tests

Suite Tests Coverage
BoardModelTests 10 Bounds, CRUD, swap, cell types
MatchFinderTests 9 3/4/5-match, L/T shape, special spawn
GravitySystemTests 7 Fall, column order, fill
ShuffleServiceTests 4 Deadlock detection + resolution
SwapTilesUseCaseTests 8 Valid/invalid swap, events, move consumption
Total 38

Setup

  1. Unity 6 (6000.x LTS)
  2. Install VContainer via Package Manager
  3. Install DOTween via Package Manager
  4. Open Assets/Scenes/Gameplay.unity

Development Progress

Phase Status Description
Phase 1 ✅ Done Domain layer foundation
Phase 2 ✅ Done Domain rules + Application layer
Phase 3 ✅ Done Infrastructure + VContainer DI
Phase 4 ✅ Done Presentation + Unity layer
Phase 5 ✅ Done UI + VFX
Phase 6 ✅ Done Unit & integration tests

About

A production-quality Match-3 puzzle game built with Unity 6, Clean Architecture, dependency injection, and automated tests.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages