https://github.com/bog-walk/tic-tac-toe-mpp
:robot: Dual-mode Tic Tac Toe for Desktop & Android built using Compose Multiplatform.
https://github.com/bog-walk/tic-tac-toe-mpp
algorithms android-app compose-for-desktop jetpack-compose kotlin multiplatform tic-tac-toe
Last synced: 3 months ago
JSON representation
:robot: Dual-mode Tic Tac Toe for Desktop & Android built using Compose Multiplatform.
- Host: GitHub
- URL: https://github.com/bog-walk/tic-tac-toe-mpp
- Owner: bog-walk
- License: mit
- Created: 2022-04-01T18:29:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-01T17:00:11.000Z (almost 3 years ago)
- Last Synced: 2025-02-10T03:23:09.821Z (5 months ago)
- Topics: algorithms, android-app, compose-for-desktop, jetpack-compose, kotlin, multiplatform, tic-tac-toe
- Language: Kotlin
- Homepage:
- Size: 1.12 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# :rocket: Tic Tac Toe :x::robot::o:

:video_game: A dual-mode Tic Tac Toe game for Desktop & Android built using **JetBrains**
[Compose Multiplatform](https://www.jetbrains.com/lp/compose-mpp/).## :memo: Game details
The classic game comes with two versions: a local 2-player mode and a single-player versus bot mode with switchable difficulty.

## :briefcase: Features
- Bot with 2 difficulty settings based on a Strategy Pattern, switchable even in-game
- All model data, logic, and UI components (except `ExitDialog`) shared in `:common`
- Platform-specific declarations using `expect`/`actual` for:
- Pop-up dialog composable
- Screen navigation sealed class
- Resource getter within composables
- Robust model and UI test suites
- Android navigation using `NavHost()` with arguments and back button handling
- Responsive UI for Android with state retention between configuration changes
## :computer: Run Desktop application
Clone the repository then pick an option:
- `./gradlew :desktop:run` from an open terminal in the root of the project
- Open the Gradle toolbar in IntelliJ IDEA and select `tic-tac-toe/Tasks/compose desktop/run`
## :microscope: Run tests
Clone the repository then pick an option:
- Open the project in IntelliJ IDEA and choose specific tests using gutter icons or right-click any test folder to choose
to run all tests in that module- Open the Gradle toolbar in IntelliJ IDEA and select `tic-tac-toe/Tasks/verification/allTests`
## :iphone: Run Android application
Clone the repository then open the project in IntelliJ IDEA (or Android Studio) and run the **android** configuration.