A Go version of the https://lcthw.dev/learn-code-the-hard-way/curseyou-python-rogue that makes a tiny Rogue in Go.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
405 B
16 lines
405 B
--- 03_pathing_enemies/game.go 2025-10-06 12:44:21.971080300 -0400
|
|
+++ 04_combat/game.go 2025-10-06 10:56:30.634388900 -0400
|
|
@@ -34,2 +34,13 @@
|
|
}
|
|
}
|
|
+
|
|
+func (game *Game) Restart() {
|
|
+ game.SetStatus("YOU DIED! Try again.")
|
|
+ game.Player.HP = 20
|
|
+ game.Player.Pos = Position{1,1}
|
|
+ clear(game.Enemies)
|
|
+ game.FillPaths(game.Paths, PATH_LIMIT)
|
|
+ game.FillMap(game.Level, '#')
|
|
+
|
|
+ game.Render()
|
|
+}
|
|
|