This repository has been archived on 2017-10-30. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
RunasSudo 6e7258c89f
Generate the final code!
2017-02-06 17:21:44 +10:30
tools Generate the final code! 2017-02-06 17:21:44 +10:30
.gitignore Add tool for graphing rooms and items 2017-02-05 20:15:53 +10:30
COPYING Initial commit 2016-05-29 18:04:40 +09:30
README.md Add dbg_dump_to_raw.py 2016-05-30 16:22:29 +09:30
arch-spec Initial commit 2016-05-29 18:04:40 +09:30
dbg_dump.py Implement debug commands, like saving and loading state 2016-05-29 18:31:27 +09:30
dbg_fastboot.py Electric Boogaloo 2017-02-05 20:15:54 +10:30
dbg_load.py Implement debug commands, like saving and loading state 2016-05-29 18:31:27 +09:30
dbg_pdb.py One more code 2017-02-06 14:09:53 +10:30
dbg_speedrun.py Put everything together to completely break the game 2017-02-05 20:15:54 +10:30
dbg_teleporter.py Stage solution to code 7 2016-06-02 18:30:34 +09:30
electric_boogaloo.md Generate the final code! 2017-02-06 17:21:44 +10:30
notes.md Electric Boogaloo 2017-02-05 20:15:54 +10:30
synacor.py One more code 2017-02-06 14:09:53 +10:30

README.md

synacor.py

My sort-of-OOP, poorly-documentedconcise response to the Synacor challenge

Debug commands

At any time the program is waiting for input, a string of the following form may be input:

.<cmd> <args>

This will execute the file <cmd>.py with dbg_args[0] set to <cmd> and <args> stored in dbg_args[1..n].

For example, the self-test and decryption at the beginning of the program takes a comparatively long time. To save the state to the dumps/init file, enter:

.dbg_dump dumps/init

Similarly, debug commands may be passed as command-line arguments to synacor.py in the form:

./synacor.py <cmd> <args>

For example, to load the dumps/init state to skip the self-test and decryption, run:

./synacor.py dbg_load dumps/init

Dump files are stored in Python pickle format, so if you want to inspect the memory in a hex editor, for example, it will be necessary to extract a raw memory dump:

./tools/dump_to_raw.py dumps/init dumps/init.raw