if ((gEnemyY1 = 7) and (gEnemyX1 < 7)) or ((gEnemyY1 = 6) and (gEnemyX1 < 6)) or ((gEnemyY1 = 5) and (gEnemyX1 < 5)) or ((gEnemyY1 = 4) and (gEnemyX1 < 4)) or ((gEnemyY1 = 3) and (gEnemyX1 < 3)) or ((gEnemyY1 = 2) and (gEnemyX1 < 2)) then
if gEnemyY1 = 7 then
if gLineFlip6[gEnemyX1] = 9 then
EnemyUpRight()
pNoChoice = 0
exit
end if
else
if gEnemyY1 = 6 then
if gLineFlip5[gEnemyX1] = 9 then
EnemyUpRight()
pNoChoice = 0
exit
end if
else
if gEnemyY1 = 5 then
if gLineFlip4[gEnemyX1] = 9 then
EnemyUpRight()
pNoChoice = 0
exit
end if
else
if gEnemyY1 = 4 then
if gLineFlip3[gEnemyX1] = 9 then
EnemyUpRight()
pNoChoice = 0
exit
end if
else
if gEnemyY1 = 3 then
if gLineFlip2[gEnemyX1] = 9 then
EnemyUpRight()
pNoChoice = 0
exit
end if
else
if gEnemyY1 = 2 then
if gLineFlip1[gEnemyX1] = 9 then
EnemyUpRight()
pNoChoice = 0
exit
end if
end if
end if
end if
end if
end if
end if
else
if gEnemyY1 < 7 then
if gEnemyY1 = 6 then
if gLineFlip7[gEnemyX1] = 9 then
EnemyDownLeft()
pNoChoice = 0
exit
end if
else
if gEnemyY1 = 5 then
if gLineFlip6[gEnemyX1] = 9 then
EnemyDownLeft()
pNoChoice = 0
exit
end if
else
if gEnemyY1 = 4 then
if gLineFlip5[gEnemyX1] = 9 then
EnemyDownLeft()
pNoChoice = 0
exit
end if
else
if gEnemyY1 = 3 then
if gLineFlip4[gEnemyX1] = 9 then
EnemyDownLeft()
pNoChoice = 0
exit
end if
else
if gEnemyY1 = 2 then
if gLineFlip3[gEnemyX1] = 9 then
EnemyDownLeft()
pNoChoice = 0
exit
end if
else
if gEnemyY1 = 1 then
if gLineFlip2[gEnemyX1] = 9 then
EnemyDownLeft()
pNoChoice = 0
exit
end if
end if
end if
end if
end if
end if
end if
else
if gEnemyY1 < 7 then
if gEnemyY1 = 6 then
if gLineFlip7[gEnemyX1 + 1] = 9 then
EnemyDownLeft()
pNoChoice = 0
exit
end if
else
if gEnemyY1 = 5 then
if gLineFlip6[gEnemyX1 + 1] = 9 then
EnemyDownLeft()
pNoChoice = 0
exit
end if
else
if gEnemyY1 = 4 then
if gLineFlip5[gEnemyX1 + 1] = 9 then
EnemyDownLeft()
pNoChoice = 0
exit
end if
else
if gEnemyY1 = 3 then
if gLineFlip4[gEnemyX1 + 1] = 9 then
EnemyDownLeft()
pNoChoice = 0
exit
end if
else
if gEnemyY1 = 2 then
if gLineFlip3[gEnemyX1 + 1] = 9 then
EnemyDownLeft()
pNoChoice = 0
exit
end if
else
if gEnemyY1 = 1 then
if gLineFlip2[gEnemyX1 + 1] = 9 then
EnemyDownLeft()
pNoChoice = 0
exit
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
if pNoChoice = 1 then
repeat while gMoveBady = 1
pBadyDirection = random(4)
if pBadyDirection = 1 then
if ((gEnemyY1 = 7) and (gEnemyX1 < 7)) or ((gEnemyY1 = 6) and (gEnemyX1 < 6)) or ((gEnemyY1 = 5) and (gEnemyX1 < 5)) or ((gEnemyY1 = 4) and (gEnemyX1 < 4)) or ((gEnemyY1 = 3) and (gEnemyX1 < 3)) or ((gEnemyY1 = 2) and (gEnemyX1 < 2)) then