@@ -86,17 +86,19 @@ func (game *Game) gameDirector() {
// Clean the screen
game.screen.Clear()
- // Draw starter conditions
- game.drawBox()
- game.drawPlayer()
- //game.drawCoords()
-
// Draw robots??
if len(game.robots) == 0 {
game.level++
game.cleanTrash()
+ game.resetPlayer()
game.initRobots()
}
+
+ // Draw starter conditions
+ game.drawBox()
+ game.drawPlayer()
+ //game.drawCoords()
game.drawRobots()
// Draw my ex-wife
@@ -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
+}