#!/usr/bin/env python3

import bottisota
import bottisota.bot

controller = bottisota.bot.Controller()

controller.syscall_drv(270, bottisota.DRV_SPEED_MAX)
while True:
    x, y, speed, direction = controller.syscall_pos()
    if speed == 0:
        controller.syscall_drv((direction + 90) % 360,
                               bottisota.DRV_SPEED_MAX)
