0% found this document useful (0 votes)
4 views6 pages

Tic-Tac-Toe Game Project in C

Uploaded by

Huzaifa Tariq
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views6 pages

Tic-Tac-Toe Game Project in C

Uploaded by

Huzaifa Tariq
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

FACULTY OF ENGINEERING SCIENCES AND TECHNOLOGY

Hamdard Institute of Engineering & Technology


Hamdard University

DEPARTMENT OF COMPUTER SCIENCE

PROJECT PROPOSAL
PROGRAM: BSCS
COURSE: Operating System

GROUP MEMBERS:

[Link] Bin Tariq (2348-2022)


Syed Saad Ali (1775-2022)
Jawwad Hussain (2284-2022)

SUBMITTED TO:
Miss Ishmal Shahid
FACULTY OF ENGINEERING SCIENCES AND TECHNOLOGY
Hamdard Institute of Engineering & Technology
Hamdard University

Project Title: Tic-Tac-Toe Game

Introduction:
The Tic-Tac-Toe game is a simple two-player game where players take turns
marking a 3x3 grid. This project involves developing the game using the C
programming language. It demonstrates core programming concepts.

Objectives:
The primary objectives of this project are:

 To design and implement a console-based Tic-Tac-Toe game.


 To provide a user-friendly experience for two players to play the
game.
 To use programming concepts effectively.
 To ensure the game identifies a winner or a draw correctly.

Scope of the Project:


The project includes the following:

1. Game Setup:
o A 3x3 grid represented using an array.
o Two players: Player 1 (X) and Player 2 (Y).

2. Game Functionality:
o Players take turns selecting a cell in the grid.
o The game checks for winning conditions after each move.
FACULTY OF ENGINEERING SCIENCES AND TECHNOLOGY
Hamdard Institute of Engineering & Technology
Hamdard University
o If a player wins, a congratulatory message is displayed.
o If all moves are played without a winner, the game ends in a
draw.

3. Code Structure:
o Clear modular design with functions for marking the grid,
displaying the grid, and checking for a win.

4. Output:
o A simple text-based interface to display the grid and results.

Features of the Project:


The game will include the following features:

1. Interactive Gameplay:
o Players enter a number to mark a cell.
o The grid updates dynamically after each move.

2. Win Detection:
o The program checks all rows, columns, and diagonals for a
winning condition.

3. Draw Condition:
o If no player wins after all moves, the game ends in a draw.

4. Modular Code:
o Functions for marking the grid, checking the winner, and
displaying the board.

5. Error-Free Execution:
o Ensures smooth gameplay without crashes or bugs.
FACULTY OF ENGINEERING SCIENCES AND TECHNOLOGY
Hamdard Institute of Engineering & Technology
Hamdard University

Project Modules:

Module 1: Display the Grid

 This module prints the 3x3 grid with updated moves.


 Example Output:

Module 2: Player Input and Marking

 Allows players to input their chosen cell (0–8).


 Marks the grid with X for Player 1 and Y for Player 2.

Module 3: Check Win Condition

 Checks all possible winning combinations:


o Rows: Top, Middle, Bottom
o Columns: Left, Middle, Right
o Diagonals

Module 4: Game Flow

 Controls the flow of the game:


o Accepts input from both players.
o Checks for a win or draw after each move.
FACULTY OF ENGINEERING SCIENCES AND TECHNOLOGY
Hamdard Institute of Engineering & Technology
Hamdard University
o Displays results at the end of the game.

Flowchart:
Below is a basic flowchart showing the game logic:
FACULTY OF ENGINEERING SCIENCES AND TECHNOLOGY
Hamdard Institute of Engineering & Technology
Hamdard University

Expected Outcome:
At the end of this project:

 The game will be fully functional, allowing two players to play Tic-
Tac-Toe.
 Players can view the grid dynamically after each move.
 The game will correctly declare a winner or identify a draw.
 The code will follow clean and modular programming practices.

Project Benefits:
This project will:

 Help in understanding basic C programming concepts such as arrays,


functions, and conditionals.
 Improve problem-solving and logical thinking skills.
 Provide hands-on experience with developing interactive programs.

Conclusion:
The Tic-Tac-Toe Game project in C language is a simple yet effective way
to demonstrate programming skills. It covers fundamental concepts,
provides interactive gameplay, and ensures a satisfying user experience. This
project is a great step for learning how to build small console-based
applications.

You might also like