URL: http://www2.hawaii.edu/~wongandr/coderulerredux-wongandr.zip
Revisions made: Kevin English's code review was applied. The most notable of these changes is changing Vector to ArrayList - amazingly, this change was nearly seamless, aside from removing a few typecastings (which is good).
Strategy changes: Nothing significant. The criteria for deciding to choose peasants or knights changed slightly - now knights will always be produced until at least 20 are in play under my control. This is because it is generally more useful to own all the castles rather than gain more land, plus peasants in the beginning have a fairly good survival rate (unless being hunted by multiple mobs of knights).
It was considered that the criteria for which castle to target would be changed - this was tossed out for the following reason: Suppose there is castle A and B, and B has more knights guarding it. Then A should be targeted. But suppose that right when we're about to capture A, a knight comes back to A and tons of knights flee from B. Then B is the better target, and all the knights will flock to B instead.
Thus, it still targets the nearest castle.
Other notes: I really like how Eclipse allows you to do variable renaming (e.g. refactoring) with minimal pain - no other IDE I have used has such a useful feature (that I could find, that is).
Wednesday, September 5, 2007
Subscribe to:
Post Comments (Atom)
1 comment:
Please make the URL to your code a link! (In general, it's lame to not make URLs clickable.)
Post a Comment