mirror of
https://github.com/guezoloic/racing-game.git
synced 2026-03-29 02:13:46 +00:00
Ajout de la partie view du projet
This commit is contained in:
37
model/Main.java
Normal file
37
model/Main.java
Normal file
@@ -0,0 +1,37 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user