Friday, August 31, 2007

07.CodeRulerReview


Michal Zielinski & Chiao-Fen Zielinski's Code Ruler Review































































FileLinesViolationComments
MyRuler.java45, 46, 48, *ICS-SE-Eclipse-22 space indent
MyRuler.java53spelling error"based" instead of "baced"
MyRuler.java48, 49, 50, *EJS-25Capital letter for 2nd, 3rd, 4th…word of variable
MyRuler.java155EJS-22Capital letter for 2nd, 3rd, 4th…word of method
MyRuler.java140, 165EJS-5Indent nested code
MyRuler.java137, 138, 159, *EJS-9Use meaningful variable names
MyRuler.java136EJS-28First for loop should start with "i"
MyRuler.java30, 153EJS-42Descriptions given for only some parameters
MyRuler.java156, 162, 171EJS-76Use { }




Your code is not overly complex in terms of the amount of loops and thus, should execute relatively quickly. With that in mind, you could implement a more sophisticated algorithm for your peasants to acquire land and still be under the 0.5 second limit per turn. Maybe have each of them look around for the closest land controlled by another ruler or that is unclaimed. That way they all won't be traveling in one group as well.

No comments: