Hey there i have a question about programming this Game.
I just tried to create a Game with Greenfoot to increase my programming ablitys but something gone wrong so i hope someone can help me to find the mistake :/
-Black0utHD
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class wombat here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class wombat extends Actor
{
/**
* Act - do whatever the wombat wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
move();
}
private void move();{
int x = getX();
int y = getY();
if(Greenfoot.isKeyDown("right"))
{
setLocation(x + 2, y);
}
else if(Greenfoot.isKeyDown("left"))
{
setLocation(x - 2, y);
}