Skip to content

Commit 15f9123

Browse files
committed
use user_loop
1 parent 15882a9 commit 15f9123

File tree

1 file changed

+1
-10
lines changed
  • examples/mascot-jump-game/python

1 file changed

+1
-10
lines changed

examples/mascot-jump-game/python/main.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,5 @@ def on_client_connected(client_id, data):
231231
# Provide the LED state function to the Arduino sketch
232232
Bridge.provide("get_led_state", get_led_state)
233233

234-
# Start game loop in separate thread
235-
game_thread = threading.Thread(target=game_loop, daemon=True)
236-
game_thread.start()
237-
238234
# Run the app
239-
try:
240-
App.run()
241-
except KeyboardInterrupt:
242-
game_running = False
243-
if game_thread:
244-
game_thread.join()
235+
App.run(user_loop=game_loop)

0 commit comments

Comments
 (0)