prepare displaying game of life grid

This commit is contained in:
Baipyrus 2024-04-14 21:47:13 +02:00
parent b66f12b7c6
commit 80984f8243

14
main.go
View File

@ -1,12 +1,26 @@
package main package main
import ( import (
"fmt"
"log" "log"
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/joho/godotenv" "github.com/joho/godotenv"
) )
func output(_ *resty.Client, _ string, width, height int, arr [][]Cell) {
for i := 0; i < width; i++ {
for j := 0; j < height; j++ {
if arr[i][j].live {
fmt.Printf("█")
} else {
fmt.Printf(" ")
}
}
fmt.Printf("\n")
}
}
func main() { func main() {
// Load .env file if it exists // Load .env file if it exists
err := godotenv.Load(".env") err := godotenv.Load(".env")