I would start by putting an 'else' at the beginning of line 46 of the Player class (as shown at the top of this discussion).
if (!Greenfoot.isKeyDown("left") && direction == -1) if (!Greenfoot.isKeyDown("left") && direction == -1)