You are on page 1of 26

A MINOR PROJECT REPORT

ON
“CONNECT-4”

Submitted to

DIBRUGARH UNIVERSITY
By
Ariyan Gupta
(17992015)

Mridupaban Patowary
(17992039)

Sandeep Kamalapuri
(17992044)

Minor Project
in partial fulfillment for minor project of
fourth Semester
BACHELOR OF COMPUTER APPLICATION

CENTRE FOR COMPUTER SCIENCE AND APPLICATIONS,


DIBRUGARH UNIVERSITY,
DIBRUGARH –786004, ASSAM, INDIA.
BATCH (2017-2020)
CERTIFICATE
This is to certify that the Project Report entitled “CONNECT-4” by Ariyan
Gupta(17992015), Mridupaban Patowary(17992039), Sandeep
Kamalapuri(17992044), to the Dibrugarh University, Dibrugarh, Assam, in
partial fulfillment of the requirement for the award of Degree of BACHELOR
OF COMPUTER APPLICATION. It is a bonafide record of the project work
carried out by them under my supervision during the year of 2017-2020.

Date:

Guide: ASSISTANT PROFESSOR

( KAUSTUVMONI BORDOLOI )
CERTIFICATE
This is to certify that the Project Report entitled “CONNECT 4” by Ariyan
Gupta(17992015), Mridupaban Patowary(17992039), Sandeep
Kamalapuri(17992044), to the Dibrugarh University, Dibrugarh, Assam, in
partial fulfilment of the requirement for the award of Degree of BACHELOR
OF COMPUTER APPLICATION. It is a bonafide record of the project work
carried out by them under my supervision during the year of 2017-2020.

Date:

Chairperson,

(GOPAL CHANDRA HAZARIKA)


CCSA, DU
EXAMINATION CERTIFICATE
This is to certify that the project report entitled “CONNECT 4” by Ariyan
Gupta(17992015), Mridupaban Patowary(17992039), Sandeep
Kamalapuri(17992044), of the Centre for Computer Science and Application,
Dibrugarh University has carried out the Project Work in a manner satisfactory
to warrant its acceptance and also defended it successfully. I wish him them all
the success in their future endeavors.

Examiners:

1. External Examiner:

02. Internal Examiner:


DECLARATION
I hereby declare that the Dissertation work entitled “CONNECT 4”
submitted to the Dibrugarh University, Dibrugarh, Assam, in partial
fulfillment for minor project of fourth semester Bachelor of Computer
Applications. It is an original work done by us under the guidance of
KAUSTUVMONI BORDOLOI and has not been submitted for the award of
any degree.

Signature of the student’s:

(SANDEEP KAMPLAPURI)

17992044

(ARIYAN GUPTA)

17992015

(MRIDUPABAN PATOWARY)

17992039
ACKNOWLEDGEMENT

The Present project work is a humble and maiden effort of the work concerned
with the “CONNECT 4” and has been a large success for the generous help and
guidance received by us from several persons and quarters.

We also extend deep gratitude to my project guide for his guidance and his
encouragement for us, it was unfailing source of reward experience.

We also express our gratitude to, for providing generous advice and moral
support.

We are also thankful to all teachers for their help and timely advice.

Finally thanks to all our friends in the department for their kind cooperation and
help inside as well as outside the college.

Ariyan Gupta(17992015)

Mridupaban Patowary(17992039)

Sandeep Kamalapuri(17992044)

BCA 4TH SEMESTER

CCSA, DIBRUGARH UNIVERSITY


CONTENTS

1. ABSTRACT………………………………………………………1

2. INTRODUCTION…………………………………………………2-3

3. FEASIBILITY STUDY…………………………………………...4-8

4. DESIGN……………………………………………………9-14

ABBREVIATION…………………………………………….15

CONCLUSION……………………………………………….16

REFERENCES…………………………………………….17
ABSTRACT

This project consisted of creating a Java FX application for the game Connect
Four. We created code that set up a 6 by 7 board. The rules for the game are
exactly the same as any Connect Four game. Two players play against each
other: PLAYER1 versus PLAYER2. The player hovers the mouse over the board
and then clicks on any column and their chip will fall to the appropriate row.
This means that if there are no chips in that column, it will fall to the bottom, but
if there are already chips in that column, it will fall to the row directly above it.
The code detects if you try and place a chip in an already taken spot, and it does
not allow you to do that. We also made code that determines when there is four
in a row and someone has won the game.

