1
0
Fork 0

feat(grid): add IsRowFull()

This commit is contained in:
Henrik Hautakoski 2025-09-15 08:05:02 +02:00
parent e958f87e64
commit eb31bdf50c

View file

@ -30,3 +30,12 @@ func (g Grid) Tile(x, y byte) graphics.Tile {
func (g *Grid) Set(x, y byte, c Block) {
(*g)[uint16(x)+(uint16(y)*GRID_WIDTH)] = c
}
func (g *Grid) IsRowFull(y byte) bool {
for x := range byte(g.Width()) {
if g.At(x, y) == BLOCK_EMPTY {
return false
}
}
return true
}