mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-25 11:31:46 +00:00
prepare displaying game of life grid
This commit is contained in:
parent
b66f12b7c6
commit
80984f8243
14
main.go
14
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")
|
||||
|
Loading…
Reference in New Issue
Block a user