home *** CD-ROM | disk | FTP | other *** search
Wrap
global gGameBoard, gKounterH, gKounterV, gPosH, gPosV, gPuppeter, singleUndo, gPlaying, gSingleMove, gCompsTurn, gEKountH, gEKountV, gEMoves, gEWinX, gEWinY, gETrys, gEholdX, gEholdY, gELineH, gELineV, gELineHolder, gELineDirection, gEatmH, gEatmV, gEraseEnemy, gEraseFixH, gEraseFixV, gCapturedPlayer, gCapturedEnemy, gGo4WinV, gGo4WinH, gCheckPLines, gNuLine, gEBalls, gNuMapPosX, gNuMapPosY, gKountY, gKountX, gESaveLength, gLineDot, gAdd5Xs, gKount2, gFullBoard, gBlinker, gSpecial, gPlayerHasEaten, gEnemyHasEaten on prepareMovie gGameBoard = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] cursor(member("blackBeadCursor")) gPlayerHasEaten = 0 gEnemyHasEaten = 0 gKounterH = 1 gKounterV = 1 gPuppeter = 20 singleUndo = 1 gPlaying = 1 gELineHolder = [0, 0, 0, 0, 0] gELineDirection = random(9) gCompsTurn = 0 gEMoves = 0 gETrys = 0 gEKountV = 1 gEKountH = 1 gNuLine = 1 gEBalls = 1 gNuMapPosX = 0 gNuMapPosY = 0 gKountY = 1 gKountX = 1 gESaveLength = 0 gEatmX = 1 gEatmY = 1 gEraseEnemy = 20 gEraseFixH = 58 gEraseFixV = 8 gCapturedPlayer = 0 gCapturedEnemy = 0 gLineDot = 1 gEWinX = 1 gEWinY = 1 gAdd5Xs = 1 gFullBoard = 0 gBlinker = 0 startTimer() end on enterFrame if gPlaying = 1 then PlayerMove() PlayerWin() EatBallsPlayer() if gPlaying = 1 then EnemyMove() EnemyWin() EatBallsEnemy() end if if ((the mouseH < 55) and (the mouseV < 378)) or (the mouseH > 477) then cursor(member("noNoCursor")) else cursor(member("blackBeadCursor")) end if else cursor(0) end if end on EnemyMove me if gCompsTurn = 1 then cursor(4) gCompsTurn = 0 AI_Block() if gGameBoard[gEKountV][gEKountH] = 0 then gGameBoard[gEKountV][gEKountH] = 2 gEMoves = gEMoves + 1 gCompsTurn = 0 sprite(gPuppeter).puppet = 1 sprite(gPuppeter).member = "red bead" sprite(gPuppeter).loc = point(58 + (gEKountH * 30), 9 + (gEKountV * 30)) repeat with gBlinker = 1 to 6 if (gBlinker mod 2) = 1 then startTimer() repeat while the timer < 6 sprite(gPuppeter).visible = 0 updateStage() end repeat end if if (gBlinker mod 2) = 0 then startTimer() repeat while the timer < 6 sprite(gPuppeter).visible = 1 updateStage() end repeat end if end repeat puppetSound(2, "red piece") sprite(gPuppeter).visible = 1 gPuppeter = gPuppeter + 1 else AI_Random() gGameBoard[gEKountV][gEKountH] = 2 gEMoves = gEMoves + 1 gCompsTurn = 0 sprite(gPuppeter).puppet = 1 sprite(gPuppeter).member = "red bead" sprite(gPuppeter).loc = point(58 + (gEKountH * 30), 9 + (gEKountV * 30)) repeat with gBlinker = 1 to 6 if (gBlinker mod 2) = 1 then startTimer() repeat while the timer < 6 sprite(gPuppeter).visible = 0 updateStage() end repeat end if if (gBlinker mod 2) = 0 then startTimer() repeat while the timer < 6 sprite(gPuppeter).visible = 1 updateStage() end repeat end if end repeat puppetSound(2, "red piece") sprite(gPuppeter).visible = 1 gPuppeter = gPuppeter + 1 end if end if end on PlayerWin if gCapturedPlayer >= 10 then gPlaying = 0 startTimer() go(15) end if repeat with gKounterV = 1 to 13 repeat with gKounterH = 1 to 13 if (gKounterH >= 2) and (gKounterH < 9) then if (gGameBoard[gKounterV][gKounterH] = 1) and (gGameBoard[gKounterV][gKounterH + 1] = 1) and (gGameBoard[gKounterV][gKounterH + 2] = 1) and (gGameBoard[gKounterV][gKounterH + 3] = 1) and (gGameBoard[gKounterV][gKounterH + 4] = 1) then repeat with gAdd5Xs = 0 to 4 sprite(286 + gAdd5Xs).puppet = 1 sprite(286 + gAdd5Xs).member = "black x red trim" sprite(286 + gAdd5Xs).loc = point(58 + ((gKounterH + gAdd5Xs) * 30), 9 + (gKounterV * 30)) end repeat gPlaying = 0 startTimer() go(15) end if else if gKounterH = 1 then if (gGameBoard[gKounterV][gKounterH] = 1) and (gGameBoard[gKounterV][gKounterH + 1] = 1) and (gGameBoard[gKounterV][gKounterH + 2] = 1) and (gGameBoard[gKounterV][gKounterH + 3] = 1) and (gGameBoard[gKounterV][gKounterH + 4] = 1) then repeat with gAdd5Xs = 0 to 4 sprite(286 + gAdd5Xs).puppet = 1 sprite(286 + gAdd5Xs).member = "black x red trim" sprite(286 + gAdd5Xs).loc = point(58 + ((gKounterH + gAdd5Xs) * 30), 9 + (gKounterV * 30)) end repeat gPlaying = 0 startTimer() go(15) end if else if gKounterH = 9 then if (gGameBoard[gKounterV][gKounterH] = 1) and (gGameBoard[gKounterV][gKounterH + 1] = 1) and (gGameBoard[gKounterV][gKounterH + 2] = 1) and (gGameBoard[gKounterV][gKounterH + 3] = 1) and (gGameBoard[gKounterV][gKounterH + 4] = 1) then repeat with gAdd5Xs = 0 to 4 sprite(286 + gAdd5Xs).puppet = 1 sprite(286 + gAdd5Xs).member = "black x red trim" sprite(286 + gAdd5Xs).loc = point(58 + ((gKounterH + gAdd5Xs) * 30), 9 + (gKounterV * 30)) end repeat gPlaying = 0 startTimer() go(15) end if end if end if end if if (gKounterV >= 2) and (gKounterV < 9) then if (gGameBoard[gKounterV][gKounterH] = 1) and (gGameBoard[gKounterV + 1][gKounterH] = 1) and (gGameBoard[gKounterV + 2][gKounterH] = 1) and (gGameBoard[gKounterV + 3][gKounterH] = 1) and (gGameBoard[gKounterV + 4][gKounterH] = 1) then repeat with gAdd5Xs = 0 to 4 sprite(286 + gAdd5Xs).puppet = 1 sprite(286 + gAdd5Xs).member = "black x red trim" sprite(286 + gAdd5Xs).loc = point(58 + (gKounterH * 30), 9 + ((gKounterV + gAdd5Xs) * 30)) end repeat gPlaying = 0 startTimer() go(15) end if else if gKounterV = 1 then if (gGameBoard[gKounterV][gKounterH] = 1) and (gGameBoard[gKounterV + 1][gKounterH] = 1) and (gGameBoard[gKounterV + 2][gKounterH] = 1) and (gGameBoard[gKounterV + 3][gKounterH] = 1) and (gGameBoard[gKounterV + 4][gKounterH] = 1) then repeat with gAdd5Xs = 0 to 4 sprite(286 + gAdd5Xs).puppet = 1 sprite(286 + gAdd5Xs).member = "black x red trim" sprite(286 + gAdd5Xs).loc = point(58 + (gKounterH * 30), 9 + ((gKounterV + gAdd5Xs) * 30)) end repeat gPlaying = 0 startTimer() go(15) end if else if gKounterV = 9 then if (gGameBoard[gKounterV][gKounterH] = 1) and (gGameBoard[gKounterV + 1][gKounterH] = 1) and (gGameBoard[gKounterV + 2][gKounterH] = 1) and (gGameBoard[gKounterV + 3][gKounterH] = 1) and (gGameBoard[gKounterV + 4][gKounterH] = 1) then repeat with gAdd5Xs = 0 to 4 sprite(286 + gAdd5Xs).puppet = 1 sprite(286 + gAdd5Xs).member = "black x red trim" sprite(286 + gAdd5Xs).loc = point(58 + (gKounterH * 30), 9 + ((gKounterV + gAdd5Xs) * 30)) end repeat gPlaying = 0 startTimer() go(15) end if end if end if end if if (gKounterV >= 2) and (gKounterV < 9) and ((gKounterH >= 2) and (gKounterH < 9)) then if (gGameBoard[gKounterV][gKounterH] = 1) and (gGameBoard[gKounterV + 1][gKounterH + 1] = 1) and (gGameBoard[gKounterV + 2][gKounterH + 2] = 1) and (gGameBoard[gKounterV + 3][gKounterH + 3] = 1) and (gGameBoard[gKounterV + 4][gKounterH + 4] = 1) then repeat with gAdd5Xs = 0 to 4 sprite(286 + gAdd5Xs).puppet = 1 sprite(286 + gAdd5Xs).member = "black x red trim" sprite(286 + gAdd5Xs).loc = point(58 + ((gKounterH + gAdd5Xs) * 30), 9 + ((gKounterV + gAdd5Xs) * 30)) end repeat gPlaying = 0 startTimer() go(15) end if else if (gKounterV = 1) and (gKounterH <= 9) then if (gGameBoard[gKounterV][gKounterH] = 1) and (gGameBoard[gKounterV + 1][gKounterH + 1] = 1) and (gGameBoard[gKounterV + 2][gKounterH + 2] = 1) and (gGameBoard[gKounterV + 3][gKounterH + 3] = 1) and (gGameBoard[gKounterV + 4][gKounterH + 4] = 1) then repeat with gAdd5Xs = 0 to 4 sprite(286 + gAdd5Xs).puppet = 1 sprite(286 + gAdd5Xs).member = "black x red trim" sprite(286 + gAdd5Xs).loc = point(58 + ((gKounterH + gAdd5Xs) * 30), 9 + ((gKounterV + gAdd5Xs) * 30)) end repeat gPlaying = 0 startTimer() go(15) end if else if (gKounterV = 9) and (gKounterH >= 2) and (gKounterH <= 9) then if (gGameBoard[gKounterV][gKounterH] = 1) and (gGameBoard[gKounterV + 1][gKounterH + 1] = 1) and (gGameBoard[gKounterV + 2][gKounterH + 2] = 1) and (gGameBoard[gKounterV + 3][gKounterH + 3] = 1) and (gGameBoard[gKounterV + 4][gKounterH + 4] = 1) then repeat with gAdd5Xs = 0 to 4 sprite(286 + gAdd5Xs).puppet = 1 sprite(286 + gAdd5Xs).member = "black x red trim" sprite(286 + gAdd5Xs).loc = point(58 + ((gKounterH + gAdd5Xs) * 30), 9 + ((gKounterV + gAdd5Xs) * 30)) end repeat gPlaying = 0 startTimer() go(15) end if else if (gKounterV = 9) and (gKounterH = 1) then if (gGameBoard[gKounterV][gKounterH] = 1) and (gGameBoard[gKounterV + 1][gKounterH + 1] = 1) and (gGameBoard[gKounterV + 2][gKounterH + 2] = 1) and (gGameBoard[gKounterV + 3][gKounterH + 3] = 1) and (gGameBoard[gKounterV + 4][gKounterH + 4] = 1) then repeat with gAdd5Xs = 0 to 4 sprite(286 + gAdd5Xs).puppet = 1 sprite(286 + gAdd5Xs).member = "black x red trim" sprite(286 + gAdd5Xs).loc = point(58 + ((gKounterH + gAdd5Xs) * 30), 9 + ((gKounterV + gAdd5Xs) * 30)) end repeat gPlaying = 0 startTimer() go(15) end if end if end if end if end if if (gKounterV > 5) and (gKounterV < 13) and ((gKounterH >= 2) and (gKounterH < 9)) then if (gGameBoard[gKounterV][gKounterH] = 1) and (gGameBoard[gKounterV - 1][gKounterH + 1] = 1) and (gGameBoard[gKounterV - 2][gKounterH + 2] = 1) and (gGameBoard[gKounterV - 3][gKounterH + 3] = 1) and (gGameBoard[gKounterV - 4][gKounterH + 4] = 1) then repeat with gAdd5Xs = 0 to 4 sprite(286 + gAdd5Xs).puppet = 1 sprite(286 + gAdd5Xs).member = "black x red trim" sprite(286 + gAdd5Xs).loc = point(58 + ((gKounterH + gAdd5Xs) * 30), 9 + ((gKounterV - gAdd5Xs) * 30)) end repeat gPlaying = 0 startTimer() go(15) end if else if (gKounterV = 13) and (gKounterH <= 9) then if (gGameBoard[gKounterV][gKounterH] = 1) and (gGameBoard[gKounterV - 1][gKounterH + 1] = 1) and (gGameBoard[gKounterV - 2][gKounterH + 2] = 1) and (gGameBoard[gKounterV - 3][gKounterH + 3] = 1) and (gGameBoard[gKounterV - 4][gKounterH + 4] = 1) then repeat with gAdd5Xs = 0 to 4 sprite(286 + gAdd5Xs).puppet = 1 sprite(286 + gAdd5Xs).member = "black x red trim" sprite(286 + gAdd5Xs).loc = point(58 + ((gKounterH + gAdd5Xs) * 30), 9 + ((gKounterV - gAdd5Xs) * 30)) end repeat gPlaying = 0 startTimer() go(15) end if else if (gKounterV = 5) and (gKounterH = 1) then if (gGameBoard[gKounterV][gKounterH] = 1) and (gGameBoard[gKounterV - 1][gKounterH + 1] = 1) and (gGameBoard[gKounterV - 2][gKounterH + 2] = 1) and (gGameBoard[gKounterV - 3][gKounterH + 3] = 1) and (gGameBoard[gKounterV - 4][gKounterH + 4] = 1) then repeat with gAdd5Xs = 0 to 4 sprite(286 + gAdd5Xs).puppet = 1 sprite(286 + gAdd5Xs).member = "black x red trim" sprite(286 + gAdd5Xs).loc = point(58 + ((gKounterH + gAdd5Xs) * 30), 9 + ((gKounterV - gAdd5Xs) * 30)) end repeat gPlaying = 0 startTimer() go(15) end if else if (gKounterV = 5) and (gKounterH >= 2) and (gKounterH <= 9) then if (gGameBoard[gKounterV][gKounterH] = 1) and (gGameBoard[gKounterV - 1][gKounterH + 1] = 1) and (gGameBoard[gKounterV - 2][gKounterH + 2] = 1) and (gGameBoard[gKounterV - 3][gKounterH + 3] = 1) and (gGameBoard[gKounterV - 4][gKounterH + 4] = 1) then repeat with gAdd5Xs = 0 to 4 sprite(286 + gAdd5Xs).puppet = 1 sprite(286 + gAdd5Xs).member = "black x red trim" sprite(286 + gAdd5Xs).loc = point(58 + ((gKounterH + gAdd5Xs) * 30), 9 + ((gKounterV - gAdd5Xs) * 30)) end repeat gPlaying = 0 startTimer() go(15) end if end if end if end if end if if gGameBoard[gKounterV][gKounterH] <> 0 then gFullBoard = gFullBoard + 1 end if if gFullBoard >= 169 then gFullBoard = 0 gPlaying = 0 go(34) put "3" end if end repeat end repeat gFullBoard = 0 end