For by
= 1 To 20 ' initialize begin: ' MAIN LOOP
x = 0: y = 0 ' get move
For by
= 1 To 21 ' check if move is valid tx = bx + x: ty = by + y
d = b(ty, tx)
moves = moves + 1 ' make the move
v1 = 1: v2 = 21: v3 = 1: v4 = 14: v5 = 1
tx = x + bx: ty = y + by
If (tx
> 0) And (ty
> 0) And (tx
< 14) And (ty
< 21) Then b
(y
+ by
, x
+ bx
) = p
b(by, bx) = 0
For by
= 8 To 17 ' check if done