Hacricko is a Python-based game inspired by the childhood Indian game of "Odd or Even," a cricket variant akin to rock-paper-scissors. Players engage in a toss to decide who bats or bowls first, then compete to score the highest runs without getting bowled out.
- Clone this repository:
git clone https://github.com/VerifiedTreakee/Hackriko.git
- Launch the game to see the main menu:
- Option 1: Start a new game.
- Option 2: View previous scores (feature not yet implemented).
- Option 3: Exit the game.
- Choose Who Starts:
- Press
1to start the toss yourself. - Press
2to let the computer start the toss.
- Choose:
1for Even2for Odd
- Enter a number between 1 and 6 as your toss input.
- The computer will randomly select a number.
- The sum of the two numbers determines the winner:
- If the sum is even and you chose "Even," you win.
- If the sum is odd and you chose "Odd," you win.
- The computer will randomly choose Even or Odd.
- Enter a number between 1 and 6 as your toss input.
- The winner is determined the same way as above.
- The toss winner chooses to either:
- Bat: Attempt to score as many runs as possible.
- Bowl: Try to restrict the opponent's runs.
- Input a number between 1 and 6 on each turn.
- The computer will also choose a random number.
- If your number matches the computer's number, you are bowled out, and your batting ends.
- Your total score is the sum of all numbers entered before getting out.
- The computer bats first, and you bowl.
- Enter a number between 1 and 6 for each ball.
- If your number matches the computer's number, the computer is bowled out, and its batting ends.
- The computer's total score is the sum of its numbers before getting out.
- The second player attempts to chase the target score set by the first player.
- The game ends when:
- The chasing player scores more than the target (they win).
- The chasing player is bowled out without exceeding the target (they lose).
- Final scores and game stats are displayed at the end.
- Player chooses Odd and inputs
3. - Computer chooses
4. - Total:
3 + 4 = 7(Odd). The player wins the toss.
-
Player bats first and inputs:
2,4,6. On the fourth input, the player and computer both choose3→ Bowled out.- Player's score:
2 + 4 + 6 = 12.
-
Computer bats and inputs:
1,5,6. On the fourth input, the player and computer both choose4→ Bowled out.- Computer's score:
1 + 5 + 6 = 12.
Result: The game is a tie.
- Input validation ensures all numbers are between 1 and 6.
- Invalid inputs prompt re-entry.
- If the game exits unexpectedly, rerun the program to restart.
- Original idea by @Suvro Bhowmick
- Codded and maintained by @Verified Treakee
- Highest score
- Game History
- Ai mode dosen't run
- some output inconssitencies