Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
LINK 800
MARK LOOP
COPY X #LOCK
TEST #LOCK = 1111
TJMP END
SUBI 1111 #LOCK T
ADDI X T X
JUMP LOOP
MARK END
LINK 800
GRAB 301
LINK -1
ADDI X 1 #LOCK
LINK -1
The bot starts with a value for X of 0. The bot inputs X to #LOCK. The bot checks the returned value of #LOCK. If the value is 1111, the lock is open, and the bot jumps to the "END" section of the code. If the value is not 1111, the bot increments X. Each digit of X that is correct corresponds to a 1 in the returned value of #LOCK, so by subtracting the value from 1111 (inverting it), we can increment all of the digits of X that are incorrect. When the correct value is reached, the bot runs the "END" section of code and finishes the puzzle. (3/3)
Thank you again for playing my level and for your comments! This was partially a way for me to learn and practice my JavaScript, so I am glad to see that people are enjoying it. I apologize for any other errors that I haven't noticed.
HINT: Is there a smarter way to brute force this lock? Why does the lock return values at all? (2/3)
First of all, I apologize for the mistake in the description. I copied it from a version of this puzzle with a three digit lock, so the example is only three digits. I will fix the description with an update, I hope it doesn't break anything. I think that this description needs to be updated more, but I do not know how to phrase it right now.
To answer another question you had, the key to the lock is a number between 3333 and 9999. If you input a number with less than four digits, like "72", the lock will interpret it as "0072" (I spent a long time on that part of the level code). The reason the key starts at 3333 is to prevent a key with less than four digits. A code like "0072" would also be too easy to brute force :)
Your main question is a little harder to answer. (1/3)
those noop are made to left enough time for the robot to get inside the room and get out
LINK 800
COPY 9959 X
MARK OPEN
NOOP
NOOP
NOOP
NOOP
NOOP
NOOP
COPY X #LOCK
SUBI X 1 X
TEST X = 999
TJMP TAKE
REPL OPEN
MARK TAKE
LINK 800
GRAB 301
LINK -1
KILL
COPY X #LOCK
LINK -1
First, As you may found, some of us prefer to use a single robot to finish the job (me), and this puzzle seems perfect for one robot, so I have written a good program which should be fine for any situation. However, it didn't work in most rounds, which is weird because it works in round two and the situation if I manually put it close to the right number. So I have copied my program at the end for you to check.