Thisisjustsomeexamplesofmekindofparsingthatdata, butagain, it's like a logfile, soit's reallychallengedlikeit's notlikeyoucanjustreadthereplayfile, mimicitanddirectlymimicit.
Andthenoncewehaveallthisdata, we'rereadytoactuallystartiteratingthroughourshipsbecausetherestofstuffarethingsthatweneedtocalculateonlike a ahpershipbasis.
So, forexample, wemightwanttoknowhowclosearetheclosestfiveenemiestoeachindividualship, orhowcloseistheclosestplanetorsoon.
Sothere's a lotof a lotofthosekindofquestionsWeactuallyhavetoaskthaton a pershipbasis, so I'llatleaststartthis, um, so's reiteratethroughiftheshipisbasicallyoftheshipisdocked.
Let's skipit.
Thisisquestionablewhetherornotyouwanttoleaveitornot, I wouldtestitbothways.
I kindofthinkit's prettyinefficient.
Toe, likedockingondocking, dockingundock.
So I didn't leaveitinthere, butbecausewe'reonlychoosingbetweenthreechoices.
Um, andoneofthosechoicesismine.
Emptyplanet, uh, whichisnotlikelytobeanoptionmuchpastthefirst, Let's say 100 frames.
So, whilewe'reupheretoletmejustgoaheadand, uh, I'm gonnapastethesetwohelperfunctionsthat I wroteSochibyvalue, thisjustfindsthedictionary's keybythedictionary's value.
Andsoany a I thatlearnswhatwecantrytomine, Butthenwejustfallbackonattack.
Really?
Thatshouldbeinitonattackoption.
Not a properchosetomineoptionanyway, uh, andthenweattack.
So, umwell, lookslike I caughtmetoomuchthere.
Well, if, uh, no.
Anyway, umSoififourclosestplanetthere's moreherethan I thought, Yeah, ififourclosestplanetisifwecanmineit, thenwemineit.
Otherwisewe'regoingtoattack.
Butifthisturnsouttoenotbelikeiftheclosestownedplanet, ifwedon't have a closestownedplanet, thenwegoandfallbacktotheclosestemptyplanet, andthenweattempttodotheclosestemptyplanet.
Butifthatfails, thenweattack.
Sowejusthavethesekindoffallback.
Soyouhavetwooptionshere.
Youcouldonejustchangeyourvectorchoice.
Ifyoufallbackononeofthesefailsafe's oryoucouldnothaveanyofthefailsafeswerandthenandthenhopefullyyourmodelmightbe a littlemoreaccurateorsomethinglikethat.
But I'm gonnahavehimthere.
Thenfinally, uh, ififwegetthatkindofthirdoption, youmakesure I gettherightamountoftabs.