This is a simple implementation of the classic Tic-Tac-Toe game using the GTK+ library in C. Unlike the traditional 3x3 grid, this version allows for a customizable grid size, making it an NxM grid where players aim to align N symbols in a row to win.
- NxM Grid: Play on a grid of custom size.
- Turn-based Play: Players take turns to place their symbols (X or O) on the grid.
- Win Detection: The game detects when a player aligns N symbols in a row horizontally, vertically, or diagonally to declare a winner.
- Reset and Restart: You can reset the game or restart with a different grid size.
- GTK+ 3: Ensure you have GTK+ 3 installed on your system to compile and run this application.
-
Compilation: Use a C compiler to build the application. For example:
make
-
Execution: Run the compiled executable:
./Tic-Tac-Toe.exe
-
Gameplay: Follow on-screen instructions to set the grid size and play the game.
- Mouse Click: Click on the grid cells to place your symbol.
Tic-Tac-Toe_BASIC.c
: Contains the main C code for the Tic-Tac-Toe game (NxN).Tic-Tac-Toe_FLEX.c
: Contains the main C code for the Tic-Tac-Toe game (NxM).main.c
,app.c
andapp.h
: Contains the main C code for the Tic-Tac-Toe game (NxM). Also divided into 3 parts to be more readable.Tic-Tac-Toe_AI.c
: Contains the main C code for the Tic-Tac-Toe game (NxM). Try to implement AI for solo playing.Minimax.c
: Contains the main C code for the Minimax algorithm for 3x3Project.c
: Contains the main C code for the basic CLI Tic-Tac-Toe NxN gameREADME.md
: This file, providing information and instructions for the application.Makefile
: Compile file for the most stable version.
Feel free to contribute to this project by forking it, making improvements, and creating a pull request.
This project is licensed under the MIT License - see the LICENSE
file for details.
- Fixing the problem about implementation of the AI code.
- Adding new game mode support
- Fixing the bugs and improve performance