Skip to content

Commit 0f82a7c

Browse files
committed
Added Tic-Tac-Toe app
1 parent 4fdd9d5 commit 0f82a7c

File tree

17 files changed

+17744
-0
lines changed

17 files changed

+17744
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Tic-Tac-Toe Game (2 Players)
2+
3+
## Table of Contents
4+
- [Introduction](#introduction)
5+
- [Game Rules](#game-rules)
6+
- [Getting Started](#getting-started)
7+
- [How to Play](#how-to-play)
8+
- [Winning](#winning)
9+
- [Draw](#draw)
10+
- [Contributing](#contributing)
11+
- [License](#license)
12+
13+
---
14+
15+
## Introduction
16+
Welcome to the 2-player Tic-Tac-Toe game! This classic game is designed for two players to compete against each other in a simple yet engaging way. It's a perfect choice for those who enjoy strategic thinking and friendly competition.
17+
18+
## Game Rules
19+
Tic-Tac-Toe is played on a 3x3 grid. Two players take turns marking empty cells with their respective symbols:
20+
- Player 1: O
21+
- Player 2: X
22+
23+
The goal of the game is to form a straight line (horizontal, vertical, or diagonal) of your symbol (X or O) before your opponent does. The player who achieves this first wins the game.
24+
25+
## Getting Started
26+
To play the game, follow these steps:
27+
28+
1. Clone this repository to your local machine or download the source code.
29+
2. Open a terminal or command prompt and navigate to the game's directory.
30+
31+
## How to Play
32+
1. Run the game by executing the main script. For example, if you are using Python, you can run the game with the following command:
33+
```
34+
python tictactoe.py
35+
```
36+
2. The game will display an empty 3x3 grid.
37+
3. Players will take turns entering the row and column where they want to place their symbol (X or O).
38+
4. The game will update the grid and display it after each move.
39+
5. Continue taking turns until one player wins or the game ends in a draw.
40+
41+
## Winning
42+
A player wins by achieving one of the following conditions:
43+
- Completing a row (horizontally).
44+
- Completing a column (vertically).
45+
- Completing a diagonal line (either from the top-left to bottom-right or from top-right to bottom-left).
46+
47+
The game will announce the winner and ask if you want to play again.
48+
49+
## Draw
50+
If all cells on the grid are filled, and no player has achieved a winning condition, the game ends in a draw. It will inform you that the game is a draw and ask if you want to play again.
51+
52+
## Contributing
53+
If you'd like to contribute to this Tic-Tac-Toe game, please feel free to submit pull requests or open issues on the GitHub repository. We welcome any improvements, bug fixes, or feature enhancements.
54+
55+
## License
56+
This Tic-Tac-Toe game is open-source software released under the [MIT License](LICENSE). You are free to use, modify, and distribute this software as per the terms of the license.
57+
58+
Enjoy playing the game and have fun competing with your friends!

0 commit comments

Comments
 (0)