bugfix: mixed up dimensions

This commit is contained in:
Baipyrus 2024-04-15 01:26:20 +02:00
parent 93322ad555
commit 0c3d18afbe

View File

@ -14,8 +14,8 @@ func output(client *resty.Client, url string, width, height int, arr [][]Cell) {
// Prepare instructions for matrix // Prepare instructions for matrix
instructions := make([]interface{}, 0) instructions := make([]interface{}, 0)
// Append all live cells as pixel instructions // Append all live cells as pixel instructions
for i := 0; i < width; i++ {
for j := 0; j < height; j++ { for j := 0; j < height; j++ {
for i := 0; i < width; i++ {
if arr[i][j].live { if arr[i][j].live {
instructions = append(instructions, Pixel{X: i, Y: j, Endpoint: PIXEL}) instructions = append(instructions, Pixel{X: i, Y: j, Endpoint: PIXEL})
goterm.Print("X") goterm.Print("X")