import greenfoot.*;
import java.awt.Color;
public class Score extends Actor
{
static int best = 0;
int score = 0;
public void addedToWorld(World w)
{ act();
}
public void act()
{ setImage(new GreenfootImage("Score: " + score + "\nBest: " + best, 20, Color.WHITE, Color.BLACK));
setLocation(Space.width - (getImage().getWidth()/2), getImage().getHeight()/2);
if(Space.started)
{
score++;
if(best < score) best = score;
}
}
}


