Go to file
Jake 3551ec747d added second robot lesson and changing levels. Need to check win conditions on all checkpoints reached, current error leaves level incomplete if checkpoint is reached after code finishes 2025-07-04 18:21:15 +08:00
.vscode added dropdown for lessons, and added first robot lesson to second dropdown 2025-07-03 23:25:13 +08:00
data added second robot lesson and changing levels. Need to check win conditions on all checkpoints reached, current error leaves level incomplete if checkpoint is reached after code finishes 2025-07-04 18:21:15 +08:00
game.js added second robot lesson and changing levels. Need to check win conditions on all checkpoints reached, current error leaves level incomplete if checkpoint is reached after code finishes 2025-07-04 18:21:15 +08:00
gameworld.js added objectives to first robot lesson, locked compile button while executing, game world resets on compile & run 2025-07-04 15:50:06 +08:00
index.html added dropdown for lessons, and added first robot lesson to second dropdown 2025-07-03 23:25:13 +08:00
old.html implemented output to page console, and updates DOM after every line of code to prevent long waits 2025-03-23 17:02:14 +08:00
pyodide-worker.js added second robot lesson and changing levels. Need to check win conditions on all checkpoints reached, current error leaves level incomplete if checkpoint is reached after code finishes 2025-07-04 18:21:15 +08:00
readme.md added second robot lesson and changing levels. Need to check win conditions on all checkpoints reached, current error leaves level incomplete if checkpoint is reached after code finishes 2025-07-04 18:21:15 +08:00
robot.js new, minimalist layout 2025-06-24 13:21:04 +08:00
sensor.js new, minimalist layout 2025-06-24 13:21:04 +08:00
style.css added objectives to first robot lesson, locked compile button while executing, game world resets on compile & run 2025-07-04 15:50:06 +08:00
todo.md implemented monacoEditor to make text editor much more advanced, rearranged screen elements 2025-03-30 22:10:40 +08:00

readme.md

import robot import time

robot.move(0.00006) while True: if robot.get_sensors()[0]["hitpoint"]["x"] is not None: robot.turn(0.001) elif robot.get_sensors()[1]["hitpoint"]["x"] is not None: robot.turn(-0.001) else: robot.turn(0) time.sleep(0.1)

import robot import time

robot.move(0.00006) while True: left = robot.get_sensors()[0]["distance"] right = robot.get_sensors()[1]["distance"] print(str(int(left)) + "\t" + str(int(right))) if left < 55: robot.turn(0.01) elif right < 55: robot.turn(-0.01) else: robot.turn(0) time.sleep(0.1)

import time import robot

robot.move(1) time.sleep(1.6) robot.move(0) robot.turn(1) time.sleep(2.2) robot.turn(0) robot.move(1)