ECE 2524

Introduction to Unix for Engineers

Hungover Hangover Escape

Usage

I reviewed the Hangover Escape program. Since it was written in Python, no compilation was necessary. Only the following command should have been needed:

$ ./game.py

I was not able to run the program, first because of indentation errors which I fixed and then because of other errors that I hope will be fixed so that I can try the game out. I assume that the programmers are using different editors to program so indention is being treated differently by both. I also understand that they are probably working our the run-time errors now.

Also after looking at the source code, the program does not quite implement all the functions described in hte README file.

Style

The structure of the code creates a readable file but it could be tweaked a bit to ensure readability and modularity.

It is readable. I understand that there is a world which contains rooms which contain items. There is a go command in the world that moves from room to room.

The code is also modular at this point. There are three different classes that hold data correspnding to different parts of the code. For instance, the room contains room data, including its name, description, and items list.

The one suggestion I would make is this. They may want to consider creating multiple files for the different classes if they create any more so that the code remains modular and readable.

Philosophy

The creators explained clearly their usage of the Unix design, specifically metnioeing two Unix Rules. And I beleive they followed these two Rules: Seperation and Simplicity.

The ‘Separated Engine and Interface’ Pattern is evident in the fact that the engine and interface are seperate. That is, the game.py file accepts user input and the world.py file processes the data and input. It also follows The ed Pattern since it (will) accepts user input.

So far, there is no user intaraction implemented so it would not be possible for that to be redirected to a file or pipe

The program follows the Rule of Silence. It does not print out much at all, but an example of following this rule is in the ‘go’ command in the world class. When a valid room is moved to, nothing is printed out. But if one tries to move to an invalid room, an error message is printed.

This program also follows the Rule of Representation since the complex room data is stored in a yaml file and not written out in code.

Conclusion

This program has much potential. I cannot wait for it to be coded so that I can try it out!