From a349d221f11143fefc4f5daa3af3ac0f642cf860 Mon Sep 17 00:00:00 2001 From: Sacha Ligthert Date: Tue, 5 Dec 2023 23:20:58 +0100 Subject: [PATCH] Bring movePlayer() in to line with the rest. --- game.go | 2 +- player.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/game.go b/game.go index 97eb3fd..902111c 100644 --- a/game.go +++ b/game.go @@ -105,7 +105,7 @@ func (game *Game) gameDirector() { game.screen.Show() // Process input - game.movePlayer(game, <-game.keypresses) + game.movePlayer(<-game.keypresses) // Move robots game.moveRobots() diff --git a/player.go b/player.go index 67381ad..0901e85 100644 --- a/player.go +++ b/player.go @@ -4,7 +4,7 @@ func (game *Game) drawPlayer() { game.screen.SetContent(game.player.position.x, game.player.position.y, '@', nil, game.style) } -func (g *Game) movePlayer(game *Game, press int) { +func (game *Game) movePlayer(press int) { if press == Left { if game.player.position.x != 2 { game.player.position.x--