fixed clear screen problem, menus are now shown correctly. lots new

bugs though
This commit is contained in:
2024-06-01 20:22:28 +02:00
parent 9f1bdfd2af
commit 37fb0d637f
10 changed files with 115 additions and 83 deletions

15
grid.go
View File

@@ -78,6 +78,19 @@ func (grid *Grid) FillRandom() {
}
}
func (grid *Grid) Dump() {
for y := 0; y < grid.Height; y++ {
for x := 0; x < grid.Width; x++ {
if grid.Data[y][x] == 1 {
fmt.Print("XX")
} else {
fmt.Print(" ")
}
}
fmt.Println()
}
}
// initialize using a given RLE pattern
func (grid *Grid) LoadRLE(pattern *rle.RLE) {
if pattern != nil {
@@ -95,6 +108,8 @@ func (grid *Grid) LoadRLE(pattern *rle.RLE) {
}
}
}
//grid.Dump()
}
}