This commit is contained in:
LinlyBoi
2023-03-09 11:39:02 +02:00
parent 93543f744b
commit b674e441f3

View File

@@ -31,12 +31,15 @@ public class Traffic {
Traffic_Sign.add(StopButton, 3); Traffic_Sign.add(StopButton, 3);
while (true) { while (true) {
red_thread.run(); red_thread.start();
if (pressed) break; if (pressed)
yellow_thread.run(); break;
if (pressed) break; yellow_thread.start();
green_thread.run(); if (pressed)
if (pressed) break; break;
green_thread.start();
if (pressed)
break;
} }
} }
} }