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

23 lines
487 B
Java

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();
}
}