diff --git a/game.go b/game.go index f25635e..11b9b7b 100644 --- a/game.go +++ b/game.go @@ -86,17 +86,19 @@ func (game *Game) gameDirector() { // Clean the screen game.screen.Clear() + // Draw robots?? + if len(game.robots) == 0 { + game.level++ + game.cleanTrash() + game.resetPlayer() + game.initRobots() + } + // Draw starter conditions game.drawBox() game.drawPlayer() //game.drawCoords() - // Draw robots?? - if len(game.robots) == 0 { - game.level++ - game.cleanTrash() - game.initRobots() - } game.drawRobots() // Draw my ex-wife diff --git a/player.go b/player.go index 1cae9e5..a74e0ac 100644 --- a/player.go +++ b/player.go @@ -119,3 +119,8 @@ func (game *Game) onPlayer(pos Position) bool { } return onPlayer } + +func (game *Game) resetPlayer() { + game.player.position.x = 40 + game.player.position.y = 12 +}