Welcome to the Tic-Tac-Toe game! This is a simple yet engaging Android application developed in Kotlin using Android Studio. The game allows two players to take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row wins the game.
- Two-player mode: Play with a friend on the same device.
- Responsive UI: Designed to work on various screen sizes.
- Simple and intuitive design: Easy to use interface for all ages.
To run this project, you will need to have Android Studio installed on your machine. Follow the steps below to get started:
-
Clone the repository:
git clone https://github.com/rushikatabathuni/Tic-Tac-Toe-Kotlin.git
-
Open the project in Android Studio:
- Launch Android Studio.
- Click on
File
->Open
and navigate to the cloned repository. - Select the project folder and click
OK
.
-
Build and run the project:
- Connect an Android device or start an emulator.
- Click on the
Run
button in Android Studio or pressShift + F10
.
- MainActivity.kt: Contains the main game logic and UI handling.
- activity_main.xml: Defines the layout for the main activity.
- values/strings.xml: Contains all the string resources used in the application.
- values/colors.xml: Defines the color scheme for the application.
- values/styles.xml: Contains style definitions for UI components.
- Launch the application on your Android device.
- On the home screen, click
Start Game
. - Players take turns tapping on an empty cell to place their mark (
X
orO
). - The game will automatically detect and announce the winner or if the game ends in a draw.
Contributions are welcome! If you find any bugs or have feature requests, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to the Kotlin and Android development communities for their valuable resources and tutorials.