module automaton ///////////////////////////////////////////////////////////// pub struct A2D { pub mut: maxx int maxy int data &int } [inline] pub fn (a &A2D) set(x,y int, newval int) { unsafe { mut e := &int(0) e = a.data + y*a.maxx + x *e = newval } } [inline] pub fn (a &A2D) get(x,y int) int { unsafe { mut e := &int(0) e = a.data + y*a.maxx + x return *e } } [inline] pub fn (a &A2D) clear() { for y := 0; y