package main import ( "bufio" "fmt" "os" ) func main() { // get a reader for user input (to get newline before each time step) in := bufio.NewReader(os.Stdin) // make a 12-unit wide world w := NewWorld(12) // run the simulation for 500 time steps for i := 0; i < 500; i++ { // output world using its String function fmt.Println(w) fmt.Println() // update for next time step w.Update() // wait for newline before next time step in.ReadString('\n') } // output the final state of the world fmt.Println(w) }