0% found this document useful (0 votes)
27 views18 pages

Rohan PPR

Uploaded by

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

Rohan PPR

Uploaded by

Rohan Kokatare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Subject name and Code: PPR (22478) Academic year: 2023-24

Course Name: AO 4I Semester: Fourth

Tic Tac Toe Game


MICRO PROJECT REPORT
Submitted in March 2024 by the group of 3 students

Sr. Roll Enrollment Seat No.


No No Full name of student No. (Sem-III)

1 15 ROHAN GANGARAM KOKATARE 23112090100


2 16 KHUSHAL LAXMAN CHAVAN 23112090101
3 13 SANSKRUTI SHAILESH NIMSE 23112090098

Under the Guidance of Prof. Ritika Mahajan in 3 Years Diploma Programmed in


Engineering & Technology of Maharashtra State Board of Technical Education ISO
9001:2008(ISO/ICE-27001:2013) SHIVAJIRAO S. JONDHLE POLYTECHNIC, ASANGAON

1
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION, MUMBAI
CERTIFICATE

This is to certify that Mr. ROHAN GANGARAM KOKATARE


Roll No- 03 of Third Semester of Automation & Robotics Diploma Programmed
in Engineering & Technology at Shivaji Rao S. Jondhle Polytechnic Asangaon
(EAST) Shahapur 421601 has completed the Micro Project satisfactorily in the

subject PPR (22478) in the academic year 2023-2024 prescribed in the


curriculum.

Place: ASANGAON Enrollment No. : 23112090100


Date: / / 2023 Exam seat No:

Project Guide Head of the Department Principal

2
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION, MUMBAI
CERTIFICATE

This is to certify that Mr. KHUSHAL LAXMAN CHAVAN


Roll No- 03 of Third Semester of Automation & Robotics Diploma Programmed
in Engineering & Technology at Shivajirao S. Jondhle Polytechnic Asangaon
(EAST) Shahapur 421601 has completed the Micro Project satisfactorily in the
subject PPR (22478) in the academic year 2023-2024 prescribed in the

curriculum.

Place: ASANGAON Enrollment No. : 23112090101


Date: / / 2023 Exam seat No:

Project Guide Head of the Department Principal

3
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION, MUMBAI
CERTIFICATE

This is to certify that Mr. SANSKRUTI SHAILESH NIMSE


Roll No- 03 of Third Semester of Automation & Robotics Diploma Programmed
in Engineering & Technology at Shivajirao S. Jondhle Polytechnic Asangaon

(EAST) Shahapur 421601 has completed the Micro Project satisfactorily in the
subject PPR (22478) in the academic year 2023-2024 prescribed in the
curriculum.

Place: ASANGAON Enrollment No. : 23112090098


Date: / / 2023 Exam seat No:

Project Guide Head of the Department Principal

4
INDEX

Sr.
Title name Page No.
No

1. Introduction 5

Aim of the
2. Micro-Project 5

3. Action Plan 6

Resources
4. Require 6

5. Algorithm 7

6. Code 8

7. Output 9

8. Conclusion 10

9. References 11

10. Skill Developed / learning out of this Micro-Project 12

11. Advantage & Disadvantage 13

5
PART-A
TIC-TAC TOE GAME
1.0 Brief Introduction
Object oriented programming – As the name suggests uses objects in
programming. Object oriented programming aims to implement real
world entities like inheritance, hiding, polymorphism etc. in
programming. The main aim of OOP is to bind together the data and the
functions that operates on them so that no other part of code can access
this data except that function. Object-oriented programming (OOP) is
a programming paradigm based on the concept of "objects", which may
contain data, in the form of fields, often known as attributes; and code,
in the form of procedures, often known as methods. A feature of objects
is that an object's procedures can access and often modify the data fields
of the object with which they are associated (objects have a notion of
"this" or "self"). In OOP, computer programs are designed by making
them out of objects that interact with one another. There is significant
diversity of OOP languages, but the most popular ones are class-based,
meaning that objects are instances of classes, which typically also
determine their type.

2.0 Aim of the Micro-Project


This Micro-Project aims at:
1. Create a program for Tic-Tac Toe game.

6
3.0Action Plan

Name of
Sr. Planned Planned
Details of activity Responsible Team
No. Start date Finish date
Members
ROHAN
1 Project Survey 06-30-2018 07-07-2018

