Create 2D game map with images

It’s well explained here : since your player is moving using two indices x and y, then if it’s located at the origin (0, 0) then calling the method left() on the player will result in this :

// Start at origin (top left of the map)
Player myPlayer = new Player(0, 0); // x = 0, y = 0

myPlayer.left(); // x = -1, y = 0

myPlayer.display(); // Will display the player outside of the map!!

So you need to prevent this kind of behavior by not alowing the player to move up / right / left or down when situated at the borders of the screen. (hint: use conditions, try to write down a way to tell if the player can move or not) :wink: