An open API service indexing awesome lists of open source software.

https://github.com/barandev/tic-tac-toe-with-javascript

A simple Tic Tac Toe game implemented in JavaScript and Python Flask, featuring two-player and vs. computer modes.
https://github.com/barandev/tic-tac-toe-with-javascript

ai flask game-development javascript python tic-tac-toe two-player-game vs-computer web-development

Last synced: 10 months ago
JSON representation

A simple Tic Tac Toe game implemented in JavaScript and Python Flask, featuring two-player and vs. computer modes.

Awesome Lists containing this project

README

          

# Tic Tac Toe Game

This repository contains a simple Tic Tac Toe game implemented in JavaScript and a Flask web application to serve the game.

## Instructions

### JavaScript Implementation (script.js)

1. **Getting Started**: To start playing the game, open `index.html` in a web browser.

2. **Game Modes**:
- **Two Player Mode**: Click on the "Two Players" button to start a game where two players can play against each other.
- **Vs. Computer Mode**: Click on the "Vs. Computer" button to play against the computer.

3. **Gameplay**:
- Click on any empty cell to make your move.
- The game alternates between 'X' and 'O'.
- The game will notify you when someone wins or if it's a draw.
- Click on the "Reset" button to restart the game at any time.
- Click on the "Back" button to return to the main menu.

### Python Flask Web Application (main.py)

1. **Running the Application**:
- Ensure you have Python installed on your system.
- Install the required dependencies using `pip install -r requirements.txt`.
- Run the Flask application using `python main.py`.

2. **Accessing the Game**:
- Once the Flask application is running, navigate to `http://localhost:8080` in your web browser to play the Tic Tac Toe game.

![GitHub language count](https://img.shields.io/github/languages/count/barandev/Tic-Tac-Toe-with-Javascript)
![GitHub repo size](https://img.shields.io/github/repo-size/barandev/Tic-Tac-Toe-with-Javascript)
[![License](https://img.shields.io/github/license/barandev/Tic-Tac-Toe-with-Javascript)](https://github.com/barandev/Tic-Tac-Toe-with-Javascript/blob/main/LICENSE)
[![GitHub issues](https://img.shields.io/github/issues/barandev/Tic-Tac-Toe-with-Javascript)](https://github.com/barandev/Tic-Tac-Toe-with-Javascript/issues)
[![GitHub pull requests](https://img.shields.io/github/issues-pr/barandev/Tic-Tac-Toe-with-Javascript)](https://github.com/barandev/Tic-Tac-Toe-with-Javascript/pulls)
[![GitHub stars](https://img.shields.io/github/stars/barandev/Tic-Tac-Toe-with-Javascript)](https://github.com/barandev/Tic-Tac-Toe-with-Javascript/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/barandev/Tic-Tac-Toe-with-Javascript)](https://github.com/barandev/Tic-Tac-Toe-with-Javascript/network)