ROHAN
2 Gathering Information 07-21-2018 07-28-2018

SANSKRUTI
3 Executed 08-04-2018 08-04-2018

KHUSHAL
4 Create Report 08-11-2018 08-18-2018

4.0 Resources Require

Sr.
Name of Resource / Material Specification Quantity Remark
No.

Computer (Pentium 14th


1 Hardware: Computer System 1
gen), RAM 8GB, SSD 1TB

2 Operating System Windows 10 1

3 Software PYTHON IDLE 1

7
PART B
Tic Tac Toe Game Project
1.0 Brief Description
This python program on TIC Tic-Tac Game is a simple text base game. This
program is without graphics to focus on logic /algorithm used in game. Two
players can play this game.

2.0 Aim of the Micro-


Project This Micro-
Project aims at:
1. Create a program for Tic-Tac Toe game

3.0 Course Outcomes Integrated


a) Develop the procedure oriented programming approach.
b) Develop the object oriented programming approach.

4.0 Actual Procedure Followed.

1. Project survey done by Rohan.


2. Collecting information from Internet by Rohan.
3. Written and Executed by Khushal.
4. Gathering and analyzing all this information and Create Report by
Khushal.

8
6.0 Outputs of the Micro-Projects

ALGORITHM
Algorithm Name : TIC-TAC TOE GAME
STEP 1 :- START
STEP 2 :- Initialize int player  1,i,choice char mark

STEP 3 :- Read choice


STEP 4 :- mark (player  1) ? 'X' : 'O';
STEP 5 :- if choice  1 and square[1]  1
ELSE IF (choice is equal to 2 and square[2] is equal to '2')

ELSE

Till 9;
ELSE
PRINT - “Invalid
move” player--
icheckwin()
player++
STEP 6:- WHILE(i is equal to -1)
board( )
IF(i is equal to1)
PRINT –“ Win”

ELSE

PRINT – “Game Draw”


STEP 7:- CHECKWIN()

IF (square[1] is equal to square[2] and square[2] is equal to square[3])


