On way is to use bit flags to keep track of what numbers have been guessed:
GUESSES = %01111110 ' We're not using bit 0 because you can't guess 0
On each guess, GUESSES.[Numberguessed] = 0. If 3 is guessed GUESSES.3 = 0 and GUESSES becomes %01110110...
To determine the lowest number and return it
IF GUESSES = 0 then all numbers have been guessed
For LP = 1 to 6
IF GUESSES.LP = 1 Then
LP is the lowest number left
Endif
Next LP
I'm not advertising this as suitable code, rather sort of pseudo-code to illustrate the concept.
Bookmarks