CRITICAL: AIController uses wrong property names for Ship class #2
Labels
No labels
blocked:needs-decision
blocked:no-changes
feature-request
quickfix
test-coverage
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/gravity-racer#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
Description
AIController.js references property names that don't match the Ship class, preventing AI ships from working.
Specific mismatches
ship.position-> Ship usesposship.velocity-> Ship usesvelship.fuel-> Ship hasfuel.currentandfuel.capacityship.capacitor-> Ship hascapacitor.current/capacitor.maxCapacityship.maxThrust-> Ship doesn't have thisship.thrust-> Ship hascurrentThrustship.health-> Ship hashull.currentship.gForce-> Ship hastotalGship.velocity.scale()-> Ship's Vec2 usesmul()notscale()Impact
AI ships cannot steer, thrust, or manage resources. Racing is effectively single-player.
Fix
Add adapter properties/getters to Ship, or refactor AIController to use Ship's property names.