return 1
ELSE IF(square[4]is equal to square[5]and square[5]is equal to square[6]
else
return -1
STEP 8:- BOARD( )
Display –“Tic Tac Toe”
Display “ 1 (X) - Player 2 (O)
Display “<< square[1] << | << square[2] << | "
Display “<< square[4] << | << square[5] << | << square[6] ”
Display “<< square[7] << | << square[8] << | << square[9] ”
STEP 9:- EXIT
9
# Tic Tac Toe Game in Python

# The game board


board = [' ' for _ in range(9)]

# Function to draw the game board


def draw_board():
row1 = '| {} | {} | {} |'.format(board[0],
board[1], board[2])
row2 = '| {} | {} | {} |'.format(board[3],
board[4], board[5])
row3 = '| {} | {} | {} |'.format(board[6],
board[7], board[8])

print(row1)
print(row2)
print(row3)

# Function to get the player's move


def get_move(player):
valid_move = False
while not valid_move:
move = input('Player {}: Enter your
move (1-9): '.format(player))
if move.isdigit() and int(move) in
range(1, 10) and board[int(move) - 1] == '
':
board[int(move) - 1] = player
valid_move = True
else:
10
print('Invalid move. Try again.')

# Function to check if there is a winner


def check_winner():
# Check rows
for i in range(0, 9, 3):
if board[i] == board[i+1] ==
board[i+2] and board[i] != ' ':
return board[i]

# Check columns
for i in range(3):
if board[i] == board[i+3] ==
board[i+6] and board[i] != ' ':
return board[i]

# Check diagonals
if board[0] == board[4] == board[8]
and board[0] != ' ':
return board[0]
if board[2] == board[4] == board[6]
and board[2] != ' ':
return board[2]

# Check if the board is full


if ' ' not in board:
return 'T'

# No winner yet
return False
11
# Function to play the game
def play_game():
player = 'X'
while True:
draw_board()
if check_winner():
draw_board()
if check_winner() == 'T':
print('It\'s a tie!')
else:
print('Player {}
wins!'.format(check_winner()))
break
get_move(player)
if player == 'X':
player = 'O'
else:
player = 'X'

# Start the game


play_game()

12
13
CONCLUSION

The provided Store Management System offers a basic framework for product
management. Its strengths lie in its simplicity, user-friendly interface, and
structured data handling. However, limitations like scalability issues, lack of
data persistence, and absence of advanced features hinder its suitability for
real-world applications. To enhance its functionality, one could implement
data validation, user authentication, and GUI integration. Additionally,
incorporating file I/O for data storage would enable persistence between
program runs. With these enhancements, the system could evolve into a more
robust and practical solution for managing products in a store environment.
From this project we learned about functions, arrays, loops and conditional
statements. We learned to implement various C++ concepts.

14
REFERENCES
https://github.com/topics/tic-tac-toe-game

https://www.coursera.org/projects/introduction-to-cpp-programming...

15
7.0 Skill Developed / learning out of this Micro-Project
• Basic knowledge: Apply knowledge of basic mathematics,
science and basic engineering to solve the broad-based computer
engineering problems.
• Ethics: Apply ethical principles for commitment to professional
ethics, responsibilities and norms of the practice also in the field
of computer engineering.
• The engineer and society: Assess societal, health, safety, legal
and cultural issues and the consequent responsibilities relevant to
practice in field of computer engineering.
• Communication: Communication effectively in oral and written
form.
• Life-long learning: Engage in independent and life-long learning
activities in the context of technological changes also in the
computer engineering and allied industry.

16
8. Advantage and Disadvantage

Tic-Tac-Toe: advantages:

1. Teaches strategy skills.

Playing Tic-Tac-Toe may seem like a game of chance at first, but after playing a
few rounds, players usually notice that there’s a certain strategy and pattern
of movements that can end up in a win. Because of this, it teaches players
(both young and old) to start thinking strategically, which can be highly
beneficial in other areas of life too.

2. Develops logical thinking.

There’s a great deal of logic that can be applied to a game of Tic-Tac-Toe.


Simple moves that are quite logical are the ones that result in a win. This can
help people to start thinking about things differently; from a more logical
point of view.

3. Improves the ability to concentrate and focus.

To win at a game of Tic-Tac-Toe, players need to focus or concentrate for a


few moments at a time. This practice at focus and concentration can help to
develop these skills. This is a great skill to have in all areas of life.

4. Teaches good sportsmanship.

Both kids and adults can benefit from learning how to be graceful when
winning and losing. This is called good sportsmanship. Players of Tic-Tac-Toe
must be able to handle themselves whether they win or lose. It’s a great lesson
to learn from the game.

5. Sets the foundation for learning more complex games.

When kids are developing, they need to be introduced to games in stages,


based on complexity. Because Tic-Tac-Toe is a simple game, it is a great
foundation game to learn before moving on to more complex and challenging
games. Tic-Tac-Toe can teach all of the basics of playing a game, such as
following the rules, thinking about the gameplay, watching what opponents
are doing, and so on.

17
Tic-Tac-Toe: Disadvantages:

1. It can get boring knowing that you are going to win every single time.

If you are an experienced Tic-Tac-Toe player, you probably (in fact,


you do) know precisely how to win. If you are playing against newbies to the
game or kids who haven’t had much experience with it, it can become a little
boring if you are winning round after round. It can also be a little frustrating
because teaching the tricks will simply end in a tie at the end of every round.
For the more experienced players, playing 2 or 3 rounds is usually all that they
can stomach.

2. The game usually takes less than a minute to play.

If you are looking for a game to while away a few hours of the afternoon or
evening, Tic-Tac-Toe might not be it. The game is quick and easy, which means
that it usually takes less than a minute for one of the players to win.

3. You usually need paper and a pencil/pen to play.

If you want to play Tic-Tac-Toe, you need some paper and a pencil or pen. If you
don’t have these available, you aren’t going to be able to play. This can be
rather inconvenient. It’s even more inconvenient or frustrating if you have the
paper but no pen!

4. New versions of Tic-Tac-Toe have ruined the original version.

Not everyone likes change. Over the years, Tic-Tac-Toe has changed, and this is
not something that is appreciated by everyone. Those who enjoy the original
version of Tic-Tac-Toe may feel that the new variations have ruined it.

8. The game can be addictive and can lead to wasting a lot of time.

We all know that certain games can become addictive. Everyone is different.
Some people get addicted to video games, while others get addicted to paper
and pencil games, like Tic-Tac-Toe.

18

You might also like