Metrolib... An OO Game

This is a very small partial resurrection from memory of the very first quasi-OO program I wrote, so long ago that its very source code has crumbled into bits and returned to the ether. What was key about it to me, all those long years ago, was the discovery that by the almost-trivial act of assigning the "current room" variable, I was able to change the state of the entire universe.

The game itself was a text-based adventure game involving the exploration of the old "Metro Library" building on the corner of College St & St. George in Toronto. When I was there it had been partly taken over as "the engineering cafeteria" and was in a state of decay from its original Gothic splendor; it has since been renovated and reopened as the Koffler Student Centre.

  • MetroLib.java, the main program
  • Room.java, representing one room
  • Rooms.java, the data structure of all rooms; this file would normally be generated by a simple pre-processor from a database or text file listing all the rooms.