The diffs must be pretty or else.

master
Zed A. Shaw 2 days ago
parent 9279099dc8
commit fe1313966a
  1. 17
      01_the_screen/map.go
  2. 17
      01_the_screen/temp.go
  3. 3
      03_pathing_enemies/ui.go

@ -46,20 +46,3 @@ func (game *Game) FillMap(target Map, setting rune) {
target[y] = slices.Repeat([]rune{setting}, game.Width) target[y] = slices.Repeat([]rune{setting}, game.Width)
} }
} }
func (game *Game) NewMap() {
game.Level = Map{
[]rune("#################"),
[]rune("#.#...#.........#"),
[]rune("#.#.###.#.###.#.#"),
[]rune("#.#.....#...#.#.#"),
[]rune("#.#.#######.#.###"),
[]rune("#.#...#...#.#...#"),
[]rune("#.###.###...###.#"),
[]rune("#...#.......#...#"),
[]rune("#.#.#########...#"),
[]rune("#.#.............#"),
[]rune("#################"),
}
}

@ -0,0 +1,17 @@
package main
func (game *Game) NewMap() {
game.Level = Map{
[]rune("#################"),
[]rune("#.#...#.........#"),
[]rune("#.#.###.#.###.#.#"),
[]rune("#.#.....#...#.#.#"),
[]rune("#.#.#######.#.###"),
[]rune("#.#...#...#.#...#"),
[]rune("#.###.###...###.#"),
[]rune("#...#.......#...#"),
[]rune("#.#.#########...#"),
[]rune("#.#.............#"),
[]rune("#################"),
}
}

@ -67,12 +67,13 @@ func (game *Game) Render() {
game.Screen.Clear() game.Screen.Clear()
game.DrawMap() game.DrawMap()
game.DrawEntity('@', game.Player.Pos, tcell.ColorYellow)
if SHOW_PATHS { if SHOW_PATHS {
game.DrawPaths() game.DrawPaths()
} }
game.DrawEntity('@', game.Player.Pos, tcell.ColorYellow)
for pos, _ := range game.Enemies { for pos, _ := range game.Enemies {
game.DrawEntity('G', pos, tcell.ColorRed) game.DrawEntity('G', pos, tcell.ColorRed)
} }

Loading…
Cancel
Save