Exemplo n.º 1
0
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
Exemplo n.º 2
0
def beDead():
    rpi.changeSpeed(0)