Connect 4or
Connect 4or is a native Android implementation of the classic Connect Four strategy game. Built entirely in Kotlin using modern Android development...
Connect 4or
Category: Mobile Application Development / Game Development
Platform: Android
Language: Kotlin
Build System: Gradle (Kotlin DSL)
Status: Active Development
Project Overview
Connect 4or is a native Android implementation of the classic Connect Four strategy game. Built entirely in Kotlin using modern Android development practices, the application delivers a polished, responsive gaming experience on Android devices.
Connect Four is a two-player connection board game in which players alternately drop coloured discs into a seven-column, six-row vertically suspended grid. The objective is to be the first player to form a horizontal, vertical, or diagonal line of four of one's own discs.
Core Features
Game Mechanics
- Full implementation of the classic Connect Four ruleset
- Two-player local (same-device) multiplayer
- Intelligent win detection across all valid line orientations:
- Horizontal (left-right)
- Vertical (top-bottom)
- Diagonal (both directions)
- Draw detection when the board fills completely
Android-Native Implementation
- Built with Kotlin as the primary language — Google's officially recommended Android development language
- Follows modern Android architecture patterns
- Native UI components for smooth, responsive gameplay
- Proper state management for game sessions
Build System
- Gradle with Kotlin DSL (build.gradle.kts) for type-safe, expressive build configuration
- Multi-module project structure (app module + test infrastructure)
- Standard Android test framework integration (androidTest + unit test directories)
Technical Architecture
| Component | Detail |
|---|---|
| Language | Kotlin |
| Target Platform | Android |
| Build System | Gradle with Kotlin DSL |
| Min SDK | Standard Android SDK |
| Project Structure | Standard Android module layout |
| Testing | androidTest (instrumented) + test (unit) directories |
Project Structure
Connect 4or/
├── app/
│ ├── src/
│ │ ├── main/ <- Application source code
│ │ ├── test/ <- Unit tests
│ │ └── androidTest/ <- Instrumented device tests
│ └── build.gradle.kts <- Module build configuration
├── build.gradle.kts <- Root project build config
├── settings.gradle.kts <- Project settings
└── gradle.properties <- Gradle and JVM properties
Gameplay
Rules
- Players alternate turns, each dropping one disc per turn
- Discs fall to the lowest available row in the chosen column
- First player to connect four discs in a row (any direction) wins
- If all 42 cells fill without a winner, the game is a draw
Win Conditions
- Horizontal: Four consecutive discs in the same row
- Vertical: Four consecutive discs in the same column
- Diagonal: Four consecutive discs on either diagonal axis
Development Notes
The project uses Kotlin DSL throughout, reflecting current best practices in Android development. The Kotlin DSL provides compile-time safety and IDE auto-completion for Gradle configuration, making the build scripts more maintainable and less error-prone than traditional Groovy DSL.
The standard Android project layout ensures compatibility with Android Studio and the broader Android toolchain ecosystem.