Files
archived-L3-racing-game/src/Main.java

29 lines
518 B
Java

public class Main {
public static void main(String[] args) throws InterruptedException {
Map m = Map.fromChars(new Character[][] {
{'3', '#', '2'},
{'#', ' ', 'S'},
{'9', '#', 'F'},
});
Thread t = new Thread(() -> {
while (true)
{
try
{
Thread.sleep(5000);
}
catch (InterruptedException e)
{
e.printStackTrace();
}
System.out.println(Game.create().togglePause() ? "stop" : "fini");
}
});
t.start();
Game.create()
.init(3, m)
.run();
}
}