Files
SirRoboGarage/common_libs/guns/head_on.nim
T
SirStone 254c7dc997 feat(ModularBot): pluggable bot with 4 guns, phantom meteor movement, radar harness
- Gun harness: virtual bullet tracker, rolling fitness, auto-selector
- Guns: head-on, linear (extrapolation), circular (integrated formula), tsetlin machine (learning)
- Movement: phantom meteor gravity engine (danger histograms, phantom bullets, fire detection)
- Radar: harness + radar_lock adapter
- Color-coded modules: turret/bullet color per gun, body per movement, scan per radar
- Beats Target, SpinBot, Crazy, TrackFire in 10-round battles
2026-09-20 00:37:10 +02:00

14 lines
428 B
Nim

## Head-on gun: predict enemy stays at current position.
## Simplest possible Gun implementation — baseline reference.
import gun_harness/gun_interface
type HeadOnGun* = object
discard
proc predict*(g: var HeadOnGun, state: WorldState, bulletSpeed: float): GunPrediction =
GunPrediction(x: state.enemyX, y: state.enemyY)
proc onResult*(g: var HeadOnGun, e: FeedbackEvent) =
discard # analytical gun — no learning