Bca - V Minor Project Report
Bca - V Minor Project Report
ChessMate
A PROJECT REPORT
Submitted by
of
JANUARY 2023
Annexure-D
SELF CERTIFICATE
Certificate
..………………………………………………………………………………………………… ……………
Dr Meenkashi Narula
Head- Department of Information Technology
Place:
Date:
Annexure-F
ACKNOWLEDGEMENT
With candor and pleasure I/We take opportunity to express my sincere thanks and obligation to my/our
esteemed guide ______________. It is because of his/her able and mature guidance and co-operation
without which it would not have been possible for me/us to complete my project.
Finally, I/We gratefully acknowledge the support, encouragement & patience of my /our family/
families, and as always, nothing in my/our life would be possible without God, Thank You!
1.1. PURPOSE
The aim of the project is to provide both a chess as well as chat facility in one application such that two
users can play the chess against each other as well as they can chat among themselves on the network
that is any number of computers connected via a network. So the users can play the chess in pair and in
the meantime when any one of them wants to communicate with the opponent player, he can also do
that simultaneously.
1.2. SCOPE
Online chess game play: Users can play against each other in real-time or asynchronously.
Chess problem solving: Users can solve chess puzzles and problems to improve their chess
skills.
Learning resources: Users can access tutorials, videos, and other resources to learn how to play
chess.
Tournaments and competitions: Users can participate in online chess tournaments and
competitions.
Social features: Users can connect with other chess players, join clubs and groups, and chat
with others.
Game analysis: Users can analyze their own games and those of others using chess engines and
other tools.
User account management: Users can create accounts, login, and manage their settings.
Admin Panel to manage the website
1.3. OBJECTIVES
a) To provide a user-friendly interactive environment to the users of the application that helps
them to play and communicate with a lot of ease.
b) To provide help to the users in playing the chess that is the different moves of the different
pieces etc are being explained to the users, if they require.
c) The care is taken that the user finds the same chatting mechanism as he is normally used to.
d) Since there exists client and server as the project is based on client server architecture, where
server is serving as a mediator in between the players and the client is making request to server
as well as doing all the part that is related to playing logic.
e) The care has been taken that the application has less CPU usage.
1.4. SDLC METHODOLOGIES
Design Philosophy
As there are many types of models available to implement a project. Here in this section, we
have discussed the model which we have used and why we have used it.
The Waterfall Model was the first Process Model to be introduced. It is also
referred to as a linear-sequential life cycle model. It is very simple to understand
and use.
In a waterfall model, each phase must be completed before the next phase can
begin and there is no overlapping in the phases.
2.1 INTRODUCTION
As we all practice social distancing during COVID-19, many of us are looking for ways to
entertain and improve ourselves, connect with others, and help our children continue to learn.
According to William Bart, professor of educational psychology in the University of Minnesota’s
College of Education and Human Development, online chess training may be just the mental challenge
and escape we need right now.
Some children are able to learn some aspects of chess at four years of age. In order to learn the names
of the squares on the chessboard, students need to know the letters a through h in the alphabet and
numbers 1 to 8. Because of this, I don’t recommend children start learning chess until after
kindergarten.
Chess training and practice supports the development of higher-order thinking skills—like problem
solving, decision making, critical thinking, planning, and even creative thinking. Chess training and
practice also helps improve general cognitive ability and scholastic achievement—especially in
mathematics.
In addition, it reinforces affective attributes such as patience, prudence, and perseverance. Two
prominent virtues of chess are fairness and honesty. The international chess community promotes civil
behavior and respect for the opponent but punishes players found to have cheated. Chess is a civil
game with an ethical code that predisposes players to play respectfully with other individuals.
Many students, including those with disabilities, can benefit educationally and psychologically from
chess training.
Online chess training and online chess play have potential for the betterment of students during and
after the present coronavirus pandemic.
Seniors can benefit from learning and playing chess in various ways. Cognitive benefits include the
refinement and maintenance of higher-order thinking skills such as problem solving, decision making,
critical thinking, planning, and even creative thinking.
In addition, chess training and practice supports the development of vigilance and awareness. Chess
can involve many traps and tricks, and seniors can learn to deal with them which may help them avoid
scams and chicanery in everyday life.
2.1.1 PROJECT OVERVIEW
The project will incorporate several popular web development technologies such as HTML, CSS3,
JavaScript. Much of the time, the tools and programming languages taught in a classroom setting are
learned and practiced in isolation from one another. Although this approach has its place, it is not
typically representative of how software is developed for applications in industry. The ability to make
different technologies play nicely with one another effectively, efficiently, and elegantly is a key
strength of successful software engineers. This web application project will give us an opportunity to
develop the important skill of integrating various technologies with one another in a single application.
Internet: Required
HTML
The Hypertext Markup Language, or HTML is the standard markup language for
as Cascading Style Sheets (CSS) and scripting languages such as JavaScript. HTML allows
web users can create and structure sections, paragraphs, and links using elements, tags,
and attributes.
a) Web development. Developers use HTML code to design how a browser displays web page
elements, such as text, hyperlinks, and media files.
b) Internet navigation. Users can easily navigate and insert links between related pages and
websites as HTML is heavily used to embed hyperlinks.
c) Web documentation. HTML makes it possible to organize and format documents, similarly
to Microsoft Word.
CSS
Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation of a
document written in HTML or XML. CSS is used to style and layout web pages for example,
to alter the font, colour, size, and spacing of your content, split it into multiple columns, or
add animations and other decorative features. CSS allows you to apply styles to web pages.
More importantly, CSS enables you to do this independent of the HTML that makes up
CSS is easy to learn and understand, but it provides powerful control over the presentation
of an HTML document. CSS is the language for describing the presentation of Web pages,
including colours, layout, and fonts. It allows one to adapt the presentation to different types
of devices, such as large screens, small screens, or printers
JavaScript
commonly used as a part of web pages, whose implementations allow client-side script to
interact with the user and make dynamic pages. It is an interpreted programming language
like Array, Date, and Math, and a core set of language elements like operators, control
a) Internal JS: We can add JavaScript directly to our HTML file by writing the
code inside the <script> tag. The <script> tag can either be placed inside the <head> or
b) External JS: We can write JavaScript code in other file having an extension .js and then
link this file inside the <head> tag of the HTML file in which we want to add this code.
Applications of JavaScript:
c) Web Development: Adding interactivity and behaviour to static sites JavaScript was
language was required to create robust web applications. When we explore a map in
Google Maps then we only need to click and drag the mouse. All detailed view is just a
click away, and this is possible only because of JavaScript. It uses Application
Programming Interfaces(APIs) that provide extra power to the code. The Electron and
e) Server Applications: With the help of Node.js, JavaScript made its way from client to
f) Games: Not only in websites, but JavaScript also helps in creating games for leisure.
development as well. It provides the EaseJS library which provides solutions for
works for applications that require the internet for its functioning.
h) Art: Artists and designers can create whatever they want using JavaScript to draw on
HTML 5 canvas, make the sound more effective also can be used p5.js library.
i) Machine Learning: This JavaScript ml5.js library can be used in web development by
using machine learning.
3.1 INTRODUCTION
It is a process of planning a new business system or replacing an existing system by defining its
components or modules to satisfy the specific requirements. Before planning, you need to understand
the old system thoroughly and determine how computers can best be used in order to operate
efficiently. System Design focuses on how to accomplish the objective of the system. The chapter
includes the physical design, user interface design which means all the required diagrams for
describing how we designed and created are being displayed in this chapter.
PLAYER VS PLAYER
Actor: The first player (WHITE), who initiates the game and makes the first move.
Actor: The second player(BLACK), makes moves as the opponent.
Use Case: "Start Game," in which the first player initiates the game.
Use Case: "Make Move," in which the players take turns making moves according to the rules of chess.
Use Case: "End Game," in which the game ends when one player checkmates the other or the game is a
draw.
Use Case: "Offer draw" in which one player can propose a draw to the other player.
Use Case: "Claim victory" in which one player claim victory if the opponent left the game.
COMPUTER VS PLAYER
Actor: The player, who initiates the game and makes moves.
Actor: The computer, which acts as the opponent and makes moves based on its chess-
playing algorithm.
Use Case: "Start Game," in which the player initiates the game and selects the difficulty
level for the computer opponent.
Use Case: "Make Move," in which the player and computer take turns making moves
according to the rules of chess.
Use Case: "End Game," in which the game ends when one player checkmates the other
or the game is a draw.
3.2.2 DATA FLOW DIAGRAM
1. External entities:
Users interact with the website through a web browser by accessing the game and playing chess
games.
Administrators interact with the website through a web browser by accessing the homepage,
and choosing game mode.
2. Game process:
The game subprocess handles the display and interaction of the chess board and the pieces on
the website.
The move validation subprocess handles the validation of user moves, including the
enforcement of chess rules and the detection of checkmate and stalemate.
The analysis subprocess handles the communication with external chess engines to provide
move suggestions and game analysis to the users.
3. The website pages:
The login page, and game page, are generated by the web and sent to the user's web browser to
be displayed.
3.2.4 SITE MAPS
Homepage: The main page of the website, which provides an overview of the website's features and
allows users to access the different sections of the website.
Play: This page would allow users to play chess online either against player or a computer.
Instruction: This page would contain resources for learning and basic rules of chess.
3.4.1 DESIGN
The most creative and challenging phase of the system life cycle is system design. The design is a
solution to develop that know-how of the new system under consideration.
It provides the understanding and procedural details necessary for implementing the system
recommended in feasibility study. Design phase identifies the boundary and interface of the systems,
format I/O etc.
The KING:
The King is the most important piece. When it is trapped so it cannot move without being
captured, then the game is lost. This trap is called checkmate.
The King can move one square in any direction. A King can never move into check, or onto a
square where it can be captured by an opponent's piece. If a King is not in check, and no other
legal move is possible, then the position is said to be in stalemate. A stalemated game is a draw,
or a tie.
The QUEEN:
The Queen is the most powerful piece.
The Queen can move to any square in any direction as long as her path is not blocked. Her
range and the ability to attack many pieces an once are the source of her power.
The ROOK:
The Rook is the next very powerful piece after Queen.
The Rook can move to any square along its file or row as long as its path is not blocked. Its
range is the source of its power.
The BISHOP:
The Bishop comes next to Rook in terms of power.
The Bishop can move to any square along its diagonals as long as its path is not blocked. Its range is the
source of its power.
The KNIGHT:
The Knight is nearly as powerful as the Bishop.
The Knight is the only piece that can hop over other pieces in an L-shaped path. This ability
makes it particularly powerful in the early stage of a game when the board is crowded with
pieces.
The PAWN:
The Pawn is the least powerful piece because of its poor mobility.
The Pawn may move only one square forward if its path is not blocked. However, it may move
as an option one or two squares forward on its first move only. It may capture only diagonally
one square. It may not capture forward. It may not move backward. The lowly Pawn usually
does not last long, but if it is able to reach the 8th row or rank, then it can promote itself to any
other piece except the King. A Pawn thus promoted is replaced by that piece. Therefore, it is
possible to have more than one Queen, or two Rooks, Bishops, or Knights on the board at one
time.
Here Black is castled long or on the Queen side. White is uncastled. Castling is an important move in
chess. It allows a player to quickly move both the King to safety and the Rook to the center for battle.
For this reason, wise players carefully guard their ability to castle and usually castle early in the game.
Likewise, clever players will attempt to prevent their opponent from castling. When castling the player
moves his King two squares toward one of the player's Rooks and moves that Rook to the opposite side
of the King. A player may not castle if either the King or the Rook involved have already moved. Also,
the King may not castle out of, through, or into check. There must be no pieces between the King and
Rook when castling.
Different modules specified in the design document are coded in the Coding phase according to the
module specification. The main goal of the coding phase is to code from the design document prepared
after the design phase through a high-level language and then to unit test this code. Good software
development organizations want their programmers to maintain to some welldefined and standard style
of coding called coding standards. They usually make their own coding standards and guidelines
depending on what suits their organization best and based on the types of software they develop. It is
very important for the programmers to maintain the coding standards otherwise the code will be
rejected during code review.
4.2 TESTING
Testing is vital to the success of the system. System testing makes a logical assumption that if all parts
of the system are correct the resulis will be successfully achieved. Effective testing early in the process
translates directly into long term cost saving, reduced number of errors. System testing is done when all
the modules of the system are in working order and has been tested independently for proper working .
All the pieces are put into one system and test to determined, whether it needs user's requirements. The
best program is worthless if doesn't needs. System testing is designed to uncover weakness that were
not found in earlier tests like program testing in which only syntactical and logical are removed. The
purpose of System Testing is to consider all the likely variations to which it will be subjected and then
push the system to its limits.
1) Program Testing:
It checks types of errors that is Syntax and Logic.
2) String Testing:
It is used to test a set of related programs forming a subsystem.
3) System Testing:
It test the system as a whole that is, it checks the interrelationship among the various
subsystems.
4) Alpha Testing:
It tests the system in simulated environment on simulated data.
5) Beta Testing:
It test the system under realistic conditions with actual data.
6) User Acceptance Testing:
An acceptance testing has the objective of telling the user about the validity and reliability of
the system that is the developed system is functioning according to the needs prescribed by the
user. This testing is done with the actual data in presence of the user at the users place.
1) The first test for a system is to see whether it produces the correct outputs.
2) A volume test is done in which we create as many as records as would normally be produced
to verify that the hardware and software will function properly.
3) Stress Testing is done to prove that the system doesn't malfunction under peak loads. We
subject the system to a high volume of data over a short time period.
4) A forced system failure is included to test the backup recovery procedure. Unaccurate data
are entered to see the response of the system in terms of error detections and protections and to
test that the data and programs are secured from unauthorised access.
5) The usability test verifies the user-friendly nature of the system. This related to natural
operating and error handling procedures.
6) Boundary value analysis is done to find out that the system does'nt produce incorrect result,
when the values provided are not within the prescribed domain or at the boundaries of the
respective domains.
Input screen
Player vs Computer
Player vs Player
Instruction
5.2 Reports in print Format with actual Data
Front page
Player vs Computer
Basic Functions in Player vs Computer code:
a) updateSquarecolor()
This function is used to update the colors of each square after each move.
b) checkBlack(n,values)
This function is used to find all the possible places to where a selected white chess piece can be
moved in this step.
c) checkWhite(n,values)
This function is used to find all the possible places to where a selected black chess piece can be
moved in this step.
d) checkmate()
This function is used to check if there would be danger to your king if you make
any move and declares you to have lost.
e) check()
This function is used to make your moves, if possible, and also to warn the player if the mkintg
is in check and the player is not trying to protect it, by the use of the checkBlack and
checkWhite functions described above.
f) chooseTurn()
This function is helpful for the computer to play its move by moving forward with the best
possible move. It also declares the player as winner if there is no possible move for the
computer to make while protecting its king. It basically helps in the propogation of the game
step by step.
g) startTime()
This function is to show current time and day.
h) maxxTime()
This function is used to check the time limit for each move and warn the player after 45 seconds
and stop the game and declare him to have lost after 1 minute.
i)maxxTime2()
This function is used to check and stop the game at maximum time limit of 45 minutes and the
game would be declared drawn.
j) restart()
This function is used to restart timer after each move.
Player vs player
Basic functions in player vs player:
a) updateSquarecolor()
This function is used to update the colors of each square after each move.
b) checkBlack(n,values)
This function is used to find all the possible places to where a selected white chess piece can be
moved in this step.
c) checkWhite(n,values)
This function is used to find all the possible places to where a selected black chess piece can be
moved in this step.
d) checkmate()
This function is used to check if there would be danger to your king if you make any move and
declares you to have lost.
e) check()
This function is used to make your moves, if possible, and also to warn the player if the mkintg is
in check and the player is not trying to protect it, by the use of the checkBlack and checkWhite
functions described above.
Instructions
In conclusion, a chess website can provide a wide range of benefits for chess players of all skill levels.
Features such as online play, tournaments, training programs, and interactive learning tools can help
players improve their game and connect with other chess enthusiasts. Additionally, incorporating new
technologies such as artificial intelligence and virtual reality can enhance the online chess experience.
With the increasing popularity of chess and the convenience of online play, a well-designed and user-
friendly chess website has the potential for significant growth and success in the future.
The future scope of a chess website could include various features such as online tournaments, chess
training programs, and interactive learning tools. Additionally, incorporating artificial intelligence and
machine learning algorithms to provide personalized chess training and analysis could also be a
potential area of growth. Other possibilities include integration with virtual reality technology to
enhance the online chess playing experience, and expanding to include other variations of chess such as
chess960 or bughouse. Overall, a chess website that provides a comprehensive and engaging
experience for chess players of all skill levels could have a strong future.