You are on page 1of 12

JSPM's

Rajarshi Shahu College of Engineering, Polytechnic

Academic Year 2023-24

CLASS- Syco Subject- Data structure using C (22317)

Micro-Project Report

TITLE OF MICROPROJECT : Tic Tac Toe Game Using Array

GROUP NO. – 04

GROUP MEMBERS:

ROLL NO NAME

13 Hariom Suryavanshi

14 Kanishka kandhare

15 Akshada Sagar

16 Prashant Bhambare
Maharashtra State
Board of Technical Education, Mumbai
(Autonomous) (ISO-9001-2008) (ISO/IEC 27001:2013)

CERTIFICATE
This is to certify that Mr/Mrs

1. Hariom Suryawanshi 2. Kanishka kandhare 3. Akshada Sagar 4. Prashant Bhambare of Diploma In


Computer Engineering of JSPM’s Rajarshi Shahu College of Engineering Polytechnic (Code: 1620)
has completed Micro projects of the course Data structure using c (22317) as prescribed in the
curriculum for the academic year 2023 to 2024.

Place: Tathwade, Pune Enrollment No: 1. 2116200222

2. 2116200223

3. 2216200224

4. 2216200225

Date:

Mrs.M.S.PATIL Mrs.V.T.Thakare

(Course Incharge) (Head of Department)

Seal Of Institute
1.0 Brief Description :
Games played on three-in-a-row boards can be traced back to ancient Egypt,[5] where such
game boards have been found on roofing tiles dating from around 1300 BC.[6]

An early variation of tic-tac-toe was played in the Roman Empire, around the first century
BC. It was called terni lapilli (three pebbles at a time) and instead of having any number of
pieces, each player had only three; thus, they had to move them around to empty spaces
to keep playing.[7] The game's grid markings have been found chalked all over Rome.
Another closely related ancient game is three men's morris which is also played on a simple
grid and requires three pieces in a row to finish,[8] and Picaria, a game of the Puebloans.

The different names of the game are more recent. The first print reference to "noughts and
crosses" (nought being an alternative word for 'zero'), the British name, appeared in 1858,
in an issue of Notes and Queries.[9] The first print reference to a game called "tick-tack-
toe" occurred in 1884, but referred to "a children's game played on a slate, consisting of
trying with the eyes shut to bring the pencil down on one of the numbers of a set, the
number hit being scored".[This quote needs a citation] "Tic-tac-toe" may also derive from
"tick-tack", the name of an old version of backgammon first described in 1558. The US
renaming of
"noughts and crosses" to "tic-tac-toe" occurred in the 20th century.[10]

In 1952, OXO (or Noughts and Crosses), developed by British computer scientist Sandy
Douglas for the EDSAC computer at the University of Cambridge, became one of the first
known video games.[11][12] The computer player could play perfect games of tic-tac-
toe against a human opponent.[11]

In 1975, tic-tac-toe was also used by MIT students to demonstrate the computational power
of Tinkertoy elements. The Tinkertoy computer, made out of (almost) only Tinkertoys, is able
to play tic-tac-toe perfectly.[13] It is currently on display at the Museum of Science, Boston.
2.0 Aim Of The Micro-Project:
To know the concept of tic tac toe game and how to play tic tac toe game.

3.0 Course Outcome Addressed :


1. Perform basic operation on array.
2. Apply different searching and sorting technique

3. Implement basic operation on stack and queue using array representation


4. Implement basic operation on linked list

4.0 Actual Methodology Followed:


1. Firstly, a discussion will be held with group members and course coordinator and idea
about the topic will be encouraged.
2. The topic will be divided into several modules. Then each and every module.
3. A thorough research will be on the modules which will include all the key concepts
related to each modules of the microproject.
4. All the information shall be perfectly arranged into the Specified format and all the
errors/mistakes committed will be resolved.
5. Finally, the copy will be submitted to the concerned course coordinator
5.0 Action Plan: 1-8 weeks :

Sr. No. Details of activity Start date Finish date Team member.

1. Discussion of topic

Hariom Suryawanshi
2. Finalization of topic
Kanishka kandhare
3. Preparation of Abstract
Akshada Sagar
4. Submission of abstract Prashant Bhambare

5. Literature survey

6. Collection of data

7. Collection of data

8. Discussion of content
6.0 Action Plan: 9-16 weeks :

Sr. No. Details of activity Start date Finish date Team member.

9. Proof Reading of Content

10. Editing of Content

Hariom
11. Editing of Content
Suryawanshi
Kanishka kandhare
12. Completion of Report
Akshada Sagar
13. Completion of Presentation
Prashant Bhambare
14. Viva

15. Presentation

16. Final Submission

7.0 Resources used :

Sr.no Name of Resources Specifications Quality Remark

1. Computer Intel core-i3,4GB 1


Ram,2.00GHz,64 bit
OS,1Tb HDD

2. Internet -

3. Reference Books Nirali Publications and 2


Techknowledge Publication
8.0 Program for Tic Tac Toe game:

#include <stdio.h>

// Function to print the Tic-Tac-Toe

board void printBoard(char board[3][3])

for (int i = 0; i < 3; i++) {

for (int j = 0; j < 3; j++) {

printf(" %c ",

board[i][j]); if (j < 2) {

printf("|");

printf("\n");

if (i < 2) {

printf("---+---+---\n");

// Function to check if a player has won

int checkWin(char board[3][3], char player) {


for (int i = 0; i < 3; i++) {

if ((board[i][0] == player && board[i][1] == player && board[i][2] == player) ||

(board[0][i] == player && board[1][i] == player && board[2][i] == player)) {

return 1;

if ((board[0][0] == player && board[1][1] == player && board[2][2] == player) ||

(board[0][2] == player && board[1][1] == player && board[2][0] == player)) {

return 1;

return 0;

int main() {

char board[3][3] = { { ' ', ' ', ' ' }, { ' ', ' ', ' ' }, { ' ', ' ', ' ' } };

int row, col;

int currentPlayer =

1; int moves = 0;

printf("Tic-Tac-Toe Game\n");
while (1) {

// Print the current

board printBoard(board);

// Get the player's move

printf("Player %d, enter row and column (e.g., 1 2): ", currentPlayer);

scanf("%d %d", &row, &col);

// Check for valid input

if (row < 1 || row > 3 || col < 1 || col > 3 || board[row - 1][col - 1] != ' ') {

printf("Invalid move. Try again.\n");

continue;

// Update the board

if (currentPlayer == 1) {

board[row - 1][col - 1] = 'X';

} else {

board[row - 1][col - 1] = 'O';

// Check if the current player has

won if (checkWin(board,

currentPlayer)) {
printBoard(board);

printf("Player %d wins!\n", currentPlayer);

break;

// Check for a draw

moves++;

if (moves == 9) {

printBoard(board);

printf("It's a

draw!\n"); break;

// Switch to the other player

currentPlayer = (currentPlayer == 1) ? 2 : 1;

return 0;

}
9.0 Output:

You might also like