From fe1313966af8dc42d961bcfb90d861961ae4c78b Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Mon, 6 Oct 2025 11:31:38 -0400 Subject: [PATCH] The diffs must be pretty or else. --- 01_the_screen/map.go | 17 ----------------- 01_the_screen/temp.go | 17 +++++++++++++++++ 03_pathing_enemies/ui.go | 3 ++- 3 files changed, 19 insertions(+), 18 deletions(-) create mode 100644 01_the_screen/temp.go diff --git a/01_the_screen/map.go b/01_the_screen/map.go index f79fd25..fd7811e 100644 --- a/01_the_screen/map.go +++ b/01_the_screen/map.go @@ -46,20 +46,3 @@ func (game *Game) FillMap(target Map, setting rune) { 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("#################"), - } -} diff --git a/01_the_screen/temp.go b/01_the_screen/temp.go new file mode 100644 index 0000000..93d7999 --- /dev/null +++ b/01_the_screen/temp.go @@ -0,0 +1,17 @@ +package main + +func (game *Game) NewMap() { + game.Level = Map{ + []rune("#################"), + []rune("#.#...#.........#"), + []rune("#.#.###.#.###.#.#"), + []rune("#.#.....#...#.#.#"), + []rune("#.#.#######.#.###"), + []rune("#.#...#...#.#...#"), + []rune("#.###.###...###.#"), + []rune("#...#.......#...#"), + []rune("#.#.#########...#"), + []rune("#.#.............#"), + []rune("#################"), + } +} diff --git a/03_pathing_enemies/ui.go b/03_pathing_enemies/ui.go index f2d8777..9731c38 100644 --- a/03_pathing_enemies/ui.go +++ b/03_pathing_enemies/ui.go @@ -67,12 +67,13 @@ func (game *Game) Render() { game.Screen.Clear() game.DrawMap() - game.DrawEntity('@', game.Player.Pos, tcell.ColorYellow) if SHOW_PATHS { game.DrawPaths() } + game.DrawEntity('@', game.Player.Pos, tcell.ColorYellow) + for pos, _ := range game.Enemies { game.DrawEntity('G', pos, tcell.ColorRed) }