Subscribe via RSS Become a friend on Facebook Follow me on Twitter

Cymons Games

Bagels

June 13th, 2008

Number guessing games take many forms. There’s the famous high/low variation. There’s the warmer/colder, and then there’s games like Bagels. Bagels is almost a mini version of Mastermind. When you make a guess you get one of three clues; “Fermi” you’ve got one correct digit in the correct place, “Pico” means you’ve got one correct digit in the wrong place, and “Bagles” means you’ve got nothing, a big zero. The goal, of course, is fermi-fermi-fermi, meaning you’ve guessed the 3 digit number.

Bagels is written by Joseph Larson based on a BASIC game by D. Resek and P. Rowe as found in ‘BASIC Computer Games’ edited by David H. Ahl.

2 Responses to “Bagels”

  1. Nige

    Because of the way ‘for’ works you can remove the ‘if (fermi != 0)’ and ‘if (pico != 0)’ lines and the program will still work in the same way, but be two lines shorter.


  2. Joe

    Woah, congrats on the spot, and so quick too, especially considering the links were broken. (Actually there were a number of problems with this post. Not a shining moment for me.)

    But you’re right. You can remove those lines and the code will still function. Good catch.

    I’m afraid of what you’d find if you combed over the rest of my code.


Leave a Reply

Cymons Games. All programs provided without guarantee or warranty. Maintained by Joseph Larson.
If you have any questions or notice something is wrong please contact me. Powered by WordPress.