Odd-Even

View Project
Project GIF 1

About

This was the first game I created for my computer science project in school, back when I had just started programming. It was inspired by a hand-sign-based cricket game that I used to play with my friends. The game initially began as a simple text-based version, and I later updated it to include a basic UI and animations using conio.h.

There are 2 versions :

Project Screenshot 1
Project Screenshot 2
Project Screenshot 3
Project Screenshot 4
Project Screenshot 5
Project Screenshot 6
Project Screenshot 7
Project Screenshot 8
Project Screenshot 9
Project Screenshot 10
Project Screenshot 11

Rules

The game is similar to Stone-Paper-Scissors, but uses fingers as strokes. Each stroke is a number between 1 and 6, with just the thumb representing 6.
Both the player and the opponent simultaneously show a number. If the numbers are the same, the inning changes. If they’re different, the number shown by the batting side is added as runs.
The game has two innings. After the second inning, the scores are compared — if the opponent scores more runs than the player, the opponent wins. Otherwise, the player wins.
This is how you play Odd-Even Cricket.

Opponent AI

The game itself was a challenge, as I was still learning programming at the time. But the real challenge was figuring out how to create a simple AI opponent. Back then, I had no idea what AI actually was or how to implement one.

So I went with a very basic approach to handle AI difficulty. Depending on the difficulty level, the AI would get more chances than the player to draw numbers. On Easy, the AI draws 1 random number just like the player. On Medium, it gets to draw 2 random numbers. And on Hard, it draws 3. If any of the numbers match the player's number, the AI wins the round.

Future Work

I’m very proud of this game, and I’d love to create an online multiplayer version of it in the future. It would be great to play it again with my school friends.