mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-26 03:51:45 +00:00
local framerate constant
This commit is contained in:
parent
b462335db4
commit
2bb893e9a8
4
main.go
4
main.go
@ -35,6 +35,8 @@ func output(client *resty.Client, url string, width, height int, arr [][]Cell) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
const FPS = 10
|
||||||
|
|
||||||
// Load .env file if it exists
|
// Load .env file if it exists
|
||||||
err := godotenv.Load(".env")
|
err := godotenv.Load(".env")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -53,7 +55,7 @@ func main() {
|
|||||||
// Run Game of Life
|
// Run Game of Life
|
||||||
done := setup(func(c [][]Cell) {
|
done := setup(func(c [][]Cell) {
|
||||||
output(client, url, width, height, c)
|
output(client, url, width, height, c)
|
||||||
}, width, height, 10)
|
}, width, height, FPS)
|
||||||
|
|
||||||
// Wait for user input to quit
|
// Wait for user input to quit
|
||||||
fmt.Scanln()
|
fmt.Scanln()
|
||||||
|
Loading…
Reference in New Issue
Block a user