HAND-CRICKET GAME APPLICATION
A PROJECT REPORT
BACHELOR OF SCIENCE (COMPUTER SCIENCE)
By
SHRAVAN JOKHANPRASAD AGRAHARI
2023420193
&
AYUSH DEEPAK DUBEY
2023420197
Under the esteemed guidance of
Mr. Abhijeet Kale
Department of Computer Science
VPM’s B.N. Bandodkar College of Science
(Autonomous)
Thane – 400601, Maharashtra
Academic year 2024-25
CERTIFICATE OF SYSTECH COMPUTER INSTITUTE
To whomsoever it may concern
Respected Sir/Madam,
I am pleased to certify that ‘Mr. Shravan J. Agrahari’ and ‘Mr. Ayush D. Dubey’
has been actively involved with “SYSTECH COMPUTER INSTITUTE” for the last
45 to 60 days, focusing on various elements of game development. They have
specifically contributed to the "Hand Cricket Game Application," which is a digital
version of the classic hand cricket game, incorporating computer-based gameplay
mechanics and an engaging user experience.
Please note that the information related to software design and other aspects of
this project does not necessarily represent our proprietary methods.
Our support has mainly revolved around assisting with game development
concepts, strategies for user engagement, and the overall structure of the application
to facilitate the project. The format and details included in the project report have
been customized to align with the project's needs.
Regards,
Client’s Signature
ACKNOWLEDGEMENT
We would like to express our gratitude to everyone who provided valuable resources
and assistance while creating this project.
Firstly, we would like to express our heartfelt gratitude to our teacher
coordinator, Mr. Abhijeet Kale, for guiding us through this project. His constructive
advice and constant motivation are responsible for the successful completion of this
project.
Also, we extend our gratitude towards our parents, friends, and colleagues who
have helped us a lot in finishing the project within the given time frame.
ABSTRACT
The Hand Cricket Game Application is an interactive web-based game designed
to provide users with an engaging and entertaining experience. Developed using
HTML, CSS, and JavaScript, the game simulates the popular hand cricket game,
allowing players to compete against a computer opponent in a digital environment.
Traditional hand cricket is typically played using fingers to represent runs, but
the manual process lacks automation and real-time score tracking. Additionally, offline
gameplay limits accessibility and engagement. The proposed system addresses these
challenges by offering a user-friendly web interface, automated score calculations, and
responsive gameplay mechanics.
The game features intuitive controls, dynamic animations, and real-time game
logic to ensure an immersive experience. Players can select their runs, and the system
automatically determines the outcome based on the game's logic. The responsive design
ensures smooth performance across multiple devices, enhancing accessibility and
usability.
By implementing this Hand Cricket Game Application, users can enjoy a
digitized, fast-paced, and interactive version of the traditional game, improving
engagement and providing a fun and competitive platform for players of all ages. The
system eliminates manual errors, enhances the gaming experience, and demonstrates
the effective use of front-end web technologies in game development.
SYNOPSIS
INTRODUCTION
This game is a tribute to the beloved traditional recreational activity
(childhood game) Hand Cricket, which we played for over a decade and believe
many in the Indian subcontinent have either heard of or played at least once. Playing
it in person required coordination and quick mental math, making it both challenging
and enjoyable. To relive those cherished memories, we created the Hand Cricket
Application, which enhances the Legacy gameplay by introducing enhanced
gameplay metrics such as strike rate calculation, performance averages, and win
probability indicators. Additionally, you can share your results and statistics with
friends. While the app may lack the human element of real-life matches, it offers an
innovative and exciting way to enjoy the classic game, blending nostalgia with
modern technology. We hope this app brings you the same joy and excitement as
playing Hand Cricket with your friends. Target Audience: Cricket enthusiasts of all
ages. Casual gamers seeking a fun and nostalgic experience.
Current System
The current system for playing Hand Cricket is primarily manual. It relies on
players physically showing fingers to represent their shots and deliveries. This
traditional method has limitations:
a. Limited Accessibility: Players need to be physically present in the same
location to play.
b. Lack of Convenience: Finding willing opponents can be challenging,
especially for solo players.
c. Data Storage and Management: Tracking scores and Match Statistics is
manual and prone to data inconsistency in manual scorekeeping.
Problems Faced in Current System
a. Inconvenience: Requires physical presence and coordination between
players.
b. Limited Accessibility: Geographic dependency for player interactions.
c. No Skill Tracking: No mechanism to track player progress and
achievements.
Proposed System
a. Convenience: Play anytime, anywhere against Computer - Powered Players
b. Entertainment: Provides a fun and engaging digital experience.
c. Interactive user experience enabled by Computer-driven gameplay
dynamics.
Software Requirements
Programming Languages: HTML, CSS, Javascript
Development Environment
Visual Studio Code
Hardware Requirements
Storage: 256 GB SSD or higher.
RAM: 4 GB and more
Processor: Dual-core processor (Intel i3 or equivalent).
Operating System: Windows 11 and more
Table of Content
Sr.no Topic Page no.
1. Introduction 1-4
1.1 Problem Definition 1-2
1.2 Project Objectives 2-3
1.3 Project Purpose, Scope, & Applicability 3-4
1.4 Advantages of the Project 4
2. Survey of Technology 5-6
3. Requirements & Analysis 7
3.1 Hardware & Software Requirements 7
3.2 Gantt Chart 7
4 System Design 8
4.1 Basic Modules 8
4.2 Logic diagrams (Class Diagram, Use case Diagram, ER 9-11
Diagram)
5 Implementation & Testing 12-23
5.1 Testing Approach Software 12-133
5.2 Coding 12-23
6 Results 24-26
6.1 System Workings 24-26
7 Conclusion 27
8 References 28
CHAPTER 1: INTRODUCTION
1.1 Define the Problem:
In today’s digital era, interactive games have become a major form of
entertainment for users of all ages. Traditional games that were once played using
physical means are now transitioning into digital platforms, offering greater
accessibility, convenience, and engagement. One such traditional game is Hand
Cricket, a popular game played among children using hand gestures to simulate cricket
actions. While the game is simple and engaging, it has never been fully developed into
a structured digital format.
Hand Cricket, when played manually, involves two players using their fingers
to represent runs, while one of the players acts as a bowler. The randomness of the game
makes it fun, but it also lacks standardization and fairness when played physically.
Some common issues with the manual version of the game include disputes overruns,
difficulty in tracking scores, and inconsistencies in gameplay. Additionally, in a manual
setting, players must rely on memory for keeping scores, which increases the chances
of errors and miscalculations.
The digital transformation of Hand Cricket can solve these challenges by
providing a structured, rule-based, and automated system for fair gameplay. A web-
based Hand Cricket game offers an opportunity for users to enjoy the game anytime,
without the need for a physical opponent. Implementing such a system ensures accurate
score tracking, eliminates human errors, and provides an engaging user interface to
make the game more immersive.
Another critical challenge of manually playing Hand Cricket is the lack of fair
play. Since the game depends on hand gestures, players might not always be honest in
declaring their numbers. A digital version eliminates this issue by ensuring that the rules
are programmed, making it impossible for players to manipulate the results. The system
can also introduce a computer opponent, allowing users to play the game even when no
human opponent is available.
The demand for simple, browser-based games is increasing, as many people
look for quick and entertaining ways to pass their time. Traditional board and card
games like Chess and Solitaire have already seen successful transitions into the digital
space. Hand Cricket, being a widely known and nostalgic game, holds the potential to
gain similar popularity if developed properly.
Furthermore, developing a web-based Hand Cricket game using HTML, CSS,
and JavaScript provides a cross-platform gaming experience that works across different
devices, including desktops, laptops, and mobile phones. Web-based games have the
advantage of being instantly accessible, as they do not require installation, unlike
mobile apps. This approach makes it easier to reach a broader audience without
platform restrictions.
From a technical standpoint, designing a digital Hand Cricket game requires an
intuitive user interface, real-time score updates, a fair randomization system, and an
engaging user experience. The game logic should be implemented in JavaScript to
handle score calculations and determine the winner based on programmed rules.
Additionally, a simple and visually appealing UI using HTML and CSS will enhance
user engagement.
The project aims to provide an easy-to-play, fair, and interactive gaming
experience for Hand Cricket enthusiasts. It eliminates disputes, automates scoring, and
brings an enjoyable pastime into the digital world. By implementing structured rules,
score tracking, and a responsive design, this project ensures that Hand Cricket remains
a fun and competitive game for users worldwide.
1.2 OBJECTIVES:
The main objective is to create a web-based version of Hand Cricket that
simulates the traditional game while ensuring fair and structured
gameplay.
The game should automatically track scores, eliminating human errors that
occur in manual gameplay. This will ensure a more reliable gaming
experience.
The digital version will remove any possibility of players manipulating
scores, as the game logic will be programmed to follow strict rules.
The game should work on all devices, including desktops, laptops, and
smartphones, without requiring installation.
Since Hand Cricket is a well-known childhood game, the project aims to
bring back nostalgic memories while providing an improved digital
experience.
The game should be lightweight, fast, and responsive to provide a smooth
gaming experience without unnecessary lag or delays.
1.3.1 Purpose
The primary purpose of this project is to digitize the traditional Hand Cricket game
and offer an enhanced gaming experience for users who enjoy simple, web-based
games. By transforming the game into a web application, the project ensures fair
gameplay, accessibility, and entertainment. Many people enjoy playing casual games
in their free time.
The Hand Cricket web game will provide a fun and interactive experience for users,
keeping them engaged. Manual scorekeeping in Hand Cricket often leads to disputes
and miscalculations. The digital version eliminates these issues by automating score
tracking and winner determination. Due to web-based game now users can play anytime
anywhere with computer.
1.3.2 Scope
The scope of this project is to digitize the traditional game of Hand Cricket, by
which the user can play the game anytime anywhere using a computer-based player and
without any physical player. In web-based gameplay manipulating the scores can’t be
done by other players because of logic (rules) built into the game, also it will ensure
fair gameplay. The user interface (UI) is interactive by which users can enjoy the
gameplay and it feels & looks like they play it in real life. There are various scopes of
the project, in which one is fair gameplay, i.e. no cheating & disputes will occur during
the game as it is web-based. The game is compatible with various devices like PCs,
laptops, Mobile, and tablets. Also, the game does not charge any money as it is a free
one. Also, there is scope for the developer as it is a simple logic-based game developed
using HTML and JavaScript which help the developer to learn the logic of
programming.
1.3.4 Applicability
The Hand Cricket Web Game is applicable in multiple scenarios like, Users looking
for a fun and light game to play in their free time can easily access and enjoy this game.
The project serves as a learning tool for aspiring web developers, demonstrating how
JavaScript can be used to build interactive games. The game can be integrated into
online gaming platforms to expand casual game offerings. Hand Cricket is a game
known to many, and this digital version ensures that the game continues to be enjoyed
in a modern format. The game can be played without the physical appearance of the
opponent or the opponent can’t resume the game as the opponent is a computer.
1.4 Advantages
1. Fair Gameplay: The game follows strict rules, eliminating the chances of
disputes or cheating that can occur in manual Hand Cricket.
2. Accurate Score Tracking: The system automatically updates scores, reducing
human errors in calculation.
3. Engaging UI/UX: With an interactive and visually appealing interface, users
can enjoy an immersive gaming experience.
4. No Installation Required: Unlike mobile apps, this game runs in a web
browser, making it instantly accessible.
5. Time-Saving: Users can play quick matches without needing a physical
opponent, making it a perfect game for short breaks.
6. No complex mechanics, so players can start playing instantly.
CHAPTER 2: SURVEY OF TECHNOLOGY
2.1 Survey Of Technology
A technological survey is a method of gathering insights on software, tools, and
relevant tech skills in a particular context. The tools and technologies used for
developing the project are given below:
Visual Studio Code - Visual Studio Code, also commonly referred to as VS
Code is a source code editor made by Microsoft with the Electron framework
for windows, Linux and MAC OS. Features include support for debugging,
syntax highlighting, intelligent code completion, snippets, code refactoring,
and embedded Git. Users can change the theme, keyboard shortcuts,
preferences, and install extensions that add functionality. VS Code also
integrates with build and scripting tools to perform common tasks making
everyday workflows faster. VS Code has support for Git so you can work
with source control without leaving the editor including viewing pending
changes diffs. Visual Studio Code is a source code editor that can be used
with a variety of programming languages including HTML, CSS, JavaScript,
PHP, C, C#, JAVA and many more.
HTML - HTML stands for Hypertext Markup Language. It is used to design
web pagesusing a markup language. HTML is the combination of Hypertext
and Markup language. Hypertext defines the link between the web pages. A
markup language is used to define the text document within tag which defines
the structure of web pages. HTML is a 8 markup language that is used by the
browser to manipulate text, images, and other content to display it in the
required format. It is a simple markup language, and its implementation is
easy. It is used to create a website structure. It helps in developing
fundamentals about web programming.
CSS - CSS (Cascading Style Sheets) is a Style-Sheet language used to design
webpages to make it attractive. The reason for using CSS is to simplify the
process of making web pages presentable. CSS allows you to apply styles to
web pages. More importantly, CSS enables you to do this independent of the
HTML that makes up each web page. There are three types of CSS which are
given below: Inline CSS: In Inline CSS, we add the style to the tags using the
“style” attribute inside the tag which we want to design. Internal or
Embedded CSS: Internal CSS allows us to style our page by adding the tag.
Java-Script - JavaScript is a dynamic computer programming language. It
is lightweight and most commonly used as a part of web pages, whose
implementations allow client-side scripts to interact with the user and make
dynamic pages. It is an interpreted programming language with object-
oriented capabilities.
CHAPTER 3: Requirements & Analysis
3.1 Project Requirements
Specific software and hardware requirements must be met to ensure the
successful development and deployment of the Hand Cricket Game Application. These
requirements are essential for providing a seamless, interactive, and efficient gaming
experience.
Software Requirements:
Programming Languages: HTML, CSS, Javascript
Development Environment
Visual Studio Code
Hardware Requirements
Storage: 256 GB SSD or higher.
RAM: 4 GB and more
Processor: Dual-core processor (Intel i3 or equivalent).
Operating System: Windows 11 and more
3.2 Gantt Chart
GANTT CHART
HAND CRICKET GAME APPLICATION
27-Sep17-Oct 6-Nov26-Nov16-Dec 5-Jan 25-Jan14-Feb6-Mar
Client Requirements & Research
Planning
Software Development Life Cycle (SDLC) Planning
Project Diagrams & System Design
Coding & Development
Testing & Debugging
Final Release & Documentation
0 5 10 15 20 25 30 35 40
Start date End date Duration
CHAPTER 4: SYSTEM DESIGN
4.1 Basic Modules
The Game Logic Module forms the backbone of the application by
implementing the core rules, turn-based system, random number generation for the
computer, and determining the winner. This ensures that the game follows the
traditional Hand Cricket rules while maintaining unpredictability.
The Player module helps the player register, make the call for the toss, and make
their moves while batting or balling. The Computer Module generates random moves
to stimulate the gameplay at the time of the toss, or the main gameplay (i.e. while
batting, or balling).
The Welcome Screen Module registers the player/user name and their origin (i.e.
their country). In this module, the computer doesn’t take place as it is already registered
in the game. The welcome screen serves a realistic and interactive user interface (UI)
that feels and looks like playing in the stadium. Also, it shows the rules of the game.
The Toss page module takes the number as input from both the player (user and
computer) for deciding who will bat first or bowl first. The logic of tossing is based on
the Odd/Even mechanism. When the user enters the input number it will select Even or
Odd and the input number is then summed up by the computer-selected number on that
basis, what will the result is then compared to user selected term (Odd/Even) and it will
decide who won and if user won it has been given an option “what will you do Bat or
Ball”.
The Main Game Screen Module witnessed the game between the user and the
computer. Here the batting and balling are done by selecting the moves randomly by
the user and computer at the time of batting and balling. It also declares the winner of
the game as per the logic and rules of the game. Main game screen also allow the user
to decide that he/she will play again by providing the option at the end of the game.
4.2 Logic Diagrams
4.2.1 Class Diagram
4.2.2 Use-Case Diagram
4.2.3 Entity - Relationship Diagram
CHAPTER 5: IMPLEMENTATION AND TESTING
5.1 Testing Approach Software
Testing is an investigation conducted to provide stakeholders with information about
the quality of the product or service under test. It can also provide an objective,
independent view of the software to allow the business to appreciate and understand
the risk of software implementation. The basic purpose of testing is to detect the
errors that may be present in the program or software. Testing is the process of
executing a program with the intent of finding errors.
5.1.1 The Box Approach
Testing methods are traditionally divided into white-box and black-box testing. These
two approaches are used to describe the point of view that a test engineer takes when
designing test cases.
White-box Testing - White box testing is also known as clear testing, glass testing,
transparent box testing and structural testing. In white box testing an internal
perspective of the system, as well as programming skills, are used to design test case.
The testers choose inputs to exercise paths through the code and determine the
appropriate outputs. While White box testing can be applied at the unit, integration
and system levels of the software testing process, it is usually done at the unit level.
Black-box Testing - Black box testing treats the system as a “black box”, examining
functionally without any knowledge of internal implementation, without seeing the
source code. The testers are only aware of what the system is supposed to do, not how
it does it.
5.1.2 Levels of Testing
Unit testing - Unit testing focuses verification efforts on the smallest unit of the
software design module. It involves testing individual modules of the application in
isolation i.e., without interaction with other modules or external dependencies such as
databases. As unit testing only requires a subset of the software, it allows testing to
begin early in software development. Unit tests are often automated to run throughout
development as a set of regression tests that can identify errors introduced during
development.
Integration testing - Integration testing is a systematic testing for construction of the
program structure while at the same time conducting tests to uncover errors associated
with in the interface. It involves checking if modules work correctly when they are
combined. This provides a wider scope for testing, and bugs that are introduced
arising from module interactions are commonly detected during integration testing.
System testing - System testing involves checking if the entire integrated software is
working correctly. Performed on a fully integrated system, this lets engineers check
whether the system meets its high-level requirements.
5.2. Coding Detail and Code Efficiency
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hand Cricket</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<!-- Welcome Screen -->
<div id="welcome-screen">
<h1>Welcome to Hand Cricket</h1>
<input type="text" id="player-name" placeholder="Enter your name">
<input type="text" id="player-country" placeholder="Enter your country">
<button onclick="startGame()">Start Game</button>
<button onclick="showRules()">Game Rules</button>
</div>
<!-- Rules Screen -->
<div id="rules-screen" style="display: none;">
<button onclick="backToWelcome()">Back</button>
<h2>How to Play Hand Cricket</h2>
<ol>
<li>The game starts with a coin toss (Odd/Even).</li>
<li>Players pick numbers from 1 to 6 while batting/bowling.</li>
<li>If both players pick the same number, the batting player is out.</li>
<li>Score as much as possible while batting to beat AI.</li>
</ol>
</div>
<!-- Toss Screen -->
<div id="toss-screen" style="display: none;">
<h2>Coin Toss (Odd or Even)</h2>
<input type="number" id="player-toss-number" placeholder="Enter number (1-
10)">
<button onclick="chooseToss('Odd')">Odd</button>
<button onclick="chooseToss('Even')">Even</button>
<p id="toss-result"></p>
<div id="bat-ball-choice" style="display: none;">
<h3>You won the toss! Choose:</h3>
<button onclick="chooseBatBall('Bat')">Bat</button>
<button onclick="chooseBatBall('Ball')">Ball</button>
</div>
</div>
<!-- Game Screen -->
<div id="game-screen" style="display: none;">
<h2 id="batting-status">You're Batting</h2>
<p id="score" data-player-score="0" data-computer-score="0">Player: 0 | AI: 0</p>
<p id="player-choice-display">Your choice: �♂�</p>
<p id="ai-choice-display">AI choice: �</p>
<div class="buttons">
<button onclick="playTurn(1)">1</button>
<button onclick="playTurn(2)">2</button>
<button onclick="playTurn(3)">3</button>
<button onclick="playTurn(4)">4</button>
<button onclick="playTurn(5)">5</button>
<button onclick="playTurn(6)">6</button>
</div>
<button onclick="playAgain()" style="display: none;" id="play-again">Play
Again</button>
</div>
</div>
<script>
let playerScore = 0;
let computerScore = 0;
let playerBatting = true;
let playerName = '';
let playerChoice = 0; // Store player's choice
let computerChoice = 0; // Store AI's choice
function startGame() {
playerName = document.getElementById("player-name").value; // Corrected ID
playerCountry = document.getElementById("player-country").value; // Corrected
ID
if (playerName && playerCountry) {
document.getElementById("welcome-screen").style.display = "none"; // Corrected
display logic
document.getElementById("toss-screen").style.display = "block";
} else {
alert("Please enter your name and country.");
function showRules() {
document.getElementById("welcome-screen").style.display = "none";
document.getElementById("rules-screen").style.display = "block";
function backToWelcome() {
document.getElementById("rules-screen").style.display = "none";
document.getElementById("toss-screen").style.display = "none";
document.getElementById("game-screen").style.display = "none";
document.getElementById("welcome-screen").style.display = "block";
resetGame();
function resetGame() {
playerScore = 0;
computerScore = 0;
playerBatting = true;
playerChoice = 0; // Reset player's choice
computerChoice = 0; // Reset AI's choice
document.getElementById("score").innerText = `Player: 0 | AI: 0`;
document.getElementById("player-choice-display").innerText = "Your choice:
�♂�"; // Reset display
document.getElementById("ai-choice-display").innerText = "AI choice: �"; //
Reset display
document.getElementById("play-again").style.display = "none";
function chooseToss(choice) {
const playerNumber = parseInt(document.getElementById("player-toss-
number").value);
if (playerNumber < 1 || playerNumber > 10 || isNaN(playerNumber)) {
alert("Please enter a valid number between 1 and 10.");
return;
}
const AI = Math.floor(Math.random() * 10) + 1;
const tossResult = (playerNumber + AI) % 2 === 0 ? "Even" : "Odd";
document.getElementById("toss-result").innerText = `Toss Result: ${tossResult}`;
setTimeout(() => {
if (choice === tossResult) {
document.getElementById("bat-ball-choice").style.display = "block";
} else {
alert("AI won the toss. It will decide!");
Math.random() < 0.5 ? chooseBatBall("Bat") : chooseBatBall("Ball");
}, 1000);
function chooseBatBall(choice) {
document.getElementById("toss-screen").style.display = "none";
document.getElementById("game-screen").style.display = "block";
document.getElementById("batting-status").innerText = `${playerName} is
${choice}ing`;
playerBatting = choice === "Bat";
function playTurn(playerChoice) {
const computerChoice = Math.floor(Math.random() * 6) + 1;
// Store choices for display
window.playerChoice = playerChoice; // Store player's choice
window.computerChoice = computerChoice; // Store AI's choice
// Update display with choices
document.getElementById("player-choice-display").innerText = `Your choice:
${getFingerEmoji(playerChoice)}`;
document.getElementById("ai-choice-display").innerText = `AI choice:
${getFingerEmoji(computerChoice)}`;
if (playerBatting) {
if (playerChoice === computerChoice) {
alert(`${playerName}, you're Out! AI will now bat.`);
playerBatting = false;
document.getElementById("batting-status").innerText = "AI is Batting";
} else {
playerScore += playerChoice;
checkCheerUpMessages(playerChoice, playerScore);
} else {
if (playerChoice === computerChoice) {
alert("AI is Out! You won the game!");
document.getElementById("batting-status").innerText = `${playerName} Won!`;
showCongratulatoryPopup();
document.getElementById("play-again").style.display = "block";
return;
} else {
computerScore += computerChoice;
if (computerScore > playerScore) {
alert("AI won the game!");
document.getElementById("batting-status").innerText = "AI Won!";
document.getElementById("play-again").style.display = "block";
return;
document.getElementById("score").innerText = `Player: ${playerScore} | AI:
${computerScore}`;
function checkCheerUpMessages(playerChoice, playerScore) {
// Cheer up for selecting 4 or 6
if (playerChoice === 6 || playerChoice === 4) {
alert(`Great choice! You selected ${playerChoice} 🎉`);
// Check for milestone scores
if (playerScore > 0 && playerScore % 50 === 0) {
alert(`Awesome! You've scored ${playerScore} runs! Keep it up! 🎊`);
function showCongratulatoryPopup() {
alert(`Congratulations ${playerName}! You won the game! 🎉`);
function getFingerEmoji(number) {
// Return finger emoji based on the number chosen
switch (number) {
case 1: return "1"; // One finger
case 2: return "�2"; // Two fingers
case 3: return "3"; // Three fingers
case 4: return "4"; // Four fingers
case 5: return "�5"; // Five fingers
case 6: return "6"; // Six fingers (light skin tone)
default: return "�♂�"; // Default emoji
function playAgain() {
location.reload();
</script>
</body>
</html>
style.css
body {
font-family: Arial, sans-serif;
background-color: #8ed8e5;
text-align: center;
padding: 20px;
}
.container {
max-width: 400px;
margin: auto;
background: rgb(39, 246, 125);
padding: 20px;
border-radius: 10px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
h1, h2 {
color: #333;
input {
width: 90%;
padding: 10px;
margin: 10px 0;
border: 1px solid #ccc;
border-radius: 5px;
button {
padding: 10px 15px;
margin: 5px;
border: none;
background-color: #0b5d1e;
color: white;
border-radius: 5px;
cursor: pointer;
button:hover {
background-color: #218838;
.buttons {
display: flex;
justify-content: center;
gap: 10px;
flex-wrap: wrap;
.buttons button {
width: 50px;
height: 50px;
font-size: 18px;
}
CHAPTER 6: RESULTS
1. Welcome Page Of the Game
2. Rules Page
3. Toss Page
4. Error showing if we enter any negative number
5. Main Game Screen
CHAPTER 7: CONCLUSION
The Hand Cricket Game Application successfully brings the traditional game
into a digital platform, offering an interactive and engaging experience. The project
utilized HTML, CSS, and JavaScript to develop a responsive and user-friendly web
application. Through structured system design, implementation, testing, the game
ensures accuracy, fairness, and smooth gameplay.
The project underwent unit testing, integration testing, performance analysis,
and compatibility checks to ensure a seamless user experience across multiple devices
and browsers. The automated scorekeeping, turn-based gameplay, and AI-generated
moves enhance the game’s appeal.
This project demonstrates the practical application of software development,
game logic, and user interface design. Future enhancements may include multiplayer
functionality, AI difficulty levels, and leaderboard integration. Overall, the project
achieves its objective of providing an enjoyable digital adaptation of Hand Cricket,
making it accessible to a broader audience.
Chapter 8 : REFERENCES
https://www.w3schools.com/
https://developer.mozilla.org/en-US/docs/Web/JavaScript
https://www.geeksforgeeks.org/
https://www.youtube.com/playlist?list=PLJ94R7CwDx01YeomCbNM5kIk9oDqledED