I want to control the direction of the bullet, when i press space and right it have to fly right when i press space and left it have to fly left and so on
i came up with this idea : but it says that operator && can not be applied to boolean,java.lang.string
if (Greenfoot.isKeyDown ("space") && ("right"))
{
setLocation(getX() + 36, getY());
}
if (Greenfoot.isKeyDown ("space") && ("left"))
{
setLocation(getX() - 36, getY());
}
if (Greenfoot.isKeyDown ("space") && ("up"))
{
setLocation(getX()+0, getY ()+36);
}
if (Greenfoot.isKeyDown ("space") && ("down"))
{
setLocation(getX() + 0, getY()-36 );
}

