package main import "core:fmt" import "core:strings" import "core:time" WIDTH :: 128 HEIGHT :: 128 AREA :: WIDTH * HEIGHT main :: proc() { board : [AREA]bool = --- fmt.print("\e[2J") // clear screen for { fmt.print("\e[u") // reset cursor print_board(&board) update_board(&board) time.sleep(time.Millisecond * 50) } } print_board :: proc(state: ^[AREA]bool) { for y := 0; y < HEIGHT; y += 2{ line := strings.builder_make() defer strings.builder_destroy(&line) for x in 0.. 2) new_state[x + y * WIDTH] = new_cell } } for i in 0..