mirror of
https://github.com/guezoloic/L3-racing-game.git
synced 2026-03-31 04:11:33 +00:00
feat: ajout et correction multiple classe
This commit is contained in:
@@ -24,19 +24,28 @@ public class Main {
|
||||
|
||||
Map m = Map.fromInts(map);
|
||||
|
||||
// game.run();
|
||||
// // game.run();
|
||||
|
||||
// Dashboard d = new Dashboard(new Car(10, new State()), "Voiture 1", null, Color.BLUE, 500, 500, 10, 10);
|
||||
Car[] cars = new Car[] { new Car(m.getPathSize(), new State(), Color.PINK)};
|
||||
System.out.println(cars[0].getLoop());
|
||||
Track t = new Track(m, cars, null, 1080, 512, 0, 0);
|
||||
Dashboard d = new Dashboard(cars[0], null, () -> true, 300, 300, 0, 0);
|
||||
while(cars[0].getRound() < 1)
|
||||
{
|
||||
// // Dashboard d = new Dashboard(new Car(10, new State()), "Voiture 1", null, Color.BLUE, 500, 500, 10, 10);
|
||||
// Car[] cars = new Car[] { new Car("Voiture 1", Color.PINK, m.getPathSize(), new State())};
|
||||
// System.out.println(cars[0].getLoop());
|
||||
// Track t = new Track(m, cars, null, 1080, 512, 0, 0);
|
||||
// Dashboard d = new Dashboard(cars[0], null, () -> true, 300, 300, 0, 0);
|
||||
// Rankboard r = new Rankboard(null, 100, 100, 0, 0, cars);
|
||||
// while(cars[0].getRound() < 1)
|
||||
// {
|
||||
|
||||
cars[0].run();
|
||||
GameView.update();
|
||||
Thread.sleep(500);
|
||||
}
|
||||
// cars[0].run();
|
||||
// GameView.update();
|
||||
// Thread.sleep(500);
|
||||
// }
|
||||
|
||||
Game game = new Game.Builder()
|
||||
.addCar(new Game.CarInfo("Voiture 1", Color.BLUE))
|
||||
.addCar(new Game.CarInfo("Voiture 2", Color.PINK))
|
||||
.addCar(new Game.CarInfo("Voiture 3", Color.RED))
|
||||
.setMap(m)
|
||||
.build();
|
||||
game.run();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user