Move maze drawing into renderer package
This commit is contained in:
parent
dd37379bc5
commit
c6b2a837b0
2 changed files with 17 additions and 10 deletions
15
game/renderer/maze.go
Normal file
15
game/renderer/maze.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package renderer
|
||||
|
||||
import (
|
||||
"pacman/engine/render"
|
||||
"pacman/game/world"
|
||||
)
|
||||
|
||||
// DrawMaze - draws the maze.
|
||||
func DrawMaze(maze *world.Maze, x, y uint8) {
|
||||
for tile_x := range uint8(world.MAZE_WIDTH) {
|
||||
for tile_y := range uint8(world.MAZE_HEIGHT) {
|
||||
render.DrawTile(x+tile_x, y+tile_y, maze.At(tile_x, tile_y))
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue