Created
January 22, 2021 07:04
-
-
Save Untrusted-Game/b8a19b819f4bd2cdb396610ac5c801c5 to your computer and use it in GitHub Desktop.
Solution to level 4 in Untrusted: http://alex.nisnevich.com/untrusted/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************* | |
* multiplicity.js * | |
******************* | |
* | |
* Out of one cell and into another. They're not giving you | |
* very much to work with here, either. Ah, well. | |
* | |
* Level filenames can be hints, by the way. Have I | |
* mentioned that before? | |
* | |
* No more cells after this one. I promise. | |
*/ | |
function startLevel(map) { | |
map.placePlayer(map.getWidth()-5, map.getHeight()-4); | |
for (y = 7; y <= map.getHeight() - 3; y++) { | |
map.placeObject(7, y, 'block'); | |
map.placeObject(map.getWidth() - 3, y, 'block'); | |
} | |
map.placeObject(map.getWidth() - 5, 9, 'exit'); | |
//Why'd you remove the validation? even if the level is MORE secure | |
//a validation that simplistic could not POSSIBLY get in your way | |
//Twisted Code (sometimes called macks2008 or macks2010) was here | |
for (x = 7; x <= map.getWidth() - 3; x++) { | |
map.placeObject(x, 7, 'block'); | |
map.placeObject(x, map.getHeight() - 3, 'block'); | |
} | |
map.placeObject(map.getWidth() - 5, 5, 'exit'); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Better (if longer) signature.
(don't make me break out RSA... or elliptical curve)