DeMille / encrusted

A z-machine (interpreter) for text adventure games like Zork
https://sterlingdemille.com/encrusted
MIT License
128 stars 20 forks source link

Update the shift opcodes to match the conventional but unspecified behaviour tested in Praxix #21

Closed curiousdannii closed 5 years ago

curiousdannii commented 5 years ago

I'm new at Rust and my style is probably quite ugly, but these double casts seemed the simplest way to handle the shifts.

Hmm, but thinking now, it will probably still panic if given more than 31 places... but rather than asserting, it should just cap them so that it can continue running without issue.

DeMille commented 5 years ago

Great, thanks! When it failed the Praxix shift tests I wasn't sure what the behavior should even look like so I shelved it for later. 👍