home *** CD-ROM | disk | FTP | other *** search
- on setGame
- global gDifficultyLevel, gFrameCounter, gGameSol, gGameState, gCurrentScreen
- gFrameCounter = 0
- case gDifficultyLevel of
- 1:
- gGameSol = item random(6) of "111,222,333,444,555,666"
- 2:
- theChoices = "123456"
- theCombo = EMPTY
- repeat with i = 1 to 2
- myChoice = random(length(theChoices))
- put char myChoice of theChoices into char i of theCombo
- delete char myChoice of theChoices
- end repeat
- thirdPiece = char random(2) of theCombo
- if random(10) > 5 then
- put thirdPiece before theChoices
- else
- put thirdPiece after theChoices
- end if
- gGameSol = theCombo
- otherwise:
- theChoices = "123456"
- theCombo = EMPTY
- repeat with i = 1 to 3
- myChoice = random(length(theChoices))
- put char myChoice of theChoices into char i of theCombo
- delete char myChoice of theChoices
- end repeat
- gGameSol = theCombo
- end case
- repeat with i = 1 to 3
- sprite(34 - i).member = "6111_key_" & char i of gGameSol
- end repeat
- theCombination = EMPTY
- repeat with i = 25 to 27
- correctKey = value(char i - 24 of gGameSol)
- keyVal = random(6)
- repeat while (correctKey = keyVal) or (theCombination contains string(keyVal))
- keyVal = random(6)
- end repeat
- put string(keyVal) after theChoices
- sprite(i).member = "6111_lock_" & string(keyVal)
- end repeat
- end
-