INTRODUCTION
1
The goal of this project was to make a computer game using Java FX
application, and Connect Four seemed like the most fun. We wanted our desktop
version of Connect Four to be as realistic to the actual board game as possible.
We wanted all the same rules to apply. A fun game to play over free time ,break,
and from the aspiration to make a game people can really play on the computer.
This project is interesting because the code involves some complicated nested
for loops and if then statements. This project took a lot of problem solving, but
with lots of trial and error we were successful with creating Connect Four on
Java FX application.

2.1 Description
2
The aim of this project is to build a simple board game called “CONNECT
4”. The game is played with two players. The design of simple algorithm
that generates computer moves when the game is played between a
players. Below be describe how to play the game .

The game takes place in a 7 by 6 rectangular board.


Each pair has 21 turns to play. Player take turns dropping a disc from the
top of the board in one of the seven columns. The disc fall down and fill
the lowest unoccupied circle . A player cannot drop a disc in a certain
column if it is already full (i.e it contain 6 discs ). The layer beside who
will begin the game . The object of the game is to connect 4 disc
vertically , horizontally, or diagonally. If the board is filled and no one
has aligned four disc , then the game is over .That means the total of the
moves is 42 turns.

FEASIBILITY STUDY
3
Depending on the results of the initial investigation the survey is now expanded to
a more detailed feasibility study. “FEASIBILITY STUDY” is a test of system
proposal according to its workability, impact of the organization, ability to meet
needs and effective use of the resources. It focuses on these major questions:

1. What resources are available for given Player?

2. What are the likely impacts of the player system on the organization?

3. Whether it is worth to play the game?

During feasibility analysis for this project, following primary areas of interest are
to be considered. Investigation and generating ideas about a new system does this.

Steps in feasibility analysis

Eight steps involved in the feasibility analysis are:

 Form a project team and appoint a project leader.


 Prepare system flowcharts.
 Enumerate potential proposed system.
 Define and identify characteristics of proposed system.
 Determine and evaluate performance and cost effective of each proposed
system.
 Weight system performance and cost data.
 Select the best-proposed system.
 Prepare and report final project directive to management.
4
3.1 Technical feasibility
A study of resource availability that may affect the ability to achieve an acceptable
system. This evaluation determines whether the technology needed for the
proposed system is available or not.

 Can the work for the project be done with current equipment existing
software technology & available personal?
 Can the system be upgraded if developed?
 If new technology is needed then what can be developed?
 This is concerned with specifying equipment and software that will
successfully satisfy the user requirement. The technical needs of the system
may include:

Front-end

An important issue for the development of a project is the selection of suitable


front-end . When we decided to develop the project we went through an extensive
study to determine the most suitable platform that suits the needs of the
organization as well as helps in development of the project.

The aspects of our study included the following factors.

Front-end selection:

1. It must have a GUI that assists employees that are not from IT
background.

5
2. Scalability and extensibility.

3. Flexibility.

4. Robustness.

5. According to the organization requirement and the culture.

6. Must provide excellent reporting features with good printing support.

7. Platform independent.

8. Easy to debug and maintain.

9. Event driven programming facility.

10. Front end must support some popular back end like Ms Access.

According to the above stated features we selected javaFx as the front-end for

developing our project.

3.2 Economical feasibility

Economic justification is generally the “Bottom Line” consideration for most


systems. Economic justification includes a broad range of concerns that includes
cost benefit analysis. In this we weight the cost and the benefits associated with
the candidate system and if it suits the basic purpose of the organization i.e. profit
making, the project is making to the analysis and design phase.

The financial and the economic questions during the preliminary investigation are
verified to estimate the following:

6
 The cost to conduct a full system investigation.
 The cost of hardware and software for the class of application being
considered.
 The benefits in the form of reduced cost.

 The proposed system will give the minute information, as a result the
performance is improved

 This feasibility checks whether the system can be developed with the
available funds. The does connect-4 does not require enormous amount of
money to be developed. This can be done economically if planned
judicially, so it is economically feasible. The cost of project depends upon
the number of man-hours required.

