From 80984f824350a28b0ed528e6f71c618421a089b5 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Sun, 14 Apr 2024 21:47:13 +0200 Subject: [PATCH] prepare displaying game of life grid --- main.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/main.go b/main.go index 0650be8..20b05cb 100644 --- a/main.go +++ b/main.go @@ -1,12 +1,26 @@ package main import ( + "fmt" "log" "github.com/go-resty/resty/v2" "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() { // Load .env file if it exists err := godotenv.Load(".env")