Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 7 days 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 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-01T17:00:11.000Z (about 2 years ago)
- Last Synced: 2024-10-08T23:23:15.746Z (28 days 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:
![](screenshots/t3_desktop_dp_demo.gif)
![](screenshots/t3_android_dp_demo.gif):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.
![](screenshots/t3_desktop_sp_demo.gif)
![](screenshots/t3_android_sp_demo.gif)## :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![](screenshots/t3_android_landscape_demo.gif)
## :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.