Search

An unbeatable game?

Updated: Sep 20, 2020

I’m Varit Asavathiratham, and I am in 9S. Last year I created a game on Python which is based on a project we were working on in ICT. The project was to create a game where the computer would generate a number from anywhere in between 1-100, and you had 10 guesses to figure out what that number was. The computer would tell you if your guess was too low or too high, and if you guessed the number, you won! Simple, right?

 

How the game works:


After creating this game, I decided to take it one step further. I wanted to create a game where you could choose the difficulty, and you had to wager points to guess the number. I created this code on Python. The basic rules of the game are:

  • You start with 10 points, and select a difficulty between 1-4. (Each difficulty has a wider guessing range)

  • You have to wager an amount of points from the total you have.

  • The computer generates a number, and you try to guess the number.

  • If you get it right first try, you win 5X the amount of points you wagered. If you get it wrong, the computer tells you if the number is lower or higher, and you guess again.

  • The next time you guess, you get can 4X the amount of points back. Then 3X and 2X. If you don’t get it right by then, you lose all the points you wagered.

  • This cycle repeats until you either run out of points, or you get to 30. If you run out, you lose. If you get 30 points, you win!

It’s a pretty simple concept. At first, I coded this without functions, requiring a LOT of copy and pasting. I’m telling you, a lot. However, I am currently coding it with functions, and will hopefully post it here when I’m done.

No one has ever beaten Level 4, also known as MASTER MODE. Think you can do it? Share your results in the comments below.


Link to program: https://drive.google.com/file/d/1qZWvYuuF1jL1mWiJCyAYYrfAWh1DwvZb/view?usp=sharing



54 views1 comment

Recent Posts

See All