HTML and JavaScript for Bagels © Copyright 2004 by James Larson
Bagels

How To Play Bagels

Bagels is a number guessing game. The computer chooses at random a secret three digit code. No two digits in the secret code are the same. To help you compose a guess, the computer will give you clues. These clues are:

Bagels None of the digits in your guess are in the secret code.
Fermi One digit in your guess is correct and in the correct position of the secret code. Please note that if you have three Fermi's, you win!
Pico One digit of your guess is present in the secret code, but in the wrong position. Please note, if you get three Pico's, your guess has all the necessary digits, but all in the wrong place! This is close, but no cigar.

User Controls Explained
   
These buttons allow you to enter a digit between the "[" and "]" (called brackets) of the current guess box. If the digit you click on or type does not appear in your guess, the digit or "X" between the brackets gets replaced by it, and the brackets will move to the next digit position. If the digit clicked or typed is already in your guess, the brackets snap to that digit's position, and the digit becomes an "X" again.
Keyboard: Type digit keys 0 through 9.
Causes the brackets to move left one position. If it already is at the far left side of the guess box, it will wrap to the far right.
Keyboard: Type < key.
Causes the brackets to move right one position. If it already is at the far right side of the guess box, it will wrap to the far left.
Keyboard: Type > key.
Once you've entered a guess, click on Go button to submit your guess.
Keyboard: Type upper or lower case G.
Starts a new game. However, if you click it without having actually won the game, it is counted as a loss.
Keyboard: Type upper or lower case N.
Guess Column
Your guess, as you compose it, appears here. The brackets indicate where the next digit will be deposited in the code as you click the digit buttons. When all the "X's" are digits, click the Go button to receive clues.
Clues Column
After entering your guess, and clicking on Go button, the computer will give you "Pico's", "Fermi's", or "Bagels," as discussed above.
Wins & Losses
If you guess the secret code in six or fewer guesses, it is counted as a win. If you fail to guess in six, it is counted as a loss, and the correct secret code is given you. Restarting in the middle of a game is a loss. These tallies are stored in a cookie so that the next time you run Bagels, you start where you left off.

Visitor #



This classic computer game has been written and distributed by

James Larson
Programmer/Analyst Consultant
http://www.dst-corp.com/james
E-mail address
In God We Trust...