BUT2/DEV/DEV3.2/TP05_Files/Q4Main.java

23 lines
487 B
Java
Raw Normal View History

2023-11-20 13:22:30 +01:00
import java.util.*;
public class Q4Main{
public static void main(String[] args){
Serpent jeux = new Serpent();
Timer boucle = new Timer(true);
Repetition iteration = new Repetition(jeux, boucle);
boucle.scheduleAtFixedRate(iteration, 1000, 100);
try {
while(true){
Thread.sleep(1000000);
}
}
catch (InterruptedException e) {
e.printStackTrace();
}
boucle.cancel();
}
}