Skip to content

Latest commit

 

History

History
77 lines (56 loc) · 2.54 KB

README.md

File metadata and controls

77 lines (56 loc) · 2.54 KB

Tic Tac Toe

Overview

This Tic Tac Toe app is a classic game implemented for Android devices. It allows two players to take turns marking spaces in a 3x3 grid, with the goal of getting three of their marks in a horizontal, vertical, or diagonal row.

image

image

For downloading this app visit releases page

Features

  • Two-player mode: Play against another human.
  • Simple and intuitive UI: Easy to understand and play.
  • Restart game option: Quickly restart the game to play again.
  • Winner announcement: The app declares the winner at the end of each game.

Getting Started

Prerequisites

  • Android Studio installed on your computer.
  • An Android device or emulator to run the app.

Installation

  1. Clone the repository:
    git clone https://github.com/manish7924/Tic-Tac-Toe.git
  2. Open the project in Android Studio:
    • Open Android Studio.
    • Click on Open an existing Android Studio project.
    • Navigate to the cloned repository and select it.
  3. Build and run the project:
    • Connect your Android device or start an emulator.
    • Click on the Run button in Android Studio to build and deploy the app.

Usage

  1. Launch the app on your Android device.
  2. The game starts with Player 1 (X) taking the first turn.
  3. Tap on an empty cell in the 3x3 grid to place your mark.
  4. Players alternate turns until one player gets three marks in a row or all cells are filled.
  5. The game announces the winner or declares a draw.
  6. Tap the Restart button to start a new game.

Code Structure

  • MainActivity.java: Contains the main logic for the game, including handling user interactions and game state.
  • activity_main.xml: Defines the layout for the main activity, including the game board and restart button.
  • strings.xml: Contains all the text strings used in the app.
  • styles.xml: Defines the style and theme for the app.

Contributing

  1. Fork the repository.
  2. Create your feature branch:
    git checkout -b feature/YourFeature
  3. Commit your changes:
    git commit -m 'Add some feature'
  4. Push to the branch:
    git push origin feature/YourFeature
  5. Open a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.