if (the mouseH < (59 + 12 + (8 * 26))) and (the mouseH > (59 - 12 + (8 * 26))) and (the mouseV > (10 - 12 + (8 * 26))) and (the mouseV < (10 + 12 + (8 * 26))) then
if (gKounterV >= 6) and (gKounterV <= 10) and ((gKounterH >= 6) and (gKounterH <= 10)) then
next repeat
end if
if (the mouseH < (59 + 12 + (gKounterH * 26))) and (the mouseH > (59 - 12 + (gKounterH * 26))) and (the mouseV > (10 - 12 + (gKounterV * 26))) and (the mouseV < (10 + 12 + (gKounterV * 26))) then
if (the mouseH < (59 + 12 + (gKounterH * 26))) and (the mouseH > (59 - 12 + (gKounterH * 26))) and (the mouseV > (10 - 12 + (gKounterV * 26))) and (the mouseV < (10 + 12 + (gKounterV * 26))) then
if (gGameBoard[gGo4WinV][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV][gGo4WinH + 2] <> 2) and (gGameBoard[gGo4WinV][gGo4WinH + 2] = 0) then
gBalls = 2
end if
if (gGameBoard[gGo4WinV][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV][gGo4WinH + 2] = 1) and (gGameBoard[gGo4WinV][gGo4WinH + 3] = 0) then
gBalls = 3
end if
if (gGameBoard[gGo4WinV][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV][gGo4WinH + 2] = 1) and (gGameBoard[gGo4WinV][gGo4WinH + 3] = 1) and (gGameBoard[gGo4WinV][gGo4WinH + 4] = 0) then
gBalls = 4
end if
if (gGameBoard[gGo4WinV][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV][gGo4WinH + 2] = 0) and (gGameBoard[gGo4WinV][gGo4WinH + 3] = 1) and (gGameBoard[gGo4WinV][gGo4WinH + 4] = 1) then
gBalls = 4
gSpecial = 2
end if
if (gGameBoard[gGo4WinV][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV][gGo4WinH + 2] = 0) and (gGameBoard[gGo4WinV][gGo4WinH + 3] = 1) then
gBalls = 3
gSpecial = 1
end if
else
if gGo4WinH = 12 then
if (gGameBoard[gGo4WinV][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV][gGo4WinH + 2] <> 2) and (gGameBoard[gGo4WinV][gGo4WinH + 2] = 0) then
gBalls = 2
if (gGameBoard[gGo4WinV][gGo4WinH + 2] = 1) and (gGameBoard[gGo4WinV][gGo4WinH + 3] <> 2) and (gGameBoard[gGo4WinV][gGo4WinH + 3] = 0) then
gBalls = 3
end if
end if
else
if gGo4WinH = 13 then
if (gGameBoard[gGo4WinV][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV][gGo4WinH + 2] <> 2) and (gGameBoard[gGo4WinV][gGo4WinH + 2] = 0) then
gBalls = 2
end if
end if
end if
end if
if gBalls >= gSaveLength then
gNuMapPosY = gGo4WinV
gNuMapPosX = gGo4WinH + (gBalls - gSpecial)
gSaveLength = gBalls
gEKountV = gNuMapPosY
gEKountH = gNuMapPosX
end if
gBalls = 1
gSpecial = 0
if (gGo4WinH <= 11) and (gGo4WinV >= 5) then
if (gGameBoard[gGo4WinV - 1][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH + 2] <> 2) and (gGameBoard[gGo4WinV - 2][gGo4WinH + 2] = 0) then
gBalls = 2
end if
if (gGameBoard[gGo4WinV - 1][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH + 2] = 1) and (gGameBoard[gGo4WinV - 3][gGo4WinH + 3] = 0) then
gBalls = 3
end if
if (gGameBoard[gGo4WinV - 1][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH + 2] = 1) and (gGameBoard[gGo4WinV - 3][gGo4WinH + 3] = 1) and (gGameBoard[gGo4WinV - 4][gGo4WinH + 4] = 0) then
gBalls = 4
end if
if (gGameBoard[gGo4WinV - 1][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH + 2] = 0) and (gGameBoard[gGo4WinV - 3][gGo4WinH + 3] = 1) and (gGameBoard[gGo4WinV - 4][gGo4WinH + 4] = 1) then
gBalls = 4
gSpecial = 2
put "special"
end if
if (gGameBoard[gGo4WinV - 1][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH + 2] = 0) and (gGameBoard[gGo4WinV - 3][gGo4WinH + 3] = 1) then
gBalls = 3
gSpecial = 1
end if
else
if (gGo4WinH = 12) and (gGo4WinV = 4) then
if (gGameBoard[gGo4WinV - 1][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH + 2] <> 2) and (gGameBoard[gGo4WinV - 2][gGo4WinH + 2] = 0) then
gBalls = 2
if (gGameBoard[gGo4WinV - 2][gGo4WinH + 2] = 1) and (gGameBoard[gGo4WinV - 3][gGo4WinH + 3] <> 2) and (gGameBoard[gGo4WinV - 3][gGo4WinH + 3] = 0) then
gBalls = 3
end if
end if
else
if (gGo4WinH = 13) and (gGo4WinV = 3) then
if (gGameBoard[gGo4WinV - 1][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH + 2] <> 2) and (gGameBoard[gGo4WinV - 2][gGo4WinH + 2] = 0) then
gBalls = 2
end if
end if
end if
end if
if gBalls >= gSaveLength then
gNuMapPosY = gGo4WinV - (gBalls - gSpecial)
gNuMapPosX = gGo4WinH + (gBalls - gSpecial)
gSaveLength = gBalls
gEKountV = gNuMapPosY
gEKountH = gNuMapPosX
end if
gBalls = 1
gSpecial = 0
if gGo4WinV >= 5 then
if (gGameBoard[gGo4WinV - 1][gGo4WinH] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH] <> 2) and (gGameBoard[gGo4WinV - 2][gGo4WinH] = 0) then
gBalls = 2
end if
if (gGameBoard[gGo4WinV - 1][gGo4WinH] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH] = 1) and (gGameBoard[gGo4WinV - 3][gGo4WinH] = 0) then
gBalls = 3
end if
if (gGameBoard[gGo4WinV - 1][gGo4WinH] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH] = 1) and (gGameBoard[gGo4WinV - 3][gGo4WinH] = 1) and (gGameBoard[gGo4WinV - 4][gGo4WinH] = 0) then
gBalls = 4
end if
if (gGameBoard[gGo4WinV - 1][gGo4WinH] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH] = 0) and (gGameBoard[gGo4WinV - 3][gGo4WinH] = 1) and (gGameBoard[gGo4WinV - 4][gGo4WinH] = 1) then
gBalls = 4
gSpecial = 2
put "special"
end if
if (gGameBoard[gGo4WinV - 1][gGo4WinH] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH] = 0) and (gGameBoard[gGo4WinV - 3][gGo4WinH] = 1) then
gBalls = 3
gSpecial = 1
end if
else
if gGo4WinV = 4 then
if (gGameBoard[gGo4WinV - 1][gGo4WinH] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH] <> 2) and (gGameBoard[gGo4WinV - 2][gGo4WinH] = 0) then
gBalls = 2
if (gGameBoard[gGo4WinV - 2][gGo4WinH] = 1) and (gGameBoard[gGo4WinV - 3][gGo4WinH] <> 2) and (gGameBoard[gGo4WinV - 3][gGo4WinH] = 0) then
gBalls = 3
end if
end if
else
if gGo4WinV = 3 then
if (gGameBoard[gGo4WinV - 1][gGo4WinH] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH] <> 2) and (gGameBoard[gGo4WinV - 2][gGo4WinH] = 0) then
gBalls = 2
end if
end if
end if
end if
if gBalls >= gSaveLength then
gNuMapPosY = gGo4WinV - (gBalls - gSpecial)
gNuMapPosX = gGo4WinH
gSaveLength = gBalls
gEKountV = gNuMapPosY
gEKountH = gNuMapPosX
end if
gBalls = 1
gSpecial = 0
if (gGo4WinH >= 5) and (gGo4WinV >= 5) then
if (gGameBoard[gGo4WinV - 1][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH - 2] <> 2) and (gGameBoard[gGo4WinV - 2][gGo4WinH - 2] = 0) then
gBalls = 2
end if
if (gGameBoard[gGo4WinV - 1][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH - 2] = 1) and (gGameBoard[gGo4WinV - 3][gGo4WinH - 3] = 0) then
gBalls = 3
end if
if (gGameBoard[gGo4WinV - 1][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH - 2] = 1) and (gGameBoard[gGo4WinV - 3][gGo4WinH - 3] = 1) and (gGameBoard[gGo4WinV - 4][gGo4WinH - 4] = 0) then
gBalls = 4
end if
if (gGameBoard[gGo4WinV - 1][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH - 2] = 0) and (gGameBoard[gGo4WinV - 3][gGo4WinH - 3] = 1) and (gGameBoard[gGo4WinV - 4][gGo4WinH - 4] = 1) then
gBalls = 4
gSpecial = 2
put "special"
end if
if (gGameBoard[gGo4WinV - 1][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH - 2] = 0) and (gGameBoard[gGo4WinV - 3][gGo4WinH - 3] = 1) then
gBalls = 3
gSpecial = 1
end if
else
if (gGo4WinH = 4) and (gGo4WinV = 4) then
if (gGameBoard[gGo4WinV - 1][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH - 2] <> 2) and (gGameBoard[gGo4WinV - 2][gGo4WinH - 2] = 0) then
gBalls = 2
if (gGameBoard[gGo4WinV - 2][gGo4WinH - 2] = 1) and (gGameBoard[gGo4WinV - 3][gGo4WinH - 3] <> 2) and (gGameBoard[gGo4WinV - 3][gGo4WinH - 3] = 0) then
gBalls = 3
end if
end if
else
if (gGo4WinH = 3) and (gGo4WinV = 3) then
if (gGameBoard[gGo4WinV - 1][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV - 2][gGo4WinH - 2] <> 2) and (gGameBoard[gGo4WinV - 2][gGo4WinH - 2] = 0) then
gBalls = 2
end if
end if
end if
end if
if gBalls >= gSaveLength then
gNuMapPosY = gGo4WinV - (gBalls - gSpecial)
gNuMapPosX = gGo4WinH - (gBalls - gSpecial)
gSaveLength = gBalls
gEKountV = gNuMapPosY
gEKountH = gNuMapPosX
end if
gBalls = 1
gSpecial = 0
if gGo4WinH >= 5 then
if (gGameBoard[gGo4WinV][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV][gGo4WinH - 2] <> 2) and (gGameBoard[gGo4WinV][gGo4WinH - 2] = 0) then
gBalls = 2
end if
if (gGameBoard[gGo4WinV][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV][gGo4WinH - 2] = 1) and (gGameBoard[gGo4WinV][gGo4WinH - 3] = 0) then
gBalls = 3
end if
if (gGameBoard[gGo4WinV][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV][gGo4WinH - 2] = 1) and (gGameBoard[gGo4WinV][gGo4WinH - 3] = 1) and (gGameBoard[gGo4WinV][gGo4WinH - 4] = 0) then
gBalls = 4
end if
if (gGameBoard[gGo4WinV][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV][gGo4WinH - 2] = 0) and (gGameBoard[gGo4WinV][gGo4WinH - 3] = 1) and (gGameBoard[gGo4WinV][gGo4WinH - 4] = 1) then
gBalls = 4
gSpecial = 2
put "special"
end if
if (gGameBoard[gGo4WinV][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV][gGo4WinH - 2] = 0) and (gGameBoard[gGo4WinV][gGo4WinH - 3] = 1) then
gBalls = 3
gSpecial = 1
end if
else
if gGo4WinH = 4 then
if (gGameBoard[gGo4WinV][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV][gGo4WinH - 2] <> 2) and (gGameBoard[gGo4WinV][gGo4WinH - 2] = 0) then
gBalls = 2
if (gGameBoard[gGo4WinV][gGo4WinH - 2] = 1) and (gGameBoard[gGo4WinV][gGo4WinH - 3] <> 2) and (gGameBoard[gGo4WinV][gGo4WinH - 3] = 0) then
gBalls = 3
end if
end if
else
if gGo4WinH = 3 then
if (gGameBoard[gGo4WinV][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV][gGo4WinH - 2] <> 2) and (gGameBoard[gGo4WinV][gGo4WinH - 2] = 0) then
gBalls = 2
end if
end if
end if
end if
if gBalls >= gSaveLength then
gNuMapPosY = gGo4WinV
gNuMapPosX = gGo4WinH - (gBalls - gSpecial)
gSaveLength = gBalls
gEKountV = gNuMapPosY
gEKountH = gNuMapPosX
end if
gBalls = 1
gSpecial = 0
if (gGo4WinH >= 5) and (gGo4WinV <= 11) then
if (gGameBoard[gGo4WinV + 1][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH - 2] <> 2) and (gGameBoard[gGo4WinV + 2][gGo4WinH - 2] = 0) then
gBalls = 2
end if
if (gGameBoard[gGo4WinV + 1][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH - 2] = 1) and (gGameBoard[gGo4WinV + 3][gGo4WinH - 3] = 0) then
gBalls = 3
end if
if (gGameBoard[gGo4WinV + 1][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH - 2] = 1) and (gGameBoard[gGo4WinV + 3][gGo4WinH - 3] = 1) and (gGameBoard[gGo4WinV + 4][gGo4WinH - 4] = 0) then
gBalls = 4
end if
if (gGameBoard[gGo4WinV + 1][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH - 2] = 0) and (gGameBoard[gGo4WinV + 3][gGo4WinH - 3] = 1) and (gGameBoard[gGo4WinV + 4][gGo4WinH - 4] = 1) then
gBalls = 4
gSpecial = 2
put "special"
end if
if (gGameBoard[gGo4WinV + 1][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH - 2] = 0) and (gGameBoard[gGo4WinV + 3][gGo4WinH - 3] = 1) then
gBalls = 3
gSpecial = 1
end if
else
if (gGo4WinH = 4) and (gGo4WinV = 12) then
if (gGameBoard[gGo4WinV + 1][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH - 2] <> 2) and (gGameBoard[gGo4WinV + 2][gGo4WinH - 2] = 0) then
gBalls = 2
if (gGameBoard[gGo4WinV + 2][gGo4WinH - 2] = 1) and (gGameBoard[gGo4WinV + 3][gGo4WinH - 3] <> 2) and (gGameBoard[gGo4WinV + 3][gGo4WinH - 3] = 0) then
gBalls = 3
end if
end if
else
if (gGo4WinH = 3) and (gGo4WinV = 13) then
if (gGameBoard[gGo4WinV + 1][gGo4WinH - 1] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH - 2] <> 2) and (gGameBoard[gGo4WinV + 2][gGo4WinH - 2] = 0) then
gBalls = 2
end if
end if
end if
end if
if gBalls >= gSaveLength then
gNuMapPosY = gGo4WinV + (gBalls - gSpecial)
gNuMapPosX = gGo4WinH - (gBalls - gSpecial)
gSaveLength = gBalls
gEKountV = gNuMapPosY
gEKountH = gNuMapPosX
end if
gBalls = 1
gSpecial = 0
if gGo4WinV <= 11 then
if (gGameBoard[gGo4WinV + 1][gGo4WinH] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH] <> 2) and (gGameBoard[gGo4WinV + 2][gGo4WinH] = 0) then
gBalls = 2
end if
if (gGameBoard[gGo4WinV + 1][gGo4WinH] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH] = 1) and (gGameBoard[gGo4WinV + 3][gGo4WinH] = 0) then
gBalls = 3
end if
if (gGameBoard[gGo4WinV + 1][gGo4WinH] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH] = 1) and (gGameBoard[gGo4WinV + 3][gGo4WinH] = 1) and (gGameBoard[gGo4WinV + 4][gGo4WinH] = 0) then
gBalls = 4
end if
if (gGameBoard[gGo4WinV + 1][gGo4WinH] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH] = 0) and (gGameBoard[gGo4WinV + 3][gGo4WinH] = 1) and (gGameBoard[gGo4WinV + 4][gGo4WinH] = 1) then
gBalls = 4
gSpecial = 2
put "special"
end if
if (gGameBoard[gGo4WinV + 1][gGo4WinH] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH] = 0) and (gGameBoard[gGo4WinV + 3][gGo4WinH] = 1) then
gBalls = 3
gSpecial = 1
end if
else
if gGo4WinV = 12 then
if (gGameBoard[gGo4WinV + 1][gGo4WinH] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH] <> 2) and (gGameBoard[gGo4WinV + 2][gGo4WinH] = 0) then
gBalls = 2
if (gGameBoard[gGo4WinV + 2][gGo4WinH] = 1) and (gGameBoard[gGo4WinV + 3][gGo4WinH] <> 2) and (gGameBoard[gGo4WinV + 3][gGo4WinH] = 0) then
gBalls = 3
end if
end if
else
if gGo4WinV = 13 then
if (gGameBoard[gGo4WinV + 1][gGo4WinH] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH] <> 2) and (gGameBoard[gGo4WinV + 2][gGo4WinH] = 0) then
gBalls = 2
end if
end if
end if
end if
if gBalls >= gSaveLength then
gNuMapPosY = gGo4WinV + (gBalls - gSpecial)
gNuMapPosX = gGo4WinH
gSaveLength = gBalls
gEKountV = gNuMapPosY
gEKountH = gNuMapPosX
end if
gBalls = 1
gSpecial = 0
if (gGo4WinH <= 11) and (gGo4WinV <= 11) then
if (gGameBoard[gGo4WinV + 1][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH + 2] <> 2) and (gGameBoard[gGo4WinV + 2][gGo4WinH + 2] = 0) then
gBalls = 2
end if
if (gGameBoard[gGo4WinV + 1][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH + 2] = 1) and (gGameBoard[gGo4WinV + 3][gGo4WinH + 3] = 0) then
gBalls = 3
end if
if (gGameBoard[gGo4WinV + 1][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH + 2] = 1) and (gGameBoard[gGo4WinV + 3][gGo4WinH + 3] = 1) and (gGameBoard[gGo4WinV + 4][gGo4WinH + 4] = 0) then
gBalls = 4
end if
if (gGameBoard[gGo4WinV + 1][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH + 2] = 0) and (gGameBoard[gGo4WinV + 3][gGo4WinH + 3] = 1) and (gGameBoard[gGo4WinV + 4][gGo4WinH + 4] = 1) then
gBalls = 4
gSpecial = 2
put "special"
end if
if (gGameBoard[gGo4WinV + 1][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH + 2] = 0) and (gGameBoard[gGo4WinV + 3][gGo4WinH + 3] = 1) then
gBalls = 3
gSpecial = 1
end if
else
if (gGo4WinH = 12) and (gGo4WinV = 12) then
if (gGameBoard[gGo4WinV + 1][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH + 2] <> 2) and (gGameBoard[gGo4WinV + 2][gGo4WinH + 2] = 0) then
gBalls = 2
if (gGameBoard[gGo4WinV + 2][gGo4WinH + 2] = 1) and (gGameBoard[gGo4WinV + 3][gGo4WinH + 3] <> 2) and (gGameBoard[gGo4WinV + 3][gGo4WinH + 3] = 0) then
gBalls = 3
end if
end if
else
if (gGo4WinH = 13) and (gGo4WinV = 13) then
if (gGameBoard[gGo4WinV + 1][gGo4WinH + 1] = 1) and (gGameBoard[gGo4WinV + 2][gGo4WinH + 2] <> 2) and (gGameBoard[gGo4WinV + 2][gGo4WinH + 2] = 0) then