import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import java.awt.Color;
/**
* Write a description of class Scor here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Scor extends raspunsuri
{
private int puncte = 1;
/**
* Act - do whatever the Scor wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public Scor()
{
setImage(new GreenfootImage("Punctaj : " + puncte, 24, Color.GREEN, Color.BLACK));
}
public void act()
{
addPuncte();
}
public void addPuncte()
{
if(Greenfoot.mouseClicked(t2i1a.class))
{
puncte ++;
setImage(new GreenfootImage("Punctaj : "+ puncte, 24, Color.RED, Color.GREEN));
}
}
}
and scoreboard beforeclick on t2i1a
(the same)


