code wiki / _hdl_build / nx_breeder_lab.nx
nx_breeder_lab.nx
buildroot/runtime/_hdl_build/nx_breeder_lab.nx
about
nx_breeder_lab.nx -- THE GENETICS LAB SCREEN + the tooth that proves the science is VISIBLE.
Emits a real game screen: two parents, their Punnett square, and the litter they actually produced --
and then MEASURES the rendered litter's visible phenotype ratios against the Punnett prediction.
That measurement is the difference between "we have genetics" and "the player can SEE genetics".
Educational payload, on screen: genotype notation (Hh), the 4-cell square, the predicted odds, and
the observed count -- the exact loop a biology student runs by hand.
license_tier: ORIGINAL
dependencies 6 imports · 0 importers
imports: nx_syscalls.nxnx_game_taming.nxnx_creature_render.nxnx_game_art.nxnx_game_critic.nxnx_png_write.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
| 15 | const LW: i64 = 640 |
| 16 | const LH: i64 = 400 |
functions
| 18 | func lp(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 19 | func ln2(v: i64) -> i64 |
| 33 | func lnl() -> i64 { lp("\n" as *u8); return 0 } |
| 35 | func lab_png(fb: *i64, path: *u8) -> i64 |
| 50 | func lab_geno_str(fb: *i64, x: i64, y: i64, g: i64, t: i64, col: i64) -> i64 |
| 56 | func main() -> i64 |