Professional Documents
Culture Documents
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
Date:
( 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,
Examiners:
1. External Examiner:
(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)
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 .
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:
2. What are the likely impacts of the player system on the organization?
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.
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
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.
7. Platform independent.
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
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.
considered are:
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
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)
Software Used:
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
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