import java.util.Scanner;
public class Bombe implements Runnable {
private Kode code;
private int timeLeft = 10;
private Scanner input = new Scanner(System.in);
public Bombe(Kode c) {
code = c;
System.out.println("Oppgi armeringskode: ");
code.addCode(input.nextLine());
}
@Override
public void run() {
while (timeLeft > 0) {
System.out.println("Time left: " + timeLeft);
timeLeft--;
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
return;
}
}
System.out.println("BOOM!");
System.exit(0);
}
}