STORY LOOP FURRY PORN GAMES C SERVICES [?] [R] RND POPULAR | Archived flashes: 228086 |
/disc/ · /res/ — /show/ · /fap/ · /gg/ · /swf/ | P0001 · P2561 · P5121 |
This is the info page for Flash #26333 |
Match your wits against the computer or against a friend. To move a piece, click on it with your mouse. You can only move the piece one space forward diagonally. You cannot move the pieces backwards. The only time you can move the piece backwards is when you achieve a “King.” To king your pieces, you must reach the last row on the opposite side of the board. If you can jump an opponent you must do so. If you are playing in the overhead view and you would like to see all possible moves, just double click on the piece you would like to move. To take your opponent’s pieces, jump over the opponent’s piece diagonally and land in an empty square. You can win the game by taking all of you opponents’ pieces or by blocking your opponent from making any more legal moves. Replay your opponents last move by clicking on the "last move" button. |
VIEW PERSPECTIVE OVERHEAD MODE BE RED BE BLACK 2 PLAYER DIFFICULTY EASY HARD |
Click on the options you would like to play with. Click start when you have made your selection and are ready to play. |
turn |
ActionScript [AS1/AS2]
Frame 20view_overhead.onPress = function () { view_picker.gotoAndStop(2); }; view_perspective.onPress = function () { view_picker.gotoAndStop(1); }; mode_red.onPress = function () { mode_picker.gotoAndStop(1); diff_picker._visible = true; }; mode_black.onPress = function () { mode_picker.gotoAndStop(2); diff_picker._visible = true; }; mode_2play.onPress = function () { mode_picker.gotoAndStop(3); diff_picker._visible = false; }; difficulty_easy.onPress = function () { diff_picker.gotoAndStop(1); }; difficulty_med.onPress = function () { diff_picker.gotoAndStop(2); }; difficulty_hard.onPress = function () { diff_picker.gotoAndStop(3); };Frame 21stop();Frame 49if (BOARD == 2) { AB.gotoAndPlay("board2"); } else { AB.gotoAndPlay("board3"); }Frame 86stop(); function Tup(point) { if (!PERSPECTIVE) { return({x:Math.round(point.x), y:Math.round(point.y)}); } var xold = (0.927 * Math.round(point.x - 331)); var yold = (0.94 * Math.round(point.y - 161)); var mag = Math.sqrt(Math.pow(xold, 2) + Math.pow(yold, 2)); var xresult = ((1.2 * Math.round(mag * Math.cos(rad(angle(xold, yold) - 133)))) + 361); var yresult = ((0.77 * Math.round(mag * Math.sin(rad(angle(xold, yold) - 133)))) + 150); return({x:xresult, y:yresult}); } function Tdown(point) { if (!PERSPECTIVE) { return(point); } var ytemp = ((fl * ((y0 + ycorrect) - point.y)) / (point.y - ycorrect)); var xtemp = (((point.x - xcorrect) * (fl + ytemp)) / fl); var xresult = ((((xtemp + 318) * 512) / 640) + 92); var yresult = ((((ytemp - 42) * 255) / 240) + 33); return({x:xresult, y:yresult}); } function game_over(n) { win_text = ""; if ((COMPUTER != 0) && (COMPUTER != n)) { win_text = win_text + "CONGRADULATIONS!\r"; lclap_sound.start(0, 0); } if (n == -1) { win_text = win_text + "RED WON"; } else if (n == 1) { win_text = win_text + "BLACK WON"; } trace(("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!GAME OVER " + n) + " WON"); } function king_me() { king_sound.start(0, 0); trace("******KING ME"); } function clear_moves_board() { var i = 0; while (i < 8) { var j = 0; while (j < 8) { eval (("board_mc.s" + i) + j)._alpha = 0; j++; } i++; } } function square_maker(mc) { mc._alpha = 0; if (PERSPECTIVE) { mc._alpha = 0; } } function st(n) { if (n > -1) { return(" " + n); } return(String(n)); } function traceboard(temp_board) { var p; trace(" 0 1 2 3 4 5 6 7"); trace("-------------------"); var cnt = 0; while (cnt < 8) { p = (cnt + "|") + st(temp_board[cnt][0]); p = p + st(temp_board[cnt][1]); p = p + st(temp_board[cnt][2]); p = p + st(temp_board[cnt][3]); p = p + st(temp_board[cnt][4]); p = p + st(temp_board[cnt][5]); p = p + st(temp_board[cnt][6]); p = p + st(temp_board[cnt][7]); trace(p); cnt++; } trace("\t\t\t\t\t\t\t\t\t\t."); } function enemy(a, b) { var e = true; if (b == undefined) { e = false; } else if (b == 0) { e = false; } else if ((a * b) > 0) { e = false; } return(e); } function find_score(board, t) { cma++; var s = 0; var cnty = 0; while (cnty < 8) { var cntx = 0; while (cntx < 8) { var cs = ((((8 * t) * board[cnty][cntx]) * board[cnty][cntx]) * board[cnty][cntx]); if (cs > 0) { cs = cs + 7; } if (cs > 0) { if ((((t == -1) && (cnty == 0)) && (board[0][cntx] == 1)) && ((((board[1][cntx - 1] == -1) || (board[1][cntx + 1] == -1)) || (board[2][cntx - 2] == -1)) || (board[2][cntx + 2] == -1))) { cs = cs * 1.5; } if ((((t == 1) && (cnty == 7)) && (board[7][cntx] == -1)) && ((((board[7][cntx - 1] == 1) || (board[7][cntx + 1] == 1)) || (board[6][cntx - 2] == 1)) || (board[6][cntx + 2] == 1))) { cs = cs * 1.5; } if ((board[cntx][cnty] == 2) && ((board[cnty - 1][cntx + 1] == -1) || (board[cnty - 1][cntx - 1] == -1))) { cs = cs * 1.2; } if ((board[cntx][cnty] == -2) && ((board[cnty + 1][cntx + 1] == 1) || (board[cnty + 1][cntx - 1] == 1))) { cs = cs * 1.2; } if (((board[cnty + 1][cntx + 1] == 0) && (board[cnty - 1][cntx - 1] == 0)) || ((board[cnty - 1][cntx + 1] == 0) && (board[cnty + 1][cntx - 1] == 0))) { cs = cs * 0.5; } if (((board[cnty + 1][cntx + 1] == 0) && (board[cnty - 1][cntx - 1] == 0)) && ((board[cnty - 1][cntx + 1] == 0) && (board[cnty + 1][cntx - 1] == 0))) { cs = cs * 0.5; } if (((t == -1) && (board[cnty][cntx] > 0)) && ((enemy(board[cnty][cntx], board[cnty + 1][cntx + 1]) && (board[cnty - 1][cntx - 1] == 0)) || (enemy(board[cnty][cntx], board[cnty + 1][cntx - 1]) && (board[cnty - 1][cntx + 1] == 0)))) { cs = cs * 0; } if (((t == -1) && (board[cnty][cntx] < 0)) && ((enemy(board[cnty][cntx], board[cnty - 1][cntx + 1]) && (board[cnty + 1][cntx - 1] == 0)) || (enemy(board[cnty][cntx], board[cnty - 1][cntx - 1]) && (board[cnty + 1][cntx + 1] == 0)))) { cs = cs * 0; } if ((board[cnty][cntx] == -2) && ((enemy(board[cnty][cntx], board[cnty + 1][cntx + 1]) && (board[cnty + 2][cntx + 2] == 0)) || (enemy(board[cnty][cntx], board[cnty + 1][cntx - 1]) && (board[cnty + 2][cntx - 2] == 0)))) { cs = cs * 1.5; } if ((board[cnty][cntx] == 2) && ((enemy(board[cnty][cntx], board[cnty - 1][cntx + 1]) && (board[cnty - 2][cntx + 2] == 0)) || (enemy(board[cnty][cntx], board[cnty - 1][cntx - 1]) && (board[cnty - 2][cntx - 2] == 0)))) { cs = cs * 1.5; } if ((cnty == 7) || ((cnty == 0) && ((board[cnty][cntx] == 1) || (board[cnty][cntx] == -1)))) { cs = cs * 2.5; } if (((cnty == 5) && (board[cnty][cntx] == 1)) || ((cnty == 2) && (board[cnty][cntx] == -1))) { cs = cs * 1.25; } if (((t == -1) && (cnty == 2)) && (enemy(board[2][cntx], board[3][cntx + 1]) || (enemy(board[2][cntx], board[3][cntx - 1])))) { cs = -8; } if (((t == 1) && (cnty == 6)) && (enemy(board[6][cntx], board[5][cntx + 1]) || (enemy(board[6][cntx], board[5][cntx - 1])))) { cs = -8; } s = s + cs; } cntx++; } cnty++; } trace((("t: " + t) + " Finished with find score, S is : ") + s); return(s); } trace(((((" BOARD is: " + BOARD) + " COMPUTER is: ") + COMPUTER) + " DEPTH is: ") + DEPTH); you_are_mc.gotoAndStop(COMPUTER + 2); start_y = 40; start_x = 227; dragging = false; turn_mc.gotoAndStop(3); last_btn.onRelease = function () { if (user_board.dark_moves > 0) { var last_mc = eval (("player_mc.p" + last_c) + last_d); trace("LAST MC: " + last_mc); trace((("last_x: " + last_x) + " last_y: ") + last_y); last_mc._x = last_x; last_mc._y = last_y; last_mc.moveMe(eval (("board_mc.s" + last_c) + last_d)._x, eval (("board_mc.s" + last_c) + last_d)._y, 8, 19); } }; back_btn.onRelease = function () { delete user_board; board_mc.removeMovieClip(); player_mc.removeMovieClip(); gotoAndPlay (1); }; temptrace = function () { light_moves = user_board.light_moves; light_score = user_board.dark_taken; dark_moves = user_board.dark_moves; dark_score = user_board.light_taken; trace(((" light taken " + user_board.light_taken) + " Dark taken ") + user_board.dark_taken); trace(((" light moves " + user_board.light_moves) + " Dark moves ") + user_board.dark_moves); }; angle = function (xc, yc) { var a = Math.abs((Math.atan(yc / xc) / Math.pi) * 180); if ((xc < 0) && (yc > 0)) { a = 180 - a; } if ((xc < 0) && (yc < 0)) { a = 180 + a; } if ((xc > 0) && (yc < 0)) { a = 360 - a; } return(a); }; rad = function (deg) { return((deg / 180) * Math.pi); }; MovieClip.prototype.moveMe = function (x, y, rate, depth) { createEmptyMovieClip("mover_mc" + depth, depth); eval ("mover_mc" + depth).mc = this; moving = true; var delta_y = ((y - this._y) / Math.abs(x - this._x)); var delta_x = ((x - this._x) / Math.abs(x - this._x)); eval ("mover_mc" + depth).onEnterFrame = function () { if (((((this.mc._y <= y) && ((this.mc._y + (delta_y * rate)) >= y)) || ((this.mc._y >= y) && ((this.mc._y + (delta_y * rate)) <= y))) || ((this.mc._x <= x) && ((this.mc._x + (delta_x * rate)) >= x))) || ((this.mc._x >= x) && ((this.mc._x + (delta_x * rate)) <= x))) { this.onEnterFrame = undefined; this.removeMovieClip(); user_board.show_board(); moving = false; } this.mc._y = this.mc._y + (delta_y * rate); this.mc._x = this.mc._x + (delta_x * rate); }; }; board_type = function (b, move, t) { this.board_ar = [[0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, -1, 0, -1, 0, -1, 0], [0, -1, 0, -1, 0, -1, 0, -1], [-1, 0, -1, 0, -1, 0, -1, 0]]; if (b != undefined) { var cntx = 0; while (cntx < 8) { var cnty = 0; while (cnty < 8) { this.board_ar[cnty][cntx] = b[cnty][cntx]; cnty++; } cntx++; } } if (move != undefined) { var a = move.a; var b = move.b; var c = move.c; var d = move.d; var val = this.board_ar[a][b]; this.board_ar[a][b] = 0; this.board_ar[c][d] = val; if (((val == 1) && (c == 7)) || ((val == -1) && (c == 0))) { val = val * 2; this.board_ar[c][d] = val; } if (((a + c) % 2) == 0) { this.board_ar[(a + c) / 2][(b + d) / 2] = 0; this.move_list = []; this.list_valid_jumps(c, d); if (this.move_list.length > 0) { t = t * -1; } } t = t * -1; } if (t == undefined) { this.turn = 1; } else { this.turn = t; } this.jumped = false; this.jumped_x = -1; this.jumped_y = -1; this.move_list = new Array(); }; board_type.prototype.add_move = function (a, b, c, d, e) { temp = new Object(); temp.a = a; temp.b = b; temp.c = c; temp.d = d; temp.e = e; this.move_list.push(temp); delete temp; }; board_type.prototype.show_moves_list = function () { if ((!PERSPECTIVE) && (user_board.turn != COMPUTER)) { var cnt = 0; while (cnt < this.move_list.length) { var c = this.move_list[cnt].c; var d = this.move_list[cnt].d; eval (("board_mc.s" + c) + d)._alpha = 50; cnt++; } } }; board_type.prototype.list_valid_jumps = function (y, x) { this.clear_moves_board(); var val = this.board_ar[y][x]; if (val == 1) { if ((this.board_ar[y + 1][x - 1] < 0) && (this.board_ar[y + 2][x - 2] == 0)) { this.add_move(y, x, y + 2, x - 2, true); } if ((this.board_ar[y + 1][x + 1] < 0) && (this.board_ar[y + 2][x + 2] == 0)) { this.add_move(y, x, y + 2, x + 2, true); } } else if (val == -1) { if ((this.board_ar[y - 1][x - 1] > 0) && (this.board_ar[y - 2][x - 2] == 0)) { this.add_move(y, x, y - 2, x - 2, true); } if ((this.board_ar[y - 1][x + 1] > 0) && (this.board_ar[y - 2][x + 2] == 0)) { this.add_move(y, x, y - 2, x + 2, true); } } if (val == 2) { if ((this.board_ar[y + 1][x - 1] < 0) && (this.board_ar[y + 2][x - 2] == 0)) { this.add_move(y, x, y + 2, x - 2, true); } if ((this.board_ar[y + 1][x + 1] < 0) && (this.board_ar[y + 2][x + 2] == 0)) { this.add_move(y, x, y + 2, x + 2, true); } if ((this.board_ar[y - 1][x - 1] < 0) && (this.board_ar[y - 2][x - 2] == 0)) { this.add_move(y, x, y - 2, x - 2, true); } if ((this.board_ar[y - 1][x + 1] < 0) && (this.board_ar[y - 2][x + 2] == 0)) { this.add_move(y, x, y - 2, x + 2, true); } } else if (val == -2) { if ((this.board_ar[y + 1][x - 1] > 0) && (this.board_ar[y + 2][x - 2] == 0)) { this.add_move(y, x, y + 2, x - 2, true); } if ((this.board_ar[y + 1][x + 1] > 0) && (this.board_ar[y + 2][x + 2] == 0)) { this.add_move(y, x, y + 2, x + 2, true); } if ((this.board_ar[y - 1][x - 1] > 0) && (this.board_ar[y - 2][x - 2] == 0)) { this.add_move(y, x, y - 2, x - 2, true); } if ((this.board_ar[y - 1][x + 1] > 0) && (this.board_ar[y - 2][x + 2] == 0)) { this.add_move(y, x, y - 2, x + 2, true); } } }; board_type.prototype.list_valid_moves = function () { var jump = false; this.clear_moves_board(); var cntx = 0; while (cntx < 8) { var cnty = 0; while (cnty < 8) { if ((this.turn == 1) && (this.board_ar[cnty][cntx] == 1)) { if (this.board_ar[cnty + 1][cntx - 1] == 0) { this.add_move(cnty, cntx, cnty + 1, cntx - 1, false); } else if ((this.board_ar[cnty + 1][cntx - 1] < 0) && (this.board_ar[cnty + 2][cntx - 2] == 0)) { this.add_move(cnty, cntx, cnty + 2, cntx - 2, true); jump = true; } if (this.board_ar[cnty + 1][cntx + 1] == 0) { this.add_move(cnty, cntx, cnty + 1, cntx + 1, false); } else if ((this.board_ar[cnty + 1][cntx + 1] < 0) && (this.board_ar[cnty + 2][cntx + 2] == 0)) { this.add_move(cnty, cntx, cnty + 2, cntx + 2, true); jump = true; } } else if ((this.turn == -1) && (this.board_ar[cnty][cntx] == -1)) { if (this.board_ar[cnty - 1][cntx - 1] == 0) { this.add_move(cnty, cntx, cnty - 1, cntx - 1, false); } else if ((this.board_ar[cnty - 1][cntx - 1] > 0) && (this.board_ar[cnty - 2][cntx - 2] == 0)) { this.add_move(cnty, cntx, cnty - 2, cntx - 2, true); jump = true; } if (this.board_ar[cnty - 1][cntx + 1] == 0) { this.add_move(cnty, cntx, cnty - 1, cntx + 1, false); } else if ((this.board_ar[cnty - 1][cntx + 1] > 0) && (this.board_ar[cnty - 2][cntx + 2] == 0)) { this.add_move(cnty, cntx, cnty - 2, cntx + 2, true); jump = true; } } else if ((this.turn == 1) && (this.board_ar[cnty][cntx] == 2)) { if (this.board_ar[cnty + 1][cntx - 1] == 0) { this.add_move(cnty, cntx, cnty + 1, cntx - 1, false); } else if ((this.board_ar[cnty + 1][cntx - 1] < 0) && (this.board_ar[cnty + 2][cntx - 2] == 0)) { this.add_move(cnty, cntx, cnty + 2, cntx - 2, true); jump = true; } if (this.board_ar[cnty + 1][cntx + 1] == 0) { this.add_move(cnty, cntx, cnty + 1, cntx + 1, false); } else if ((this.board_ar[cnty + 1][cntx + 1] < 0) && (this.board_ar[cnty + 2][cntx + 2] == 0)) { this.add_move(cnty, cntx, cnty + 2, cntx + 2, true); jump = true; } if (this.board_ar[cnty - 1][cntx - 1] == 0) { this.add_move(cnty, cntx, cnty - 1, cntx - 1, false); } else if ((this.board_ar[cnty - 1][cntx - 1] < 0) && (this.board_ar[cnty - 2][cntx - 2] == 0)) { this.add_move(cnty, cntx, cnty - 2, cntx - 2, true); jump = true; } if (this.board_ar[cnty - 1][cntx + 1] == 0) { this.add_move(cnty, cntx, cnty - 1, cntx + 1, false); } else if ((this.board_ar[cnty - 1][cntx + 1] < 0) && (this.board_ar[cnty - 2][cntx + 2] == 0)) { this.add_move(cnty, cntx, cnty - 2, cntx + 2, true); jump = true; } } else if ((this.turn == -1) && (this.board_ar[cnty][cntx] == -2)) { if (this.board_ar[cnty - 1][cntx - 1] == 0) { this.add_move(cnty, cntx, cnty - 1, cntx - 1, false); } else if ((this.board_ar[cnty - 1][cntx - 1] > 0) && (this.board_ar[cnty - 2][cntx - 2] == 0)) { this.add_move(cnty, cntx, cnty - 2, cntx - 2, true); jump = true; } if (this.board_ar[cnty - 1][cntx + 1] == 0) { this.add_move(cnty, cntx, cnty - 1, cntx + 1, false); } else if ((this.board_ar[cnty - 1][cntx + 1] > 0) && (this.board_ar[cnty - 2][cntx + 2] == 0)) { this.add_move(cnty, cntx, cnty - 2, cntx + 2, true); jump = true; } if (this.board_ar[cnty + 1][cntx - 1] == 0) { this.add_move(cnty, cntx, cnty + 1, cntx - 1, false); } else if ((this.board_ar[cnty + 1][cntx - 1] > 0) && (this.board_ar[cnty + 2][cntx - 2] == 0)) { this.add_move(cnty, cntx, cnty + 2, cntx - 2, true); jump = true; } if (this.board_ar[cnty + 1][cntx + 1] == 0) { this.add_move(cnty, cntx, cnty + 1, cntx + 1, false); } else if ((this.board_ar[cnty + 1][cntx + 1] > 0) && (this.board_ar[cnty + 2][cntx + 2] == 0)) { this.add_move(cnty, cntx, cnty + 2, cntx + 2, true); jump = true; } } cnty++; } cntx++; } var ml = this.move_list.length; if (jump) { var cnt = 0; while (cnt < ml) { if (!this.move_list[cnt].e) { this.move_list.splice(cnt, 1); cnt--; ml--; } cnt++; } } }; board_type.prototype.valid = function (py, px, sy, sx) { var v = false; if ((sy == py) && (sx == px)) { v = true; this.turn = this.turn * -1; } else if (((sx + sy) % 2) == 1) { v = false; var cnt = 0; while (cnt < this.move_list.length) { if (!v) { if ((py == this.move_list[cnt].a) && (px == this.move_list[cnt].b)) { if ((sy == this.move_list[cnt].c) && (sx == this.move_list[cnt].d)) { v = true; this.jumped = this.move_list[cnt].e; if (this.jumped) { this.jumped_y = (this.move_list[cnt].a + this.move_list[cnt].c) / 2; this.jumped_x = (this.move_list[cnt].b + this.move_list[cnt].d) / 2; } } } } cnt++; } } return(v); }; board_type.prototype.evaluate = function (D) { var r = 0; var maxs = -99999; if (D == 1) { r = -1 * find_score(this.board_ar, this.turn); return(r); } this.list_valid_moves(); var temp_score; hscores = new Array(); var sum = 0; var cnt = 0; while (cnt < this.move_list.length) { var temp_board = new board_type(this.board_ar, this.move_list[cnt], this.turn); traceboard(temp_board.board_ar); delete temp_board; cnt++; } var cnt = 0; while (cnt < this.move_list.length) { trace(((" CNT: " + cnt) + " hueristic score: ") + hscores[cnt]); var temp_board = new board_type(this.board_ar, this.move_list[cnt], this.turn); temp_score = temp_board.evaluate(D - 1); if ((temp_score > maxs) || (cnt == 0)) { maxs = temp_score; } delete temp_board; cnt++; } return(maxs); }; board_type.prototype.comp_mover = function () { thinking = true; cma = 0; var score = 0; var move_ind; var start_time = getTimer(); var temp_score = new Array(this.move_list.length); if (this.move_list.length > 0) { trace((((("turn : " + user_board.turn) + " Dark move: ") + user_board.dark_moves) + " Light move: ") + user_board.light_moves); if (user_board.dark_moves != 0) { var cnt = 0; while (cnt < this.move_list.length) { trace(((" Looking at move: " + cnt) + " Score at top of loop: ") + score); traceboard(this.board_ar); if (this.valid(this.move_list[cnt].a, this.move_list[cnt].b, this.move_list[cnt].c, this.move_list[cnt].d)) { temp_board = new board_type(this.board_ar, this.move_list[cnt], this.turn); trace("TEMP BOARD: "); traceboard(temp_board.board_ar); var t = temp_board.evaluate(DEPTH); trace((("IND: " + cnt) + " SCORED: ") + t); temp_score[cnt] = t; delete temp_board; } if ((temp_score[cnt] > score) || (cnt == 0)) { score = temp_score[cnt]; move_ind = cnt; } cnt++; } var tie_list = new Array(); var i = 0; var cnt = 0; while (cnt < this.move_list.length) { trace((((("CNT: " + cnt) + " TEMP AT CNT: ") + temp_score[cnt]) + " HIGH SCORE: ") + score); if (temp_score[cnt] == score) { tie_list.push(cnt); } trace("TIE LIST: " + tie_list); cnt++; } var ran = tie_list[random(tie_list.length)]; trace("Selected element: " + ran); delete temp_score; delete tie_list; } else { ran = 0; } var a = this.move_list[ran].a; var b = this.move_list[ran].b; var c = this.move_list[ran].c; var d = this.move_list[ran].d; var val = this.board_ar[a][b]; if (this.valid(a, b, c, d)) { this.board_ar[a][b] = 0; this.board_ar[c][d] = val; this.move_list = []; if (((val == 1) && (c == 7)) || ((val == -1) && (c == 0))) { val = val * 2; this.board_ar[c][d] = val; king_me(); if (this.jumped) { if (this.turn == 1) { user_board.light_taken++; } else { user_board.dark_taken++; } temptrace(); this.board_ar[this.jumped_y][this.jumped_x] = 0; this.jumped = false; } } if (this.jumped) { if (this.turn == 1) { user_board.light_taken++; } else { user_board.dark_taken++; } temptrace(); this.board_ar[this.jumped_y][this.jumped_x] = 0; eval (("player_mc.p" + this.jumped_y) + this.jumped_x)._alpha = 30; this.move_list = []; this.list_valid_jumps(c, d); if (this.move_list.length == 0) { this.jumped = false; } } if (!this.jumped) { eval (("player_mc.p" + a) + b).moveMe(eval (("board_mc.s" + c) + d)._x, eval (("board_mc.s" + c) + d)._y, 8, 18); this.turn = this.turn * -1; turn_mc.gotoAndStop(this.turn + 2); this.list_valid_moves(); this.show_moves_list(); if (this.move_list.length == 0) { game_over(this.turn * -1); } } else { user_board.show_board(); eval (("player_mc.p" + a) + b).moveMe(eval (("board_mc.s" + c) + d)._x, eval (("board_mc.s" + c) + d)._y, 8, 19); this.comp_mover(); } last_x = eval (("player_mc.p" + a) + b)._x; last_y = eval (("player_mc.p" + a) + b)._y; trace("ln 665 LAST MC: " + last_mc); trace((("ln 666 last_x: " + last_x) + " last_y: ") + last_y); last_c = c; last_d = d; last_a = a; last_b = b; eval (("board_mc.s" + a) + b)._alpha = 50; eval (("board_mc.s" + a) + b).gotoAndStop(2); trace(((((" Marked last move y: " + a) + " x:") + b) + " ALPHA:") + eval (("board_mc.s" + a) + b)._alpha); } } else { game_over(COMPUTER * -1); } last_btn._x = 585; reset_btn._x = 585; back_btn._x = 22; think_time = false; thinking = false; if (global_class.turn == 1) { user_board.light_moves++; } else { user_board.dark_moves++; } temptrace(); }; board_type.prototype.piece_maker = function (mc) { mc.class = this; mc.onPress = function () { eval (("board_mc.s" + last_a) + last_b).gotoAndStop(1); if ((((((!dragging) && (this.class.turn == (Math.abs(mc.val) / mc.val))) && (this.class.turn != COMPUTER)) && (!think_time)) && (!thinking)) && (!moving)) { last_y = this._y; last_x = this._x; mc.swapDepths(65); startDrag (this); dragging = true; this.onPress = function () { var under = eval (this._droptarget); var ay = mc.yid; var ax = mc.xid; if (this.class.valid(mc.yid, mc.xid, under.yid, under.xid)) { win_text = ""; this.class.board_ar[this.yid][this.xid] = 0; last_c = (this.yid = under.yid); last_d = (this.xid = under.xid); this.class.board_ar[this.yid][this.xid] = this.val; this.class.move_list = []; this._x = under._x; this._y = under._y; stopDrag(); dragging = false; this.class.piece_maker(this); if (((this.val == 1) && (this.yid == 7)) || ((this.val == -1) && (this.yid == 0))) { this.val = this.val * 2; this.class.board_ar[this.yid][this.xid] = this.val; king_me(); if (this.class.jumped) { if (global_class.turn == 1) { user_board.light_taken++; } else { user_board.dark_taken++; } temptrace(); this.class.board_ar[this.class.jumped_y][this.class.jumped_x] = 0; this.class.jumped = false; } } if (this.class.jumped) { if (global_class.turn == 1) { user_board.light_taken++; } else { user_board.dark_taken++; } this.class.board_ar[this.class.jumped_y][this.class.jumped_x] = 0; eval (("player_mc.p" + this.class.jumped_y) + this.class.jumped_x)._alpha = 30; this.class.move_list = []; this.class.list_valid_jumps(this.yid, this.xid); this.class.show_moves_list(); if (this.class.move_list.length == 0) { this.class.jumped = false; } else { sclap_sound.start(0, 0); } } if (!this.class.jumped) { global_class = this.class; global_class.show_board(); global_class.turn = global_class.turn * -1; turn_mc.gotoAndStop(global_class.turn + 2); global_class.list_valid_moves(); global_class.show_moves_list(); if (global_class.move_list.length == 0) { game_over(global_class.turn * -1); } } if (!((ay == under.yid) && (ax == under.xid))) { trace(((((((" Y1: " + ay) + " Y2: ") + under.yid) + " X1: ") + ax) + " X2: ") + under.xid); if (global_class.turn == 1) { user_board.light_moves++; } else { user_board.dark_moves++; } temptrace(); } trace((("ln 798 last_x: " + last_x) + " last_y: ") + last_y); trace((("ln 801 last_c: " + last_c) + " last_d: ") + last_d); if (global_class.turn == COMPUTER) { last_btn._x = 900; reset_btn._x = 900; back_btn._x = 900; think_time = true; } else { last_btn._x = 585; } } else if (global_class.move_list[0].e) { win_text = "Take the jump!"; } }; } }; }; this.onEnterFrame = function () { if (((user_board.turn == COMPUTER) && (think_time)) && (!thinking)) { user_board.comp_mover(); } }; make_board = function () { removeMovieClip("board_mc"); CreateEmptyMovieClip("board_mc", 5); var i = 0; while (i < 8) { var j = 0; while (j < 8) { if (PERSPECTIVE) { if (((i + j) % 2) == 1) { board_mc.attachMovie("dark_square_p", ("s" + i) + j, (i * 8) + j); } else { board_mc.attachMovie("light_square_p", ("s" + i) + j, (i * 8) + j); } } else if (((i + j) % 2) == 1) { board_mc.attachMovie("dark_square", ("s" + i) + j, (i * 8) + j); } else { board_mc.attachMovie("light_square", ("s" + i) + j, (i * 8) + j); } eval (("board_mc.s" + i) + j).xid = j; eval (("board_mc.s" + i) + j).yid = i; eval (("board_mc.s" + i) + j).x = (j * 35) + start_x; eval (("board_mc.s" + i) + j).y = (i * 35) + start_y; var temp_point = Tup({x:eval (("board_mc.s" + i) + j).x, y:eval (("board_mc.s" + i) + j).y}); eval (("board_mc.s" + i) + j)._x = temp_point.x; eval (("board_mc.s" + i) + j)._y = temp_point.y; square_maker(eval (("board_mc.s" + i) + j)); j++; } i++; } }; board_type.prototype.show_board = function () { make_board(); trace("Blank Board"); removeMovieClip("player_mc"); CreateEmptyMovieClip("player_mc", 6); var i = 0; while (i < 8) { var j = 0; while (j < 8) { if (PERSPECTIVE) { if (this.board_ar[i][j] == 1) { player_mc.attachMovie("red_piece_p", ("p" + i) + j, (i * 8) + j); eval (("player_mc.p" + i) + j).val = 1; } else if (this.board_ar[i][j] == -1) { player_mc.attachMovie("white_piece_p", ("p" + i) + j, (i * 8) + j); eval (("player_mc.p" + i) + j).val = -1; } else if (this.board_ar[i][j] == 2) { player_mc.attachMovie("red_king_p", ("p" + i) + j, ((i * 8) + j) + 64); eval (("player_mc.p" + i) + j).val = 2; } else if (this.board_ar[i][j] == -2) { player_mc.attachMovie("white_king_p", ("p" + i) + j, ((i * 8) + j) + 64); eval (("player_mc.p" + i) + j).val = -2; } } else if (this.board_ar[i][j] == 1) { player_mc.attachMovie("red_piece", ("p" + i) + j, (i * 8) + j); eval (("player_mc.p" + i) + j).val = 1; } else if (this.board_ar[i][j] == -1) { player_mc.attachMovie("white_piece", ("p" + i) + j, (i * 8) + j); eval (("player_mc.p" + i) + j).val = -1; } else if (this.board_ar[i][j] == 2) { player_mc.attachMovie("red_king", ("p" + i) + j, (i * 8) + j); eval (("player_mc.p" + i) + j).val = 2; } else if (this.board_ar[i][j] == -2) { player_mc.attachMovie("white_king", ("p" + i) + j, (i * 8) + j); eval (("player_mc.p" + i) + j).val = -2; } if (this.board_ar[i][j] != 0) { if (eval (("player_mc.p" + i) + j) == undefined) { trace((((("Undefined on lin 528: i " + i) + " j ") + j) + "BOARD: ") + this.board_ar[i][j]); } eval (("player_mc.p" + i) + j).x = (j * 35) + start_x; eval (("player_mc.p" + i) + j).y = (i * 35) + start_y; var temp_point = Tup({x:eval (("player_mc.p" + i) + j).x, y:eval (("player_mc.p" + i) + j).y}); eval (("player_mc.p" + i) + j)._x = temp_point.x; eval (("player_mc.p" + i) + j)._y = temp_point.y; eval (("player_mc.p" + i) + j).xid = j; eval (("player_mc.p" + i) + j).yid = i; this.piece_maker(eval (("player_mc.p" + i) + j)); } j++; } i++; } }; reset_btn.onPress = function () { trace("BUTTON HIT"); win_text = ""; user_board.turn = 1; user_board.dark_taken = 0; user_board.light_taken = 0; user_board.dark_moves = 0; user_board.light_moves = 0; game_boards = new Array(); user_board.board_ar = [[0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, -1, 0, -1, 0, -1, 0], [0, -1, 0, -1, 0, -1, 0, -1], [-1, 0, -1, 0, -1, 0, -1, 0]]; user_board.show_board(); user_board.list_valid_moves(); if (user_board.turn == COMPUTER) { user_board.comp_mover(); } }; king_sound = new Sound(this); king_sound.attachSound("king_sound"); lclap_sound = new Sound(this); lclap_sound.attachSound("long_clap_sound"); sclap_sound = new Sound(this); sclap_sound.attachSound("short_clap_sound"); if (BOARD == 3) { b3._visible = true; b2._visible = false; b1._visible = false; PERSPECTIVE = true; } if (BOARD == 2) { b3._visible = false; b1._visible = false; PERSPECTIVE = false; } if (BOARD == 1) { b2._visible = false; PERSPECTIVE = false; } think_time = false; user_board = new board_type(); anim = new Array(); user_board.dark_taken = 0; user_board.light_taken = 0; user_board.dark_moves = 0; user_board.light_moves = 0; win_text = ""; trace("turn: " + user_board.turn); user_board.show_board(); user_board.list_valid_moves(); if (COMPUTER == 0) { user_board.show_moves_list(); last_btn._x = 900; } if (user_board.turn == COMPUTER) { user_board.comp_mover(); }Symbol 9 MovieClip [dark_square] Frame 1stop();Symbol 59 Buttonon (release) { trace((((("CAUGHT START VP.c:" + view_picker._currentframe) + " MP.c ") + mode_picker._currentframe) + " Dp.c ") + diff_picker._currentframe); gotoAndPlay (23); if (view_picker._currentframe == 1) { BOARD = 3; } else { BOARD = 2; } if (mode_picker._currentframe == 1) { COMPUTER = 1; } else if (mode_picker._currentframe == 2) { COMPUTER = -1; } else { COMPUTER = 0; } if (diff_picker._currentframe == 1) { DEPTH = 1; } else if (diff_picker._currentframe == 2) { DEPTH = 3; } trace(((((" BOARD is: " + BOARD) + " COMPUTER is: ") + COMPUTER) + " DEPTH is: ") + DEPTH); }Symbol 61 MovieClip Frame 1stop();Symbol 70 MovieClip Frame 8stop();Symbol 70 MovieClip Frame 16stop();Symbol 106 MovieClip Frame 1stop();
Library Items
Symbol 1 Sound [short_clap_sound] | ||
Symbol 2 Sound [long_clap_sound] | ||
Symbol 3 Sound [king_sound] | ||
Symbol 4 Graphic | Used by:9 | |
Symbol 5 Graphic | Used by:9 | |
Symbol 6 Graphic | Used by:7 | |
Symbol 7 MovieClip | Uses:6 | Used by:9 |
Symbol 8 Graphic | Used by:9 | |
Symbol 9 MovieClip [dark_square] | Uses:4 5 7 8 | |
Symbol 10 Graphic | Used by:11 | |
Symbol 11 MovieClip [light_square] | Uses:10 | |
Symbol 12 Bitmap | Used by:13 | |
Symbol 13 Graphic | Uses:12 | Used by:14 |
Symbol 14 MovieClip [white_piece] | Uses:13 | |
Symbol 15 Bitmap | Used by:16 | |
Symbol 16 Graphic | Uses:15 | Used by:17 |
Symbol 17 MovieClip [red_piece] | Uses:16 | |
Symbol 18 Bitmap | Used by:20 25 | |
Symbol 19 Bitmap | Used by:20 | |
Symbol 20 Graphic | Uses:18 19 | Used by:21 |
Symbol 21 MovieClip [white_king] | Uses:20 | |
Symbol 22 Bitmap | Used by:23 | |
Symbol 23 Graphic | Uses:22 | Used by:26 106 |
Symbol 24 MovieClip | Used by:26 | |
Symbol 25 Graphic | Uses:18 | Used by:26 |
Symbol 26 MovieClip [red_king] | Uses:23 24 25 | |
Symbol 27 Bitmap | Used by:28 35 | |
Symbol 28 Graphic | Uses:27 | Used by:29 30 |
Symbol 29 MovieClip [black_piece_p] | Uses:28 | |
Symbol 30 MovieClip [red_piece_p] | Uses:28 | |
Symbol 31 Bitmap | Used by:33 35 | |
Symbol 32 Bitmap | Used by:33 41 | |
Symbol 33 Graphic | Uses:31 32 | Used by:34 |
Symbol 34 MovieClip [white_king_p] | Uses:33 | |
Symbol 35 Graphic | Uses:31 27 | Used by:36 |
Symbol 36 MovieClip [red_king_p] | Uses:35 | |
Symbol 37 Graphic | Used by:38 | |
Symbol 38 MovieClip [dark_square_p] | Uses:37 | |
Symbol 39 Graphic | Used by:40 | |
Symbol 40 MovieClip [light_square_p] | Uses:39 | |
Symbol 41 Graphic | Uses:32 | Used by:42 |
Symbol 42 MovieClip [white_piece_p] | Uses:41 | Used by:61 |
Symbol 43 Graphic | Used by:Timeline | |
Symbol 44 Bitmap | Used by:45 | |
Symbol 45 Graphic | Uses:44 | Used by:Timeline |
Symbol 46 Bitmap | Used by:49 | |
Symbol 47 Bitmap | Used by:49 | |
Symbol 48 Bitmap | Used by:49 | |
Symbol 49 Graphic | Uses:46 47 48 | Used by:Timeline |
Symbol 50 Font | Used by:51 60 | |
Symbol 51 Text | Uses:50 | Used by:Timeline |
Symbol 52 Font | Used by:54 | |
Symbol 53 Font | Used by:54 | |
Symbol 54 Text | Uses:52 53 | Used by:Timeline |
Symbol 55 Bitmap | Used by:56 58 | |
Symbol 56 Graphic | Uses:55 | Used by:57 59 |
Symbol 57 MovieClip | Uses:56 | Used by:59 |
Symbol 58 Graphic | Uses:55 | Used by:59 |
Symbol 59 Button | Uses:56 57 58 | Used by:Timeline |
Symbol 60 Text | Uses:50 | Used by:Timeline |
Symbol 61 MovieClip | Uses:42 | Used by:Timeline |
Symbol 62 Graphic | Used by:63 | |
Symbol 63 Button | Uses:62 | Used by:Timeline |
Symbol 64 Bitmap | Used by:65 | |
Symbol 65 Graphic | Uses:64 | Used by:66 |
Symbol 66 MovieClip | Uses:65 | Used by:70 |
Symbol 67 Bitmap | Used by:68 | |
Symbol 68 Graphic | Uses:67 | Used by:69 |
Symbol 69 MovieClip | Uses:68 | Used by:70 |
Symbol 70 MovieClip | Uses:66 69 | Used by:Timeline |
Symbol 71 MovieClip | Used by:Timeline | |
Symbol 72 Bitmap | Used by:73 | |
Symbol 73 Graphic | Uses:72 | Used by:74 |
Symbol 74 MovieClip | Uses:73 | Used by:Timeline |
Symbol 75 Bitmap | Used by:76 | |
Symbol 76 Graphic | Uses:75 | Used by:77 |
Symbol 77 MovieClip | Uses:76 | Used by:Timeline |
Symbol 78 Bitmap | Used by:79 | |
Symbol 79 Graphic | Uses:78 | Used by:Timeline |
Symbol 80 Bitmap | Used by:81 | |
Symbol 81 Graphic | Uses:80 | Used by:Timeline |
Symbol 82 Font | Used by:83 | |
Symbol 83 Text | Uses:82 | Used by:Timeline |
Symbol 84 Font | Used by:85 86 87 88 89 | |
Symbol 85 EditableText | Uses:84 | Used by:Timeline |
Symbol 86 EditableText | Uses:84 | Used by:Timeline |
Symbol 87 EditableText | Uses:84 | Used by:Timeline |
Symbol 88 EditableText | Uses:84 | Used by:Timeline |
Symbol 89 EditableText | Uses:84 | Used by:Timeline |
Symbol 90 Bitmap | Used by:91 | |
Symbol 91 Graphic | Uses:90 | Used by:93 |
Symbol 92 Graphic | Used by:93 | |
Symbol 93 Button | Uses:91 92 | Used by:Timeline |
Symbol 94 Bitmap | Used by:95 | |
Symbol 95 Graphic | Uses:94 | Used by:96 98 |
Symbol 96 MovieClip | Uses:95 | Used by:98 |
Symbol 97 Graphic | Used by:98 | |
Symbol 98 Button | Uses:95 96 97 | Used by:Timeline |
Symbol 99 Bitmap | Used by:100 102 | |
Symbol 100 Graphic | Uses:99 | Used by:101 103 |
Symbol 101 MovieClip | Uses:100 | Used by:103 |
Symbol 102 Graphic | Uses:99 | Used by:103 |
Symbol 103 Button | Uses:100 101 102 | Used by:Timeline |
Symbol 104 Bitmap | Used by:105 | |
Symbol 105 Graphic | Uses:104 | Used by:106 |
Symbol 106 MovieClip | Uses:105 23 | Used by:Timeline |
Instance Names
"view_picker" | Frame 20 | Symbol 61 MovieClip |
"mode_picker" | Frame 20 | Symbol 61 MovieClip |
"diff_picker" | Frame 20 | Symbol 61 MovieClip |
"view_perspective" | Frame 20 | Symbol 63 Button |
"view_overhead" | Frame 20 | Symbol 63 Button |
"mode_red" | Frame 20 | Symbol 63 Button |
"mode_black" | Frame 20 | Symbol 63 Button |
"mode_2play" | Frame 20 | Symbol 63 Button |
"difficulty_easy" | Frame 20 | Symbol 63 Button |
"difficulty_med" | Frame 20 | Symbol 63 Button |
"difficulty_hard" | Frame 20 | Symbol 63 Button |
"AB" | Frame 49 | Symbol 70 MovieClip |
"reset_btn" | Frame 86 | Symbol 93 Button |
"back_btn" | Frame 86 | Symbol 98 Button |
"last_btn" | Frame 86 | Symbol 103 Button |
"turn_mc" | Frame 86 | Symbol 106 MovieClip |
"b2" | Symbol 70 MovieClip Frame 1 | Symbol 66 MovieClip |
Special Tags
ExportAssets (56) | Timeline Frame 1 | Symbol 1 as "short_clap_sound" |
ExportAssets (56) | Timeline Frame 1 | Symbol 2 as "long_clap_sound" |
ExportAssets (56) | Timeline Frame 1 | Symbol 3 as "king_sound" |
ExportAssets (56) | Timeline Frame 1 | Symbol 9 as "dark_square" |
ExportAssets (56) | Timeline Frame 1 | Symbol 11 as "light_square" |
ExportAssets (56) | Timeline Frame 1 | Symbol 14 as "white_piece" |
ExportAssets (56) | Timeline Frame 1 | Symbol 17 as "red_piece" |
ExportAssets (56) | Timeline Frame 1 | Symbol 21 as "white_king" |
ExportAssets (56) | Timeline Frame 1 | Symbol 26 as "red_king" |
ExportAssets (56) | Timeline Frame 1 | Symbol 29 as "black_piece_p" |
ExportAssets (56) | Timeline Frame 1 | Symbol 30 as "red_piece_p" |
ExportAssets (56) | Timeline Frame 1 | Symbol 34 as "white_king_p" |
ExportAssets (56) | Timeline Frame 1 | Symbol 36 as "red_king_p" |
ExportAssets (56) | Timeline Frame 1 | Symbol 38 as "dark_square_p" |
ExportAssets (56) | Timeline Frame 1 | Symbol 40 as "light_square_p" |
ExportAssets (56) | Timeline Frame 1 | Symbol 42 as "white_piece_p" |
ExportAssets (56) | Timeline Frame 20 | Symbol 42 as "white_piece_p" |
ExportAssets (56) | Timeline Frame 20 | Symbol 42 as "white_piece_p" |
ExportAssets (56) | Timeline Frame 20 | Symbol 42 as "white_piece_p" |
Labels
"part2" | Frame 22 |
"board2" | Symbol 70 MovieClip Frame 1 |
"board3" | Symbol 70 MovieClip Frame 9 |
Dynamic Text Variables
light_score | Symbol 85 EditableText | "" |
dark_score | Symbol 86 EditableText | "" |
light_moves | Symbol 87 EditableText | "" |
dark_moves | Symbol 88 EditableText | "" |
win_text | Symbol 89 EditableText | "" |
|