Nov-24-2017, 03:17 PM
def nextpos(doska, x, y): size = len(doska) if x < size // 2: if y > 0 and doska[y-1][x] == '*': return x, y-1 else: if y < size-1 and doska[y+1][x] == '*': return x, y+1 if y < size // 2: if x < size-1 and doska[y][x+1] == '*': return x+1, y else: if x > 0 and doska[y][x-1] == '*': return x-1, y return x, yI did it like this , but this function moves with figures counter-clockwise. I tried to make it in clock direction



