mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-26 12:01:45 +00:00
better i/o handling
This commit is contained in:
parent
c97d6c68e9
commit
1138458e0a
4
main.go
4
main.go
@ -19,6 +19,7 @@ func output(_ *resty.Client, _ string, width, height int, arr [][]Cell) {
|
|||||||
}
|
}
|
||||||
fmt.Printf("\n")
|
fmt.Printf("\n")
|
||||||
}
|
}
|
||||||
|
fmt.Printf("------------\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@ -41,8 +42,7 @@ func main() {
|
|||||||
}, width, height, 5)
|
}, width, height, 5)
|
||||||
|
|
||||||
// Wait for user input to quit
|
// Wait for user input to quit
|
||||||
var input string
|
fmt.Scanln()
|
||||||
fmt.Scanln(&input)
|
|
||||||
// Stop Game of Life, wait for routine
|
// Stop Game of Life, wait for routine
|
||||||
done <- true
|
done <- true
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user