Erlang Text Elite
This last weekend, I somehow came to think about the wonderful old space trading game Elite, and the way it managed to cram a vast universe of planets with names, stats, and fun descriptions (along with the 3D space flight simulation, which was an amazing feat in itself) into the tiny 8-bit home computers of old. Only minutes later, I had found Ian Bell's Text Elite web page, where Ian, one of the two original authors of the game, has published a reconstruction in C of the main universe-generating algorithm, along with a simple text interface to actually let you "play", i.e., buy, sell, and jump between planets. Great! So I rewrote it in Erlang . And had a lot of fun doing it. Apart from the nostalgic kick, there were two points with the exercise: First of all, I just wanted to see the main algorithm as cleanly implemented as possible. But second, I wanted to see what it would be like to rewrite a piece of classic game code that was very clearly not written with function...