Try this for performMovement:
protected void performMovement() { if (Greenfoot.isKeyDown(upKey)) { localRotation = UP; if (canMove()) { setLocation(getX(), getY()-1); } } if (Greenfoot.isKeyDown(leftKey)) { localRotation = LEFT; setRotation(localRotation); checkTurn(); if (canMove()) { move(1); } } if (Greenfoot.isKeyDown(downKey)) { localRotation = DOWN; if (canMove()) { setLocation(getX(), getY()+1); } } if (Greenfoot.isKeyDown(rightKey)) { localRotation = RIGHT; setRotation(localRotation); checkTurn(); if (canMove()) { move(1); } } }