Sea Battle - a classic Battleship 2D game for Android, written in Kotlin with Jetpack Compose and Coroutines.
Play Market 50K+ downloads
- Hand-drawn notebook look with light and dark themes
- Portrait and landscape layouts
- Computer opponent that hunts down wounded ships
- English, Ukrainian and Russian localization
- dev - contains stable implementation of main functionality and tests.
- master - released versions.
Single-Activity MVVM. MainViewModel owns the game state and exposes it as a single StateFlow<GameUiState>; the Compose UI observes it and draws both boards on Canvas.
- battle_field - pure Kotlin game model: the 10×10 grid, ship placement and shot handling
- main -
MainViewModelruns the turns,ShotManageris the computer's AI - ui - Compose screens, the notebook-paper background and the board grid
Jetpack Compose, Material 3 - UI
Coroutines, StateFlow - pacing the computer's moves and delivering state to the UI
Lifecycle ViewModel - keeping game state across configuration changes
Play In-App Review - asking for a rating after a win
JUnit 4, Mockito, Compose UI Test - tests
./gradlew assembleDebug # build debug APK
./gradlew testDebugUnitTest # unit tests
./gradlew connectedAndroidTest # instrumented tests (device/emulator)


