You are on page 1of 9

PROJECT ON

DESIGN TIC-TAC-TOE GAME USING DEPTH


FIRST SEARCH ALGORITHMS

DEPARTMENT OF COMPUTER SCIENCE ENGINEERING


C. V. RAMAN GLOBAL UNIVERSITY, BHUBANESWAR, ODISHA
COURSE: DESIGN AND ANALYSIS OF ALGORITHMS

SUBMITTED BY :

S.NO NAME REGD.NO ROLL.NO BRANCH SEM

1 SOUMYA RANJAN 20010483 CSD20067 CSE(DATA SCIENCE) 4TH


SWAIN

2 RAVIRAJ KUMAR 20010446 CSD20030 CSE(DATA SCIENCE) 4TH


PATNAIK

3 SAMANTHALA VINOD 20010477 CSD20061 CSE(DATA SCIENCE) 4TH

4 T SAI SUBHAM 20010476 CSD20060 CSE(DATA SCIENCE) 4TH

5 DIBYARANJAN 20010460 CSD20044 CSE(DATA SCIENCE) 4TH


BISWASROY
DECLARATION

We hereby declare that this project-based report entitled "DESIGN TIC-TAC-TOE GAME

USING DFS ALGORITHMS” has been prepared by us in partial fulfillment of the

requirement for the award of degree "BACHELOR OF TECHNOLOGY in COMPUTER

SCIENCE ENGINEERING" during the academic year 2021 - 2022. We also declare that

this project-based report is of our own effort.


ACKNOWLEDGMENT

Apart from the efforts of all the team members, the section of this project report

topic depends largely on the encouragement and guidance of our teachers. We

take this opportunity to express our gratitude to the teachers who have been

instrumental in the approval of this project topic.

We would like to show our greatest appreciation to DR.SANTOSH SHARMA and

other staff members. We cannot think of them enough for their tremendous

support and help. They motivated and encouraged use every time while selecting

the proper project topic. Without their encouragement and guidance, we would

not have been able to select the proper topic.


CONTENTS

❖ Abstract

❖ Introduction

❖ System requirements

❖ Project Description

❖ Algorithm

❖ Source Code

❖ Output

❖ Conclusion
ABSTRACT

Tic-Tac-Toe is a simple classic famous game which is played mostly by kids. The java

tic tac toe game also helps to improve the concentration of the kids.

The objective of this tic-tac-toe game java project is to build a tic-tac-toe game so

anyone can play it without wasting paper. The Tic-Tac-Toe game is also called the X

and O game. The player who succeeds in placing their marks in a diagonal,

horizontal, or vertical row is the winner.

Tic Tac Toe is a two player game where each player is assigned a marking symbol X or O.In a

3×3 grid, each player has to place their symbol.The player who succeeds in placing three of their

marks in a diagonal, horizontal, or vertical row is the winner.


INTRODUCTION

Tic Tac Toe is a classic programming problem that many developers


encounter on their programming journey. Deceptively simple, Tic Tac Toe
can teach developers about:

● Arrays
● Booleans
● Conditionals
● Functions
● Looping
● Variables
● Data Structures

There are many ways to implement a game of Tic-Tac-Toe in Java, so before we


begin coding, we must think about how we will implement the game specifically.
For this tutorial, we will be coding a text-based version of Tic-Tac-Toe. Our Tic-
Tac-Toe will start out by printing the board, and then asking for input from the first
player that will specify where on the board to place that player’s mark. After placing
the mark, we will print the board state again and then ask the other player for their
move. That process will be continued until one player wins or the board is filled up
(indicating that a tie occurred). The input that will be taken in to specify where to
place a mark will be in the format of two integers, which specify the row and
column where the mark is to be placed. Below is a sample of what a game will play
like.
SYSTEM REQUIREMENTS

★ IDE Used: Visual Studio Code , Eclipse

★ Java should be installed on the machine.

★ ľo build a tic-tac-toe game using java we íequiíe basic knowledge

of java.

★ Abstíact Window ľoolkit (AWľ) & Swing packages aíe standaíd

gíaphical useí inteífaces used to íendeí gíaphics. By default, these

packages aíe installed by java.


PROJECT DESCRIPTION

For the option human, both the players are human and for the option computer, the first
player is human and the second player is computer.

A player can choose between two symbols with his opponent, usual games use “X”and
“O”. If the first player chooses “X” then the second player has to play with “O” and vice
versa. A player marks any of the 3x3 squares with his symbol (may be “X” or “O”) and his
aim is to create a straight line horizontally or vertically or diagonally with two intentions:

a) Create a straight line before his opponent to win the game.

b) Restrict his opponent from creating a straight line first.

In case logically no one can create a straight line with his own symbol, the game results
in a tie. Hence there are only three possible results – a player wins, his opponent (human
or computer) wins or it’s a tie.

Rules Of Playing Tic Tac Toe Game

The Tic Tac Toe game takes place in the following steps.

● In the first step, we have to consist of a 3×3 grid.


● It is a two player game so each player is assigned with a symbol X or O.
● In the first turn, the first player(whosoever turn) will place his/her marking
symbol in any of the 9 cells.
● In the second turn, the second player will place his/her marking symbol in any
of the available 8 cells.
● This process will go on until any of the players will make three successive
square grids of the same sign either vertically, horizontally or diagonally.
● If the player having X marking symbol will achieve the above result then
he/she will win or if the player having O marking symbol will achieve the
above result then he/she will win.
● If the grid contains no free cell left and none of the above conditions
arrived, the Game will end with a Draw.
CONCLUSION

The software design project taught us about programming and the documentation involved with creating

an engineering project. The limitations of this project were time constraints and limited testing time with

the Proteus. The programs could only be tested on the Proteus in class, which made it difficult to debug

the code. Our limited experience with creating code for the Proteus also made this project difficult.

Creating the website and documenting our design process went well. Overall teamwork went well and

the workload for the project was split up effectively. The marketing was also successful and simple.

While writing the code was difficult at first, eventually, after a lot of debugging we developed an

effective code. I think most of the difficulty in writing the code stemmed from a lack of experience

writing code that was this extensive.

Figuring out how to code for the touch screen also created difficulties toward the beginning of the

project.

You might also like