Tictac Toe
Tictac Toe
Submitted By:
Table of Contents:
1.Abstract
Tic-tac-toe, noughts and crosses, or Xs and
Os is a paper-and-pencil game for two
players who take turns marking the spaces
in a three-by-three grid with X or O. The
player who succeeds in placing three of
their marks in a horizontal, vertical, or
diagonal row is the winner. It is a solved
game, with a forced draw assuming best
play from both players.
2.Introduction
3.Objectives:
· Design a simple console-based Tic Tac
Toe game.
· Implement game logic to determine
valid moves and winning conditions.
· Provide a user-friendly interface for
input and output.
· Enable replay functionality for
multiple games.
Programming Language: C
Compiler: GCC or any C compiler
IDE: Code::Blocks, Dev-C++, or any text
editor
Testing
The game was tested for various scenarios,
including:
Valid moves.
Invalid moves (out of bounds and
occupied spaces).
Winning conditions for both players.
Draw conditions.
Implementation
Program Structure
Code Implementation
Below is a simplified version of the Tic Tac Toe game code in C
Conclusion
The Tic Tac Toe game
implemented in C demonstrates
fundamental programming
concepts such as arrays, loops,
conditionals, and functions. It
serves as an excellent project for
beginners to understand game
development and basic C
programming.
Bibliography:
Google – For learning about the various functions used in the
project and researching about calculators
https://www.geeksforgeeks.org – For learning about the structure and
working of the code.
Future Enhancements
Implement a graphical user interface
(GUI).
Add AI for single-player mode.
Enhance input validation.
Support for larger grids (e.g., 4x4 or
5x5).