Go to file
Jake 6051be2f61 robot sensor values now available in simulation, line sensors return distance, await is automatically inserted before sleep commands 2025-03-30 21:31:04 +08:00
game.js robot sensor values now available in simulation, line sensors return distance, await is automatically inserted before sleep commands 2025-03-30 21:31:04 +08:00
gameworld.js robot sensor values now available in simulation, line sensors return distance, await is automatically inserted before sleep commands 2025-03-30 21:31:04 +08:00
index.html implementing matter.js, added obstacles and tank, need to convert to rigidbody driven rather than just moving pixels for movement 2025-03-27 18:58:27 +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 robot sensor values now available in simulation, line sensors return distance, await is automatically inserted before sleep commands 2025-03-30 21:31:04 +08:00
readme.md robot sensor values now available in simulation, line sensors return distance, await is automatically inserted before sleep commands 2025-03-30 21:31:04 +08:00
robot.js robot sensor values now available in simulation, line sensors return distance, await is automatically inserted before sleep commands 2025-03-30 21:31:04 +08:00
sensor.js robot sensor values now available in simulation, line sensors return distance, await is automatically inserted before sleep commands 2025-03-30 21:31:04 +08:00
todo.md robot sensor values now available in simulation, line sensors return distance, await is automatically inserted before sleep commands 2025-03-30 21:31:04 +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) await time.sleep(0.1)