Im making a flappy bird game and whenever I try to put a new bird into the background, a terminal window pops up. But, I cant even open the terminal window and I dont know why, so I don't know what the problem is. Here's my code:
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)import greenfoot;
/**
* Write a description of class bird here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class bird extends Actor
{
int gravity = 10;
boolean wingflap = false;
int x = getX();
int y = getY();
int a = 10;
/**
* Act - do whatever the bird wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
// Add your action code here.
upAndDown();
}
public void upAndDown(){
if(Greenfoot.isKeyDown("up")){
setLocation(x,y+a);
}
}
}
