Skip to content

CynthiaWeaver-Jeannine/tic-tac-toe-game

Repository files navigation

Tic-Tac-Toe Game

tic tac toe game)

Test your skills against Max, the AI. Choose between Easy, Hard, and Random modes!

Table of Contents

Introduction

This is a simple Tic Tac Toe game that allows you to play against an AI opponent named Max. Choose from easy, hard, and random modes while playing on your choice of either a 3x3 board or a 4x4 board. When you click "New Game", the starting player is chosen randomly. The game is built with HTML, CSS, and JavaScript, using minimax algorithm for the AI. The scores are kept for each player, and the scores can be reset at any time.

Features

  • Interactive Tic Tac Toe gameplay.
  • Play against an AI opponent (Max).
  • Simple, intuitive user interface.
  • Three modes of play: easy, hard, and random.
  • Scores are kept for each player.

How to Play

  1. Click the "New Game" button, and the starting player is chosen randomly.
  2. You play as "X"; Max plays as "O."
  3. To make a move, click on one of the empty squares on the game board.
  4. Play strategically to block Max.
  5. You win when you fill consecutive boxes in either a row, column, or diagonal.

tic tac toe game showing a draw, 4x4 board

Getting Started

To play the game, simply open the Tic Tac Toe Game in your web browser. You can also clone the repository and run it locally by following these steps:

  1. Clone this repository:

    git clone https://github.com/CynthiaWeaver-Jeannine/tic-tac-toe-game
  2. Open the index.html file in your web browser.

  3. Start playing and test your skills against Max!

tic tac toe game showing ai win, 3x3 board

Contributing

If you'd like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch with a descriptive name:
    git checkout -b feature/your-feature-name
  3. Make your changes and commit them:
    git commit -m "Add your feature description"
  4. Push your changes to your fork:
    git push origin feature/your-feature-name
  5. Open a pull request to the main repository.

Contact

If you have any questions, suggestions, or if your are interested in collaborating, contact me:

cynthiajweaver@live.com
LinkedIn: Cynthia Weaver's LinkedIn Profile
GitHub Repository for this game

tic tac toe showing player win 4x4 board