From: Brett L. <wak...@ea...> - 2005-12-02 23:51:58
|
Just in time for the weekend, I've just committed a fairly sizable amount of the token laying code into CVS. I've got the initial groundwork built for drawing tokens in semi-correct positions based on number of stations in the hex and number of tokens in the hex. Most of what's left here is the rather tedious task of finding reasonable coordinate offsets. As far as I can tell, tokens are being properly distributed and assigned. Testing this is somewhat tedious, but the inital home tokens are being placed where they should be. I think it's ready, or very close to being ready, for hooking up to the OR Window to allow manual token laying. Erik, did you want to handle that area, or did you want me to take a stab at it? Here's the more important changes: Company now has it's own overridden equals() method for comparing two CompanyI objects and returning a boolean indicating whether they're the same object or not. Company now has it's own toString() method for obtaining quick n' dirty information about the particular object. MapHexes now maintain an instance of the PublicCompany that has a home or destination in that particular hex. I added this mostly because it makes more sense to compare company objects rather than just their name strings. MapHex has an initial stab at merging token lists. I haven't tested it at all yet, and it currently only handles merging down to a single station from N number of stations. Looking through the tile images, I couldn't find a tile that indicated that three stations ever merged into two, so I don't think any additional merge code needs to be added to handle that situation. I could be wrong. I think for anything else that's important, I've left comments in the code. ---Brett. |