Implements complete SwarmBot formation-based combat strategy in AssemblyScript: - JSON parsing for game config and state - Tight cohesion (radius=3) movement with circular mean center-of-mass - Enemy-seeking behavior with engagement bonuses - Toroidal distance calculations Builds to 27KB swarm.wasm (AssemblyScript produces compact binaries vs Go's ~12MB). Build script now copies to dist/. Closes: bf-2a7w Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
9 lines
265 B
Bash
Executable file
9 lines
265 B
Bash
Executable file
#!/bin/sh
|
|
# Build swarm.wasm from AssemblyScript source
|
|
set -e
|
|
cd "$(dirname "$0")"
|
|
mkdir -p ../../dist
|
|
npm install
|
|
npx asc index.ts -o build/swarm.wasm --runtime incremental
|
|
cp build/swarm.wasm ../../dist/swarm.wasm
|
|
echo "Built wasm/bots/swarm -> dist/swarm.wasm"
|