diff --git a/mapping/gamemap.go b/mapping/gamemap.go index 297ea8a..4db887f 100644 --- a/mapping/gamemap.go +++ b/mapping/gamemap.go @@ -11,20 +11,15 @@ func (g *GameMap) Initialize() { for x := range g.Tiles { g.Tiles[x] = make([]Tile, g. Height) + for y := range g.Tiles[x] { + g.Tiles[x][y] = Tile{ + BlockSight: true, + BlockMovement: true, + } + } } - g.Tiles[30][22] = Tile { - BlockMovement: true, - BlockSight: true, - } - g.Tiles[31][22] = Tile{ - BlockMovement: true, - BlockSight: true, - } - g.Tiles[32][22] = Tile{ - BlockMovement: true, - BlockSight: true, - } + } // IsBlocked returns if the given coordinates are blocking movement.