dgets / nightMiner

Halite III Bot - rewriting Halite III bot from scratch with better project structure plans
6 stars 1 forks source link

ShipHistory object idea-- decide how many moves are needed to get back to shipyard? Structuring ideas in general? #60

Open dgets opened 5 years ago

dgets commented 5 years ago

I was just thinking that, for a few purposes in the game (including the scuttle processing and perhaps for some purposes in calculating what moves to begin working with _earlyblockade at), it may be a good idea to toss some processing into the current_assignments object, or (probably a better idea) somewhere in the MapChunk object to determine exactly how many moves it will take from whatever position to return to the shipyard in an ideal scenario.

I'm just not sure how that should fit in with things exactly; I hate to put it out there as a static method, knowing that it should be handled in a different way if I'm going to be processing things the 'right' OO way... We'll see how impatient I get, I guess. I'm totally open to ideas on the placement of something like this, or better ideas for structuring.

dgets commented 5 years ago

Okay, so it looks like this really isn't necessary; I didn't check the existing hlt.* libraries, and it looks like hlt.game_map.GameMap has an existing method called calculate_distance which will, unsurprisingly, do exactly what we need.