Sunday, September 14, 2008

CodeRuler Review

West and Shum’s Code Ruler game strategy is very good. I like how they split their offense into two groups, one attacking enemy knights and the other to capture the enemy’s castle. Also taking into account if the group that is assigned to attack the knights first is dead, the other team will set its next priority to enemy knights after it was taking enemy castles. The approach they used for the peasants is very well thought out, having them occupy available land then looking to the occupy land that belongs to the enemy. They’re overall plan for the assignment was superbly designed.

Comment Overview
The use of comment content was very well used, making parts of the code easier to understand. Also using end closing brace comments when they had a complex nested control structure, which made it unproblematic to follow.

Javadocs
Their javadocs gave a good complete description of the program. It gave good details to understand what each method's function is in the game and also what the parameters are that’s being passed in.

Logic and Structure
The method logic was good throughout the code, but the attack() method could have been named better to show how the function is described in the javadoc. Since the attack() method was to tell the knights to move aggressively, and also they had another method which was to tell the knights to attack.

The class structure was well designed, most of the main function of the knights, peasants, and castle was organized well. They first split the knights into the 2 groups then having them move to a specific manner, then calling the oderPeasants() method for the peasant movement, and lastly controlling how much knights or peasants to produce.

Coding Format



FileLinesViolationComment
MyRuler.java9, 86, 87, *ICS-SE0Eclipse-2more than 100 characters in a line
MyRuler.java231EJS p.24Method naming convention

Conclusion
The goal of this assignment was to review another person’s code, based on the Java coding and documentation standards. After examining West and Shum’s code, I see that they followed the standards pretty well. Doing this, they made it uncomplicated to understand what each portion of their code was performing. Following these standard is very useful and would make open source programming easier for all programmers.

No comments: