- Learn
- Tutorials
- Algorithms
- Binary Search
- Appendices
- D Tuning Tables
Appendix D — Tuning Tables
The numbers that make Crack the Safe play the way it does. Change them to remix the game: the game’s Logic reads them from here. Try one change at a time, and run the game after each. If something stops working, put the old number back.
D.1 Data Tables
D.1.1 Safe Settings
The tuning numbers of one safe. lowestCode and highestCode: the smallest and largest code the safe can have (both included). startEntry: the number the keypad display shows before the player types. scanBudget: the most scans one trial allows. runDelay: the seconds from pressing Run to the computer’s first turn. runInterval: the seconds between the computer’s turns while Run is on.
11005070.250.9D.1.2 Safe Copy
The words the player reads, one row per message or label that Logic picks, named for it (for example Higher Than, or Card Higher for a Scan Card). text: the words shown (on the message line under the safe, on a Scan Card, or on the computer’s readout).
Scan a guess to get a clue.HIGHER THANLOWER THANUNLOCKED!OUT OF SCANSUse the remaining range.Start a new safe.Code sealed.possibilities remainpossibility remainsHIGHERLOWERUNLOCKEDCan the computer crack your code?Choose a code fromSet and lock a code first.NEXT GUESS:SOLVED INSCANSCANSPaused.Same code. Computer's turn.D.1.3 Scan Log
The record of the current trial, one row per scan, added by Record Scan: row “Scan 1” is the first scan. guess: the code scanned. clue: what the scan told (1 the code is higher, -1 lower, 0 the guess is the code). low and high: the range of codes still possible after the clue. The table starts empty, and a new safe empties it again.
D.1.4 Screen Layout
Which pieces the screen shows in each situation: one row per piece (the Keypad row is every keypad key), one yes/no column per situation. human and humanDone: the Human role while the safe is Locked, and once the attempt has ended (Unlocked or Exhausted). codeSetup, searching, running, solved, outOfScans: the Computer role while the player sets up a code (Setup), while the computer searches (Locked) with Run off or on, once the safe is open (Unlocked), or out of scans (Exhausted).
YesYesNoNoNoYesNoYesNoNoNoNoYesNoYesNoNoNoNoYesNoYesNoNoNoNoYesNoYesNoNoNoNoYesNoNoYesYesYesYesNoYesNoYesNoNoNoNoNoNoYesNoNoNoNoNoNoNoYesYesYesNoYesNoNoYesNoNoNoYesNoNoYesYesYesNoYesNoNoYesYesNoNoYesNoNoYesNoYesNoYesNoNoYesNoNoNoYesNoNoNoYesNoNoNoNoNoYesNoNoNoNoNoNoNoNoNoNoYesNoNoNoNoNoYesNoD.2 Logic Numbers
The numbers and colors each Logic Component keeps in its Shared Variables and Per Instance Variables, with the Starting Value its card gives. A value set on its Object, under Variables in the Properties, or on a placement in the Scene, wins over the value here.
TYPE ITS DIGIT
digit ...................... 0
SHOW CODE MARK
lastGuessColor ............. #f3c569
inRangeColor ............... #48bab5
ruledOutColor .............. #263b47
LAY OUT SCAN RECORD
stripLeft .................. 54.15
stripWidth ................. 970
markTop .................... -629
rowLeft .................... 51.5
rowWidth ................... 973
cardRoom ................... 139
cardTop .................... -695
guessTop ................... -685
clueTop .................... -707
