## ๐ Overview
**CubeEye** is an advanced Android application designed to solve 3x3 Rubik's Cubes. It leverages computer vision to scan a physical cube and provides an interactive, animated 3D guide to solve it using near-optimal moves.
## โจ Key Features
### ๐ท Smart Scanning System
* **Real-time Color Detection:** Automatically identifies cube face colors using the camera via the custom `ColorAnalyzer`.
* **Guided Scanning:** An intuitive UI overlay guides users through the process of capturing all 6 faces correctly.
* **Validation Logic:** The built-in `CubeValidator` ensures the scanned state is physically solvable before proceeding.
* **Manual Correction:** Includes a `ColorPickerDialog` allowing users to manually adjust colors if lighting conditions affect automatic detection.
### ๐งฉ Intelligent Solver
* **Kociemba Algorithm:** Integrates the famous Two-Phase Algorithm (via the *min2phase* library) to find near-optimal solutions, often requiring fewer than 20 moves.
* **Fast Local Computation:** Solves complex scrambles in seconds directly on the device without needing a network connection.
### ๐ฅ Interactive 3D Guide
* **3D Visualization:** Features a fully interactive 3D render (`Cube3DView`) that accurately mimics the real cube's state.
* **Step-by-Step Animation:** Users can play, pause, and scrub through the solution moves at their own pace.
## ๐ Technical Highlights
* **Modern Android Stack:** Built entirely using Kotlin and Jetpack Compose (Material 3).
* **Robust Architecture:** Follows Clean Architecture principles, utilizing MVVM patterns, Hilt for dependency injection, and Coroutines for asynchronous operations.
* **CameraX:** Implements a stable and efficient camera foundation for live preview and image analysis.
* **SceneView:** Utilizes the SceneView library for high-performance 3D rendering.
## ๐ Known Issues / TODOs
* Optimize color detection thresholds to better handle extreme lighting conditions.
* Automate the integration of the "min2phase" library (currently included as manual source files).