mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-26 03:51:45 +00:00
bugfix: mixed up dimensions
This commit is contained in:
parent
93322ad555
commit
0c3d18afbe
4
main.go
4
main.go
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user