After some thought, I have tentatively titled the project for ICS 111 "Programmer's Pursuit." Aside from making me use the escape character for the apostrophe a lot in the code, the alliterative title actually matches the content of the game quite well. There are three interpretations of the title that I can think of, all of which are valid.
I have skimmed through the original Lisp code; I had forgotten some of the little jokes and hints hidden in the program, so it was an entertaining as well as educational experience. The main file itself is 2914 lines long though; it is broken up into several functions admittedly, and those who have actually seen the code that I write may quite correctly predict that about a third of that length is in comments, but still quite a bit of material to sort through.
I have also started work on the actual programming. Currently, everything is divided into three packages. The environment itself consists of Room instances, convenient subdivisions of the area that may not always correspond to actual rooms. (I suppose the term "room" is more due to tradition than anything else.) Within these rooms may exist Item instances; items are what the player character can actually interact with in a variety of ways. Several Person instances will also be present; these are carbon-based living organisms that the player may also interact with. This is a bit of a change from the original Lisp program in which people were treated as items in their specific rooms; to avoid human rights violations, people are now distinct from items
The actual player character is technically a Person as well. However, it seems more convenient to have the data on the protagonist available for the rest of the program to access: if the player is just another Person instance, then the player instance might get lost in a Room somewhere and the program would have no idea of how to find the player again.
Of the three basic classes described above, I have completed Item, started on Person, and have not started Room. I have been partially successful in implementing test-driven development; I did write the test for the Item class immediately after writing the class itself. My handwritten notes were all for the classes themselves, not for the tests, so starting on the classes seemed more natural than testing. The Room class is not yet started though, so hopefully I will remember to try working on the tests first this time.
If all goes well, I should be able to set up the project site on Google Project Hosting over the weekend. As suggested in the comments on my original post, I will try working with Git, which should be an interesting and hopefully beneficial experience.
Can't wait to hear how your project is going! Please keep us informed.
ReplyDelete