mirror of
https://github.com/guezoloic/racing-game.git
synced 2026-03-28 18:03:50 +00:00
37 lines
630 B
Java
37 lines
630 B
Java
import model.*;
|
|
import view.*;
|
|
|
|
|
|
public class Main {
|
|
public static void main(String[] args) throws InterruptedException {
|
|
// Map m = Map.fromChars(new Character[][] {
|
|
// {'3', '#', '2'},
|
|
// {'#', ' ', 'S'},
|
|
// {'9', '#', 'F'},
|
|
// });
|
|
|
|
Game game = new Game.Builder()
|
|
.defaultMap()
|
|
.setPlayers(3)
|
|
.build();
|
|
|
|
Thread t = new Thread(() -> {
|
|
int i = 0;
|
|
while (i++ < 10)
|
|
{
|
|
try
|
|
{
|
|
Thread.sleep(5000);
|
|
}
|
|
catch (InterruptedException e)
|
|
{
|
|
e.printStackTrace();
|
|
}
|
|
System.out.println(game.togglePause() ? "stop" : "fini" );
|
|
}
|
|
});
|
|
|
|
t.start();
|
|
game.run();
|
|
}
|
|
} |