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.
27 lines
404 B
27 lines
404 B
package main
|
|
|
|
func main() {
|
|
DebugInit()
|
|
|
|
game := NewGame(17, 11)
|
|
game.InitScreen()
|
|
|
|
for {
|
|
game.NewMap()
|
|
dead_ends := game.NewMaze()
|
|
game.PlaceEnemies(dead_ends)
|
|
game.Render()
|
|
|
|
for game.HandleEvents() {
|
|
game.CalculatePaths()
|
|
game.EnemyPathing()
|
|
game.Render()
|
|
}
|
|
|
|
if game.Player.HP <= 0 {
|
|
game.Restart()
|
|
} else {
|
|
game.Exit()
|
|
}
|
|
}
|
|
}
|
|
|