public class controller extends Thread

{

	private bounce b;

	public	boolean IsPainted = true;	



	public void setBounce(bounce newB)

	{

		b = newB;

	}



    synchronized public void run()

	{

		while(true) {

			if (IsPainted)

			{

                try

			    {

    			    this.wait(10);

    			}

    			catch(InterruptedException ie){}

    			

				IsPainted = false;

				b.Move();

			}

		}

	}

}
