home *** CD-ROM | disk | FTP | other *** search
- global gGameBoard, gKounterH, gKounterV, gPosH, gPosV, gPuppeter, singleUndo, gPlaying, gSingleMove, gCompsTurn, gEKountH, gEKountV, gEPuppet, gEMoves, gEWinX, gEWinY, gETrys, gEholdX, gEholdY, gELineH, gELineV, gELineHolder, gELineDirection, gGo4WinV, gGo4WinH, gCheckPLines, gNuLine, gEBalls, gNuMapPosX, gNuMapPosY, gKountY, gKountX, gESaveLength, gLineDot, gAdd5Xs, gKount2, gFullBoard, gBlinker, gSpecial
-
- 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"))
- gKounterH = 1
- gKounterV = 1
- gPuppeter = 20
- singleUndo = 1
- gPlaying = 1
- gELineHolder = [0, 0, 0, 0, 0]
- gELineDirection = random(9)
- gCompsTurn = 0
- gEPuppet = 220
- gEMoves = 0
- gETrys = 0
- gEKountV = 1
- gEKountH = 1
- gNuLine = 1
- gEBalls = 1
- gNuMapPosX = 0
- gNuMapPosY = 0
- gKountY = 1
- gKountX = 1
- gESaveLength = 0
- gLineDot = 1
- gEWinX = 1
- gEWinY = 1
- gAdd5Xs = 1
- gFullBoard = 0
- gBlinker = 0
- startTimer()
- end
-
- on enterFrame
- if gPlaying = 1 then
- PlayerMove()
- PlayerWin()
- if gPlaying = 1 then
- EnemyMove()
- EnemyWin()
- 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(me)
- if gGameBoard[gEKountV][gEKountH] = 0 then
- gGameBoard[gEKountV][gEKountH] = 2
- gEMoves = gEMoves + 1
- gCompsTurn = 0
- sprite(gEPuppet).puppet = 1
- sprite(gEPuppet).member = "red bead"
- sprite(gEPuppet).loc = point(55 + (gEKountH * 30), 7 + (gEKountV * 30))
- repeat with gBlinker = 1 to 6
- if (gBlinker mod 2) = 1 then
- startTimer()
- repeat while the timer < 6
- sprite(gEPuppet).visible = 0
- updateStage()
- end repeat
- end if
- if (gBlinker mod 2) = 0 then
- startTimer()
- repeat while the timer < 6
- sprite(gEPuppet).visible = 1
- updateStage()
- end repeat
- end if
- end repeat
- puppetSound(2, "red piece")
- sprite(gEPuppet).visible = 1
- gEPuppet = gEPuppet + 1
- else
- AI_Random()
- gGameBoard[gEKountV][gEKountH] = 2
- gEMoves = gEMoves + 1
- gCompsTurn = 0
- sprite(gEPuppet).puppet = 1
- sprite(gEPuppet).member = "red bead"
- sprite(gEPuppet).loc = point(55 + (gEKountH * 30), 7 + (gEKountV * 30))
- repeat with gBlinker = 1 to 6
- if (gBlinker mod 2) = 1 then
- startTimer()
- repeat while the timer < 6
- sprite(gEPuppet).visible = 0
- updateStage()
- end repeat
- end if
- if (gBlinker mod 2) = 0 then
- startTimer()
- repeat while the timer < 6
- sprite(gEPuppet).visible = 1
- updateStage()
- end repeat
- end if
- end repeat
- puppetSound(2, "red piece")
- sprite(gEPuppet).visible = 1
- gEPuppet = gEPuppet + 1
- end if
- end if
- end
-
- on PlayerWin
- repeat with gKounterV = 1 to 13
- repeat with gKounterH = 1 to 13
- if (gKounterH >= 2) and (gKounterH < 9) then
- if ((gGameBoard[gKounterV][gKounterH - 1] = 0) or (gGameBoard[gKounterV][gKounterH - 1] = 2)) and (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) and ((gGameBoard[gKounterV][gKounterH + 5] = 0) or (gGameBoard[gKounterV][gKounterH + 5] = 2)) 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(55 + ((gKounterH + gAdd5Xs) * 30), 7 + (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) and ((gGameBoard[gKounterV][gKounterH + 5] = 0) or (gGameBoard[gKounterV][gKounterH + 5] = 2)) 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(55 + ((gKounterH + gAdd5Xs) * 30), 7 + (gKounterV * 30))
- end repeat
- gPlaying = 0
- startTimer()
- go(15)
- end if
- else
- if gKounterH = 9 then
- if ((gGameBoard[gKounterV][gKounterH - 1] = 0) or (gGameBoard[gKounterV][gKounterH - 1] = 2)) and (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(55 + ((gKounterH + gAdd5Xs) * 30), 7 + (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 - 1][gKounterH] = 0) or (gGameBoard[gKounterV - 1][gKounterH] = 2)) and (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) and ((gGameBoard[gKounterV + 5][gKounterH] = 0) or (gGameBoard[gKounterV + 5][gKounterH] = 2)) 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(55 + (gKounterH * 30), 7 + ((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) and ((gGameBoard[gKounterV + 5][gKounterH] = 0) or (gGameBoard[gKounterV + 5][gKounterH] = 2)) 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(55 + (gKounterH * 30), 7 + ((gKounterV + gAdd5Xs) * 30))
- end repeat
- gPlaying = 0
- startTimer()
- go(15)
- end if
- else
- if gKounterV = 9 then
- if ((gGameBoard[gKounterV - 1][gKounterH] = 0) or (gGameBoard[gKounterV - 1][gKounterH] = 2)) and (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(55 + (gKounterH * 30), 7 + ((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 - 1][gKounterH - 1] = 0) or (gGameBoard[gKounterV - 1][gKounterH - 1] = 2)) and (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) and ((gGameBoard[gKounterV + 5][gKounterH + 5] = 0) or (gGameBoard[gKounterV + 5][gKounterH + 5] = 2)) 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(55 + ((gKounterH + gAdd5Xs) * 30), 7 + ((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(55 + ((gKounterH + gAdd5Xs) * 30), 7 + ((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 - 1][gKounterH - 1] = 0) or (gGameBoard[gKounterV - 1][gKounterH - 1] = 2)) and (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(55 + ((gKounterH + gAdd5Xs) * 30), 7 + ((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(55 + ((gKounterH + gAdd5Xs) * 30), 7 + ((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 + 1][gKounterH - 1] = 0) or (gGameBoard[gKounterV + 1][gKounterH - 1] = 2)) and (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) and ((gGameBoard[gKounterV - 5][gKounterH + 5] = 0) or (gGameBoard[gKounterV - 5][gKounterH + 5] = 2)) 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(55 + ((gKounterH + gAdd5Xs) * 30), 7 + ((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(55 + ((gKounterH + gAdd5Xs) * 30), 7 + ((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(55 + ((gKounterH + gAdd5Xs) * 30), 7 + ((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 + 1][gKounterH - 1] = 0) or (gGameBoard[gKounterV + 1][gKounterH - 1] = 2)) and (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(55 + ((gKounterH + gAdd5Xs) * 30), 7 + ((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
-