def main(fps): aworld.grid = viz.getReading(ws) asnail.isLift = rpi.getInput() asnail.move() if(checkCollision()): return False #check power-up rpi.changeSpeed(aworld.speed) rpi.changeDir(aworld.direction) rpi.moveTo(asnail.location) time.sleep(1/fps) return True
def beDead(): rpi.changeSpeed(0)