Code: http://www2.hawaii.edu/~wongandr/coderuler-wongandr.zip
Strategy: Suicide. Really.
Its a crazy strategy. Right off the bat, all knights are instantly set on capturing the closest castle to the starting gate. A few things can happen from this:
- If the knights die and the castle isn't captured, I'm screwed. Good game.
- If the knights managed to capture the new castle, well, thats usually better ^^
Knights don't care about capturing any other pieces until all castles are owned by this ruler. This is risky since that might never happen, but if it ever does, its usually hard for any other team to recover.
Peasants, on the other hand, move somewhat intelligently. They will try to first claim land that other people have claimed, then unclaimed land, and then last resort to a random movement. However, if an enemy knight is chasing them, they are very good at giving them a runaround, especially if the knight continues pursuing them. But this is good, since if the knights are chasing the peasants, that leaves their castle defenses wide open... ^^
But yea, generally peasants are pretty good at covering 90% or more of the map if they ever manage to eradicate the opposition.
Results of running against sample Rulers:
| Run | My Score | Opposing Ruler Score |
| Migrate 1 | 822 | 1 |
| Migrate 2 | 824 | 0 |
| Migrate 3 | 824 | 0 |
| Gang Up 1 | 758 | 188 |
| Gang Up 2 | 788 | 108 |
| Gang Up 3 | 639 | 296 |
| Split Up 1 | 775 | 106 |
| Split Up 2 | 761 | 140 |
| Split Up 3 | 697 | 126 |
Lessons Learned: A lot. I'll go by each item here.
Eclipse: Eclipse is very useful even for a person (like myself) who isn't very accustomed to Java. It has many things that help a programmer, such as "correct formatting" (e.g. after you copy and paste something in, it fixes up the spaces), function autocomplete, brace autocomplete (which is annoying at first, but you get used to it), error highlighting in the right hand side of the window, etc. The list goes on. Unfortunately, theres a performance tradeoff, but its bearable in most cases.
CodeRuler: Working with legacy code can sometimes be a hassle. It is probably very possible to redo everything without casts and using the Vector class; however, because of the way the application was developed, "you're stuck with what it was initially implemented in". (Or whatever Dr. Johnson's line was)
Java: Java is a language I'm starting to like a little more each time I program in it. True, it probably won't outdo C++ for me (since Java still has a performance overhead compared to C), but I'm starting to get used to some of my initial gripes about Java (long references such as System.out.println, performance overhead, awkward method of naming classes, etc).
Working with another person: I cannot comment on this. Actually, I can, but it would be making stuff up.
No comments:
Post a Comment