hey guys, im new to greenfoot and i want to know how to add a scoreboard to a simple game the Oracle taught me. Please help!
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Ball here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Ball extends Actor
{
/**
* Act - do whatever the Ball 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.
setRotation(0);
if(Greenfoot.isKeyDown("d"))
{move(5);}
if(Greenfoot.isKeyDown("a"))
{move(-5);}
setRotation(90);
if(Greenfoot.isKeyDown("w"))
{move(-5);}
if(Greenfoot.isKeyDown("s"))
{move(5);}
removeTouching(null);
}
}}


