Esempio n. 1
0
bot = Bot()

speed = 1


def close():
    bot.stop()
    quit()

while True:
    inp = input_char("wasd controls: ")
    if inp == 'w':
        bot.forward(1)
    elif inp == 's':
        bot.backward(1)
    elif inp == 'q':
        bot.left(1)
    elif inp == 'e':
        bot.right(1)
    elif inp == 'a':
        bot.strafe_left(1)
    elif inp == 'd':
        bot.strafe_right(1)
    elif inp == 'x':
        bot.stop()
    elif inp == 'q':
        close()
    elif inp == 'i':
        bot.inv_test()
    time.sleep(0.5)