Frame 1
fscommand ("showmenu", "false");
Instance of Symbol 5 MovieClip in Frame 2
on (press) {
getURL ("http://www.gametop.com/?utm_source=GreatMahjong&utm_medium=flashGame", "_blank");
}
Instance of Symbol 12 MovieClip in Frame 2
on (press) {
getURL ("http://www.gametop.com/?utm_source=GreatMahjong&utm_medium=flashGame", "_blank");
}
Frame 3
stot = this.getBytesTotal();
sloa = this.getBytesLoaded();
if (stot != 0) {
per = Math.floor((sloa / stot) * 100);
} else {
per = 0;
}
mc_bar.mc._x = mc_bar.mc._width * (-1 + (sloa / stot));
txtPer = String(per) + "%";
if (((sloa >= 1) && (stot >= 1)) && (sloa == stot)) {
gotoAndStop ("menu1");
inMenuFirst();
} else {
gotoAndPlay (2);
}
Frame 9
stop();
Instance of Symbol 204 MovieClip "mc_level" in Frame 9
onClipEvent (load) {
tellTarget (this._parent) {
gameState = 1;
createLevelState = 1;
mc_level._visible = false;
mc_menu._visible = false;
btn_menu._visible = false;
btn_undo._visible = false;
btn_sound._visible = false;
if (!soundFlag) {
btn_sound.gotoAndStop(2);
}
pauseFlag = false;
mc_scores._visible = false;
};
}
onClipEvent (enterFrame) {
this._parent.processGame(this);
}
Symbol 2 MovieClip Frame 1
#initclip 2
function soundOff() {
soundFlag = false;
snd_game.gotoAndStop(3);
}
function soundOn() {
soundFlag = true;
snd_game.gotoAndStop(2);
}
function playSnd(lib_snd) {
s = new Sound(this);
s.attachSound(lib_snd);
s.start();
}
function inMenuFirst() {
snd_menu.gotoAndStop(2);
}
function startClassicGame() {
classicGameFlag = true;
curLevel = 1;
this.gotoAndStop("menu3");
}
function startTimeGame() {
classicGameFlag = false;
curLevel = 1;
this.gotoAndStop("menu3");
}
function startGame() {
snd_menu.gotoAndStop(3);
if (soundFlag) {
snd_game.gotoAndStop(2);
}
this.gotoAndStop("game");
}
function btn_right_pressed() {
curLevel++;
if (curLevel > 20) {
curLevel = 1;
}
mc_levels.gotoAndStop(curLevel);
}
function btn_left_pressed() {
curLevel--;
if (curLevel < 1) {
curLevel = 20;
}
mc_levels.gotoAndStop(curLevel);
}
function sortRandom(a, b) {
return(random(3) - 1);
}
function clearLevelMatrix() {
var _local3;
var _local2;
var _local1;
_local3 = 0;
while (_local3 < nX) {
_local2 = 0;
while (_local2 < nY) {
_local1 = 0;
while (_local1 < nZ) {
lev_arr[_local3][_local2][_local1] = 0;
_local1++;
}
_local2++;
}
_local3++;
}
}
function loadLevel(q, targetMC) {
var _local2;
var _local1;
var _local4 = (nX * nY) * nZ;
var _local5 = Math.max(nX, nY);
var _local3 = getTimer();
_local2 = last_i;
while (_local2 < _local4) {
iX++;
if (iX >= nX) {
iX = 0;
iY++;
if (iY >= nY) {
iY = 0;
iZ++;
}
}
if (q.charAt(_local2) != "1") {
} else {
_local1 = targetMC.attachMovie("lib_card", String(CCard.N), ((iZ * 2000) + ((((nX - 1) - iX) + iY) * _local5)) + Math.min(iX, iY));
CCard.N++;
_local1.iX = iX;
_local1.iY = iY;
_local1.iZ = iZ;
lev_arr[iX][iY][iZ] = _local1;
if ((iX + 1) < nX) {
lev_arr[iX + 1][iY][iZ] = _local1;
}
if ((iY + 1) < nY) {
lev_arr[iX][iY + 1][iZ] = _local1;
}
if (((iX + 1) < nX) && ((iY + 1) < nY)) {
lev_arr[iX + 1][iY + 1][iZ] = _local1;
}
if ((getTimer() - _local3) > time_limit) {
last_i = _local2 + 1;
return(false);
}
}
_local2++;
}
return(true);
}
function showLevel(koef, targetMC) {
var _local6;
var _local1;
var _local5 = 1000;
var _local4 = 1000;
for (_local6 in targetMC) {
_local1 = targetMC[_local6];
_local1._xscale = (_local1._yscale = 100 * koef);
_local1._x = ((CCard.w + ((_local1.iX * CCard.w) / 2)) + (CCard.bw * _local1.iZ)) * koef;
_local1._y = (((_local1.iY * CCard.h) / 2) - (CCard.bh * _local1.iZ)) * koef;
if (_local1._y < _local4) {
_local4 = _local1._y;
}
if (_local1._x < _local5) {
_local5 = _local1._x;
}
}
targetMC._x = ((287.5 - _local5) - (targetMC._width / 2)) + ((CCard.w + CCard.bw) * koef);
targetMC._y = (236 - _local4) - (targetMC._height / 2);
}
function isFree(mc) {
return(((((mc.iX == 0) || (mc.iX == (nX - 1))) || ((lev_arr[mc.iX - 1][mc.iY][mc.iZ] == 0) && (lev_arr[mc.iX - 1][mc.iY + 1][mc.iZ] == 0))) || ((lev_arr[mc.iX + 2][mc.iY][mc.iZ] == 0) && (lev_arr[mc.iX + 2][mc.iY + 1][mc.iZ] == 0))) && ((mc.iZ == (nZ - 1)) || ((((lev_arr[mc.iX][mc.iY][mc.iZ + 1] == 0) && (lev_arr[mc.iX + 1][mc.iY][mc.iZ + 1] == 0)) && (lev_arr[mc.iX][mc.iY + 1][mc.iZ + 1] == 0)) && (lev_arr[mc.iX + 1][mc.iY + 1][mc.iZ + 1] == 0))));
}
function prepareToTilePlacing(targetMC) {
CCard.curN = CCard.N;
CCard.freeN = 0;
var _local2;
var _local1;
for (_local2 in targetMC) {
_local1 = targetMC[_local2];
if (isFree(_local1)) {
CCard.freeN++;
_local1.freeBack = (_local1.freeF = true);
}
}
CCard.freeNBack = CCard.freeN;
delete solution_arr;
solution_arr = new Array();
}
function freeSosedey(mc) {
var _local3;
var _local2;
var _local5;
var _local4;
if (mc.iX > 1) {
_local3 = lev_arr[mc.iX - 1][mc.iY][mc.iZ];
if (((_local3 != 0) && (!_local3.freeF)) && (isFree(_local3))) {
CCard.freeN++;
_local3.freeF = true;
}
_local2 = lev_arr[mc.iX - 1][mc.iY + 1][mc.iZ];
if ((((_local2 != _local3) && (_local2 != 0)) && (!_local2.freeF)) && (isFree(_local2))) {
CCard.freeN++;
_local2.freeF = true;
}
}
if (mc.iX < (nX - 2)) {
_local3 = lev_arr[mc.iX + 2][mc.iY][mc.iZ];
if (((_local3 != 0) && (!_local3.freeF)) && (isFree(_local3))) {
CCard.freeN++;
_local3.freeF = true;
}
_local2 = lev_arr[mc.iX + 2][mc.iY + 1][mc.iZ];
if ((((_local2 != _local3) && (_local2 != 0)) && (!_local2.freeF)) && (isFree(_local2))) {
CCard.freeN++;
_local2.freeF = true;
}
}
if (mc.iZ > 0) {
_local3 = lev_arr[mc.iX][mc.iY][mc.iZ - 1];
if (((_local3 != 0) && (!_local3.freeF)) && (isFree(_local3))) {
CCard.freeN++;
_local3.freeF = true;
}
_local2 = lev_arr[mc.iX + 1][mc.iY][mc.iZ - 1];
if ((((_local2 != _local3) && (_local2 != 0)) && (!_local2.freeF)) && (isFree(_local2))) {
CCard.freeN++;
_local2.freeF = true;
}
_local5 = lev_arr[mc.iX][mc.iY + 1][mc.iZ - 1];
if ((((_local5 != _local3) && (_local5 != 0)) && (!_local5.freeF)) && (isFree(_local5))) {
CCard.freeN++;
_local5.freeF = true;
}
_local4 = lev_arr[mc.iX + 1][mc.iY + 1][mc.iZ - 1];
if (((((_local4 != _local2) && (_local4 != _local5)) && (_local4 != 0)) && (!_local4.freeF)) && (isFree(_local4))) {
CCard.freeN++;
_local4.freeF = true;
}
}
}
function getBackSosedey(mc) {
var _local3;
var _local2;
var _local5;
var _local4;
if (mc.iX > 1) {
_local3 = lev_arr[mc.iX - 1][mc.iY][mc.iZ];
if (((_local3 != 0) && (_local3.freeF)) && (!isFree(_local3))) {
CCard.freeN--;
_local3.freeF = false;
}
_local2 = lev_arr[mc.iX - 1][mc.iY + 1][mc.iZ];
if ((((_local2 != _local3) && (_local2 != 0)) && (_local2.freeF)) && (!isFree(_local2))) {
CCard.freeN--;
_local2.freeF = false;
}
}
if (mc.iX < (nX - 2)) {
_local3 = lev_arr[mc.iX + 2][mc.iY][mc.iZ];
if (((_local3 != 0) && (_local3.freeF)) && (!isFree(_local3))) {
CCard.freeN--;
_local3.freeF = false;
}
_local2 = lev_arr[mc.iX + 2][mc.iY + 1][mc.iZ];
if ((((_local2 != _local3) && (_local2 != 0)) && (_local2.freeF)) && (!isFree(_local2))) {
CCard.freeN--;
_local2.freeF = false;
}
}
if (mc.iZ > 0) {
_local3 = lev_arr[mc.iX][mc.iY][mc.iZ - 1];
if (((_local3 != 0) && (_local3.freeF)) && (!isFree(_local3))) {
CCard.freeN--;
_local3.freeF = false;
}
_local2 = lev_arr[mc.iX + 1][mc.iY][mc.iZ - 1];
if ((((_local2 != _local3) && (_local2 != 0)) && (_local2.freeF)) && (!isFree(_local2))) {
CCard.freeN--;
_local2.freeF = false;
}
_local5 = lev_arr[mc.iX][mc.iY + 1][mc.iZ - 1];
if ((((_local5 != _local3) && (_local5 != 0)) && (_local5.freeF)) && (!isFree(_local5))) {
CCard.freeN--;
_local5.freeF = false;
}
_local4 = lev_arr[mc.iX + 1][mc.iY + 1][mc.iZ - 1];
if (((((_local4 != _local2) && (_local4 != _local5)) && (_local4 != 0)) && (_local4.freeF)) && (!isFree(_local4))) {
CCard.freeN--;
_local4.freeF = false;
}
}
}
function returnTileToLevel(mc1, mc2) {
mc1.hereF = true;
mc2.hereF = true;
lev_arr[mc1.iX][mc1.iY][mc1.iZ] = (lev_arr[mc1.iX + 1][mc1.iY][mc1.iZ] = (lev_arr[mc1.iX][mc1.iY + 1][mc1.iZ] = (lev_arr[mc1.iX + 1][mc1.iY + 1][mc1.iZ] = mc1)));
lev_arr[mc2.iX][mc2.iY][mc2.iZ] = (lev_arr[mc2.iX + 1][mc2.iY][mc2.iZ] = (lev_arr[mc2.iX][mc2.iY + 1][mc2.iZ] = (lev_arr[mc2.iX + 1][mc2.iY + 1][mc2.iZ] = mc2)));
CCard.curN = CCard.curN + 2;
CCard.freeN = CCard.freeN + 2;
getBackSosedey(mc1);
getBackSosedey(mc2);
}
function getTileFromLevel(mc1, mc2) {
mc1.hereF = false;
mc2.hereF = false;
lev_arr[mc1.iX][mc1.iY][mc1.iZ] = (lev_arr[mc1.iX + 1][mc1.iY][mc1.iZ] = (lev_arr[mc1.iX][mc1.iY + 1][mc1.iZ] = (lev_arr[mc1.iX + 1][mc1.iY + 1][mc1.iZ] = 0)));
lev_arr[mc2.iX][mc2.iY][mc2.iZ] = (lev_arr[mc2.iX + 1][mc2.iY][mc2.iZ] = (lev_arr[mc2.iX][mc2.iY + 1][mc2.iZ] = (lev_arr[mc2.iX + 1][mc2.iY + 1][mc2.iZ] = 0)));
CCard.curN = CCard.curN - 2;
CCard.freeN = CCard.freeN - 2;
freeSosedey(mc1);
freeSosedey(mc2);
}
function searchTwoStartTiles(targetMC) {
var _local2;
var _local1;
_local2 = random(CCard.N);
while (targetMC[_local2].freeF == false) {
_local2++;
if (_local2 == CCard.N) {
_local2 = 0;
}
}
_local1 = random(CCard.N);
while ((targetMC[_local1].freeF == false) || (_local1 == _local2)) {
_local1++;
if (_local1 == CCard.N) {
_local1 = 0;
}
}
solution_arr.push({n1:Math.min(_local2, _local1), n2:Math.max(_local2, _local1), s1:Math.min(_local2, _local1), s2:Math.max(_local2, _local1)});
getTileFromLevel(targetMC[_local2], targetMC[_local1]);
}
function searchSolution(targetMC) {
var _local4;
var _local1;
var _local2;
var _local11;
var _local10;
var _local5;
var _local6;
var _local7;
var _local12 = getTimer();
while (true) {
if (CCard.curN == 0) {
return(true);
}
if (CCard.freeN == 1) {
while (true) {
_local7 = solution_arr.length - 1;
returnTileToLevel(targetMC[solution_arr[_local7].n1], targetMC[solution_arr[_local7].n2]);
trace((((("--!! " + CCard.curN) + " ") + CCard.N) + " ") + CCard.freeN);
_local4 = solution_arr[_local7];
_local1 = _local4.n1;
_local2 = _local4.n2 + 1;
_local11 = _local4.s1;
_local10 = _local4.s2;
_local5 = false;
while (true) {
_local6 = false;
while (_local2 < CCard.N) {
if (targetMC[_local2].hereF && (targetMC[_local2].freeF)) {
if ((_local1 == _local11) && (_local2 == _local10)) {
_local5 = true;
trace("noSolution!!!!");
break;
}
_local6 = true;
break;
}
_local2++;
}
if (_local5 || (_local6)) {
break;
}
do {
_local1++;
if (_local1 == CCard.N) {
_local1 = 0;
}
} while (!(targetMC[_local1].hereF && (targetMC[_local1].freeF)));
_local2 = _local1 + 1;
}
if (_local5) {
solution_arr.pop();
trace("pop!!!");
} else {
_local4.n1 = _local1;
_local4.n2 = _local2;
getTileFromLevel(targetMC[_local1], targetMC[_local2]);
trace((((("++(r) " + CCard.curN) + " ") + CCard.N) + " ") + CCard.freeN);
break;
}
}
continue;
}
_local1 = random(CCard.N);
while ((targetMC[_local1].freeF == false) || (targetMC[_local1].hereF == false)) {
_local1++;
if (_local1 == CCard.N) {
_local1 = 0;
}
}
_local2 = random(CCard.N);
while (((targetMC[_local2].freeF == false) || (targetMC[_local2].hereF == false)) || (_local2 == _local1)) {
_local2++;
if (_local2 == CCard.N) {
_local2 = 0;
}
}
solution_arr.push({n1:Math.min(_local1, _local2), n2:Math.max(_local1, _local2), s1:Math.min(_local1, _local2), s2:Math.max(_local1, _local2)});
getTileFromLevel(targetMC[_local1], targetMC[_local2]);
trace((((("++(o) " + CCard.curN) + " ") + CCard.N) + " ") + CCard.freeN);
if ((getTimer() - _local12) > time_limit) {
return(false);
}
}
}
function fillTiles(targetMC) {
CCard.curN = CCard.N;
CCard.freeN = CCard.freeNBack;
var _local5;
var _local8 = CCard.N / 2;
var _local2;
var _local1;
var _local6 = 0;
var _local4;
var _local3;
delete num_arr;
num_arr = new Array(42);
_local5 = 0;
while (_local5 < 42) {
num_arr[_local5] = _local5 + 1;
free_arr[_local5] = 0;
_local5++;
}
num_arr.sort(sortRandom);
_local5 = 0;
while (_local5 < _local8) {
_local2 = targetMC[solution_arr[_local5].n1];
_local1 = targetMC[solution_arr[_local5].n2];
_local2.freeF = _local2.freeBack;
_local1.freeF = _local1.freeBack;
_local2.hereF = (_local1.hereF = true);
lev_arr[_local2.iX][_local2.iY][_local2.iZ] = _local2;
if ((_local2.iX + 1) < nX) {
lev_arr[_local2.iX + 1][_local2.iY][_local2.iZ] = _local2;
}
if ((_local2.iY + 1) < nY) {
lev_arr[_local2.iX][_local2.iY + 1][_local2.iZ] = _local2;
}
if (((_local2.iX + 1) < nX) && ((_local2.iY + 1) < nY)) {
lev_arr[_local2.iX + 1][_local2.iY + 1][_local2.iZ] = _local2;
}
lev_arr[_local1.iX][_local1.iY][_local1.iZ] = _local1;
if ((_local1.iX + 1) < nX) {
lev_arr[_local1.iX + 1][_local1.iY][_local1.iZ] = _local1;
}
if ((_local1.iY + 1) < nY) {
lev_arr[_local1.iX][_local1.iY + 1][_local1.iZ] = _local1;
}
if (((_local1.iX + 1) < nX) && ((_local1.iY + 1) < nY)) {
lev_arr[_local1.iX + 1][_local1.iY + 1][_local1.iZ] = _local1;
}
_local4 = num_arr[_local6];
if (_local4 < 5) {
_local3 = random(4) + 1;
if (_local4 == _local3) {
_local3++;
if (_local3 > 4) {
_local3 = 1;
}
}
_local2.setNum(_local4);
_local1.setNum(_local3);
if (_local2.freeF) {
free_arr[_local4 - 1]++;
}
if (_local1.freeF) {
free_arr[_local3 - 1]++;
}
} else if ((_local4 >= 5) && (_local4 <= 8)) {
_local3 = random(4) + 5;
if (_local4 == _local3) {
_local3++;
if (_local3 > 8) {
_local3 = 5;
}
}
_local2.setNum(_local4);
_local1.setNum(_local3);
if (_local2.freeF) {
free_arr[_local4 - 1]++;
}
if (_local1.freeF) {
free_arr[_local3 - 1]++;
}
} else {
_local2.setNum(_local4);
_local1.setNum(_local4);
if (_local2.freeF) {
free_arr[_local4 - 1]++;
}
if (_local1.freeF) {
free_arr[_local4 - 1]++;
}
}
_local6++;
if (_local6 == 42) {
_local6 = 0;
}
_local5++;
}
}
function processGame(targetMC) {
if (pauseFlag) {
return(undefined);
}
if (gameState == 1) {
if (createLevelState == 1) {
clearLevelMatrix();
CCard.N = 0;
(iX = -1);
(iY = 0);
(iZ = 0);
last_i = 0;
createLevelState++;
return(undefined);
}
if (createLevelState == 2) {
if (loadLevel(this["lev" + curLevel], targetMC)) {
createLevelState++;
}
return(undefined);
}
if (createLevelState == 3) {
showLevel(0.6, targetMC);
prepareToTilePlacing(targetMC);
searchTwoStartTiles(targetMC);
createLevelState++;
return(undefined);
}
if (createLevelState == 4) {
if (searchSolution(targetMC)) {
createLevelState++;
}
return(undefined);
}
if (createLevelState == 5) {
fillTiles(targetMC);
mc_level._visible = true;
mc_wait._visible = false;
btn_menu._visible = true;
btn_undo._visible = true;
btn_sound._visible = true;
btn_undo.gotoAndStop(2);
curCard = null;
if (classicGameFlag) {
curTime = 0;
} else {
curTime = 12 * Math.round((CCard.N * 2) * 1.2);
}
updateTime();
updateMatches();
scores = 0;
mc_scores.txtScores = 0;
mc_scores._visible = true;
playSnd("snd_LevelStart");
gameState = 2;
return(undefined);
}
} else if (gameState == 2) {
if (classicGameFlag) {
curTime++;
if (curTime > maxTime) {
curTime = maxTime;
}
updateTime();
if (curTime == maxTime) {
timeIsOver();
}
} else {
curTime--;
if (curTime < 0) {
curTime = 0;
}
updateTime();
if (curTime == 0) {
timeIsOver();
}
}
} else if (gameState == 3) {
frameCounter++;
if (frameCounter >= pauseFrames) {
frameCounter = 0;
if (curSolutionStep == solution_arr.length) {
btnMainMenu();
} else {
var _local3;
var _local5;
var _local4;
_local3 = solution_arr[curSolutionStep];
curSolutionStep++;
_local5 = targetMC[_local3.n1];
_local4 = targetMC[_local3.n2];
_local5.showMeAndOut();
_local4.showMeAndOut();
}
}
}
}
function btnBack() {
mc_menu._visible = false;
if (gameState == 2) {
btn_menu._visible = (btn_undo._visible = true);
btn_sound._visible = true;
pauseFlag = false;
mc_level._visible = true;
} else if (gameState == 3) {
btn_menu._visible = true;
btn_sound._visible = true;
pauseFlag = false;
mc_level._visible = true;
} else if ((gameState == 4) || (gameState == 5)) {
btnMainMenu();
}
}
function btnMenu() {
mc_level._visible = false;
pauseFlag = true;
mc_menu._visible = true;
if (gameState == 2) {
mc_menu.gotoAndStop(2);
btn_menu._visible = (btn_undo._visible = false);
btn_sound._visible = false;
} else if (gameState == 3) {
mc_menu.gotoAndStop(3);
btn_menu._visible = false;
btn_sound._visible = false;
}
}
function btnUndo() {
playSnd("snd_Undo");
var _local1 = userSolution_arr.pop();
if (userSolution_arr.length == 0) {
btn_undo.gotoAndStop(2);
}
returnTileToLevel2(_local1.mc1, _local1.mc2);
_local1.mc1.goBack();
_local1.mc2.goBack();
if (curCard != null) {
curCard.mc_ramka._visible = false;
curCard = null;
}
updateMatches();
if (_local1.mc1.myNum < 5) {
if (_local1.mc1.myNum == _local1.mc2.myNum) {
scores = scores - 20;
} else {
scores = scores - 4;
}
} else if ((_local1.mc1.myNum >= 5) && (_local1.mc1.myNum <= 8)) {
if (_local1.mc1.myNum == _local1.mc2.myNum) {
scores = scores - 20;
} else {
scores = scores - 4;
}
} else if (((_local1.mc1.myNum == 18) || (_local1.mc1.myNum == 19)) || (_local1.mc1.myNum == 20)) {
scores = scores - 6;
} else {
scores = scores - 2;
}
mc_scores.txtScores = scores;
}
function btnUndo2() {
btn_menu._visible = (btn_undo._visible = true);
btn_sound._visible = true;
mc_menu._visible = false;
gameState = 2;
btnUndo();
}
function btnMainMenu() {
delete userSolution_arr;
userSolution_arr = new Array();
snd_menu.gotoAndStop(2);
snd_game.gotoAndStop(3);
this.gotoAndStop("menu1");
}
function btnShowSolution() {
gameState = 3;
var _local2;
var _local3 = CCard.N;
var _local1;
_local2 = 0;
while (_local2 < _local3) {
_local1 = mc_level[_local2];
_local1.enabled = false;
if (!_local1.hereF) {
_local1.gotoAndStop(1);
_local1.mc_ramka._visible = (_local1.mc_green._visible = (_local1.mc_red._visible = false));
_local1.mc.gotoAndStop(_local1.myNum);
}
_local2++;
}
frameCounter = pauseFrames / 2;
curSolutionStep = 0;
mc_menu._visible = false;
mc_level._visible = true;
pauseFlag = false;
btn_menu._visible = true;
btn_sound._visible = true;
mc_scores._visible = false;
}
function freeSosedey2(mc) {
var _local3;
var _local2;
var _local5;
var _local4;
if (mc.iX > 1) {
_local3 = lev_arr[mc.iX - 1][mc.iY][mc.iZ];
if (((_local3 != 0) && (!_local3.freeF)) && (isFree(_local3))) {
CCard.freeN++;
_local3.freeF = true;
free_arr[_local3.myNum - 1]++;
}
_local2 = lev_arr[mc.iX - 1][mc.iY + 1][mc.iZ];
if ((((_local2 != _local3) && (_local2 != 0)) && (!_local2.freeF)) && (isFree(_local2))) {
CCard.freeN++;
_local2.freeF = true;
free_arr[_local2.myNum - 1]++;
}
}
if (mc.iX < (nX - 2)) {
_local3 = lev_arr[mc.iX + 2][mc.iY][mc.iZ];
if (((_local3 != 0) && (!_local3.freeF)) && (isFree(_local3))) {
CCard.freeN++;
_local3.freeF = true;
free_arr[_local3.myNum - 1]++;
}
_local2 = lev_arr[mc.iX + 2][mc.iY + 1][mc.iZ];
if ((((_local2 != _local3) && (_local2 != 0)) && (!_local2.freeF)) && (isFree(_local2))) {
CCard.freeN++;
_local2.freeF = true;
free_arr[_local2.myNum - 1]++;
}
}
if (mc.iZ > 0) {
_local3 = lev_arr[mc.iX][mc.iY][mc.iZ - 1];
if (((_local3 != 0) && (!_local3.freeF)) && (isFree(_local3))) {
CCard.freeN++;
_local3.freeF = true;
free_arr[_local3.myNum - 1]++;
}
_local2 = lev_arr[mc.iX + 1][mc.iY][mc.iZ - 1];
if ((((_local2 != _local3) && (_local2 != 0)) && (!_local2.freeF)) && (isFree(_local2))) {
CCard.freeN++;
_local2.freeF = true;
free_arr[_local2.myNum - 1]++;
}
_local5 = lev_arr[mc.iX][mc.iY + 1][mc.iZ - 1];
if ((((_local5 != _local3) && (_local5 != 0)) && (!_local5.freeF)) && (isFree(_local5))) {
CCard.freeN++;
_local5.freeF = true;
free_arr[_local5.myNum - 1]++;
}
_local4 = lev_arr[mc.iX + 1][mc.iY + 1][mc.iZ - 1];
if (((((_local4 != _local2) && (_local4 != _local5)) && (_local4 != 0)) && (!_local4.freeF)) && (isFree(_local4))) {
CCard.freeN++;
_local4.freeF = true;
free_arr[_local4.myNum - 1]++;
}
}
}
function getBackSosedey2(mc) {
var _local3;
var _local2;
var _local5;
var _local4;
if (mc.iX > 1) {
_local3 = lev_arr[mc.iX - 1][mc.iY][mc.iZ];
if (((_local3 != 0) && (_local3.freeF)) && (!isFree(_local3))) {
CCard.freeN--;
_local3.freeF = false;
free_arr[_local3.myNum - 1]--;
}
_local2 = lev_arr[mc.iX - 1][mc.iY + 1][mc.iZ];
if ((((_local2 != _local3) && (_local2 != 0)) && (_local2.freeF)) && (!isFree(_local2))) {
CCard.freeN--;
_local2.freeF = false;
free_arr[_local2.myNum - 1]--;
}
}
if (mc.iX < (nX - 2)) {
_local3 = lev_arr[mc.iX + 2][mc.iY][mc.iZ];
if (((_local3 != 0) && (_local3.freeF)) && (!isFree(_local3))) {
CCard.freeN--;
_local3.freeF = false;
free_arr[_local3.myNum - 1]--;
}
_local2 = lev_arr[mc.iX + 2][mc.iY + 1][mc.iZ];
if ((((_local2 != _local3) && (_local2 != 0)) && (_local2.freeF)) && (!isFree(_local2))) {
CCard.freeN--;
_local2.freeF = false;
free_arr[_local2.myNum - 1]--;
}
}
if (mc.iZ > 0) {
_local3 = lev_arr[mc.iX][mc.iY][mc.iZ - 1];
if (((_local3 != 0) && (_local3.freeF)) && (!isFree(_local3))) {
CCard.freeN--;
_local3.freeF = false;
free_arr[_local3.myNum - 1]--;
}
_local2 = lev_arr[mc.iX + 1][mc.iY][mc.iZ - 1];
if ((((_local2 != _local3) && (_local2 != 0)) && (_local2.freeF)) && (!isFree(_local2))) {
CCard.freeN--;
_local2.freeF = false;
free_arr[_local2.myNum - 1]--;
}
_local5 = lev_arr[mc.iX][mc.iY + 1][mc.iZ - 1];
if ((((_local5 != _local3) && (_local5 != 0)) && (_local5.freeF)) && (!isFree(_local5))) {
CCard.freeN--;
_local5.freeF = false;
free_arr[_local5.myNum - 1]--;
}
_local4 = lev_arr[mc.iX + 1][mc.iY + 1][mc.iZ - 1];
if (((((_local4 != _local2) && (_local4 != _local5)) && (_local4 != 0)) && (_local4.freeF)) && (!isFree(_local4))) {
CCard.freeN--;
_local4.freeF = false;
free_arr[_local4.myNum - 1]--;
}
}
}
function returnTileToLevel2(mc1, mc2) {
mc1.hereF = true;
mc2.hereF = true;
lev_arr[mc1.iX][mc1.iY][mc1.iZ] = (lev_arr[mc1.iX + 1][mc1.iY][mc1.iZ] = (lev_arr[mc1.iX][mc1.iY + 1][mc1.iZ] = (lev_arr[mc1.iX + 1][mc1.iY + 1][mc1.iZ] = mc1)));
lev_arr[mc2.iX][mc2.iY][mc2.iZ] = (lev_arr[mc2.iX + 1][mc2.iY][mc2.iZ] = (lev_arr[mc2.iX][mc2.iY + 1][mc2.iZ] = (lev_arr[mc2.iX + 1][mc2.iY + 1][mc2.iZ] = mc2)));
CCard.curN = CCard.curN + 2;
CCard.freeN = CCard.freeN + 2;
free_arr[mc1.myNum - 1]++;
free_arr[mc2.myNum - 1]++;
getBackSosedey2(mc1);
getBackSosedey2(mc2);
}
function getTileFromLevel2(mc1, mc2) {
mc1.hereF = false;
mc2.hereF = false;
lev_arr[mc1.iX][mc1.iY][mc1.iZ] = (lev_arr[mc1.iX + 1][mc1.iY][mc1.iZ] = (lev_arr[mc1.iX][mc1.iY + 1][mc1.iZ] = (lev_arr[mc1.iX + 1][mc1.iY + 1][mc1.iZ] = 0)));
lev_arr[mc2.iX][mc2.iY][mc2.iZ] = (lev_arr[mc2.iX + 1][mc2.iY][mc2.iZ] = (lev_arr[mc2.iX][mc2.iY + 1][mc2.iZ] = (lev_arr[mc2.iX + 1][mc2.iY + 1][mc2.iZ] = 0)));
CCard.curN = CCard.curN - 2;
CCard.freeN = CCard.freeN - 2;
free_arr[mc1.myNum - 1]--;
free_arr[mc2.myNum - 1]--;
freeSosedey2(mc1);
freeSosedey2(mc2);
}
function cardPress(mc) {
if (curCard == mc) {
return(undefined);
}
if (mc.freeF == false) {
playSnd("snd_TilesCantRemove");
return(undefined);
}
var _local2 = false;
if (curCard != null) {
if ((mc.myNum < 5) && (curCard.myNum < 5)) {
if (mc.myNum == curCard.myNum) {
scores = scores + 20;
} else {
scores = scores + 4;
}
_local2 = true;
} else if ((((mc.myNum >= 5) && (mc.myNum <= 8)) && (curCard.myNum >= 5)) && (curCard.myNum <= 8)) {
if (mc.myNum == curCard.myNum) {
scores = scores + 20;
} else {
scores = scores + 4;
}
_local2 = true;
} else if (mc.myNum == curCard.myNum) {
if (((mc.myNum == 18) || (mc.myNum == 19)) || (mc.myNum == 20)) {
scores = scores + 6;
} else {
scores = scores + 2;
}
_local2 = true;
} else {
playSnd("snd_SelectTile");
curCard.mc_ramka._visible = false;
curCard = mc;
curCard.mc_ramka._visible = true;
}
if (_local2) {
if (userSolution_arr.length == 0) {
btn_undo.gotoAndStop(1);
}
userSolution_arr.push({mc1:mc, mc2:curCard});
getTileFromLevel2(mc, curCard);
mc.goOut();
curCard.goOut();
curCard = null;
updateMatches();
mc_scores.txtScores = scores;
if (CCard.curN == 0) {
gameWin();
} else {
playSnd("snd_TilesRemove");
}
}
} else {
playSnd("snd_SelectTile");
curCard = mc;
mc.mc_ramka._visible = true;
}
}
function updateTime() {
var _local1 = int(curTime / 12);
var _local2 = int(_local1 / 60);
_local1 = _local1 - (_local2 * 60);
var _local4 = String(_local1);
var _local3 = String(_local2);
if (_local1 < 10) {
_local4 = "0" + _local4;
}
if (_local2 < 10) {
_local3 = "0" + _local3;
}
mc_scores.txtTime = (_local3 + ":") + _local4;
if (classicGameFlag) {
if ((((_local2 == 59) && (_local1 > 40)) && (_local1 != oldSec)) && ((_local1 % 2) == 1)) {
playSnd("snd_timerunout");
}
} else if ((((_local2 == 0) && (_local1 < 20)) && (_local1 != oldSec)) && ((_local1 % 2) == 1)) {
playSnd("snd_timerunout");
}
oldSec = _local1;
}
function updateMatches() {
var _local1;
var _local3 = 0;
var _local2 = 0;
_local1 = 0;
while (_local1 < 4) {
_local2 = _local2 + free_arr[_local1];
_local1++;
}
_local3 = _local3 + int((_local2 / 2) + 0.1);
_local2 = 0;
_local1 = 4;
while (_local1 < 8) {
_local2 = _local2 + free_arr[_local1];
_local1++;
}
_local3 = _local3 + int((_local2 / 2) + 0.1);
_local1 = 8;
while (_local1 < 42) {
_local3 = _local3 + int((free_arr[_local1] / 2) + 0.1);
_local1++;
}
mc_scores.txtMatches = _local3;
if ((_local3 == 0) && (CCard.curN > 0)) {
btn_menu._visible = (btn_undo._visible = false);
btn_sound._visible = false;
mc_menu.gotoAndStop(4);
mc_menu._visible = true;
gameState = 6;
}
}
function gameWin() {
playSnd("snd_LevelDone");
btn_menu._visible = false;
btn_undo._visible = false;
btn_sound._visible = false;
mc_scores._visible = false;
mc_menu.gotoAndStop(1);
mc_menu._visible = true;
var _local3 = Math.round((CCard.N * 2) * 1.2);
var _local8;
var _local4;
var _local1;
mc_menu.mc_score.txt = scores;
if (classicGameFlag) {
mc_menu.mc_spent.txt = mc_scores.txtTime;
_local1 = _local3 - (curTime / 12);
if (_local1 < 0) {
_local1 = 0;
}
_local4 = ((2 * scores) * _local1) / _local3;
mc_menu.mc_bonus.txt = Math.round(_local4);
} else {
_local8 = _local3 - (curTime / 12);
var _local2 = int(_local8);
var _local7 = int(_local2 / 60);
_local2 = _local2 - (_local7 * 60);
var _local6 = String(_local2);
var _local5 = String(_local7);
if (_local2 < 10) {
_local6 = "0" + _local6;
}
if (_local7 < 10) {
_local5 = "0" + _local5;
}
mc_menu.mc_spent.txt = (_local5 + ":") + _local6;
_local1 = _local3 - _local8;
if (_local1 < 0) {
_local1 = 0;
}
_local4 = ((2 * scores) * _local1) / _local3;
mc_menu.mc_bonus.txt = Math.round(_local4);
}
gameState = 4;
}
function timeIsOver() {
playSnd("snd_LevelStart");
btn_menu._visible = (btn_undo._visible = false);
btn_sound._visible = false;
mc_menu.gotoAndStop(5);
mc_menu._visible = true;
mc_level._visible = false;
gameState = 5;
}
var soundFlag = true;
var oldSec;
var i = 0;
var j = 0;
var curLevel = 1;
var solution_arr = new Array();
var userSolution_arr = new Array();
var free_arr = new Array(42);
var num_arr = new Array(42);
i = 0;
while (i < 42) {
num_arr[i] = i + 1;
i++;
}
var gameState;
var createLevelState;
var pauseFlag;
var nX = 34;
var nY = 20;
var nZ = 5;
var lev_arr = new Array(nX);
i = 0;
while (i < nX) {
lev_arr[i] = new Array(nY);
j = 0;
while (j < nY) {
lev_arr[i][j] = new Array(nZ);
j++;
}
i++;
}
var iX = -1;
var iY = 0;
var iZ = 0;
var last_i;
var time_limit = 100;
CCard.root = this;
var curCard = null;
var frameCounter;
var pauseFrames = 25;
var curSolutionStep;
var curTime;
var maxTime = 43200;
var classicGameFlag;
var scores;
var lev1 = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000101010001010100000000000000000000000000010000000000000000000000000101010100010101010000000000000000000000000100000000000000000000000101010101000101010101000000000000000000000001000000000000000000010101010101000000010101010101000000000000000000010000000000000000000000010101010100010101010100000000000000000000000100000000000000000000000001010101000101010100000000000000000000000001000000000000000000000000000101010001010100000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010000000000000000000000000000000000000000000000000000000000010101010101010000000000000000000000000000000000000000000000000000010101010101010101000000000000000000000000000000000000000000000000010101000001000001010100000000000000000000000000000000000000000000000001010101010101010100000000000000000000000000000000000000000000000000000101010101010100000000000000000000000000000000000000000000000000000000000101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001010101010101000000000000000000000000000000000000000000000000000001000000010000000100000000000000000000000000000000000000000000000000000101010101010100000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev2 = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000010101010101000000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000010101010101000000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010101000000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000010101010101000000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000010101010101000000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000010101010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000010101010101000000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000010101010101000000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev3 = "0000000000000000000000000000000000000000000000000000000000000000000000000001010101010001010101010000000000000000000000010000000000000000000000000000000100010000000000000000000000000001000000010000000000000000000000010000000000010000000000000000000000000000000000000000000000000000001000000000000010000000000000000000000001010100000000000000000010101010000000000000101010100000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010101010101010101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010100010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101000000000000000000001000100000000000000010001000000000000000000000000000000000000000000010001000000000000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101000101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010001010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev4 = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000100010000000000000000000000000001000000010000000000000000000000010000000000010000000000000000000000000000000000000000000000000000001000010101000010000000000000000010000000000000000010000000000000100010000100010000100010000000000000100000000000000000100000000000000000100001010100001000000000000000000000000000000000000000000000000000000100000000000100000000000000000000000100000001000000000000000000000000000100010000000000000000000000000000000000000000000000000000000000000001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100010000000000000000000000001000000000000010000000000000000010000000000000000010000000000000000010000000000000100000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev5 = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000010000010000000000000000000000000000000000000000000000000000000001010101010000000000000000000010100000000000001010000000000000000000010101010100000000000000000000101000000000000010100000000000000000000101010101000000000000000000000000000000000000000000000000000000000100000100000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000100000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010100000000000000000000001000000000000000100000000000000000000001010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000001000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000001000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000010000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000010000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000100000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev6 = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000010000000100000001000000000001000000000000000000010000000000010001000000101000000100010000000000000001000000000001000000000000000100010001000000010001000100000000000000000001010100000000000000000001000100000000000000010001000000000000000000010101000000000000000000010001000100000001000100010000000000000001000000000001000000000000000100010000001010000001000100000000000100000000000000000001000000000001000000000000000000000001000000000000000001000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000001000000000000000000000000000000000000000000010001000000000000000100010000000000000000000000000000000000000000000100010000000000000001000100000000000000000000101000000000000000000001000100000000000000010001000000000000000000000000000000000000000000010001000000000000000100010000000000000000000000000000000000000000000100000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev7 = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001001001000000000000000000000000000000000000000000000000000000001010101010101010100000000000000000000000000000000000000000000000000000001010101010000000000000000000000000000000000000000000000000000000101010100010101010000000000000000000000000000000000000000000000000000000101010101000000000000000000000000000000000000000000000000000000010101010101010101000000000000000000000000000000000000000000000000000000001001001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000010000000000000000000000000000000000000000000000000000000010101010101010101000000000000000000000000000000000000000000000000000000010000000100000000000000000000000000000000000000000000000000000001010100000001010100000000000000000000000000000000000000000000000000000001000000010000000000000000000000000000000000000000000000000000000101010101010101010000000000000000000000000000000000000000000000000000000010000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000100000000000000000000000000000000000000000000000000000000101000000000001010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100000000000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010000000000010100000000000000000000000000000000000000000000000000000000100000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev8 = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010101010100000000000000000000000000000000000000000000000000000001010101010101000000000000000000000000000000000000000000000000000000010101010101010100000000000000000000000000000000000000000000000000000101010101010101010000000000000000000000000000000000000000000000000001010101010101010000000000000000000000000000000000000000000000000000010101010101010000000000000000000000000000000000000000000000000000000101010101010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010101010101000000000000000000000000000000000000000000000000000000010000000000010000000000000000000000001010101000000000000000000000000100000000000100000000000000000000000010101010000000000000000000000001000000000001010000000000000000000000101010100000000000000000000000010000000000010000000000000000000000001010101000000000000000000000000100000000000100000000000000000000000000000000000000000000000000000001010101010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010101010000000000000000000000000000000000000000000000000000000100000000000100000000000000000000000000000000000000000000000000000001000101010001000000000000000000000000000000000000000000000000000000010001010100010000000000000000000000000000000000000000000000000000000100010101000100000000000000000000000000000000000000000000000000000001000000000001000000000000000000000000000000000000000000000000000000010101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000010000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000000101000000000000000000000000001000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev9 = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010101010101010000000000000000000000000000000000000000000000000001010101010101010100000000000000000000000000000000000000000000000000010100000000000101000000000000000000000000000000000000000000000000000101000000000001010000000000000000000000000000000000000000000000000001010000000000010100000000000000000000000000000000000000000000000000010101010101010101000000000000000000000000000000000000000000000000000101010101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010101010100000000000000000000000000000000000000000000000000000101010101010101000000000000000000000000000000000000000000000000000001010000000001010000000000000000000000000000000000000000000000000000010100000000010100000000000000000000000000000000000000000000000000000101010101010101000000000000000000000000000000000000000000000000000001010101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010101010101000000000000000000000000000000000000000000000000000000010101010101010000000000000000000000000000000000000000000000000000000101000000010100000000000000000000000000000000000000000000000000000001010101010101000000000000000000000000000000000000000000000000000000010101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000010000000000000000000000000000000000000000000000000000000001010101010000000000000000000000000000000000000000000000000000000000010000000100000000000000000000000000000000000000000000000000000000000101010101000000000000000000000000000000000000000000000000000000000100000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010100000000000000000000000000000000000000000000000000000000000001010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev10 = "0000000000000000000000000000000000000000000000000000000000000000000000001010101010101010101010100000000000000000000000000000000000000000000010101010101010101010101000000000000000000000000000000000000000000000001010101010101010101000000000000000000000000000000000000000000000000000101010101010101000000000000000000000000000000000000000000000000000001010101010101010000000000000000000000000000000000000000000000000001010101010101010101000000000000000000000000000000000000000000000001010101010101010101010100000000000000000000000000000000000000000000010101010101010101010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010101010100000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000010101010101000000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000001010101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010100000000000000000000000000000000000000000000000000000000000001000001000000000000000000000000000000000000000000000000000000000000010000010000000000000000000000000000000000000000000000000000000000000101010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000010000010000000000000000000000000000000000000000000000000000000000000100000100000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev11 = "0000000000000000000000000000000000000000000000000000000000000000000000000000001000100000100010000000000000000000000000000000000000000000000000000101010101010101010000000000000000000000000000000000000000000000000001010101010101010100000000000000000000000000000000000000000000000000010100000000000101000000000000000000000000000000000000000000000000000101000100010001010000000000000000000000000000000000000000000000000001010000000000010100000000000000000000000000000000000000000000000000010101010101010101000000000000000000000000000000000000000000000000000101010101010101010000000000000000000000000000000000000000000000000000100010000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010101000000000000000000000100000000000000000100000000000000000001010101010100000000000000000000000000000000000000000000000000000000010000000001000000000000000000010000001000100000010000000000000000000100000000010000000000000000000000000000000000000000000000000000000001010101010100000000000000000001000000000000000001000000000000000000000101010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010100000000000000000000010000000000000000000100000000000000000000000000000000000000000000000000000101010101000000000000000000000000000000000000000000000000000001000001010001010000010000000000000000000000000000000000000000000000000000010101010100000000000000000000000000000000000000000000000000000100000000000000000001000000000000000000000101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010000000000000000000001000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000100010000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000001000000000000000000000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000001000000000001000000000000000000000000000000000000000000010000000000000000000000010000000000000000000000000000000000000000000100000000000000000000000100000000000000000001000100000000000000000001000000000000000000000001000000000000000000000000000000000000000000010000000000000000000000010000000000000000000000000000000000000000000100000000000100000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev12 = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000100010000000000000000000000000000000100000000000000000000000000010000000000010000000000000000000100010000000100010000000000000001000100010001000100010000000000000001000100000001000100000000000000010001000100010001000100000000000000010001000000010001000000000000000000010000000000010000000000000000000000000001000000000000000000000000000000010001000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100000000010100000000000000000100000100000100000100000000000000000101000000000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev13 = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000001000000000010000000000000000000000000000000000000000000001000000000000000000000100000000000000000001000001000000000000000000010000000000000000000001000000000000000000000000000000000000000000000100000000001000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000001000000010000000000000000000000000001000100000000000000000000000000010000000100000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000100000000000000000000000000000000000000000000000000000000010000000001000000000000000000000000000000000000000000000000000000000100000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010101000000000000000000000000010000000001000000000000000000000000000000000000000000000000000000001000000000001000000000000000000000000000000000000000000000000000000010000000000010000000000000000000000000000000000000000000000000000000100000000000100000000000000000000000000000000000000000000000000000001000000000001000000000000000000000000000000000000000000000000000000001000000000100000000000000000000000001010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010101010000000000000000000000010000000000010000000000000000000000000000000000000000000000000000001000000000000010000000000000000000000000000000000000000000000000000010000000000000100000000000000000000000000000000000000000000000000000100000000000001000000000000000000000000000000000000000000000000000001000000000000010000000000000000000000000000000000000000000000000000010000000000000100000000000000000000000000000000000000000000000000000010000000000010000000000000000000000010101010100000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev14 = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010101010101010000000000000000000000000000000000000000000000000001010101010101010100000000000000000000000000000000000000000000000000010101010101010101000000000000000000000000000000000000000000000000000101010101010101010000000000000000000000000000000000000000000000000001010101010101010100000000000000000000000000000000000000000000000000000001010101010000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010101000101010100000000000000000000000000000000000000000000000000010101000101010101000000000000000000000000000000000000000000000000000101010101010001010000000000000000000000000000000000000000000000000001000101010101010100000000000000000000000000000000000000000000000000000101010101010100000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101000000010101000000000000000000000000000000000000000000000000000101010000010001010000000000000000000000000000000000000000000000000001000100010100010100000000000000000000000000000000000000000000000000000001010101000100000000000000000000000000000000000000000000000000000000010101010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101000000000001010000000000000000000000000000000000000000000000000001000100000000010100000000000000000000000000000000000000000000000000000001000001000100000000000000000000000000000000000000000000000000000000010001010000000000000000000000000000000000000000000000000000000000000001010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev15 = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010101010101000000000000000000000000000000000000000000000000000001010101010101010000000000000000000000000000000000000000000000000000010101000001010100000000000000000000000000000000000000000000000000000101010000010101000000000000000000000000000000000000000000000000000001010101010101010000000000000000000000000000000000000000000000000000010101010101010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010101010101010000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000001010000010100000000000000000000000000000000000000000000000000000000010100000101000000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000101010101010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010101010100000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000010100000101000000000000000000000000000000000000000000000000000000000101000001010000000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000001010101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010101010101000000000000000000000000000000000000000000000000000000000101010100000000000000000000000000000000000000000000000000000000000001000001000000000000000000000000000000000000000000000000000000000000010000010000000000000000000000000000000000000000000000000000000000000101010100000000000000000000000000000000000000000000000000000000010101010101010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev16 = "0000000000000000000000000000000000000000000000000000000000000000000000000000001000010101000010000000000000000000000000000000000000000000000000001000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000010101000001000000000000000000000000000000000000000000000000000100000100010000010000000000000000000000000000000000000000000000000001000001010100000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000001000000000000000000000000000000000000000000000000000100001010100001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100010101010001000000000000000000000000000000000000000000000000000001000100000100010000000000000000000000000000000000000000000000000000010001000001000100000000000000000000000000000000000000000000000000000100010101010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001010001000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101000000010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100010001010000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev17 = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010101010000000000000000000100000000000000010000000000000001000101010101010100010000000000000001000000000000000100000000000000000001010101010101000000000000000000010000000000000001000000000000000000010101010101010000000000000000000100000000000000010000000000000000000101010101010100000000000000000001000000000000000100000000000000010001010101010101000100000000000000010000000000000001000000000000000000010101010101010000000000000000000000000000000000000000000000000000000000101010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010101010100000000000000000001000000000000000100000000000000010001010101010101000100000000000000010000000000000001000000000000000000010101010101010000000000000000000100000000000000010000000000000000000101010001010100000000000000000001000000000000000100000000000000000001010101010101000000000000000000010000000000000001000000000000000100010101010101010001000000000000000100000000000000010000000000000000000101010101010100000000000000000000000000000000000000000000000000000000000101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010101010101000000000000000000010000000000000001000000000000000100010101010101010001000000000000000100000000000000010000000000000000000101000000010100000000000000000001000000000000000100000000000000000001010000000101000000000000000000010000000000000001000000000000000000010100000001010000000000000000000100000000000000010000000000000001000101010101010100010000000000000001000000000000000100000000000000000001010101010101000000000000000000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010101010000000000000000000000000000000000000000000000000001000101000000010100010000000000000000000000000000000000000000000000000001000000000001000000000000000000000000000000000000000000000000000000010000000000010000000000000000000000000000000000000000000000000000000100000000000100000000000000000000000000000000000000000000000000010001010000000101000100000000000000000000000000000000000000000000000000010101010101010000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000010000000100000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000100000001000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev18 = "0000000000000000000000000000000000000000000000000000000000000000000000000000000010101010101000000000000000000000000000000000000000000000000000000010101010101010100000000000000000000000000000000000000000000000000000101010101010101000000000000000000000000000000000000000000000000000001010100000101010000000000000000000000000000000000000000000000000000010101000001010100000000000000000000000000000000000000000000000000000101010101010101000000000000000000000000000000000000000000000000000001010101010101010000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000010101010101000000000000000000000000000000000000000000000000000000000101000001010000000000000000000000000000000000000000000000000000000001010000010100000000000000000000000000000000000000000000000000000000010101010101000000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010101000000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000001010000010100000000000000000000000000000000000000000000000000000000010100000101000000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010000000000000000000000000000000000000000000000000000000000000100000100000000000000000000000000000000000000000000000000000000000001000001000000000000000000000000000000000000000000000000000000000000010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010100000000000000000000000000000000000000000000000000000000000001000001000000000000000000000000000000000000000000000000000000000000010000010000000000000000000000000000000000000000000000000000000000000101010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev19 = "0000000000000000000000000000000000000000000000000000000000000000000000001010101010101010101010100000000000000000000000000000000000000000000000001010101010101010000000000000000000000000000000000000000000000000001010101010101010101000000000000000000000000000000000000000000000001010101010101010101010100000000010000000000000000000000000101000000010101010101010101010101000000000000000000000000000000000000000000000001010101010101010101000000000000000000000000000000000000000000000000000101010101010101000000000000000000000000000000000000000000000000010101010101010101010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000010101010101000000000000000000000000000000000000000000000000000000000101010101010000000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000010101010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010100000000000000000000000000000000000000000000000000000000000001010101000000000000000000000000000000000000000000000000000000000000010101010000000000000000000000000000000000000000000000000000000000000101010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000000000000000001010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var lev20 = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010101010000010101010101000000000000000000000000000000000000000001000000000100000100000000010000000000000000000101000000000000000000010000000001000001000000000100000000000001010001010001010000000000000100000000010000010000000001000000000000000000010100000000000000000001000000000100000100000000010000000000000000000000000000000000000000010101010101000001010101010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010100000001010101010000000000000000000000000000000000000000000100000001010001010000000100000000000000000000000000000000000000000001000100000000000000010001000000000000000000000000000000000000000000010000000101000101000000010000000000000000000000000000000000000000000101010101000000010101010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010101000000000101010100000000000000000001000001000000000000000000010000010000000001000001000000000000000000000000000000000000000000000100000100000000010000010000000000000000000100000100000000000000000001010101000000000101010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010100000001010101000000000000000000000000000000000000000000000001000101000000010100010000000000000000000000000000000000000000000000010101010000000101010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100000000000001010000000000000000000000000000000000000000000000000101000000000000010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
#endinitclip
Symbol 264 MovieClip [__Packages.CCard] Frame 0
class CCard extends MovieClip
{
static var root;
var onReleaseOutside, mc_red, mc_green, mc_ramka, freeBack, freeF, hereF, myNum, mc, enabled, gotoAndStop;
function CCard () {
super();
onReleaseOutside = onRollOut;
mc_ramka._visible = (mc_green._visible = (mc_red._visible = false));
freeBack = (freeF = false);
hereF = true;
}
function setNum(num) {
myNum = num;
mc.gotoAndStop(num);
}
function onRollOut() {
mc_green._visible = (mc_red._visible = false);
}
function onRollOver() {
if (freeF) {
mc_green._visible = true;
} else {
mc_red._visible = true;
}
}
function onPress() {
root.cardPress(this);
}
function goOut() {
enabled = false;
gotoAndStop(2);
mc.mc.gotoAndStop(myNum);
}
function showMeAndOut() {
gotoAndStop(3);
mc.mc.gotoAndStop(myNum);
}
function goBack() {
gotoAndStop(1);
mc_ramka._visible = (mc_green._visible = (mc_red._visible = false));
mc.gotoAndStop(myNum);
enabled = true;
}
static var w = 48;
static var h = 64;
static var bw = 4;
static var bh = 8;
}
Symbol 101 MovieClip Frame 1
this.stop();
Symbol 108 MovieClip Frame 10
this.stop();
Symbol 111 MovieClip Frame 23
this.stop();
Symbol 112 MovieClip [lib_card] Frame 1
#initclip 3
Object.registerClass("lib_card", CCard);
#endinitclip
this.stop();
Symbol 129 Button
on (release) {
this.gotoAndStop("menu2");
}
Symbol 131 Button
on (press) {
getURL ("http://www.gametop.com/?utm_source=GreatMahjong&utm_medium=flashGame", "_blank");
}
Symbol 133 Button
on (release) {
this.gotoAndStop("rules");
}
Symbol 135 MovieClip Frame 1
this.stop();
Symbol 137 MovieClip Frame 1
this.stop();
Symbol 139 Button
on (release) {
this.gotoAndStop("menu1");
}
Symbol 142 Button
on (release) {
startClassicGame();
}
Symbol 144 Button
on (release) {
startTimeGame();
}
Symbol 151 Button
on (release) {
startGame();
}
Symbol 156 Button
on (press) {
btn_right_pressed();
}
Symbol 197 MovieClip Frame 1
this.stop();
Symbol 202 Button
on (press) {
btn_left_pressed();
}
Symbol 209 Button
on (release) {
btnMenu();
}
Symbol 214 Button
on (release) {
this._parent.btnUndo();
}
Symbol 217 MovieClip Frame 1
this.stop();
Symbol 226 Button
on (press) {
this._parent.soundOff();
this.gotoAndStop(2);
}
Symbol 228 Button
on (press) {
this._parent.soundOn();
this.gotoAndStop(1);
}
Symbol 229 MovieClip Frame 1
this.stop();
Symbol 239 Button
on (release) {
this._parent.btnBack();
}
Symbol 255 Button
on (release) {
this._parent.btnShowSolution();
}
Symbol 257 Button
on (release) {
this._parent.btnMainMenu();
}
Symbol 259 Button
on (release) {
this._parent.btnUndo2();
}
Symbol 263 MovieClip Frame 1
this.stop();