insert setup call and wait for routine

This commit is contained in:
Baipyrus 2024-04-14 21:48:03 +02:00
parent 30e6c4a35b
commit 3403886e48

10
main.go
View File

@ -35,7 +35,17 @@ func main() {
// Initialize resty client // Initialize resty client
client := resty.New() client := resty.New()
// Run Game of Life
done := setup(func(c [][]Cell) {
output(client, url, width, height, c)
}, width, height, 5)
// Wait for user input to quit
var input string
fmt.Scanln(&input)
// Stop Game of Life, wait for routine
done <- true
<-done
// // Initialize custom matrix data // // Initialize custom matrix data
// col := Color{R: 255, G: 0, B: 255, Endpoint: COLOR} // col := Color{R: 255, G: 0, B: 255, Endpoint: COLOR}