Skip to content

Ajay-patidar0/Hand-Cricket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Hand Cricket World

Welcome to the Hand Cricket World, a console-based game where you can play hand cricket against the computer. Enjoy an exciting match with simple rules and gameplay mechanics.

Features

  • Play a hand cricket match against the computer.
  • Choose between batting and bowling if you win the toss.
  • Computer randomly selects its scores.
  • Simple rules for scoring and getting out.
  • The player with the highest score wins.

Rules

  1. Enter a number up to 6 (but not 5) to score runs while batting; the computer will choose a random value.
  2. If your choice matches the computer's choice, you get out and vice versa.
  3. There will be a toss. If you win, you can choose to bat or bowl first. If the computer wins, it will decide.
  4. The player who scores more runs wins the match.

How to Play

  1. Start the Game:

    • Run the Python script.
    • Press 1 to start.
    • Enter your name.
  2. Toss:

    • Choose 1 for Heads or 0 for Tails.
    • If you win, choose 1 to bat or 0 to bowl.
    • If the computer wins, it will decide the batting order.
  3. Batting:

    • Enter your score (1, 2, 3, 4, or 6).
    • If your score does not match the computer's score, you get runs based on your input.
    • If your score matches the computer's score, you are out.
  4. Bowling:

    • Enter your choice to bowl.
    • The computer will randomly select its score.
    • If the computer's score does not match your input, it gets runs based on its choice.
    • If the computer's score matches your input, it is out.
  5. Winning:

    • The match ends after both innings.
    • The player with the highest score wins the match.

Sample Game

  1. Start: Run the script and press 1 to start. Enter your name.
  2. Toss: Choose heads or tails.
  3. Play: Follow the prompts to bat or bowl.
  4. Result: The game announces the winner based on the scores.

Example

WELCOME TO THE HAND CRICKET WORLD
HUMAN VS PC

Rules:
1. You have to enter a number up to 6 but not 5. You will get runs accordingly while batting, and the computer will choose a random value.
2. If your choice and computer's choice are the same, you will be out and vice versa.
3. There will be a toss. If you win, you can choose between batting and bowling. But if the computer wins, it will decide.
4. The one who scores more will be the WINNER.

Press 1 to start
Enter your name: John
Are you excited for today's match. It's going to be interesting. Now it's time for the toss
The coin is in the air! 
Press 1 for Head and 0 for Tails: 1
It's his choice on the coin. 
Captain John won the toss. What do you want to choose?
Press 1 for bat and 0 for bowl: 1
The batsman is ready for the show. 
It's the first ball.
What do you want to score? Enter your choice (1,2,3,4,6): 4
A smooth shot to the boundary and it's a 4!
...

Congratulations!!! You won the match. It was just an amazing match.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages