mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-25 11:31:46 +00:00
parent
de00ca4af9
commit
a9d600aaed
3
main.go
3
main.go
@ -11,8 +11,7 @@ import (
|
|||||||
func output(client *resty.Client, url string, scale, width, height uint, arr [][]Cell) {
|
func output(client *resty.Client, url string, scale, width, height uint, arr [][]Cell) {
|
||||||
goterm.MoveCursor(1, 4)
|
goterm.MoveCursor(1, 4)
|
||||||
// Prepare instructions for matrix
|
// Prepare instructions for matrix
|
||||||
instructions := make([]interface{}, 1)
|
instructions := make([]interface{}, 0)
|
||||||
instructions[0] = Clear{Endpoint: CLEAR}
|
|
||||||
// Append all live cells as pixel instructions
|
// Append all live cells as pixel instructions
|
||||||
for j := 0; j < int(height/scale); j++ {
|
for j := 0; j < int(height/scale); j++ {
|
||||||
for i := 0; i < int(width/scale); i++ {
|
for i := 0; i < int(width/scale); i++ {
|
||||||
|
5
types.go
5
types.go
@ -11,7 +11,6 @@ const (
|
|||||||
UPDATE Endpoint = "update"
|
UPDATE Endpoint = "update"
|
||||||
PIXEL Endpoint = "pixel"
|
PIXEL Endpoint = "pixel"
|
||||||
COLOR Endpoint = "color"
|
COLOR Endpoint = "color"
|
||||||
CLEAR Endpoint = "clear"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Rectangle struct {
|
type Rectangle struct {
|
||||||
@ -22,10 +21,6 @@ type Rectangle struct {
|
|||||||
Endpoint Endpoint `json:"endpoint"`
|
Endpoint Endpoint `json:"endpoint"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Clear struct {
|
|
||||||
Endpoint Endpoint `json:"endpoint"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Update struct {
|
type Update struct {
|
||||||
Endpoint Endpoint `json:"endpoint"`
|
Endpoint Endpoint `json:"endpoint"`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user