import java.awt.Color;
import hsa.Console;

class Memory_time extends Thread
{
    Console con;
    public int bonus;
    public Thread thread;

    Memory_time (Console con, int bonus)
    {
	this.con = con;
	this.bonus = bonus;
	thread = new Thread (this);
	thread.start ();
    }
    
    
    public void run ()
    {
	try
	{
	    con.setTextColor (Color.black);
	    con.setCursor (23, 40);
	    con.print ("Time bonus: ");
	    while (bonus != -1)
	    {
		con.setTextColor (Color.black);
		con.setCursor (23, 52);
		con.println (bonus);
		Thread.sleep (1000);
		bonus--;
	    }
	}
	catch (InterruptedException exc)
	{
	}
    }
}
