[Melbourne-pm] Timer::HiRes and alarms? (Was: AI Contest)
Nathan Bailey
nathan.bailey at monash.edu
Wed Nov 10 23:38:11 PST 2010
On 11/11/2010, at 6:22 PM, Nathan Bailey wrote:
> I also wonder how evil it is to dig into the object, eg. for
> GetPlanet:
> return ${$self->{_planets}}[$planet_id];
> (Okay, I know how evil it is, I just wonder if it's an appropriate
> shortcut given the amount of time that code runs)
Oops, I see this is what you have done :-)
I was looking at the greps lower down.
BTW, I think croak/die is a bad idea, since death = loss?
I was inclined to warn and return a possibly successful value (eg.
planet 0), in the hopes that my bot may soldier on...
[ Of course, a good bot shouldn't hit the error condition, but... :-) ]
I think IssueOrder should have some assertions to ensure that you
don't submit an invalid order (also instant death), but how much of
that goes into the publicly shared module may be a question for
discussion :-)
N
More information about the Melbourne-pm
mailing list