feat: ajout et correction multiple classe

This commit is contained in:
2025-11-09 16:02:43 +01:00
parent 9e54622ae8
commit 0b60550e0b
5 changed files with 195 additions and 112 deletions

View File

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