Skip to content

🤖 Dual-mode Tic Tac Toe for Desktop & Android built using Compose Multiplatform.

License

Notifications You must be signed in to change notification settings

bog-walk/tic-tac-toe-mpp

Repository files navigation

🚀 Tic Tac Toe ❌🤖⭕

🎮 A dual-mode Tic Tac Toe game for Desktop & Android built using JetBrains Compose Multiplatform.

📝 Game details

The classic game comes with two versions: a local 2-player mode and a single-player versus bot mode with switchable difficulty.

💼 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

💻 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

🔬 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

📱 Run Android application

Clone the repository then open the project in IntelliJ IDEA (or Android Studio) and run the android configuration.

About

🤖 Dual-mode Tic Tac Toe for Desktop & Android built using Compose Multiplatform.

Topics

Resources

License

Stars

Watchers

Forks

Languages