https://github.com/brainfkt/tic-tac-toe
A simple Tic Tac Toe console game in C with multi-language support (FR/EN).
https://github.com/brainfkt/tic-tac-toe
c-language console-game tictactoe tutorial
Last synced: 12 months ago
JSON representation
A simple Tic Tac Toe console game in C with multi-language support (FR/EN).
- Host: GitHub
- URL: https://github.com/brainfkt/tic-tac-toe
- Owner: Brainfkt
- License: mit
- Created: 2025-02-13T22:37:34.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-13T23:01:01.000Z (about 1 year ago)
- Last Synced: 2025-02-13T23:32:42.079Z (about 1 year ago)
- Topics: c-language, console-game, tictactoe, tutorial
- Language: C
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TicTacToe Console Game
> A simple Tic Tac Toe game in C for the console, with French/English language support and colored output (blue and red).
## Description
This program lets you play the classic Tic Tac Toe (also known as Noughts and Crosses) in a local two-player mode.
- **Available languages**: French or English (select at startup).
- **Colored display**: uses ANSI codes (blue for `X`, red for `O`).
- **Score and history**: scores are tracked during the session, and an `historique.txt` file is created to log match results.
## Features
- Language selection (French/English).
- Prompts for player names (Player 1 = X, Player 2 = O).
- Displays the score (wins, losses, draws).
- Saves results in `historique.txt`.
## Requirements
- A C compiler (GCC, Clang, MinGW, etc.).
- A terminal that supports ANSI color codes (most modern terminals do).
## Installation
1. **Clone the repository** (or download the ZIP archive):
```bash
git clone https://github.com/Brainfkt/TIC-TAC-TOE.git
cd TIC-TAC-TOE
```
2. **Compile and execute the code:**
Linux/Mac:
```bash
gcc -o tictactoe tictactoe.c
./tictactoe
```
Windows:
```bash
gcc -o tictactoe.exe tictactoe.c
tictactoe.exe