public class Game_Over implements Runnable {
  Thread kick;
  int x = 0, y = 0;
  int speed = 64;
  int width = 0, height = 0;

  Game_Over (int width, int height) {
    this.width = width;
    this.height = height;
    x = width;
    y = height / 2;
  }

  public void start() {
    if (kick == null) {
      kick = new Thread(this);
      kick.start();
    }
  }

  public void run() {
    while (true) {
      x -= 5;
      if (x <= -220) {
	y = (int)(Math.random() *  height);
	x = width;
      }
      try {
	Thread.sleep(speed);
      } catch (InterruptedException e) {
      }
    }
  }

  public int getX() {
    return x;
  }

  public int getY() {
    return y;
  }

  public void stop() {
    if (kick != null) {
      kick.stop();
      kick = null;
    }
  }
}

