//move left
player=getOneObjectAtOffset(10,0,player.class);
if (player !=null)
{
setLocation(getX() - 3, getY());
if (Greenfoot.isKeyDown("space"))
{
move(10);
//For the basic solution this is where you put your new code.
}
//For the basic solution this is where you put your new code.
}