A polished, grid-based mobile puzzle game built with Unity (C#) — featuring swipe-based controls, deterministic undo/redo history, and clean separation between game logic and UI rendering.
| Resource | Link |
|---|---|
| 🔗 GitHub Repository | rohit892004/Capsitech_Task |
| 📦 APK Download | Google Drive |
The app follows a strict 3-layer architecture ensuring separation of concerns:
┌─────────────────────────────────────────────────────────┐
│ UI LAYER │
│ (Unity UI Toolkit / uGUI — rendering only) │
│ │
│ ┌─────────────┐ ┌────────────┐ ┌────────┐ ┌──────┐ │
│ │ GameScreen │→ │ GridView │ │ HUDBar │ │Overlay│ │
│ │ Root canvas │ │Tile render │ │Score/ │ │Win/ │ │
│ └─────────────┘ └────────────┘ │Moves │ │Lose │ │
│ └────────┘ └──────┘ │
└──────────────────────┬──────────────────────────────────┘
│ State events (no direct UI calls)
┌──────────────────────▼──────────────────────────────────┐
│ GAME LOGIC LAYER │
│ (Pure C# — no UnityEngine.UI dependencies) │
│ │
│ ┌─────────────────┐ ┌────────────┐ ┌─────────────┐ │
│ │ InputController │→ │ GameEngine │→ │ GridManager │ │
│ │ Swipe→Direction │ │Orchestrator│ │N×M operations│ │
│ └─────────────────┘ └─────┬──────┘ └─────────────┘ │
│ │ │
│ ┌────────▼────────┐ │
│ │ HistoryManager │ │
│ │ Undo stack │ │
│ └─────────────────┘ │
└──────────────────────┬──────────────────────────────────┘
│ Read immutable models
┌──────────────────────▼──────────────────────────────────┐
│ DATA LAYER │
│ (Immutable C# models — no side effects) │
│ │
│ GridState │ TileModel │ MoveRecord │GameConfig│
└─────────────────────────────────────────────────────────┘
| Layer | Responsibility | Key Rule |
|---|---|---|
| UI Layer | Render state visually | No business logic |
| Game Logic Layer | All game rules & transitions | No UnityEngine.UI imports |
| Data Layer | Immutable data models | No side effects |
Complete data pipeline from user input to UI update:
User Gesture (Swipe)
│
▼ Input.touch / pointer events
┌───────────────────┐
│ InputController │ ← Validates gesture, emits Direction enum
└────────┬──────────┘
│ Direction event
▼
┌───────────────────┐ ┌─────────────────┐
│ GameEngine │────────▶│ HistoryManager │
│ Orchestrator │ push │ Undo stack │
└────────┬──────────┘ └─────────────────┘
│ move(direction)
▼
┌───────────────────┐
│ GridManager │ ← Computes new GridState (pure function)
│ N×M operations │
└────────┬──────────┘
│ emit GridState
▼
┌───────────────────┐
│ EventBus / │ ← Broadcasts immutable state to all listeners
│ ScriptableObj │
└────────┬──────────┘
│ OnStateChanged()
▼
┌───────────────────┐
│ UI Rendering │ ← GridView, HUDBar, Overlay re-render
│ (Unity uGUI) │
└───────────────────┘
↑
│ Undo: pop stack → restore previous GridState
└──────── HistoryManager ──────────
Direction enum; filters invalid inputs.GridManager and records it in HistoryManager.GridState.GridView, HUDBar, and Overlay update independently.Assets/
├── Scripts/
│ ├── Data/
│ │ ├── GridState.cs # Immutable board state
│ │ ├── TileModel.cs # Single tile data
│ │ ├── MoveRecord.cs # Undo history entry
│ │ └── GameConfig.cs # Grid size, rules config
│ ├── Logic/
│ │ ├── InputController.cs # Gesture → Direction
│ │ ├── GameEngine.cs # Orchestration layer
│ │ ├── GridManager.cs # N×M grid algorithms
│ │ └── HistoryManager.cs # Undo/redo stack
│ ├── UI/
│ │ ├── GameScreen.cs # Root canvas controller
│ │ ├── GridView.cs # Tile grid renderer
│ │ ├── HUDBar.cs # Score / moves display
│ │ └── OverlayManager.cs # Win / lose overlays
│ └── Core/
│ └── EventBus.cs # Decoupled state broadcaster
├── Prefabs/
├── Scenes/
└── Resources/
| Concern | Technology |
|---|---|
| Engine | Unity (2022 LTS) |
| Language | C# |
| Architecture | Clean Architecture (3-layer) |
| UI System | Unity uGUI / UI Toolkit |
| Version Control | Git (semantic commits) |
# Clone the repository
git clone https://github.com/rohit892004/Capsitech_Task.git
# Open in Unity Hub
# Select Unity 2022 LTS or compatible version
# Build APK
# File → Build Settings → Android → Build
Or download the prebuilt APK directly from the Google Drive link.
This project follows semantic commit prefixes:
feat: New feature
fix: Bug fix
refactor: Code restructure (no behaviour change)
docs: Documentation update
test: Test additions or changes
chore: Build / config changes
This project was developed as part of a technical assessment for Capsitech IT Services.
A polished, grid-based mobile puzzle game built with Unity (C#) — featuring swipe-based controls, deterministic undo/redo history, and clean separation between game logic and UI rendering.
| Resource | Link |
|---|---|
| 🔗 GitHub Repository | rohit892004/Capsitech_Task |
| 📦 APK Download | Google Drive |
The app follows a strict 3-layer architecture ensuring separation of concerns:
┌─────────────────────────────────────────────────────────┐
│ UI LAYER │
│ (Unity UI Toolkit / uGUI — rendering only) │
│ │
│ ┌─────────────┐ ┌────────────┐ ┌────────┐ ┌──────┐ │
│ │ GameScreen │→ │ GridView │ │ HUDBar │ │Overlay│ │
│ │ Root canvas │ │Tile render │ │Score/ │ │Win/ │ │
│ └─────────────┘ └────────────┘ │Moves │ │Lose │ │
│ └────────┘ └──────┘ │
└──────────────────────┬──────────────────────────────────┘
│ State events (no direct UI calls)
┌──────────────────────▼──────────────────────────────────┐
│ GAME LOGIC LAYER │
│ (Pure C# — no UnityEngine.UI dependencies) │
│ │
│ ┌─────────────────┐ ┌────────────┐ ┌─────────────┐ │
│ │ InputController │→ │ GameEngine │→ │ GridManager │ │
│ │ Swipe→Direction │ │Orchestrator│ │N×M operations│ │
│ └─────────────────┘ └─────┬──────┘ └─────────────┘ │
│ │ │
│ ┌────────▼────────┐ │
│ │ HistoryManager │ │
│ │ Undo stack │ │
│ └─────────────────┘ │
└──────────────────────┬──────────────────────────────────┘
│ Read immutable models
┌──────────────────────▼──────────────────────────────────┐
│ DATA LAYER │
│ (Immutable C# models — no side effects) │
│ │
│ GridState │ TileModel │ MoveRecord │GameConfig│
└─────────────────────────────────────────────────────────┘
| Layer | Responsibility | Key Rule |
|---|---|---|
| UI Layer | Render state visually | No business logic |
| Game Logic Layer | All game rules & transitions | No UnityEngine.UI imports |
| Data Layer | Immutable data models | No side effects |
Complete data pipeline from user input to UI update:
User Gesture (Swipe)
│
▼ Input.touch / pointer events
┌───────────────────┐
│ InputController │ ← Validates gesture, emits Direction enum
└────────┬──────────┘
│ Direction event
▼
┌───────────────────┐ ┌─────────────────┐
│ GameEngine │────────▶│ HistoryManager │
│ Orchestrator │ push │ Undo stack │
└────────┬──────────┘ └─────────────────┘
│ move(direction)
▼
┌───────────────────┐
│ GridManager │ ← Computes new GridState (pure function)
│ N×M operations │
└────────┬──────────┘
│ emit GridState
▼
┌───────────────────┐
│ EventBus / │ ← Broadcasts immutable state to all listeners
│ ScriptableObj │
└────────┬──────────┘
│ OnStateChanged()
▼
┌───────────────────┐
│ UI Rendering │ ← GridView, HUDBar, Overlay re-render
│ (Unity uGUI) │
└───────────────────┘
↑
│ Undo: pop stack → restore previous GridState
└──────── HistoryManager ──────────
Direction enum; filters invalid inputs.GridManager and records it in HistoryManager.GridState.GridView, HUDBar, and Overlay update independently.Assets/
├── Scripts/
│ ├── Data/
│ │ ├── GridState.cs # Immutable board state
│ │ ├── TileModel.cs # Single tile data
│ │ ├── MoveRecord.cs # Undo history entry
│ │ └── GameConfig.cs # Grid size, rules config
│ ├── Logic/
│ │ ├── InputController.cs # Gesture → Direction
│ │ ├── GameEngine.cs # Orchestration layer
│ │ ├── GridManager.cs # N×M grid algorithms
│ │ └── HistoryManager.cs # Undo/redo stack
│ ├── UI/
│ │ ├── GameScreen.cs # Root canvas controller
│ │ ├── GridView.cs # Tile grid renderer
│ │ ├── HUDBar.cs # Score / moves display
│ │ └── OverlayManager.cs # Win / lose overlays
│ └── Core/
│ └── EventBus.cs # Decoupled state broadcaster
├── Prefabs/
├── Scenes/
└── Resources/
| Concern | Technology |
|---|---|
| Engine | Unity (2022 LTS) |
| Language | C# |
| Architecture | Clean Architecture (3-layer) |
| UI System | Unity uGUI / UI Toolkit |
| Version Control | Git (semantic commits) |
# Clone the repository
git clone https://github.com/rohit892004/Capsitech_Task.git
# Open in Unity Hub
# Select Unity 2022 LTS or compatible version
# Build APK
# File → Build Settings → Android → Build
Or download the prebuilt APK directly from the Google Drive link.
This project follows semantic commit prefixes:
feat: New feature
fix: Bug fix
refactor: Code restructure (no behaviour change)
docs: Documentation update
test: Test additions or changes
chore: Build / config changes
This project was developed as part of a technical assessment for Capsitech IT Services.