code wiki / _hdl_build / nx_tactics_engine_gate.nx
nx_tactics_engine_gate.nx
buildroot/runtime/_hdl_build/nx_tactics_engine_gate.nx
about
nx_tactics_engine_gate.nx -- gate for the data-driven TACTICS SIMULATION engine (G-ECO-005 rung 1).
Drives the REAL nx_tactics_engine_lib headlessly (no terminal) and asserts the engine is genuinely
CONFIG-DRIVEN + the core mechanics work, by RUNNING (not asserting):
(1) DATA-DRIVEN: two distinct configs yield distinct rosters (2v2 vs 2v3, 4 vs 5 units).
(2) WIN/LOSE both reachable: clearing team1 -> mode=win; clearing team0 -> mode=lose.
(3) COVER matters: hit-chance on open cell > hit-chance on a cover cell (same distance).
(4) BOUNDS: out-of-grid reads = wall; a move into a wall is rejected (no move, no move spent).
(5) EMERGENT PLAYTHROUGH: a scripted bot (advance-to-range + shoot) drives a full 2v2 battle to a
RESOLUTION (win or lose) within a bounded turn budget -- the whole turn loop + AI run end-to-end.
TACTICS-ENGINE-GATE verdict=GREEN iff all hold -> knowledge/status/tactics_engine.log.
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_tactics_engine_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 15 | func tg_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } |
| 16 | func tg_n(fd: i64, v: i64) -> i64 |
| 27 | func tg_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: tg_has |
| 28 | func tg_has(buf: *u8, len: i64, pat: *u8) -> i64 |
| 39 | func tg_count_nl(buf: *u8, len: i64) -> i64 called by 1: main |
| 47 | func tbot(st: *i64, cap: i64, itout: *i64) -> i64 |
| 82 | func tg_report(fd: i64, r: *i64, ok: i64) -> i64 |
| 106 | func main() -> i64 |