Skip to content

A two-player game where players take turns marking their symbol on a 3 by 3 grid, aiming to be the first to get three of their marks in a row, column, or diagonal.

License

Notifications You must be signed in to change notification settings

RedHatPixel/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe Game

Welcome to the Tic Tac Toe game! This repository contains the code for a classic two-player game where players take turns marking Xs and Os on a 3x3 grid. The game was for educational purposes only and to further my knowledge and skills for html, css and javascript.

Table of Contents

Introduction

Tic Tac Toe is a simple and classic game where two players compete to place three of their marks (X or O) in a horizontal, vertical, or diagonal row. This project brings the game to life with a clean and interactive interface.

Features

  • Two-Player Mode: Play against a friend.
  • Interactive Interface: User-friendly interface with responsive design.
  • Winning Detection: Automatically detects and announces the winner.

Installation

To run the Tic Tac Toe game locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/RedHatPixel/tic-tac-toe.git
  2. Navigate to the project directory:

    cd tic-tac-toe
  3. Install dependencies (if applicable):

    npm install

    or

    pip install -r requirements.txt

    (Depending on whether the project uses JavaScript/Node.js or Python)

  4. Run the game:

    • For a web-based game:
      npm start

Usage

Once the game is running, follow the on-screen instructions to start playing:

  1. Start the game: Choose if multiplayer or AI(under process).
  2. Make your move: Click on an empty cell in the grid to place your mark.
  3. Alternate turns: Players take turns placing their marks on the grid.
  4. Win the game: The first player to get three marks in a row (horizontally, vertically, or diagonally) wins. If all cells are filled without a winner, the game is a draw.
  5. Continue: Click Play Again to keep the scores or go back by clicking Exit.

Game Rules

  • Players take turns placing Xs and Os on an empty cell in the grid.
  • The first player to get three marks in a row, column, or diagonal wins.
  • If all cells are filled without a winner, the game ends in a draw.

Content

Google Fonts

Colors

  • Title Color 1: #DCBF3F;
  • Title Color 2: #72CFF9;
  • Background Color: #2B0040;
  • Cell BG: #43115B;
  • Main BG: #5A1E76;
  • Player Color: #48D2FE;
  • Draw Color: #BCDBF9;
  • Opponent Color: #E2BE00;

Contributing

We welcome contributions to improve the game! If you'd like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix:
    git checkout -b feature-name
  3. Make your changes and commit them:
    git commit -m "Add new feature"
  4. Push to the branch:
    git push origin feature-name
  5. Create a pull request on GitHub.

License

This project is licensed under the MIT License. See the LICENSE file for more details.


Feel free to reach out if you have any questions or need further assistance. Enjoy playing Tic Tac Toe!


This template provides a comprehensive overview of your Tic Tac Toe game, including setup instructions, gameplay rules, and guidelines for contributing, along with details about the fonts, colors, and sounds used in the project.


The design was a copy or inspired by Anuj Tic-Tac-Toe in Figma, The link was down below. https://www.figma.com/community/file/1254192154560627135

About

A two-player game where players take turns marking their symbol on a 3 by 3 grid, aiming to be the first to get three of their marks in a row, column, or diagonal.

Resources

License

Stars

Watchers

Forks

Languages