Prevent from TPing into a wall.

This commit is contained in:
Sacha Ligthert 2023-12-06 22:30:22 +01:00
parent 227364f79e
commit d554bf73ef

View File

@ -177,8 +177,8 @@ func quit(game *Game) {
func (game *Game) randPos() Position { func (game *Game) randPos() Position {
var pos Position var pos Position
x := 1 + rand.Intn(77) x := 2 + rand.Intn(76)
y := 1 + rand.Intn(22) y := 2 + rand.Intn(21)
pos.x = x pos.x = x
pos.y = y pos.y = y