Star Trek game – a Python port from Tiny BASIC
A while back I mentioned that I was in the process of porting an old Computing Today Star Trek game from Tiny BASIC to Python on my Raspberry Pi. This was before I’d taken the edX Python course and learned to code properly in the language.
Frankly, although my code works, it is truly horrible stuff. And I didn’t even have the excuse of being limited to a couple of kilobytes of memory that the original was designed to fit into. I’ve just never had the time since to go back and do it better.
However, a couple of people have asked for the code, so here it is, in all of its – ahem – glory.
The original Tiny BASIC version (pdf format) – you’ll need this to make sense of how to play the game.
My Python port (pdf format) – you’ll need to copy and paste this into a .py file to make it work with a Python 2.7 interpreter (obviously).