Minimalist Human Resource Machine interpreter
Project description
Human Resource Machine interpreter
This is a Python interpreter for programs from the Human Resource Machine game from Tomorrow Corporation. Within the game, one may copy/paste the source code that is edited visually. This library features a parser for this code, an interpreter, and a translator into TikZ pictures to be included in LaTeX.
>>> from hrm import HRM
>>> hrm = HRM.parse('level-2.hrm')
>>> hrm([1, 0, -2, 'D', 0, 0, 8, 9])
1 0 -2 D 0 0 8 9
>>> from hrm.tikz import tikz, draw
>>> tikz('level-2.hrm', 'level-2.tex')
>>> draw('level-2.hrm', 'level-2.pdf')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hrm-interpreter-1.1.tar.gz
(14.7 kB
view hashes)