style: format Go files with gofmt

- cmd/acb-maps-loader/main.go
- wasm/bots/guardian/main.go
- wasm/bots/hunter/main.go
- wasm/bots/random/main.go
- web/package-lock.json (npm ci update)
This commit is contained in:
jedarden 2026-05-25 15:33:38 -04:00
parent 223bfa3d86
commit 1839f5e7d1
5 changed files with 1328 additions and 22 deletions

View file

@ -14,15 +14,15 @@ import (
// MapFile represents the structure of map JSON files in the maps/ directory.
type MapFile struct {
ID string `json:"id"`
Players int `json:"players"`
Rows int `json:"rows"`
Cols int `json:"cols"`
WallDensity float64 `json:"wall_density"`
Walls []Position `json:"walls"`
Cores []Core `json:"cores"`
EnergyNodes []Position `json:"energy_nodes"`
Generated string `json:"generated,omitempty"`
ID string `json:"id"`
Players int `json:"players"`
Rows int `json:"rows"`
Cols int `json:"cols"`
WallDensity float64 `json:"wall_density"`
Walls []Position `json:"walls"`
Cores []Core `json:"cores"`
EnergyNodes []Position `json:"energy_nodes"`
Generated string `json:"generated,omitempty"`
}
// Position represents a row/column position.
@ -39,9 +39,9 @@ type Core struct {
// MapGeometry represents the geometry stored in map_json.
type MapGeometry struct {
Walls []Position `json:"walls"`
Cores []MapDatabaseCore `json:"cores"`
EnergyNodes []Position `json:"energy_nodes"`
Walls []Position `json:"walls"`
Cores []MapDatabaseCore `json:"cores"`
EnergyNodes []Position `json:"energy_nodes"`
}
// MapDatabaseCore represents a core as stored in the database map_json.

View file

@ -77,10 +77,10 @@ func getMoves(state *engine.VisibleState) []engine.Move {
func main() {
js.Global().Set("guardianBot", js.ValueOf(map[string]interface{}{
"init": js.FuncOf(jsInit),
"init": js.FuncOf(jsInit),
"compute_moves": js.FuncOf(jsComputeMoves),
"free_result": js.FuncOf(jsFreeResult),
"version": "1.0.0",
"free_result": js.FuncOf(jsFreeResult),
"version": "1.0.0",
}))
select {}
}

View file

@ -72,10 +72,10 @@ func getMoves(state *engine.VisibleState) []engine.Move {
func main() {
js.Global().Set("hunterBot", js.ValueOf(map[string]interface{}{
"init": js.FuncOf(jsInit),
"init": js.FuncOf(jsInit),
"compute_moves": js.FuncOf(jsComputeMoves),
"free_result": js.FuncOf(jsFreeResult),
"version": "1.0.0",
"free_result": js.FuncOf(jsFreeResult),
"version": "1.0.0",
}))
select {}
}

View file

@ -67,10 +67,10 @@ func getMoves(state *engine.VisibleState) []engine.Move {
func main() {
js.Global().Set("randomBot", js.ValueOf(map[string]interface{}{
"init": js.FuncOf(jsInit),
"init": js.FuncOf(jsInit),
"compute_moves": js.FuncOf(jsComputeMoves),
"free_result": js.FuncOf(jsFreeResult),
"version": "1.0.0",
"free_result": js.FuncOf(jsFreeResult),
"version": "1.0.0",
}))
select {}
}

1308
web/package-lock.json generated

File diff suppressed because it is too large Load diff