T3: Add circular gun module #181
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
#165 (ModularBot wayfinder map)
What to build
Circular prediction gun. Needs 2+ frames internally to compute enemy turn rate. Projects arc forward by ticksToArrive steps. Returns absolute (x, y). onResult() is no-op.
Register in ModularBot. Three analytical guns now compete.
Acceptance criteria
Blocked by
#179 (T1)
Implemented and compiled successfully (build clean, no errors).
common_libs/guns/circular.nim— new file:prevHeading+hasPrevflag; first frame falls back to head-on (need 2 frames for turn rate)enemyHeadingvalues, normalised to [-180, 180] deg/tickheading += turnRate,pos += speed * (cos, sin)), recompute bullet travel distance, repeatBotRadiusmarginonResult()no-op (analytical gun)ModularBot_garage/src/ModularBot.nim— CircularGun wired as gunId=3 (alongside parallel agents' additions: TsetlinGun=2, OscillatorModule, RadarLockModule):circPredsarray +spawnBullets(3, ...)of 3: bot.circular.onResult(fe)in tickBullets callbackof 3: bot.circular.predict(...)in gun selectioninitTracker(4)(0: HeadOn, 1: Linear, 2: Tsetlin, 3: Circular)