Switch from encoding/binary to struc
It's not perfect, but struc can deserialize the whole thing into one struct while encoding/binary can't. It's nice to have that.
This commit is contained in:
@@ -181,8 +181,8 @@ func (e *env) Draw(screen *ebiten.Image) error {
|
||||
|
||||
for y := int(rect.Min.Y); y < int(rect.Max.Y); y++ {
|
||||
for x := int(rect.Min.X); x < int(rect.Max.X); x++ {
|
||||
cell := gameMap.Cells.At(x, y, int(e.state.zIdx))
|
||||
imd.Set(x, y, makeColour(&cell, e.state.cellIdx))
|
||||
cell := gameMap.At(x, y, int(e.state.zIdx))
|
||||
imd.Set(x, y, makeColour(cell, e.state.cellIdx))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user