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.
curse-you-go-rogue/04_combat/movement.go.diff

12 lines
289 B

--- 03_pathing_enemies/movement.go 2025-10-06 12:00:47.091211600 -0400
+++ 04_combat/movement.go 2025-10-06 12:00:49.969794700 -0400
@@ -7,5 +7,7 @@
}
- if !game.Occupied(target) {
+ if game.Occupied(target) {
+ game.Attack(target)
+ } else {
game.Player.Pos = target
}