Keno Luck & Chance Presentation

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Presented by:

Nabeel Shehzad
Malik Hammad
Suleman Qureshi
Title
KENO
Luck And Chance
INTRODUCTION
Our objective is to demystify the code and
concepts that drive this game. Exploring this code
not only unveils the inner workings of an
entertaining game but also imparts essential
programming concepts and user engagement
strategies. It's a hands-on journey from code to
captivating gameplay.
Key Faetures
Players can personalize the game by entering their name.
The game allows users to set their initial balance, emphasizing
the importance of managing their funds.
Players can place bets and experience the risk and reward aspect
of betting.
The code generates random numbers to determine game
outcomes, adding an element of chance.
The game involves player input, decision-making, and feedback
on results.
Tool We Used
C++ Programming Language: The primary
language for coding the entire project.

C++ Standard Library: Included libraries like


<iostream> and <string> for input/output and
string handling, respectively.

Random Number Generation: The <cstdlib>


library was used to generate random numbers
for simulating the dice roll.
#include <iostream>
cout << "\n\n\n\t\tCASINO GAME\n\n\n";
#include <string> // Needed to use strings
#include <cstdlib> // Needed to use random numbers
cout << "\n\nEnter Your Name : ";
using namespace std;
getline(cin, playerName);

cout << "\n\nEnter Deposit amount to play game :


$";
cin >> amount;
int main()
{
string playerName;
int amount; // hold player's balance amount
int bettingAmount;
cout << "\n\n";
int guess;
cout << "\t\tRULES OF THE GAME\n\n";
int dice; // hold computer generated number
cout << "\t1. Choose any number between 1 to 10\n";
char choice;
cout << "\t2. If you win you will get 10 times of
money you bet\n";
cout << "\t3. If you bet on wrong number you will
lose your betting amount\n\n";
Code Structure

cout << "\n\nYour current balance is $ " << amount << "\n";
dice = rand()%10 + 1; // Will hold the randomly
cout <<playerName<<", enter money to bet : $"; generated integer between 1 and 10
cin >> bettingAmount;
if (bettingAmount > amount) {
cout << "Your betting amount is more than your current
balance\n";
return 0;
}
if(dice == guess) {
// Get player's numbers cout << "\n\nGood Luck!! You won Rs." <<
cout << "Guess your number to bet between 1 to 10 :"; bettingAmount * 10;
cin >> guess; amount = amount + bettingAmount * 10;
} else {
if(guess <= 0 || guess > 10) { cout << "Bad Luck this time !! You lost $ "<<
cout << "Please check the number!! should be between 1 to bettingAmount <<"\n";
10\n"; amount = amount - bettingAmount;
}
cout << "\nThe winning number was : " << dice <<"\n";
cout << "\n"<<playerName<<", You have $ " << amount << "\n";

if(amount == 0) {
cout << "You have no money to play ";
}

cout << "\n\n\nThanks for playing game. Your


balance amount is $ " << amount << "\n\n";

return 0;
}
Graphical User Interface (GUI)
Develop a user-friendly GUI to enhance the visual appeal and
ease of use.

Multiplayer Mode
Implement a multiplayer feature, allowing players to compete
with friends or other online users.

Advanced Betting Options


Introduce more betting options and strategies to create a
more engaging experience.

Sound and Animation


Enhance user engagement with sound effects and
animations for a more immersive gaming experience.
This simple Keno game in C++ serves as an excellent starting point for understanding
programming concepts and basic game development.

As you contemplate future enhancements, you'll delve deeper into the world of game design,
learning more about user experience, gameplay mechanics, and security considerations.

The journey to create more sophisticated and engaging games is an exciting one, and this
project is just the beginning of your exploration into the world of programming and gaming.
Enjoy the process and continue to learn and innovate in this dynamic field.
THANK YOU
Any Questions?

You might also like