fix(Rankboard.java): ajout arraylist clone

This commit is contained in:
2025-11-09 19:17:48 +01:00
parent 65371cc2b1
commit 72eccbf721
2 changed files with 13 additions and 7 deletions

View File

@@ -243,14 +243,17 @@ public class Game
*
* @throws InterruptedException si le thread est interrompu pendant wait()
*/
private synchronized void step() throws InterruptedException
private void step() throws InterruptedException
{
for (int i = 0; i < cars.size(); i++)
for (Car car : cars)
{
while (isPaused)
wait();
synchronized(this)
{
while (isPaused)
wait();
}
cars.get(i).run();
car.run();
for (GObserver o : obs)
{