
-----------------------------------
didsbub
Thu Dec 08, 2005 5:11 pm

Number Guessing Game
-----------------------------------
A simple number guessing game

-----------------------------------
Clayton
Wed Jan 11, 2006 8:27 pm


-----------------------------------
your program has a simple problem with it, if you choose to play again after playing once, your random number does not reset to another random number so someone can play until the cows come home inputting the same number over and over again always winning i also suggest some character graphics to make it more interesting 8-)

-----------------------------------
yoink78
Sun Jan 15, 2006 11:52 am


-----------------------------------
That's a simple fix. After the line: loop make a line that says: number := Rand.Int (1,50) that way a new number is chosen each time the for loop is executed.

-----------------------------------
cool dude
Sun Jan 15, 2006 1:56 pm


-----------------------------------
error proofing is good too. if u enter a letter your program crashes. also when it says would u like to play again and u enter any letter it will play again, but wat u should have instead is if they enter somethin other than yes or no then it should prompt the user saying invalid answer or somthin like that. for error proofing check out the turing tutorial.

-----------------------------------
Clayton
Mon Jan 16, 2006 2:26 am


-----------------------------------
error proofing is good too. if u enter a letter your program crashes. also when it says would u like to play again and u enter any letter it will play again, but wat u should have instead is if they enter somethin other than yes or no then it should prompt the user saying invalid answer or somthin like that. for error proofing check out the turing tutorial.

a simple way to program that little problem is this

%this will just keep going until an appropriate input has been made
loop
     get answer
     exit when answer = "y" or answer = "Y" or answer = "n" or answer = "N"
end loop