3.3 Operational Feasibility

It is mainly related to human organizations and political aspects. The points to be

considered are:

 What changes will be brought with the system?


 What organization structures are disturbed?
 What new skills will be required? Do the existing staff members have these
skills? If not, can they be trained in due course of time?

The system is operationally feasible as it very easy for the End users to operate it.
It only needs basic information about Windows platform.

7
3.4 Schedule feasibility

Time evaluation is the most important consideration in the development of project.


The time schedule required for the developed of this project is very important
since more development time effect machine time, cost and cause delay in the
development of other systems.

DESIGN

8
4.1 Software Requirement Specification
4.1.1 Objective:
The main objectives of system for CONNECT-4 Application are:

The aim of this project is to develop a system that can handle and manage some
of the activities involved in a game efficiently and reliably. The specific
objectives are to:

I. Build a rectangle box that allow the player.to choose whether to play on a
7 by 6. Upon selection the play board appear on the Snapshot. The slot of
the play board should be circle. A snapshot of a board is given below:

(Figure:4.1)

9
II. Insert a rectangle box that allows the player to pick a colour for the board.
III. Insert a rectangle box that allow the player to choose whether the game
will be played between two players. Upon submission of this information
text boxes appear for the players to type the names.
IV. Insert a rectangle box that enables the players to pick their own colour. For
example in the play board below, if the first player play the game the
player colour will be purple by default and the other player colour will be
orange.
V. Insert a rectangle box that allow the player to choose who will start the
game .When the player click on one of the column the empty slot of the
corresponding column should be filled with the respective colour of the
player.The player should get an error message ,if the player attempt to fill
in a slot in a column i.e. completely filled. When the game is played
between the two player the first player randomly select any of the column
and fill the circle with the default colour.

10
Figure: (4.2)
VI. In the text fields there should be no empty fields if anyone of the text field
is empty then it will show an error message on the display.

11
12
VII. Display a message box that present the name of the winner . If the board is
filled and no one has aligned four disc , then the game is drawn. This will
happen after 42 moves ,when the game is played on a 7 by 6 board.

13
Figure: (4.4)

4.1.2 Technologies to be used:

This project will be a desktop application to be developed in Java Fx


environment having

Operating System: Windows 10

Software Used:

 Intellij IDEA (Java Fx)

Programming Language:

 JavaFx
 Java

Java Fx:
JavaFx is a software platform for creating and delievery desktop
applications, as well as rich internet applications(RIAs) that can run across a
wide variety of devices. JavaFx is intended to replace Swing as the standard GUI
library for Java SE , but both will be included for the foreseeable future. It has
support for desktop computer and web browser and Microsoft Windows,Linux.
Since the JDK 11 release in 2018, JavaFx is part of the open source
OpenJDK,under the OpenJFX project.

Java:
Java is a general-purpose computer-programming language that is concurrent,
class based, object-oriented, and specifically designed to have as few
implementation dependencies as possible. It is intended to let application
developers "write once, run anywhere" (WORA), meaning that compiled Java
code can run on all platforms that support Java without the need for
recompilation. Java applications are typically compiled to bytecode that can run
on any Java virtual machine (JVM) regardless of compute architecture. As of
14
2016, Java is one of the most popular programming languages in use,
particularly for client-server web applications, with a reported 9 million
developers. The language derives much of its syntax from C and C++, but it has
fewer low-level facilities than either of them.

FLOW CHART

15
ABBREVIATIONS

URL UNIFIED RESOURCE LOCATOR


16
HTML HYPERTEXT MARK-UP LANGUAGE

DFD DATA FLOW DIAGRAM

XML EXTENSIBLE MARKUP LANGUAGE

CONCLUSION
From a proper analysis of positive points and constraints on the component, it
can be safely concluded that the product is highly efficient GUI based

17
component. This application is working properly and meeting to all user
requirements. This component can be easily plugged in many other systems.

REFERENCES
 https://www.geeksforgeeks.org/
 https://Stackoverflow.com

18
 https://www.google.com/
 https://docs.oracle.com/javase/8/javafx/api/javafx/scene/layout/Grid
Pane.html#isGridLinesVisible--

19

You might also like