The purpose of this project is to demonstrate a Kotlin-based desktop application using Jetpack Compose for the user interface. It includes a server component to manage game logic and a client component to interact with the server, specifically for a Tic-Tac-Toe game.
- Multiplayer network gameplay (supports a 3x3 grid for Tic-Tac-Toe games).
- Server and client components for managing game logic and user interactions.
- Clone the repository:
git clone https://github.com/vladkimo/tictactoe_demo_kotlin_compose_desktop_ktor_rpc.git cd tictactoe_demo_kotlin_compose_desktop_ktor_rpc
- Operating System: macOS, Windows, or Linux
- JDK: Version 11 or higher
- Gradle: Version 7.0 or higher
To build and run the application, use the Gradle tool window by clicking the Gradle icon in the right-hand toolbar, or run it directly from the terminal:
./gradlew run # Build and run the application
./gradlew build # Only build the application
./gradlew check # Run all checks, including tests
./gradlew clean # Clean all build outputs
- Open the terminal and navigate to the project root directory.
- Run the following command to build and run the server:
./gradlew :server:run
- Open the terminal and navigate to the project root directory.
- Run the following command to build and run the client:
./gradlew :client:run
- Ktor: Framework for building asynchronous servers and clients in connected systems.
- Kotlinx RPC: Library for remote procedure calls.
- Kotlinx Serialization: Library for serializing Kotlin data classes.
- Kotlin Standard Library: Core library for Kotlin programming.
- Compose Desktop: Modern toolkit for building desktop UI.
- Kotlin Coroutines: Library for asynchronous programming.
- StateFlow: State management library for Kotlin.
This project is licensed under the MIT License. See the LICENSE
file for more details.