Frame 1
if (getbytesloaded() >= math.floor(1 * getbytestotal())) {
gotoAndPlay (3);
}
if (plcount == undefined) {
barmc._xwidth = 1;
}
Frame 2
plcount = 1;
barmc._xscale = (getBytesLoaded() / getBytesTotal()) * 100;
gotoAndPlay (1);
Frame 3
stop();
Instance of Symbol 107 MovieClip "m" in Frame 3
onClipEvent (load) {
loader_lv = new loadvars();
rank = 0;
won = 0;
wm = [];
loader_lv.onload = function () {
smsg = loader_lv.msg.split(",");
_root.txt4 = smsg[51];
_root.txt5 = smsg[52];
_root.nextframe();
};
loader_lv.load("smsg.txt");
}
Frame 4
nextFrame();
Instance of Symbol 254 MovieClip "g" in Frame 4
on (release) {
_root.s5.play();
this.play();
}
on (rollOver) {
_root.s4.play();
}
Frame 5
stop();
Instance of Symbol 109 MovieClip "as" in Frame 5
onClipEvent (load) {
_root.stop();
_root.m.loader_lv.onload = function () {
w_m = parseint(_root.m.loader_lv.n, 10);
_root.m.loader_lv.onload = function () {
w_h = parseint(_root.m.loader_lv.n, 10);
_root.s.txt1 = (((_root.m.smsg[123] + w_m) + _root.m.smsg[124]) + w_h) + _root.m.smsg[125];
};
_root.m.loader_lv.load("http://hozo.hp.infoseek.co.jp/cgi-bin/shogi_h.txt?" + new date());
};
_root.m.loader_lv.load("http://hozo.hp.infoseek.co.jp/cgi-bin/shogi_m.txt?" + new date());
function test() {
}
masu = 9;
k_width = 34;
k_offset_x = 135;
k_offset_y = 30;
ob = 64;
kan = 64;
fu = 1;
ky = 2;
ke = 3;
gi = 4;
ki = 5;
ka = 6;
hi = 7;
ou = 8;
promoted = 8;
to = promoted + fu;
ny = promoted + ky;
nk = promoted + ke;
ng = promoted + gi;
um = promoted + ka;
ry = promoted + hi;
enemy = 16;
efu = enemy + fu;
eky = enemy + ky;
eke = enemy + ke;
egi = enemy + gi;
eki = enemy + ki;
eka = enemy + ka;
ehi = enemy + hi;
eou = enemy + ou;
eto = enemy + to;
eny = enemy + ny;
enk = enemy + nk;
eng = enemy + ng;
eum = enemy + um;
ery = enemy + ry;
moji = [0, "FU", "KY", "KE", "GI", "KI", "KA", "HI", "OU", "TO", "NY", "NK", "NG", 0, "UM", "RY"];
can_x = [[0], [0], [0], [-1, 1], [-1, 0, 1, -1, 1], [-1, 0, 1, -1, 1, 0], [0], [0], [-1, 0, 1, -1, 1, -1, 0, 1], [-1, 0, 1, -1, 1, 0], [-1, 0, 1, -1, 1, 0], [-1, 0, 1, -1, 1, 0], [-1, 0, 1, -1, 1, 0], [0], [0, -1, 1, 0], [-1, 1, -1, 1]];
can_y = [[0], [-1], [0], [-2, -2], [-1, -1, -1, 1, 1], [-1, -1, -1, 0, 0, 1], [0], [0], [-1, -1, -1, 0, 0, 1, 1, 1], [-1, -1, -1, 0, 0, 1], [-1, -1, -1, 0, 0, 1], [-1, -1, -1, 0, 0, 1], [-1, -1, -1, 0, 0, 1], [0], [-1, 0, 0, 1], [-1, -1, 1, 1]];
can_n = [0, 1, 0, 2, 5, 6, 0, 0, 8, 6, 6, 6, 6, 0, 4, 4];
tobi = [[[0, -1], [1, 0], [0, 1], [-1, 0]], [[-1, -1], [1, -1], [1, 1], [-1, 1]]];
tobikoe = [[[1, 2, 0, 1, 1, 0, 2, 0, 1, 1, 1, 1, 1, 1, 2], [0, 0, 0, 0, 1, 0, 2, 0, 1, 1, 1, 1, 1, 1, 2], [0, 0, 0, 0, 1, 0, 2, 0, 1, 1, 1, 1, 1, 1, 2], [0, 0, 0, 0, 1, 0, 2, 0, 1, 1, 1, 1, 1, 1, 2]], [[0, 0, 0, 1, 1, 2, 0, 0, 1, 1, 1, 1, 1, 2, 1], [0, 0, 0, 1, 1, 2, 0, 0, 1, 1, 1, 1, 1, 2, 1], [0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 1], [0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 1]]];
tobikoma = [0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1];
kingin = [0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1];
point = [[0, 20, 86, 86, 130, 138, 220, 265, 290, 30, 106, 109, 131, 0, 240, 285], [0, 10, 43, 45, 130, 160, 220, 265, 290, 20, 53, 54, 131, 0, 240, 285]];
promote_point = [0, 32, 20, 19, 3, 0, 32, 37];
uti = [1, 1, 3, 1, 3, 4, 16, 18];
board0 = [[64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64]];
board1 = [[64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64]];
board = [[64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64]];
board_k = [[64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64]];
board_d0 = [[64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64]];
board_d1 = [[64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64], [64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64]];
board_def = [[22, 18, 14, 10, 2, 8, 12, 16, 20], [0, 4, 0, 0, 0, 0, 0, 6, 0], [40, 38, 36, 34, 32, 30, 28, 26, 24], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [23, 25, 27, 29, 31, 33, 35, 37, 39], [0, 5, 0, 0, 0, 0, 0, 3, 0], [19, 15, 11, 7, 1, 9, 13, 17, 21]];
board_t = [[0, 0, 0, 0, 0, 0, 0, 0, ki], [0, 0, 0, ry, 0, eka, 0, 0, 0], [efu, 0, efu, efu, efu, efu, egi, efu, efu], [0, 0, 0, 0, 0, 0, efu, 0, 0], [0, 0, 0, 0, 0, 0, eke, 0, fu], [0, 0, 0, 0, 0, 0, gi, 0, 0], [fu, eky, eki, fu, eum, fu, fu, fu, 0], [0, 0, 0, ery, 0, ke, ou, 0, 0], [0, 0, 0, 0, 0, ki, gi, ke, ky]];
motigoma = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
motigoma0 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
motigoma1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
motigoma_t = [0, 3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0];
motigoma_u = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []];
motigoma_u0 = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []];
motigoma_u1 = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []];
boards = [[[0, 5, 0, 0, 0, 0, 0, 3, 0], [19, 15, 11, 7, 1, 9, 13, 17, 21]], [[0, 5, 0, 0, 0, 0, 0, 3, 0], [19, 15, 11, 0, 1, 0, 13, 17, 21]], [[0, 5, 0, 0, 0, 0, 0, 3, 0], [19, 15, 0, 0, 1, 0, 0, 17, 21]], [[0, 5, 0, 0, 0, 0, 0, 3, 0], [19, 0, 0, 0, 1, 0, 0, 0, 21]], [[0, 5, 0, 0, 0, 0, 0, 3, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0]], [[0, 5, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0]], [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0]], [[22, 18, 14, 0, 2, 0, 12, 16, 20], [0, 4, 0, 0, 0, 0, 0, 6, 0]], [[22, 18, 0, 0, 2, 0, 0, 16, 20], [0, 4, 0, 0, 0, 0, 0, 6, 0]], [[22, 0, 0, 0, 2, 0, 0, 0, 20], [0, 4, 0, 0, 0, 0, 0, 6, 0]], [[0, 0, 0, 0, 2, 0, 0, 0, 0], [0, 4, 0, 0, 0, 0, 0, 6, 0]], [[0, 0, 0, 0, 2, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, 0, 2, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]]];
kiki = [[], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]];
kiki0 = [[], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]];
kiki1 = [[], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], [[], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]];
kiki_u = [[], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]]];
kiki_u0 = [[], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]]];
kiki_u1 = [[], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]], [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []], [[], []]]];
yose = [[], [[0, 1, 0], [0, 0, 0], [0, 0, 0]], [[0, 1, 0], [0, 0, 0], [0, 0, 0]], [[0, 0, 0], [0, 0, 0], [0, 0, 0]], [[1, 1, 1], [0, 0, 0], [1, 0, 1]], [[1, 1, 1], [1, 0, 1], [0, 1, 0]], [[1, 0, 1], [0, 0, 0], [1, 0, 1]], [[0, 1, 0], [1, 0, 1], [0, 1, 0]], [[0, 0, 0], [0, 0, 0], [0, 0, 0]], [[1, 1, 1], [1, 0, 1], [0, 1, 0]], [[1, 1, 1], [1, 0, 1], [0, 1, 0]], [[1, 1, 1], [1, 0, 1], [0, 1, 0]], [[1, 1, 1], [1, 0, 1], [0, 1, 0]], [[1, 1, 1], [1, 0, 1], [0, 1, 0]], [[1, 1, 1], [1, 0, 1], [1, 1, 1]], [[1, 1, 1], [1, 0, 1], [1, 1, 1]]];
kiki_sum = [0, 0];
kiki_sum0 = [0, 0];
kiki_sum1 = [0, 0];
oumawari = [[15, 15, 15], [20, 100, 20], [30, 40, 30]];
koma = [[-1, 0, 0, 0], [-1, 0, ou, 0], [-1, 0, eou, 0], [-1, 0, hi, 0], [-1, 0, ehi, 0], [-1, 0, ka, 0], [-1, 0, eka, 0], [-1, 0, ki, 0], [-1, 0, eki, 0], [-1, 0, ki, 0], [-1, 0, eki, 0], [-1, 0, gi, 0], [-1, 0, egi, 0], [-1, 0, gi, 0], [-1, 0, egi, 0], [-1, 0, ke, 0], [-1, 0, eke, 0], [-1, 0, ke, 0], [-1, 0, eke, 0], [-1, 0, ky, 0], [-1, 0, eky, 0], [-1, 0, ky, 0], [-1, 0, eky, 0], [-1, 0, fu, 0], [-1, 0, efu, 0], [-1, 0, fu, 0], [-1, 0, efu, 0], [-1, 0, fu, 0], [-1, 0, efu, 0], [-1, 0, fu, 0], [-1, 0, efu, 0], [-1, 0, fu, 0], [-1, 0, efu, 0], [-1, 0, fu, 0], [-1, 0, efu, 0], [-1, 0, fu, 0], [-1, 0, efu, 0], [-1, 0, fu, 0], [-1, 0, efu, 0], [-1, 0, fu, 0], [-1, 0, efu, 0]];
koma0 = [[0, 0, 0, 0], [0, 0, ou, 0], [0, 0, eou, 0], [0, 0, hi, 0], [0, 0, ehi, 0], [0, 0, ka, 0], [0, 0, eka, 0], [0, 0, ki, 0], [0, 0, eki, 0], [0, 0, ki, 0], [0, 0, eki, 0], [0, 0, gi, 0], [0, 0, egi, 0], [0, 0, gi, 0], [0, 0, egi, 0], [0, 0, ke, 0], [0, 0, eke, 0], [0, 0, ke, 0], [0, 0, eke, 0], [0, 0, ky, 0], [0, 0, eky, 0], [0, 0, ky, 0], [0, 0, eky, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0]];
koma1 = [[0, 0, 0, 0], [0, 0, ou, 0], [0, 0, eou, 0], [0, 0, hi, 0], [0, 0, ehi, 0], [0, 0, ka, 0], [0, 0, eka, 0], [0, 0, ki, 0], [0, 0, eki, 0], [0, 0, ki, 0], [0, 0, eki, 0], [0, 0, gi, 0], [0, 0, egi, 0], [0, 0, gi, 0], [0, 0, egi, 0], [0, 0, ke, 0], [0, 0, eke, 0], [0, 0, ke, 0], [0, 0, eke, 0], [0, 0, ky, 0], [0, 0, eky, 0], [0, 0, ky, 0], [0, 0, eky, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0]];
koma_def = [[0, 0, 0, 0], [0, 0, ou, 0], [0, 0, eou, 0], [0, 0, hi, 0], [0, 0, ehi, 0], [0, 0, ka, 0], [0, 0, eka, 0], [0, 0, ki, 0], [0, 0, eki, 0], [0, 0, ki, 0], [0, 0, eki, 0], [0, 0, gi, 0], [0, 0, egi, 0], [0, 0, gi, 0], [0, 0, egi, 0], [0, 0, ke, 0], [0, 0, eke, 0], [0, 0, ke, 0], [0, 0, eke, 0], [0, 0, ky, 0], [0, 0, eky, 0], [0, 0, ky, 0], [0, 0, eky, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0], [0, 0, fu, 0], [0, 0, efu, 0]];
q_kiki = [[[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 1, 0, 1, 0, 0], [0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]], [[1, 0, 0, 0, 0, 0, 1], [0, 1, 0, 0, 0, 1, 0], [0, 0, 1, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0, 0], [0, 1, 0, 0, 0, 1, 0], [1, 0, 0, 0, 0, 0, 1]], [[0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0], [1, 1, 1, 0, 1, 1, 1], [0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0]], [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 1, 0, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]]];
q_num = [1, 9, 2, 10, 3, 11, 4, 12, 5, 6, 14, 7, 15, 8];
q_kiki_num = [[0, 0], [4, 4], [1, 1], [4, 4], [2, 2], [4, 4], [3, 3], [4, 4], [4, 4], [5, 5], [5, 7], [6, 6], [6, 7], [7, 7]];
q_board = [[[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, eke, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, fu, 0, fu, 0], [0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, eou, 0, 0, 0], [0, 0, ehi, 0, 0, 0, 0], [0, ka, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, 0, egi, eke, eky], [0, 0, 0, 0, 0, efu, 0], [0, 0, 0, 0, efu, 0, efu], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, hi, 0], [0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, eou, eki, 0, 0], [0, 0, 0, 0, 0, egi, ry], [0, 0, 0, efu, efu, efu, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, ehi, 0, 0], [0, 0, 0, 0, eka, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [ehi, 0, fu, 0, 0, 0, 0], [0, fu, gi, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, ke, 0, 0, 0, 0, 0]], [[0, 0, 0, 0, 0, 0, 0], [0, ehi, 0, eka, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, ehi, 0, eou, 0], [0, 0, 0, efu, efu, efu, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [ka, 0, 0, 0, 0, 0, 0]], [[0, ehi, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, eki, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]], [[eky, eke, 0, 0, 0, 0, 0], [0, eou, eki, 0, 0, hi, 0], [efu, efu, efu, efu, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, 0, 0, 0, 0], [0, 0, ehi, 0, 0, 0, 0], [0, 0, 0, 0, eka, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, eou, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, fu, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, 0, 0, 0, 0], [0, ehi, egi, 0, 0, 0, 0], [0, 0, efu, 0, eki, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]], [[eky, eke, 0, 0, 0, 0, 0], [0, 0, egi, 0, 0, 0, 0], [efu, efu, efu, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, 0, 0, eou, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, efu, efu, efu, efu, 0], [0, eka, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, 0, ka, eke, eky], [0, 0, 0, 0, 0, 0, eou], [0, 0, 0, 0, efu, efu, 0], [0, 0, 0, 0, 0, 0, efu], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]]];
q_answer = [[3, 4], [2, 2], [1, 4], [3, 6], [3, 4], [4, 0], [3, 2], [3, 4], [1, 2], [0, 3], [2, 3], [1, 3], [0, 2], [1, 1], [0, 1], [1, 4]];
q_msg = [38, 39, 40, 41, 42, 43, 42, 44, 45, 46, 42, 48, 45, 49, 47, 50];
r_x_from = [-1, 0];
r_x_to = [-1, 0];
r_y_from = [0, 0];
r_y_to = [0, 0];
r_capture = [0, 0];
r_promote = [0, 0];
rireki_y = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
rireki_x = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
rireki_h = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
narikoma = 0;
cnt = 20;
_root.p._visible = false;
_root.kifu._visible = false;
_root.h_cheese._visible = false;
_root.ru._visible = false;
_root.j._visible = false;
_root.tr._visible = false;
pause = true;
game_over = false;
opening = true;
syuban = 0;
checked = 0;
c_flag = false;
m_flag = false;
m_win = false;
if (_root.g._currentframe == 1) {
guide = false;
} else {
guide = true;
}
teban = 0;
tesu = 0;
_root.t = tesu;
tesu_max = tesu;
board_num = 0;
winner = 0;
zzz = false;
zzz_cnt = 0;
qcnt = 0;
function setup() {
_root.s2.play();
var obj;
var obj2;
var obj3;
var i;
var i;
var k = 10;
var kk = 1000;
var l;
var m;
var used = [];
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
_root.k.p_type.duplicatemovieclip((("_" + i) + "_") + j, k);
_root.k.shade.duplicatemovieclip((("s" + i) + "_") + j, kk);
_root.f.p_type.duplicatemovieclip((("_" + i) + "_") + j, k);
obj = _root.k[(("_" + i) + "_") + j];
obj2 = _root.k[(("s" + i) + "_") + j];
obj3 = _root.f[(("_" + i) + "_") + j];
obj._x = ((j - 1) * k_width) + k_offset_x;
obj2._x = ((j - 1) * k_width) + k_offset_x;
obj3._x = ((j - 1) * k_width) + k_offset_x;
obj._y = ((i - 1) * k_width) + k_offset_y;
obj2._y = ((i - 1) * k_width) + k_offset_y;
obj3._y = ((i - 1) * k_width) + k_offset_y;
if (board_num == (-1)) {
l = board_t[i - 1][j - 1];
if (l) {
if (l == ou) {
board[i][j] = 1;
} else if (l == eou) {
board[i][j] = 2;
} else {
if (l & enemy) {
l = l - enemy;
}
if (l & promoted) {
l = l - promoted;
}
m = 1;
while (40 >= m) {
if ((koma[m][2] % enemy) == l) {
if (used[m] != 1) {
used[m] = 1;
board[i][j] = m;
koma[m][2] = board_t[i - 1][j - 1];
break;
}
}
m++;
}
}
}
} else {
board[i][j] = board_def[i - 1][j - 1];
}
board0[i][j] = board[i][j];
l = koma[board[i][j]][2];
if (l == 0) {
obj._visible = false;
} else {
obj.g.gotoandstop(l);
}
obj.b._visible = false;
obj.ll = 0;
obj2._visible = false;
k++;
kk++;
j++;
}
i++;
}
if (0 < board_num) {
i = 1;
while (2 >= i) {
if (board_num < 7) {
m = i + 7;
} else {
m = i;
}
j = 1;
while (9 >= j) {
board[m][j] = boards[board_num][i - 1][j - 1];
l = board[m][j];
board0[m][j] = l;
obj = _root.k[(("_" + m) + "_") + j];
if (l == 0) {
obj._visible = false;
}
j++;
}
i++;
}
}
if (board_num == 12) {
i = 1;
while (9 >= i) {
board[3][i] = 0;
board0[3][i] = 0;
_root.k["_3_" + i]._visible = false;
i++;
}
}
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
if (board[i][j]) {
koma[board[i][j]][0] = i;
koma[board[i][j]][1] = j;
}
j++;
}
i++;
}
if (board_num == (-1)) {
i = 0;
while (i < 24) {
motigoma[i] = motigoma_t[i];
if (motigoma[i]) {
l = 1;
while (motigoma[i] >= l) {
j = 1;
while (40 >= j) {
if ((koma[j][2] % enemy) == (i % enemy)) {
if (used[j] != 1) {
used[j] = 1;
motigoma_u[i][l] = j;
koma[j][2] = i;
break;
}
}
j++;
}
l++;
}
}
i++;
}
}
i = 0;
while (i < 4) {
j = 0;
while (j < 2) {
l = 7 - ((i * 2) + j);
if (0 < l) {
_root.k.p_type.duplicatemovieclip("_0_" + l, k);
obj = _root.k["_0_" + l];
obj._x = (((j * k_width) * 1.5) + k_offset_x) + (k_width * 9.30000019073486);
obj._y = ((i * k_width) + k_offset_y) + (k_width * 5);
obj.g.gotoandstop(l);
obj.b._visible = false;
if (motigoma[l]) {
obj._visible = true;
} else {
obj._visible = false;
}
obj.ll = l;
_root.n.p_type.duplicatemovieclip("_" + l, k);
obj = _root.n["_" + l];
obj._x = (((j * k_width) * 1.5) + k_offset_x) + (k_width * 10.3000001907349);
obj._y = ((i * k_width) + k_offset_y) + (k_width * 5);
obj._visible = false;
k++;
}
j++;
}
i++;
}
i = 0;
while (i < 4) {
j = 0;
while (j < 2) {
l = 7 - ((i * 2) + j);
m = l + enemy;
if (0 < l) {
_root.k.p_type.duplicatemovieclip("_0_" + m, k);
obj = _root.k["_0_" + m];
obj._x = ((((1 - j) * k_width) * 1.5) + k_offset_x) - (k_width * 3.20000004768372);
obj._y = ((3 - i) * k_width) + k_offset_y;
obj.g.gotoandstop(m);
obj.b._visible = false;
if (motigoma[m]) {
obj._visible = true;
} else {
obj._visible = false;
}
obj.ll = 0;
_root.n.p_type.duplicatemovieclip("_" + m, k);
obj = _root.n["_" + m];
obj._x = ((((1 - j) * k_width) * 1.5) + k_offset_x) - (k_width * 2.20000004768372);
obj._y = ((3 - i) * k_width) + k_offset_y;
obj._visible = false;
k++;
}
j++;
}
i++;
}
_root.k.p_type.swapdepths(300);
_root.k.p_type.b._visible = false;
_root.k.p_type.ll = 0;
calc_kiki();
_root.s._visible = false;
if (board_num < 7) {
pause = false;
if (guide) {
show_guide();
}
}
opening = false;
_root.h.gotoandplay("peko");
}
function setup_line() {
var i;
var j;
var k = 10;
var obj;
i = 0;
while (i < (masu + 1)) {
_root.l.p_type.duplicatemovieclip("_" + i, k);
obj = _root.l["_" + i];
obj._x = ((i - 0.5) * k_width) + k_offset_x;
obj._y = (k_width * 4) + k_offset_y;
k++;
i++;
}
i = 0;
while (i < (masu + 1)) {
_root.l.p_type.duplicatemovieclip("__" + i, k);
obj = _root.l["__" + i];
obj._y = ((i - 0.5) * k_width) + k_offset_y;
obj._x = (k_width * 4) + k_offset_x;
obj._rotation = 90;
k++;
i++;
}
i = 0;
while (i < 7) {
j = 0;
while (j < 7) {
_root.tr.gg.duplicatemovieclip((("_" + i) + "_") + j, k);
obj = _root.tr[(("_" + i) + "_") + j];
obj._x = obj._x + (k_width * j);
obj._y = obj._y + (k_width * i);
obj.gotoandstop(33);
obj.qy = i;
obj.qx = j;
k++;
j++;
}
i++;
}
i = 0;
while (i < 13) {
_root.s.wm.duplicatemovieclip("_" + i, k);
obj = _root.s["_" + i];
if (6 < i) {
obj._x = obj._x + 128;
}
obj._y = obj._y - ((i % 7) * 25);
if (_root.m.wm[i] == 1) {
obj._visible = true;
} else {
obj._visible = false;
}
k++;
i++;
}
_root.s.wm._visible = false;
_root.tr._3_3.gotoandstop(1);
_root.tr.txt1 = _root.m.smsg[35];
_root.tr.txt2 = "1/30";
_root.tr.gg._visible = false;
_root.tr.gg._x = _root.tr.gg._x + 270;
_root.tr.gg._y = _root.tr.gg._y + 203;
_root.tr.next._visible = false;
_root.j.txt3 = _root.m.smsg[98];
_root.j.bb.b1.txt2 = _root.m.smsg[92];
_root.j.bb.b2.txt2 = _root.m.smsg[93];
_root.j.bb.b3.txt2 = _root.m.smsg[94];
_root.j.bb.b4.txt2 = _root.m.smsg[95];
_root.j.bb.b5.txt2 = _root.m.smsg[96];
_root.j.bb.b6.txt2 = _root.m.smsg[97];
_root.l.p_type._visible = false;
_root.k.p_type._visible = false;
_root.k.shade._visible = false;
_root.f.p_type._visible = false;
_root.c._visible = false;
_root.ru.txt1 = _root.m.smsg[99];
_root.ru.txt4 = _root.m.smsg[100];
_root.ru.txt2 = _root.m.smsg[101];
_root.ru.txt5 = _root.m.smsg[102];
_root.ru.txt3 = _root.m.smsg[103];
_root.ru.txt6 = _root.m.smsg[104];
_root.s.ms._visible = false;
_root.w._visible = false;
}
function question() {
var i;
var j;
var k;
var q;
var qk = [];
var flag = true;
if (qcnt < 14) {
if ((qy == 3) and (qx == 3)) {
return(undefined);
}
qk[0] = q_kiki_num[qcnt][0];
qk[1] = q_kiki_num[qcnt][1];
if (q_kiki[qk[0]][qy][qx] or q_kiki[qk[1]][qy][qx]) {
_root.tr[(("_" + qy) + "_") + qx].gotoandstop(34);
} else {
_root.tr[(("_" + qy) + "_") + qx].gotoandstop(35);
}
i = 0;
while (i < 2) {
j = 0;
while (j < 7) {
k = 0;
while (k < 7) {
if (q_kiki[qk[i]][j][k]) {
if (_root.tr[(("_" + j) + "_") + k]._currentframe != 34) {
flag = false;
break;
}
}
k++;
}
j++;
}
i++;
}
if (flag) {
_root.tr.txt1 = _root.m.smsg[36];
_root.tr.ham.gotoandplay("yes");
_root.s0.play();
}
} else {
if (29 < qcnt) {
return(undefined);
}
if (_root.tr[(("_" + qy) + "_") + qx]._currentframe != 33) {
return(undefined);
}
q = qcnt - 14;
flag = false;
if ((qy == q_answer[q][0]) and (qx == q_answer[q][1])) {
flag = true;
}
if (((q == 4) and (qy >= 3)) and (qx == 4)) {
flag = true;
} else if (((q == 15) and (qy == 1)) and (4 >= qx)) {
flag = true;
}
if (flag) {
if (qcnt == 29) {
qcnt++;
}
_root.tr[(("_" + qy) + "_") + qx].gotoandstop(_root.tr.gg._currentframe);
_root.tr.gg._visible = false;
_root.tr.txt1 = _root.m.smsg[36];
_root.tr.txt3 = _root.m.smsg[q_msg[q]];
_root.tr.ham.gotoandplay("yes");
_root.s0.play();
} else {
_root.tr[(("_" + qy) + "_") + qx].gotoandstop(35);
}
}
}
function next_question() {
var i;
var j;
var k;
var q;
var r;
if (29 < qcnt) {
return(undefined);
}
qcnt++;
q = qcnt + 1;
_root.tr.txt2 = q + "/30";
if (qcnt < 14) {
_root.tr.txt1 = _root.m.smsg[35];
i = 0;
while (i < 7) {
j = 0;
while (j < 7) {
_root.tr[(("_" + i) + "_") + j].gotoandstop(33);
j++;
}
i++;
}
_root.tr._3_3.gotoandstop(q_num[qcnt]);
} else {
q = q - 15;
k = math.floor((q - 2) / 2);
if (k < 0) {
k = 0;
}
i = 0;
while (i < 7) {
j = 0;
while (j < 7) {
r = q_board[q][i][j];
if (r == 0) {
r = 33;
}
_root.tr[(("_" + i) + "_") + j].gotoandstop(r);
j++;
}
i++;
}
_root.tr.gg.gotoandstop(k + 1);
_root.tr.gg._visible = true;
_root.tr.txt1 = _root.m.smsg[37];
_root.tr.txt3 = "";
}
}
function move() {
if ((((pause or game_over) or _root.ru._visible) or _root.j._visible) or _root.tr._visible) {
return(undefined);
}
jj = math.floor(((_root._xmouse - k_offset_x) + (k_width * 0.5)) / k_width);
ii = math.floor(((_root._ymouse - k_offset_y) + (k_width * 0.5)) / k_width);
if ((((ii < 0) or (8 < ii)) or (jj < 0)) or (8 < jj)) {
if (_root.k.p_type._visible) {
nomoved();
if (guide) {
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
_root.k[(("s" + i) + "_") + j]._visible = false;
j++;
}
i++;
}
}
}
return(undefined);
}
var b;
var c;
var u;
var i;
var j;
var k;
var x;
var y;
var obj;
var kinte;
var fy;
var fx;
var ty;
var tx;
ii++;
jj++;
b = koma[board[ii][jj]][2];
if (_root.k.p_type._visible) {
if (b == 0) {
kinte = false;
if (iii == 0) {
if ((((jjj == fu) or (jjj == ky)) and (ii == 1)) or ((jjj == ke) and (2 >= ii))) {
kinte = true;
} else if (jjj == fu) {
i = 1;
while (9 >= i) {
if (koma[board[i][jj]][2] == fu) {
kinte = true;
break;
}
i++;
}
if (koma[board[ii - 1][jj]][2] == eou) {
calc_kiki();
var kaihi = false;
if (1 < kiki[ii][jj][1]) {
kaihi = true;
}
i = 0;
while (i < 3) {
j = 0;
while (j < 3) {
x = (jj + j) - 1;
y = (ii + i) - 2;
if ((koma[board[y][x]][2] < enemy) and (kiki[y][x][0] == 0)) {
kaihi = true;
break;
}
j++;
}
i++;
}
if (!kaihi) {
kinte = true;
}
}
}
}
if (!can_move()) {
kinte = true;
}
if (kinte) {
nomoved();
} else {
r_capture[tesu + 1] = 0;
moved();
}
} else {
obj = _root.k[(("_" + ii) + "_") + jj];
if (!(obj.g._currentframe & enemy)) {
nomoved();
} else {
if ((iii == 0) or (!can_move())) {
if (guide) {
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
_root.k[(("s" + i) + "_") + j]._visible = false;
j++;
}
i++;
}
}
nomoved();
return(undefined);
}
r_capture[tesu + 1] = b;
if (b & promoted) {
b = b - promoted;
narikoma--;
}
b = b - enemy;
var my = [0, 3, 2, 2, 1, 1, 0, 0];
var mx = [0, 0, 1, 0, 1, 0, 1, 0];
fx = ((jj - 1) * k_width) + k_offset_x;
fy = ((ii - 1) * k_width) + k_offset_y;
tx = (((mx[b] * k_width) * 1.5) + k_offset_x) + (k_width * 9.30000019073486);
ty = ((my[b] * k_width) + k_offset_y) + (k_width * 5);
_root.c._x = fx;
_root.c._y = fy;
_root.c.gotoandstop(b);
c_flag = true;
c_h = b;
c_dy = (ty - fy) / 4;
c_dx = (tx - fx) / 4;
c_cnt = 0;
motigoma[b]++;
var c = board[ii][jj];
motigoma_u[b][motigoma[b]] = c;
koma[c][0] = 0;
koma[c][2] = b;
moved();
}
}
if (guide) {
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
_root.k[(("s" + i) + "_") + j]._visible = false;
j++;
}
i++;
}
}
} else {
if ((b == 0) or (b & enemy)) {
return(undefined);
}
obj = _root.k[(("_" + ii) + "_") + jj];
_root.k.p_type._x = _root._xmouse;
_root.k.p_type._y = _root._ymouse;
_root.k.p_type._visible = true;
_root.k.p_type.g.gotoandstop(obj.g._currentframe);
obj._visible = false;
iii = ii;
jjj = jj;
if (guide) {
u = board[ii][jj];
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
_root.k[(("s" + i) + "_") + j]._visible = true;
if ((koma[board[i][j]][2] & enemy) or (board[i][j] == 0)) {
if (kiki[i][j][0]) {
k = 1;
while (kiki[i][j][0] >= k) {
if (kiki_u[i][j][0][k] == u) {
_root.k[(("s" + i) + "_") + j]._visible = false;
break;
}
k++;
}
}
}
j++;
}
i++;
}
}
}
}
function moved() {
var obj = _root.k[(("_" + ii) + "_") + jj];
obj._visible = true;
obj.g.gotoandstop(_root.k.p_type.g._currentframe);
_root.k.p_type._visible = false;
_root.k[(("_" + bi) + "_") + bj].b._visible = false;
if (!guide) {
obj.b._visible = true;
}
bi = ii;
bj = jj;
tesu++;
r_x_from[tesu] = jjj;
r_x_to[tesu] = jj;
r_y_from[tesu] = iii;
r_y_to[tesu] = ii;
r_promote[tesu] = 0;
pause = true;
_root.t = tesu;
tesu_max++;
if (iii == 0) {
_root.s1.play();
board[ii][jj] = motigoma_u[jjj][motigoma[jjj] + 1];
koma[board[ii][jj]][0] = ii;
koma[board[ii][jj]][1] = jj;
think();
} else {
kk = board[iii][jjj];
board[iii][jjj] = 0;
board[ii][jj] = kk;
koma[kk][0] = ii;
koma[kk][1] = jj;
if ((((koma[kk][2] & promoted) or (koma[kk][2] == ki)) or (koma[kk][2] == ou)) or ((3 < ii) and (3 < iii))) {
_root.s1.play();
think();
} else if ((((koma[kk][2] == fu) or (koma[kk][2] == ky)) and (ii == 1)) or ((koma[kk][2] == ke) and (2 >= ii))) {
_root.s1.play();
koma[kk][2] = koma[kk][2] + promoted;
obj.g.gotoandstop(koma[kk][2]);
r_promote[tesu] = 1;
think();
} else {
_root.p.aa.gotoandstop(koma[kk][2]);
_root.p.bb.gotoandstop(koma[kk][2] + promoted);
_root.p._x = _root._xmouse;
_root.p._y = _root._ymouse;
_root.p._visible = true;
}
}
}
function nomoved() {
var obj = _root.k[(("_" + iii) + "_") + jjj];
obj._visible = true;
_root.k.p_type._visible = false;
if (iii == 0) {
motigoma[jjj]++;
_root.n["_" + jjj].t = motigoma[jjj];
if (1 < motigoma[jjj]) {
_root.n["_" + jjj]._visible = true;
}
} else {
obj.g.gotoandstop(_root.k.p_type.g._currentframe);
}
}
function pick() {
if ((((game_over or pause) or _root.ru._visible) or _root.j._visible) or _root.tr._visible) {
return(undefined);
}
_root.k.p_type._x = _root._xmouse;
_root.k.p_type._y = _root._ymouse;
_root.k.p_type._visible = true;
_root.k.p_type.g.gotoandstop(ll);
motigoma[ll]--;
_root.n["_" + ll].t = motigoma[ll];
if (motigoma[ll] < 1) {
_root.k["_0_" + ll]._visible = false;
}
if (motigoma[ll] < 2) {
_root.n["_" + ll]._visible = false;
}
iii = 0;
jjj = ll;
}
function choose(aa) {
if ((_root.ru._visible or _root.j._visible) or _root.tr._visible) {
return(undefined);
}
if (aa == 1) {
_root.s1.play();
koma[kk][2] = koma[kk][2] + promoted;
_root.k[(("_" + ii) + "_") + jj].g.gotoandstop(koma[kk][2]);
r_promote[tesu] = 1;
} else {
_root.s1.play();
}
_root.p._visible = false;
think();
}
function can_move() {
if (iii == 0) {
return(true);
}
var b;
var c;
var i;
var j;
var k;
var x;
var y;
b = koma[board[iii][jjj]][2];
i = 0;
while (i < can_n[b]) {
if (((jjj + can_x[b][i]) == jj) and ((iii + can_y[b][i]) == ii)) {
return(true);
}
i++;
}
if (b == ky) {
i = 1;
while (i < masu) {
x = jjj;
y = iii + (tobi[0][0][1] * i);
c = board[y][x];
if (c == ob) {
break;
}
if (0 < c) {
if (koma[c][2] & enemy) {
if ((x == jj) and (y == ii)) {
return(true);
}
}
break;
}
if ((x == jj) and (y == ii)) {
return(true);
}
i++;
}
} else if (tobikoma[b]) {
if ((b == hi) or (b == ry)) {
k = 0;
} else {
k = 1;
}
i = 0;
while (i < 4) {
j = 1;
while (j < masu) {
x = jjj + (tobi[k][i][0] * j);
y = iii + (tobi[k][i][1] * j);
c = board[y][x];
if (c == ob) {
break;
}
if (0 < c) {
if (koma[c][2] & enemy) {
if ((x == jj) and (y == ii)) {
return(true);
}
}
break;
}
if ((x == jj) and (y == ii)) {
return(true);
}
j++;
}
i++;
}
}
return(false);
}
function show_guide() {
var i;
var j;
var k0;
var k1;
var obj;
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
obj = _root.f[(("_" + i) + "_") + j];
k0 = kiki[i][j][0];
k1 = kiki[i][j][1];
if (k0) {
if (k1) {
if (k1 < k0) {
obj.gotoandstop(5);
} else {
obj.gotoandstop(4);
}
} else {
obj.gotoandstop(2);
}
} else if (k1) {
obj.gotoandstop(3);
} else {
obj.gotoandstop(1);
}
j++;
}
i++;
}
_root.k[(("_" + bi) + "_") + bj].b._visible = false;
}
function hide_guide() {
var i;
var j;
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
_root.f[(("_" + i) + "_") + j].gotoandstop(1);
j++;
}
i++;
}
_root.k[(("_" + bi) + "_") + bj].b._visible = true;
}
function think() {
if (3 < cnt) {
cnt = 0;
return(undefined);
}
if (game_over) {
return(undefined);
}
var a;
var b;
var c;
var d;
var i;
var j;
var k;
var l;
var m;
var x;
var y;
var obj;
var kinte = false;
var tx;
var ty;
var fx;
var fy;
var my = [0, 0, 1, 1, 2, 2, 3, 3];
var mx = [0, 1, 0, 1, 0, 1, 0, 1];
calc_kiki();
teban = 1;
if (!syuban) {
a = 0;
b = 0;
i = 3;
while (40 >= i) {
if ((i < 23) or (koma[i][2] & promoted)) {
y = koma[i][0];
if (0 < y) {
if (koma[i][2] & enemy) {
if (y >= 7) {
b++;
}
} else if (3 >= y) {
a++;
}
}
}
i++;
}
if (a) {
if ((a >= 2) or (b >= 2)) {
syuban = 1;
}
}
}
_root.txt2 = "";
sente_motigoma = 0;
gote_motigoma = 0;
i = 2;
while (7 >= i) {
if (0 < motigoma[i]) {
sente_motigoma = 1;
break;
}
i++;
}
i = 2;
while (7 >= i) {
if (0 < motigoma[i + enemy]) {
gote_motigoma = 1;
break;
}
i++;
}
if (kiki[koma[2][0]][koma[2][1]][0] == 0) {
checked = 0;
loadfrom_();
saveto1();
tumi_flag = 0;
i = -1;
while (i < 2) {
j = -1;
while (j < 2) {
y = koma[2][0] + i;
x = koma[2][1] + j;
if ((kiki[y][x][0] and ((i != 0) or (j != 0))) and (board[y][x] < ob)) {
if ((1 < kiki[y][x][0]) or ((board[y][x] == 0) and sente_motigoma)) {
if (make_oute(y, x, 0)) {
tumi_flag = 1;
break;
}
}
}
j++;
}
if (tumi_flag) {
break;
}
i++;
}
} else {
checked = 1;
}
searched = [];
search_num = -1;
best_value = -2000;
best_value2 = -2001;
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
b = koma[board[i][j]][2];
if (b & enemy) {
c = b - enemy;
k = 0;
while (k < can_n[c]) {
x = j + can_x[c][k];
y = i - can_y[c][k];
d = board[y][x];
if (!((d == ob) or (koma[d][2] & enemy))) {
determine(b, c, koma[d][2], i, j, x, y);
}
k++;
}
if (c == ky) {
k = 1;
while (k < masu) {
x = j;
y = i - (tobi[0][0][1] * k);
d = board[y][x];
if (d == ob) {
break;
}
if (0 < d) {
if (!(koma[d][2] & enemy)) {
determine(b, c, koma[d][2], i, j, x, y);
}
break;
}
determine(b, c, koma[d][2], i, j, x, y);
k++;
}
} else if (tobikoma[c]) {
if ((c == hi) or (c == ry)) {
m = 0;
} else {
m = 1;
}
k = 0;
while (k < 4) {
l = 1;
while (l < masu) {
x = j + (tobi[m][k][0] * l);
y = i - (tobi[m][k][1] * l);
d = board[y][x];
if (d == ob) {
break;
}
if (0 < d) {
if (!(koma[d][2] & enemy)) {
determine(b, c, koma[d][2], i, j, x, y);
}
break;
}
determine(b, c, koma[d][2], i, j, x, y);
l++;
}
k++;
}
}
}
j++;
}
i++;
}
j = 7 + enemy;
while (j >= (1 + enemy)) {
if (0 < motigoma[j]) {
y = 1;
while (9 >= y) {
x = 1;
while (9 >= x) {
if (board[y][x] == 0) {
kinte = false;
if ((j == eke) and (7 < y)) {
kinte = true;
} else if ((j == eky) and (8 < y)) {
kinte = true;
} else if (j == efu) {
if (8 < y) {
kinte = true;
}
k = 1;
while (9 >= k) {
if (koma[board[k][x]][2] == efu) {
kinte = true;
break;
}
k++;
}
if (koma[board[y + 1][x]][2] == ou) {
var kaihi = false;
if (1 < kiki[y][x][0]) {
kaihi = true;
}
k = 0;
while (k < 3) {
l = 0;
while (l < 3) {
var x0 = ((x + l) - 1);
var y0 = (y + k);
if (((board[y0][x0] == 0) or (koma[board[y0][x0]][2] & enemy)) and (kiki[y0][x0][1] == 0)) {
kaihi = true;
break;
}
l++;
}
k++;
}
if (!kaihi) {
kinte = true;
}
}
}
if (!kinte) {
b = j;
c = b - enemy;
d = 0;
i = 0;
determine(b, c, d, i, j, x, y);
}
}
x++;
}
y++;
}
}
j--;
}
if (best_value == (-2000)) {
_root.s3.play();
_root.s6.play();
_root.w._visible = true;
_root.w.gotoandplay(1);
winner = 0;
_root.m.won = 1;
game_end();
_root.h.gotoandstop("lose");
} else {
tesu++;
_root.t = tesu;
tesu_max++;
x = 10 - xx;
y = yy;
if (ii == 0) {
j = 0;
i = 0;
} else {
j = 10 - jj;
i = ii;
}
best_value = math.round(best_value);
_root.txt1 = (((((((((x + "") + y) + moji[cc]) + "(") + j) + "") + i) + ")") + " : ") + best_value;
x = 10 - xx2;
y = yy2;
if (ii2 == 0) {
j = 0;
i = 0;
} else {
j = 10 - jj2;
i = ii2;
}
best_value2 = math.round(best_value2);
_root.txt1 = _root.txt1 + (((((((((((newline + x) + "") + y) + moji[cc2]) + "(") + j) + "") + i) + ")") + " : ") + best_value2);
r_x_from[tesu] = jj;
r_x_to[tesu] = xx;
r_y_from[tesu] = ii;
r_y_to[tesu] = yy;
r_capture[tesu] = dd;
r_promote[tesu] = 0;
(rireki_y.shift());// not popped
(rireki_x.shift());// not popped
(rireki_h.shift());// not popped
rireki_y.push(yy);
rireki_x.push(xx);
rireki_h.push(cc);
m_y = yy;
m_x = xx;
m_h = bb;
tx = ((xx - 1) * k_width) + k_offset_x;
ty = ((yy - 1) * k_width) + k_offset_y;
if (ii == 0) {
fx = (((mx[jj - enemy] * k_width) * 1.5) + k_offset_x) - (k_width * 3.20000004768372);
fy = (my[jj - enemy] * k_width) + k_offset_y;
} else {
fx = ((jj - 1) * k_width) + k_offset_x;
fy = ((ii - 1) * k_width) + k_offset_y;
}
_root.c._x = fx;
_root.c._y = fy;
_root.c.gotoandstop(bb);
m_dy = (ty - fy) / 8;
m_dx = (tx - fx) / 8;
m_cnt = 0;
m_flag = true;
if (ii == 0) {
board[yy][xx] = motigoma_u[bb][motigoma[bb]];
motigoma[bb]--;
_root.n["_" + bb].t = motigoma[bb];
if (motigoma[bb] < 1) {
_root.k["_0_" + bb]._visible = false;
}
if (motigoma[bb] < 2) {
_root.n["_" + bb]._visible = false;
}
} else {
_root.k[(("_" + ii) + "_") + jj]._visible = false;
m = board[yy][xx];
board[yy][xx] = board[ii][jj];
board[ii][jj] = 0;
if ((6 < ii) or (6 < yy)) {
if (((cc != ki) and (cc != ou)) and (!(cc & promoted))) {
bb = bb + promoted;
cc = cc + promoted;
m_h = m_h + promoted;
r_promote[tesu] = 1;
narikoma++;
}
}
}
koma[board[yy][xx]][2] = bb;
koma[board[yy][xx]][0] = yy;
koma[board[yy][xx]][1] = xx;
if (dd == ou) {
m_win = true;
} else if (0 < dd) {
m_c_flag = true;
if (dd & promoted) {
dd = dd - promoted;
}
dd = dd + enemy;
m_c = dd;
fx = ((xx - 1) * k_width) + k_offset_x;
fy = ((yy - 1) * k_width) + k_offset_y;
tx = (((mx[dd - enemy] * k_width) * 1.5) + k_offset_x) - (k_width * 3.20000004768372);
ty = (my[dd - enemy] * k_width) + k_offset_y;
c_h = dd;
c_dy = (ty - fy) / 4;
c_dx = (tx - fx) / 4;
c_cnt = 0;
motigoma[dd]++;
motigoma_u[dd][motigoma[dd]] = m;
koma[m][0] = 0;
koma[m][2] = dd;
} else {
m_c_flag = false;
}
calc_kiki();
teban = 0;
last_move = cc;
}
}
function determine(he0, he, capture, fy, fx, tx, ty) {
var mate = false;
var gida = false;
var front = koma[board[ty + 1][tx]][2];
var dx = math.abs(tx - koma[1][1]);
var dy = math.abs(ty - koma[1][0]);
var kk0;
var kk1;
var same;
var used = [];
var he2 = he;
var prom = 0;
var danger = 0;
var f;
var h;
var i;
var j;
var k;
var p;
var u;
var x;
var y;
var ah;
var tmp;
var tmp_u;
var atari;
var atari2;
var pp;
var k0 = kiki[ty][tx][0];
var k1 = kiki[ty][tx][1];
var value;
if (capture == ou) {
value = 20000;
change_best_value(he0, he, capture, fy, fx, tx, ty, value);
return(undefined);
}
if (5000 < best_value) {
return(undefined);
}
value = point[syuban][capture];
if (syuban) {
tmp = math.min(math.max(dy, dx), math.max(math.abs(koma[2][0] - ty), math.abs(koma[2][1] - tx)));
if (fy == 0) {
tmp++;
}
if (((he == hi) or (he == ry)) or (he & promoted)) {
tmp--;
}
if ((tmp >= 6) and (capture == 0)) {
return(undefined);
}
if (board_d1[ty][tx] >= 2) {
value = value + (15 - (board_d0[ty][tx] * 3));
}
}
if (fy == 0) {
if (!yukoda(he, ty, tx)) {
return(undefined);
}
value = value - uti[he];
if ((koma[1][0] >= 7) and (ty < 7)) {
value = value - 3;
}
if (syuban == 0) {
if (((((4 >= ty) and (k0 == 0)) and (!checked)) and (!tumi_flag)) and (board_d1[ty][tx] >= 2)) {
value = value - 3;
}
}
if (k1) {
if (checked or tumi_flag) {
value = value + (7 - he);
}
if (checked) {
if (sente_motigoma) {
value = value + 2;
}
if (k1) {
i = 1;
while (k1 >= i) {
if (koma[kiki_u[ty][tx][1][i]][2] != eou) {
value = value + 5;
break;
}
i++;
}
}
}
}
} else {
k1--;
if ((6 < fy) or (6 < ty)) {
if (((he != ki) and (he != ou)) and (!(he & promoted))) {
he2 = he2 + promoted;
if (k1 >= k0) {
value = value + (promote_point[he] / (narikoma + 1));
if (syuban) {
if (dx >= 3) {
value = value - dx;
}
}
}
prom = 1;
}
}
}
if (he == fu) {
if (0 < fy) {
if (capture == 0) {
if ((ty == 5) and (tx == 7)) {
value = value - 30;
} else if ((ty == 4) and (tx == 6)) {
value = value - 30;
}
} else {
value = value + 7;
if (prom) {
value = value + 5;
if (kiki[fy][fx][0] < kiki[fy][fx][1]) {
value = value + 5;
}
}
}
if ((ty == 4) and (tx == 5)) {
if (motigoma[6] >= 1) {
value = value - 10;
}
if (koma[board[3][3]][2] == efu) {
value = value - 6;
}
}
if (((ty == 5) and (tx == 5)) and (front != fu)) {
if (koma[board[2][8]][2] == eka) {
value = value - 8;
}
}
if ((ty == 4) and (tx == 8)) {
if (capture == 0) {
value = value - 30;
} else if (capture == fu) {
value = value + 10;
if (kiki[4][8][0] >= kiki[4][8][1]) {
i = 1;
while (kiki[4][8][0] >= i) {
if (koma[kiki_u[4][8][0][i]][2] == hi) {
value = value + 35;
break;
}
i++;
}
}
}
}
if ((ty == 4) and (tx == 7)) {
if (koma[board[2][8]][2] == eka) {
value = value + 3;
} else {
value = value - 2;
}
}
value = value + ((tx % 2) * 4);
value = value + ((9 - ty) / 3);
if (6 < board_num) {
if ((tx == 1) or (tx == 9)) {
value = value - 3;
}
}
if ((k1 >= k0) and k1) {
k = 0;
i = 1;
while (kiki[ty][tx][1] >= i) {
if (koma[kiki_u[ty][tx][1][i] % kan][2] == eka) {
k = 1;
}
i++;
}
if (k == 0) {
if (tx == 1) {
if (((kiki[7][1][0] == 0) and ((board[7][1] == 0) or (koma[board[7][1]][2] == fu))) and (koma[1][1] >= 4)) {
value = value + 1;
} else if (koma[board[4][2]][2] != egi) {
value = value - 9;
}
} else if (tx == 9) {
if (((kiki[7][9][0] == 0) and ((board[7][9] == 0) or (koma[board[7][9]][2] == fu))) and (6 >= koma[1][1])) {
value = value + 1;
} else {
value = value - 9;
}
} else {
value = value + 1;
}
}
i = 1;
while (kiki[fy][fx][1] >= i) {
if ((koma[kiki_u[fy][fx][1][i]][2] == ehi) or (koma[kiki_u[fy][fx][1][i]][2] == ery)) {
if ((koma[kiki_u[fy][fx][1][i]][0] < fy) and (koma[kiki_u[fy][fx][1][i]][1] == fx)) {
value = value + 5;
if (tesu < 20) {
if ((board_num >= 1) and (6 >= board_num)) {
value = value + 7;
} else if (6 >= tesu) {
value = value + 7;
}
}
if (board[ty + 1][tx] and (!(front & enemy))) {
value = value + 15;
j = 1;
while (kiki[ty + 1][tx][0] >= j) {
if (koma[kiki_u[ty + 1][tx][0][j]][2] == ky) {
value = value - 60;
break;
}
j++;
}
}
break;
}
}
i++;
}
if ((koma[board[fy][fx - 1]][2] == egi) or (koma[board[fy][fx + 1]][2] == egi)) {
if (tx != 1) {
value = value + 8;
}
}
if ((koma[board[fy][fx - 1]][2] == eki) or (koma[board[fy][fx + 1]][2] == eki)) {
value = value + 8;
}
if ((koma[board[ty][tx - 1]][2] == egi) or (koma[board[ty][tx + 1]][2] == egi)) {
value = value + 4;
}
}
if (kiki[fy][fx][1]) {
k = 0;
i = 1;
while (kiki[fy][fx][1] >= i) {
if (koma[kiki_u[fy][fx][1][i] % kan][2] == eka) {
k = 1;
}
i++;
}
if (k) {
value = value + 6;
}
}
if (koma[board[ty + 2][tx]][2] == ke) {
if ((k1 >= k0) and (kiki[ty + 1][tx][1] >= kiki[ty + 1][tx][0])) {
value = value + 5;
}
}
} else {
if (2 >= ty) {
if ((koma[board[ty + 2][tx]][2] == fu) or (kiki[ty + 1][tx][0] >= 2)) {
value = value + 5;
}
} else if ((front == fu) or (koma[board[ty + 2][tx]][2] == fu)) {
value = value - 8;
}
if (((kiki[ty][tx][0] == 0) and (kiki[ty + 1][tx][0] == 0)) and (ty < 6)) {
if ((front & enemy) or (board[ty + 1][tx] == 0)) {
if ((koma[board[ty + 2][tx]][2] & enemy) or (board[ty + 2][tx] == 0)) {
value = value - 8;
}
}
}
if ((ty == 6) and (tx == 2)) {
if ((koma[board[7][2]][2] == fu) and (1 >= k1)) {
value = value - 10;
}
}
if ((front >= ky) and (ou >= front)) {
if ((syuban and (2 >= dx)) or (front == hi)) {
if ((math.random() * 15) < 1) {
value = value + 40;
gida = true;
}
}
if (kiki[ty][tx][1]) {
f = 0;
i = 1;
while (kiki[ty][tx][1] >= i) {
if ((koma[kiki_u[ty][tx][1][i]][2] == eke) or (koma[kiki_u[ty][tx][1][i]][2] == eto)) {
f = 1;
break;
}
i++;
}
if (f) {
value = value + 30;
}
}
}
}
f = true;
i = ty + 1;
while (9 >= i) {
h = koma[board[i][tx]][2];
if (h and (!(h & enemy))) {
f = false;
break;
}
i++;
}
if (f and (k1 >= k0)) {
if ((kiki[ty + 1][tx][1] >= kiki[ty + 1][tx][0]) and (board[ty + 1][tx] == 0)) {
i = 1;
while (kiki[ty + 1][tx][1] >= i) {
if (koma[kiki_u[ty + 1][tx][1][i]][2] == eto) {
if (kiki[ty + 1][tx][0] < kiki[ty + 1][tx][1]) {
f = false;
break;
}
}
i++;
}
if ((fy == 0) and (ty < 6)) {
f = false;
}
if ((k0 < k1) and (ty >= 7)) {
i = 1;
while (k1 >= i) {
if (koma[kiki_u[ty][tx][1][i]][2] == eky) {
f = false;
break;
}
i++;
}
}
if (f) {
value = value + (((4 + (10 / (narikoma + 1))) - math.abs(ty - 6)) - (dx / 2));
if ((2 >= dx) and (ty >= 6)) {
value = value + 3;
}
if (koma[1][0] < ty) {
value = value - 5;
}
if (syuban) {
value = value - dx;
if (ty < 6) {
value = value - 7;
}
}
}
}
}
u = board[ty + 1][tx];
if (((u != ob) and (u != 0)) and (!(koma[u][2] & enemy))) {
if ((k1 >= k0) and (koma[u][2] != fu)) {
value = value + ((point[syuban][koma[u][2]] / 40) + 3);
if ((1 >= math.abs((koma[2][0] - ty) + 1)) and (1 >= math.abs(koma[2][1] - tx))) {
value = value + 10;
if ((tx == koma[2][1]) and (ty == (koma[2][0] + 1))) {
value = value + 10;
}
}
if (koma[board[ty - 1][tx]][2] == eka) {
value = value + 10;
}
if ((koma[u][2] == hi) or (koma[u][2] == ry)) {
if (ty >= 6) {
value = value + 20;
}
}
}
}
if (((k1 >= k0) and (koma[u][2] != fu)) and (koma[board[ty + 2][tx]][2] != fu)) {
if ((1 >= math.abs((koma[1][0] - ty) - 2)) and (1 >= dx)) {
value = value + 7;
}
}
k = 0;
i = 1;
while (kiki[ty][tx][1] >= i) {
h = koma[kiki_u[ty][tx][1][i] % kan][2];
if (((h == ehi) or (h == ery)) or (h == eky)) {
if ((koma[kiki_u[ty][tx][1][i] % kan][0] < ty) and (koma[kiki_u[ty][tx][1][i] % kan][1] == tx)) {
k = 1;
break;
}
}
i++;
}
if (k) {
if ((((board[ty + 1][tx] == 0) or (front & enemy)) and (fy == 0)) and (ty < 6)) {
value = value - 10;
}
if ((k1 >= 2) and (k1 >= k0)) {
if (((1 >= kiki[ty + 1][tx][0]) and (board[ty + 1][tx] != 0)) and (!(front & enemy))) {
value = value + 20;
if (k0 < k1) {
value = value + 10;
}
if (((koma[board[ty - 1][tx - 1]][2] == egi) and (koma[board[ty][tx - 1]][2] == fu)) or ((koma[board[ty - 1][tx + 1]][2] == egi) and (koma[board[ty][tx + 1]][2] == fu))) {
value = value + (point[syuban][gi] - 50);
}
}
}
}
if ((k0 and k1) and (k1 >= k0)) {
i = 1;
while (kiki[ty][tx][0] >= i) {
h = kiki_u[ty][tx][0][i];
if (h < kan) {
if (tobikoma[koma[h][2]]) {
value = value + 2;
if (checked) {
value = value + 3;
}
if ((((fy == 0) and (ty < koma[h][0])) and (koma[h][1] == tx)) and (3 < koma[h][0])) {
if ((koma[h][2] == hi) or (koma[h][2] == ry)) {
value = value + 10;
if (motigoma[1] >= 1) {
value = value + 5;
}
if ((ty == 3) and (tx == 3)) {
value = value + 5;
}
}
}
}
}
i++;
}
}
if (front & enemy) {
if (kiki[ty + 1][tx][1] < kiki[ty + 1][tx][0]) {
value = value + 6;
}
}
if ((((front == ke) and (k1 >= k0)) and (2 >= dx)) and (3 >= dy)) {
value = value + 20;
}
if ((ty == 5) and (tx == 4)) {
if ((koma[board[1][7]][2] == eka) or (koma[board[2][6]][2] == eka)) {
value = value + 5;
}
if ((front != 0) and (!(front & enemy))) {
f = 0;
i = 1;
while (kiki[6][4][1] >= i) {
if (koma[kiki_u[6][4][1][i]][2] == eka) {
f = 1;
break;
}
i++;
}
if (f) {
f = 0;
i = 1;
while (kiki[6][4][0] >= i) {
if (koma[kiki_u[6][4][0][i]][2] == ka) {
f = 1;
break;
}
i++;
}
if (!f) {
i = 1;
while (kiki[6][4][1] >= i) {
if (koma[kiki_u[6][4][1][i]][2] == ehi) {
if (kiki[6][4][1] >= kiki[6][4][0]) {
if (kiki[5][4][0] < kiki[5][4][1]) {
f = 1;
break;
}
}
}
i++;
}
}
}
if (f) {
value = value + 20;
gida = true;
}
}
}
if ((((k1 == 0) and k0) and (capture == 0)) and (!gida)) {
value = value - 40;
}
} else if (he == ky) {
if (fy == 0) {
f = 0;
i = 2;
while (i < ty) {
if (koma[board[i][tx]][2] == fu) {
f = 1;
break;
}
i++;
}
if ((f and (ty < 8)) and (3 >= dx)) {
value = value + 10;
if (1 >= dx) {
value = value + 10;
}
}
if (k1) {
i = 1;
while (k1 >= i) {
if (koma[kiki_u[ty][tx][1][i]][2] == ehi) {
if (koma[kiki_u[ty][tx][1][i]][0] < ty) {
value = value + 3;
}
}
i++;
}
}
if (front == 0) {
if ((koma[board[ty + 2][tx]][2] >= gi) and (ou >= koma[board[ty + 2][tx]][2])) {
if (kiki[ty + 1][tx][1] >= kiki[ty + 1][tx][0]) {
value = value + 25;
if (koma[board[ty + 2][tx]][2] == hi) {
value = value + 5;
}
}
}
} else if ((front >= gi) and (ou >= front)) {
if (k1 >= k0) {
value = value + 20;
if (front == hi) {
value = value + 5;
}
} else if (koma[board[ty - 1][tx]][2] == efu) {
value = value + (point[syuban][ky] + 20);
}
}
} else if (capture == 0) {
value = value - 20;
if (ty == 2) {
value = value - 100;
}
} else {
value = value + 5;
if (ty >= 7) {
value = value + 5;
}
if ((capture == fu) and (ty == (fy + 1))) {
value = value + 20;
} else if (capture == ky) {
if (k1 < k0) {
value = value + 30;
}
}
}
if (prom and (k1 >= k0)) {
value = value + 6;
if (ty == 7) {
value = value + 2;
}
}
if ((kiki[ty + 1][tx][1] < kiki[ty + 1][tx][0]) and (board[ty + 1][tx] == 0)) {
value = value - 20;
}
} else if (he == ke) {
if ((((ty < 7) and (3 < ty)) and (3 >= dx)) and (k1 >= k0)) {
x = koma[board[ty + 2][tx - 1]][2];
y = koma[board[ty + 2][tx + 1]][2];
if (((x >= gi) and (ou >= x)) or ((y >= gi) and (ou >= y))) {
value = value + 25;
if ((x == ki) or (y == ki)) {
value = value + 10;
} else if ((x == ou) or (y == ou)) {
value = value + 15;
}
}
}
if ((ty == (koma[1][0] - 3)) and (1 >= dx)) {
value = value + 6;
}
if (capture == 0) {
if ((tx == 1) or (tx == 9)) {
value = value - 2;
}
if ((tesu < 40) and (7 >= board_num)) {
value = value - 2;
}
} else {
value = value + 2;
}
if (7 < board_num) {
value = value + 5;
if (30 < tesu) {
if (fy == 1) {
value = value + 5;
}
}
}
if (fy == 0) {
if (kiki[fy][fx][1] < kiki[fy][fx][0]) {
value = value + 3;
}
}
if (k0) {
i = 1;
while (k0 >= i) {
if (koma[kiki_u[ty][tx][0][i]][2] == ky) {
value = value - 5;
break;
}
i++;
}
}
if (prom and (k1 >= k0)) {
value = value + 5;
}
if ((ty == 3) and (tx == 7)) {
if (koma[board[2][8]][2] == eka) {
value = value - 5;
}
}
if (((ty == 3) and (tx == 3)) and (fy == 1)) {
if (koma[board[4][3]][2] == egi) {
value = value + 2;
}
}
} else if (he == gi) {
if (fy < ty) {
value = value + 3;
} else if (ty < fy) {
value = value - 1;
}
if (0 < fy) {
if (tesu < 30) {
if ((ty == 2) and (tx == 7)) {
value = value - 3;
}
}
if (ty == 1) {
value = value - 4;
}
} else {
if ((ty == 9) and (tx == 7)) {
if ((board[8][6] == 0) and (kiki[ty][tx][1] == 0)) {
value = value - 20;
}
}
if (((front == ke) and (5 >= ty)) and (2 >= dx)) {
if ((kiki[ty - 1][tx - 1][1] < kiki[ty - 1][tx - 1][0]) or (kiki[ty - 1][tx + 1][1] < kiki[ty - 1][tx + 1][0])) {
value = value + 5;
}
}
}
if (fy == 1) {
if (6 < tesu) {
value = value + 2;
}
}
if ((ty == 3) and (tx == 7)) {
if (koma[board[2][8]][2] == eka) {
if (kiki[4][7][0] == 0) {
value = value - 5;
}
if ((kiki[4][8][0] >= 3) and (1 >= kiki[3][8][1])) {
value = value + 40;
}
} else if (fy == 2) {
value = value + 10;
}
}
if ((fy == 3) and (fx == 7)) {
if (capture == 0) {
value = value - 7;
if ((ty == 4) and (tx == 8)) {
value = value - 5;
}
if (kiki[4][8][0] >= kiki[4][8][1]) {
value = value - 15;
} else if (koma[board[2][8]][2] == eka) {
value = value + 2;
}
}
}
if (((ty == 2) and (tx == 8)) and (fy == 1)) {
if ((bi == 8) and (bj == 2)) {
if ((motigoma[6] == 1) and (motigoma[22] == 1)) {
value = value + 5;
}
}
}
if ((fy == 3) and (fx == 3)) {
if (kiki[4][4][0] >= kiki[4][4][1]) {
if (((capture == 0) and (!checked)) and (!tumi_flag)) {
value = value - 15;
}
} else if ((ty == 4) and (tx == 3)) {
value = value + 10;
}
}
if ((fy == 3) and (fx == 5)) {
value = value - 4;
}
if ((fy == 2) and (fx == 6)) {
if ((ty == 3) and (tx == 5)) {
if ((((koma[board[8][8]][2] == hi) and (capture == 0)) and (!checked)) and (!tumi_flag)) {
value = value - 8;
}
}
}
if ((fy == 3) and (fx == 4)) {
if (koma[board[2][4]][2] == ehi) {
value = value + 3;
}
}
if ((fy == 4) and (fx == 2)) {
if ((ty == 3) and (tx == 3)) {
if (board[4][3] == 0) {
value = value + 3;
}
}
}
if ((fy == 4) and (fx == 3)) {
if (ty < fy) {
value = value - 3;
}
}
if (((ty == koma[1][0]) and (1 >= dx)) and (fy == 0)) {
value = value + 10;
}
if (((koma[board[ty + 1][tx]][2] == ka) or (koma[board[ty + 1][tx - 1]][2] == hi)) or (koma[board[ty + 1][tx + 1]][2] == hi)) {
value = value + 3;
} else if (prom == 0) {
if ((koma[board[ty - 1][tx - 1]][2] == ki) or (koma[board[ty - 1][tx + 1]][2] == ki)) {
if ((koma[board[ty - 1][tx - 1]][2] == hi) or (koma[board[ty - 1][tx + 1]][2] == hi)) {
value = value + 13;
} else if ((k0 < k1) or (kiki[ty - 1][tx][1] >= kiki[ty - 1][tx][0])) {
value = value + 10;
} else {
value = value - 12;
}
} else if ((koma[board[ty - 1][tx - 1]][2] == hi) or (koma[board[ty - 1][tx + 1]][2] == hi)) {
if ((k0 < k1) or (kiki[ty - 1][tx][1] >= kiki[ty - 1][tx][0])) {
} else {
value = value - 12;
}
}
}
if (ty == 9) {
if ((board[ty - 1][tx - 1] == 0) and (board[ty - 1][tx + 1] == 0)) {
value = value - 5;
}
}
if (((3 >= tx) and (fy < ty)) and (fy >= 2)) {
if ((koma[board[2][2]][2] == ehi) and (2 >= kiki[6][2][0])) {
value = value + ((tx * 2) + 3);
if (1 >= kiki[6][2][0]) {
value = value + 5;
}
}
}
if (capture) {
if (((tx == 1) and (k1 >= k0)) and (koma[board[1][1]][2] == eky)) {
value = value + 50;
}
}
} else if (he == ki) {
if ((!checked) and (!tumi_flag)) {
if (0 < fy) {
if (tesu < 40) {
if ((ty == 2) and (tx == 7)) {
value = value + 5;
if (3 >= tesu) {
value = value + 20;
}
} else if ((ty == 2) and (tx == 3)) {
if ((6 < board_num) and (fy != 3)) {
value = value + 12;
}
if (koma[board[2][2]][2] != ehi) {
value = value + 4;
}
}
if (tx < fx) {
value = value - 3;
}
}
if ((ty == 2) and (tx == 8)) {
value = value - 5;
}
if ((fy == 2) and (fx == 7)) {
value = value - 9;
}
if ((fy == 2) and (fx == 5)) {
value = value - 9;
}
if ((fy == 2) and (fx == 6)) {
value = value - 7;
}
if ((fy == 3) and (fx == 7)) {
value = value + 3;
}
if ((fy == 3) and (fx == 4)) {
if (koma[board[2][4]][2] == ehi) {
value = value + 3;
}
}
if ((20 < tesu) and syuban) {
if ((board_d1[fy][fx] == 1) and (board_d1[ty][tx] == 2)) {
value = value - 5;
} else if ((board_d1[fy][fx] == 1) and (board_d1[ty][tx] == 2)) {
value = value - 3;
}
}
} else {
if (motigoma[20]) {
value = value - 3;
}
if (((1 >= dx) and (ty >= koma[2][0])) and ((koma[2][0] + 1) >= ty)) {
i = 0;
while (1 >= i) {
j = -1;
while (1 >= j) {
if (kiki[koma[2][0] + 1][koma[2][1] + j][0]) {
value = value + 2;
}
j++;
}
i++;
}
}
}
}
if (ty >= 7) {
if ((koma[board[ty][tx - 1]][2] == gi) or (koma[board[ty][tx + 1]][2] == gi)) {
value = value + 6;
}
}
} else if ((he == ka) or (he == um)) {
if ((he2 == ka) and (0 < fy)) {
if ((2 < ty) and (ty < 7)) {
if (kiki[fy][fx][0] == 0) {
if ((capture == 0) and (7 >= board_num)) {
value = value - (ty * 2);
}
if (ty == 2) {
value = value + 3;
}
}
}
}
if (he2 == um) {
if ((2 >= dy) and (2 >= dx)) {
value = value + 4;
}
}
if ((fy == 2) and (fx == 8)) {
if (koma[board[3][7]][2] & enemy) {
value = value + 5;
}
if (kiki[fy][fx][0]) {
if (ty == 1) {
value = value - 10;
}
}
}
if ((fy == 1) and (fx == 7)) {
if ((ty == 2) and (tx == 6)) {
value = value + 5;
}
}
if (fy == 0) {
if ((ty == 9) and (tx == 7)) {
if (((board[8][6] == 0) and (kiki[9][7][1] == 0)) and (kiki[8][7][1] < kiki[8][7][0])) {
if (((koma[board[7][5]][2] == fu) or (koma[board[6][4]][2] == fu)) or (board[4][2] != 0)) {
value = value - 20;
}
}
} else if ((ty == 9) and (tx == 3)) {
if (((board[8][4] == 0) and (kiki[9][3][1] == 0)) and (kiki[8][3][1] < kiki[8][3][0])) {
if ((koma[board[7][5]][2] == fu) or (koma[board[6][6]][2] == fu)) {
value = value - 20;
}
}
}
if (ty < 7) {
if (kiki[ty][tx][0] == 0) {
value = value - 5;
} else {
i = 1;
while (kiki[ty][tx][0] >= i) {
if (koma[kiki_u[ty][tx][0][i]][2] == ka) {
value = value + 10;
}
i++;
}
}
} else {
value = value + 12;
f = koma[board[ty + 1][tx - 1]][2];
h = koma[board[ty + 1][tx + 1]][2];
if (((f == ky) or (f == ke)) and (kiki[ty + 1][tx - 1][0] == 0)) {
value = value + 5;
}
if (((h == ky) or (h == ke)) and (kiki[ty + 1][tx + 1][0] == 0)) {
value = value + 5;
}
if ((f == hi) or (h == hi)) {
value = value + 8;
}
}
if ((ty == (koma[1][0] + 1)) and (dx == 1)) {
value = value + 15;
}
if (ty == 9) {
if ((koma[board[ty - 1][tx - 1]][2] == ki) or (koma[board[ty - 1][tx + 1]][2] == ki)) {
if ((k0 < k1) or (kiki[ty - 1][tx][1] >= kiki[ty - 1][tx][0])) {
} else {
value = value - 10;
}
}
if ((koma[board[ty - 1][tx - 1]][2] == hi) or (koma[board[ty - 1][tx + 1]][2] == hi)) {
if ((k0 < k1) or (kiki[ty - 1][tx][1] >= kiki[ty - 1][tx][0])) {
} else {
value = value - 10;
}
}
}
}
if ((board_num >= 0) and (6 >= board_num)) {
if ((capture == ka) and (he == ka)) {
value = value + 20;
if (((ty == 8) and (tx == 2)) or ((ty == 7) and (tx == 3))) {
value = value + 25;
}
}
}
if (prom and (fy < 7)) {
value = value + 10;
}
if (capture) {
if (0 < k1) {
if (ty >= 5) {
value = value - 20;
}
} else {
value = value + 4;
}
}
} else if ((he == hi) or (he == ry)) {
if (tx == 6) {
value = value - 3;
}
if ((he2 == hi) and (0 < fy)) {
i = 1;
while (i < ty) {
if (koma[board[i][tx]][2] == efu) {
if (capture == 0) {
value = value - 15;
break;
}
}
i++;
}
if ((ty == 2) and (tx == 2)) {
value = value + 4;
if (fx == 4) {
if (kiki[6][2][0] >= 3) {
value = value - 3;
}
}
if (7 < board_num) {
if (30 < tesu) {
value = value - 4;
} else {
value = value + 16;
}
}
}
if (((2 < ty) and (ty < 7)) and (capture == 0)) {
value = value - (ty * 2);
}
}
if (((fy == 2) and (fx == 2)) and (capture == 0)) {
value = value - 4;
if (tx == 4) {
if (kiki[6][2][0] >= 3) {
value = value + 3;
}
} else if (tx == 1) {
if (koma[board[5][1]][2] == eky) {
value = value + 3;
} else {
value = value - 2;
}
}
if (7 < board_num) {
if (30 < tesu) {
value = value + 4;
} else {
value = value - 8;
}
}
}
if (ty == koma[1][0]) {
value = value + 5;
}
if (fy == koma[1][0]) {
if (fy != ty) {
value = value - 5;
}
}
if (fy < 7) {
if ((ty >= 7) and (koma[1][0] >= 7)) {
value = value + 15;
}
f = 0;
i = ty + 1;
while (9 >= i) {
if (board[i][tx] != 0) {
f = 1;
break;
}
i++;
}
if (f == 0) {
i = 7;
while (9 >= i) {
if (kiki[i][tx][0] == 0) {
f = 1;
break;
}
i++;
}
if (f) {
value = value + 25;
}
}
} else if (((ty < 7) and (koma[1][0] >= 7)) and (1 >= capture)) {
value = value - 30;
}
if (he2 == ry) {
if ((2 >= dy) and (2 >= dx)) {
value = value + 4;
}
if (k0) {
value = value - 10;
}
}
if (capture and (ty >= 5)) {
if (0 < k1) {
i = 1;
while ((k1 + 1) >= i) {
if (((kiki_u[ty][tx][1][i] < kan) and (koma[kiki_u[ty][tx][1][i]][2] != ehi)) and (koma[kiki_u[ty][tx][1][i]][2] != ery)) {
value = value - 50;
}
i++;
}
} else {
value = value + 3;
}
}
if (7 < board_num) {
if (fy == ty) {
if (tx == ((fx + math.floor(math.random() * 8)) - 3)) {
value = value + 3;
}
if (tx == 1) {
value = value - 2;
}
if ((tx >= 2) and (5 >= tx)) {
value = value + 1;
}
if ((board_num == 8) and (tx == 4)) {
value = value + 1;
}
}
}
if (fy == 0) {
if (ty < 7) {
value = value - 30;
} else {
value = value + 10;
if (ty >= 8) {
value = value + 5;
}
}
}
if (prom) {
if (koma[1][0] >= 8) {
if (ty < 8) {
value = value - promote_point[he];
}
}
if (fy >= 7) {
value = value - 20;
}
}
if (syuban) {
if ((1 >= math.abs(fy - koma[1][0])) and (dy >= 2)) {
value = value - 50;
}
}
} else if (he == ou) {
if (50 < tesu) {
value = value - 3;
}
if (fy >= 3) {
if (fy < ty) {
value = value + 5;
}
}
if (fy >= 5) {
if (ty < fy) {
value = value - 5;
}
}
if ((ty == 1) and (tx == 6)) {
if ((fy == 1) and (fx == 5)) {
value = value + 5;
if (tesu < 20) {
value = value + 3;
}
}
}
if ((ty == 1) and (tx == 7)) {
if ((fy == 1) and (fx == 6)) {
if ((koma[board[2][5]][2] != eki) and (koma[board[2][3]][2] != eki)) {
value = value + 4;
}
}
}
if ((fy == 1) and (fx == 7)) {
value = value - 2;
if ((ty == 2) and (tx == 6)) {
value = value - 3;
}
}
if ((fy == 2) and (fx == 8)) {
value = value - 5;
}
if ((fy == 1) and (fx == 6)) {
value = value - 3;
if ((ty == 2) and (tx == 6)) {
value = value - 2;
if ((koma[board[8][8]][2] == hi) or (koma[board[8][8]][2] == ry)) {
value = value - 3;
}
}
}
if (6 < board_num) {
if (((ty == 2) and (tx == 6)) and (tesu == 0)) {
value = value + 20;
}
if ((ty == 2) and (tx == 7)) {
value = value + 5;
if (tesu < 3) {
value = value + 15;
}
}
if ((fy == 2) and (fx == 7)) {
value = value - 10;
if ((board_num == 11) and (koma[board[8][8]][2] == hi)) {
value = value - 12;
}
}
}
}
if (kingin[he2]) {
if (0 < fy) {
if (0 < ((ty - fy) * ((koma[1][0] - fy) - 1))) {
value = value + 3;
}
if (0 < ((tx - fx) * (koma[1][1] - fx))) {
value = value + 3;
}
if (he2 == gi) {
} else if (capture == 0) {
if (5 < fy) {
if (ty < fy) {
value = value + 1;
} else if (fy < ty) {
value = value - 1;
if (board_num < 7) {
value = value - 1;
}
}
}
if (ty == 9) {
value = value - 3;
}
}
if (((he2 == to) or (he2 == ny)) or (he2 == nk)) {
if (((tx - fx) * (koma[1][1] - fx)) < 0) {
value = value - 8;
}
if (k1 >= k0) {
value = value + 3;
if (he2 == to) {
value = value + 1;
}
} else if ((he2 == to) and (capture == 0)) {
value = value - 6;
}
}
if (((fy == 3) and (fx == 7)) and (koma[board[2][8]][2] == eka)) {
value = value + 4;
}
if (((fy == 4) and (fx == 6)) and (koma[board[2][8]][2] == eka)) {
value = value + 4;
}
}
if (ty >= 4) {
value = value - (math.abs(tx - 5) - 2);
}
if (k1 >= k0) {
if ((koma[board[ty + 1][tx - 1]][2] == hi) or (koma[board[ty + 1][tx + 1]][2] == hi)) {
value = value + 5;
}
if (syuban) {
if ((1 >= dx) and (ty == (koma[1][0] - 2))) {
value = value + 10;
if (tx == koma[1][1]) {
value = value + 5;
}
}
}
}
if (koma[board[ty + 2][tx]][2] == fu) {
if ((front == 0) and (capture == 0)) {
value = value - 7;
}
}
if ((syuban and (ty >= 7)) and k1) {
i = 1;
while (k1 >= i) {
u = kiki_u[ty][tx][1][i];
if ((koma[u][2] == ery) or (koma[u][2] == ehi)) {
if (((u < kan) and (koma[u][0] == ty)) and (koma[1][0] == ty)) {
value = value - 10;
}
}
i++;
}
}
if (front != fu) {
if (k1 >= k0) {
if ((ty == (koma[1][0] - 1)) and (1 >= dx)) {
value = value + 1800;
if (0 < fy) {
value = value + 200;
}
if (tx == koma[1][1]) {
value = value + 200;
}
value = value - (math.abs(tx - 5) * 100);
}
}
if (((koma[board[ty - 1][tx]][2] == efu) and (fy == 0)) and (front != ky)) {
if ((((ty >= 7) and (2 >= dx)) and (k0 >= k1)) and (ty < koma[1][0])) {
i = -1;
while (1 >= i) {
u = board[ty + 1][tx + i];
if ((koma[u][2] >= gi) and (ou >= koma[u][2])) {
value = value + (point[syuban][he2] + 30);
break;
}
i++;
}
}
}
}
if ((((ty == (koma[1][0] - 1)) and (1 >= dx)) and k1) and ((k1 + 1) == k0)) {
f = 0;
i = 1;
while (kiki[ty][tx][0] >= i) {
u = kiki_u[ty][tx][0][i] % kan;
y = koma[u][0];
x = koma[u][1];
if ((kiki[y][x][1] and (1 < u)) and (y == koma[1][0])) {
j = 1;
while (kiki[y][x][1] >= j) {
h = koma[kiki_u[y][x][1][j]][2];
if ((h == ehi) or (h == ery)) {
if (koma[kiki_u[y][x][1][j]][0] == y) {
f = 1;
break;
}
}
j++;
}
}
i++;
}
if (f) {
value = value + 1800;
if (0 < fy) {
value = value + 200;
}
if (tx == koma[1][1]) {
value = value + 200;
}
value = value - (math.abs(tx - 5) * 100);
}
}
}
if (koma[board[2][8]][2] == eka) {
if ((ty == 3) and (tx == 7)) {
value = value - 7;
}
if ((fy == 3) and (fx == 7)) {
value = value + 7;
}
if ((ty == 4) and (tx == 6)) {
value = value - 5;
}
if ((fy == 4) and (fx == 6)) {
value = value + 5;
}
}
assume(0, fy, fx, ty, tx, prom);
k0 = kiki0[ty][tx][0];
k1 = kiki0[ty][tx][1];
k00 = koma0[2][0];
k01 = koma0[2][1];
if (kiki0[k00][k01][0]) {
return(undefined);
}
if (kiki0[koma0[1][0]][koma0[1][1]][1]) {
if (tumi_check(koma0[1][0], koma0[1][1])) {
if ((he == fu) and (fy == 0)) {
return(undefined);
}
value = value + 6000;
if (best_value < value) {
change_best_value(he0, he, capture, fy, fx, tx, ty, value);
return(undefined);
}
}
value = value + 5;
if (prom) {
value = value + 5;
}
if (point[syuban][he] < point[syuban][capture]) {
value = value + (((point[syuban][capture] - point[syuban][he]) * 5) + 1500);
}
if (k1 >= k0) {
if ((1 >= dy) and (1 >= dx)) {
value = value + (70 - (ty * 5));
}
if (capture) {
if ((1 >= dy) and (1 >= dx)) {
value = value + ((point[syuban][capture] * 3) + 1600);
} else if (kiki[ty][tx][0] == 0) {
if (capture == fu) {
if ((tx == koma[1][1]) and (ty < 7)) {
value = value + 5;
} else {
value = value + ((point[syuban][capture] * 3) + 1400);
}
} else {
value = value + ((point[syuban][capture] * 3) + 1400);
}
}
}
}
} else if ((((((capture == 0) and (k1 == 0)) and k0) and (!gida)) and (!checked)) and (!tumi_flag)) {
return(undefined);
}
i = -1;
while (1 >= i) {
j = -1;
while (1 >= j) {
y = k00 + i;
x = k01 + j;
if ((board0[y][x] < ob) and ((i != 0) or (j != 0))) {
if ((1 < kiki0[y][x][0]) or ((kiki0[y][x][0] and (board0[y][x] == 0)) and sente_motigoma)) {
danger = 1;
break;
}
}
j++;
}
if (danger) {
break;
}
i++;
}
if (danger) {
same = true;
i = -1;
while (1 >= i) {
j = -1;
while (1 >= j) {
y = k00 + i;
x = k01 + j;
if (board0[y][x] < ob) {
if (((board[y][x] != board0[y][x]) or (kiki[y][x][0] != kiki0[y][x][0])) or (kiki[y][x][1] != kiki0[y][x][1])) {
same = false;
break;
}
}
j++;
}
if (!same) {
break;
}
i++;
}
if (same) {
if (tumi_flag) {
value = value - 1000;
mate = true;
}
} else {
search_flag = false;
if ((fy == 0) and (1 < board_d1[ty][tx])) {
i = 0;
while (search_num >= i) {
same = true;
j = 0;
while (2 >= j) {
k = 0;
while (2 >= k) {
y = (k00 + j) - 1;
x = (k01 + k) - 1;
if ((board0[y][x] < ob) and ((j != 1) or (k != 1))) {
if ((kiki0[y][x][0] != searched[i][j][k][0]) or (kiki0[y][x][1] != searched[i][j][k][1])) {
same = false;
break;
}
}
k++;
}
if (!same) {
break;
}
j++;
}
if (same) {
if (searched[i][3] == 2) {
value = value - 1000;
mate = true;
}
break;
}
i++;
}
if (!same) {
search_flag = true;
}
}
if (!same) {
saveto1();
i = -1;
while (1 >= i) {
j = -1;
while (1 >= j) {
y = k00 + i;
x = k01 + j;
if ((kiki1[y][x][0] and (kiki1[y][x][0] >= (kiki1[y][x][1] - 1))) and ((i != 0) or (j != 0))) {
if (make_oute(y, x, 0)) {
danger = 2;
value = value - 1000;
mate = true;
break;
}
}
j++;
}
if (danger == 2) {
break;
}
i++;
}
loadfrom1();
}
if (search_flag) {
search_num++;
searched[search_num] = [[[], [], []], [[], [], []], [[], [], []], danger];
i = 0;
while (2 >= i) {
j = 0;
while (2 >= j) {
y = (k00 + i) - 1;
x = (k01 + j) - 1;
if ((board0[y][x] < ob) and ((i != 1) or (j != 1))) {
searched[search_num][i][j][0] = kiki0[y][x][0];
searched[search_num][i][j][1] = kiki0[y][x][1];
}
j++;
}
i++;
}
}
}
}
if (capture) {
if ((2 >= math.abs((k00 - ty) + 1)) and (2 >= math.abs(k01 - tx))) {
value = value + 10;
if ((1 >= math.abs((k00 - ty) + 1)) and (1 >= math.abs(k01 - tx))) {
value = value + 10;
}
}
if (motigoma[capture + enemy] == 0) {
value = value + 7;
} else if (motigoma[capture + enemy] >= 2) {
value = value - 7;
}
if (((2 >= dy) and (2 >= dx)) and (capture != fu)) {
value = value + 5;
if (syuban) {
if (capture == ki) {
value = value + 30;
}
}
if ((1 >= dy) and (1 >= dx)) {
value = value + 20;
if (syuban) {
value = value + 10;
if ((((capture == ki) or (capture == gi)) or (capture == hi)) or (capture == ry)) {
value = value + 10;
}
if (capture == ki) {
value = value + 10;
if ((he == ka) and (ty >= 8)) {
value = value + 80;
}
}
}
}
}
if ((ty == (k00 + 1)) and (tx == k01)) {
value = value + 20;
}
} else if ((he != fu) and (front == fu)) {
if ((board_d0[ty][tx] == 1) and (k1 >= k0)) {
} else {
value = value - 250;
}
}
i = 0;
while (i < 10) {
if (((rireki_y[i] == ty) and (rireki_x[i] == tx)) and (rireki_h[i] == he)) {
value = value - 3;
}
i++;
}
if ((math.random() * 50) < 1) {
value = value + 5;
}
if ((ty == bi) and (tx == bj)) {
value = value + 5;
}
if (k1 < k0) {
minus_kiki(ty, tx);
}
i = -1;
while (1 >= i) {
j = -1;
while (1 >= j) {
y = (k00 + i) + 1;
x = k01 + j;
if (board0[y][x] < ob) {
value = value + kiki0[y][x][1];
}
j++;
}
i++;
}
if (((fy >= 7) and (he != hi)) and (he != ry)) {
if (kiki[fy][fx][1]) {
i = 1;
while (kiki[fy][fx][1] >= i) {
if ((koma[kiki_u[fy][fx][1][i]][2] == ehi) or (koma[kiki_u[fy][fx][1][i]][2] == ery)) {
if ((koma[kiki_u[fy][fx][1][i]][0] == fy) and (math.abs(fx - koma[1][1]) < math.abs(koma[kiki_u[fy][fx][1][i]][1] - koma[1][1]))) {
value = value + 10;
if ((he == fu) or (he == ky)) {
value = value + 3;
}
break;
}
}
i++;
}
}
}
if ((kiki0[k00 + 1][k01][0] and (2 >= k00)) and (!mate)) {
f = 1;
i = -1;
while (1 >= i) {
y = k00 - 1;
x = k01 + i;
u = board0[y][x];
if ((u < ob) and (kiki0[y][x][0] == 0)) {
if ((u == 0) or ((0 < u) and (!(koma[u][2] & enemy)))) {
f = 0;
break;
}
}
i++;
}
if (f) {
p = kiki0[k00 + 1][k01][0];
if (motigoma[5] and (board0[k00 + 1][k01] == 0)) {
p++;
}
i = 1;
while (kiki0[k00 + 1][k01][1] >= i) {
u = kiki_u0[k00 + 1][k01][1][i];
if ((2 < u) and (u < kan)) {
var y0 = koma0[u][0];
var x0 = koma0[u][1];
f = false;
j = 1;
while (kiki0[y0][x0][0] >= j) {
var ut = kiki_u0[y0][x0][0][j];
h = koma0[ut][2] % enemy;
if (tobikoma[h] and (ut < kan)) {
var ddy = (y0 - koma0[ut][0]);
var ddx = (x0 - koma0[ut][1]);
if (((h == ry) and ((ddy * ddx) != 0)) or ((h == um) and ((ddy * ddx) == 0))) {
} else {
if (ddy != 0) {
var dist = math.abs(ddy);
} else {
var dist = math.abs(ddx);
}
k = 1;
while (8 >= k) {
y = y0 + ((ddy / dist) * k);
x = x0 + ((ddx / dist) * k);
if ((y == (k00 + 1)) and (x == k01)) {
p++;
f = true;
break;
}
if (0 < board0[y][x]) {
f = true;
break;
}
k++;
}
}
}
if (f) {
break;
}
j++;
}
}
i++;
}
if (kiki0[k00 + 1][k01][1] < p) {
value = value - 1000;
}
}
}
i = 1;
while (3 >= i) {
j = 1;
while (9 >= j) {
if (kiki0[i][j][1] < kiki0[i][j][0]) {
if ((board0[i][j] == 0) or (koma0[board0[i][j]][2] & enemy)) {
tmp = 0;
k = 1;
while (kiki0[i][j][0] >= k) {
u = kiki_u0[i][j][0][k] % kan;
h = koma0[u][2];
if (((h != ou) and (h != ki)) and (!(h & promoted))) {
if (tmp < promote_point[h]) {
tmp = promote_point[h];
if ((h == hi) or (h == ka)) {
tmp = tmp + 20;
if ((i == 1) and (j == 3)) {
if (((h == hi) and (koma0[board[2][2]][2] == ehi)) and (koma0[2][0] == 1)) {
value = value - 100;
}
}
}
if (1 >= math.abs(j - k01)) {
value = value - 30;
if (j == k01) {
value = value - 10;
}
}
tmp_u = u;
}
}
k++;
}
if ((0 < tmp) and (used[tmp_u] != 1)) {
used[tmp_u] = 1;
if (syuban) {
if (board_d1[i][j] >= 3) {
tmp = tmp - (board_d1[i][j] * 5);
if (tmp < 0) {
tmp = 0;
}
} else if (board_d1[i][j] == 1) {
tmp = tmp * 2;
}
}
value = value - tmp;
}
}
}
j++;
}
i++;
}
if (narikoma < 2) {
i = 7;
while (9 >= i) {
j = 1;
while (9 >= j) {
if (kiki0[i][j][0] < kiki0[i][j][1]) {
if ((board0[i][j] == 0) or (!(koma0[board0[i][j]][2] & enemy))) {
tmp = 0;
k = 1;
while (kiki0[i][j][1] >= k) {
u = kiki_u0[i][j][1][k] % kan;
h = koma0[u][2] - enemy;
if (((h != ou) and (h != ki)) and (!(h & promoted))) {
if (tmp < promote_point[h]) {
tmp = promote_point[h];
tmp_u = u;
}
}
k++;
}
if ((0 < tmp) and (used[tmp_u] != 1)) {
used[tmp_u] = 1;
if (syuban) {
if (board_d0[i][j] >= 3) {
tmp = tmp - (board_d1[i][j] * 5);
if (tmp < 0) {
tmp = 0;
}
} else if (board_d0[i][j] == 1) {
tmp = tmp * 2;
}
}
value = value + (tmp / ((narikoma * 5) + 5));
}
}
}
j++;
}
i++;
}
}
atari = 1;
atari2 = 0;
i = -1;
while (1 >= i) {
j = -1;
while (1 >= j) {
y = k00 + i;
x = k01 + j;
if (board0[y][x] < ob) {
if (kiki0[y][x][0]) {
value = value - 3;
if ((kiki0[y][x][1] < kiki0[y][x][0]) or (((kiki0[y][x][0] == kiki0[y][x][1]) and (board0[y][x] == 0)) and sente_motigoma)) {
value = value - oumawari[i][j];
}
}
}
j++;
}
i++;
}
i = -1;
while (1 >= i) {
j = -1;
while (1 >= j) {
y = koma0[1][0] + i;
x = koma0[1][1] + j;
if (board0[y][x] < ob) {
value = value + (kiki0[y][x][1] * 5);
if (kiki0[y][x][0] < kiki0[y][x][1]) {
value = value + 5;
if ((0 < board0[y][x]) and (!(koma0[board0[y][x]][2] & enemy))) {
value = value + 10;
}
} else if (((kiki0[y][x][1] == kiki0[y][x][0]) and (board0[y][x] == 0)) and gote_motigoma) {
value = value + 10;
}
}
j++;
}
i++;
}
i = 1;
while (40 >= i) {
y = koma0[i][0];
if (0 < y) {
x = koma0[i][1];
h = koma0[i][2] % enemy;
p = point[syuban][h];
if (syuban) {
pp = math.min(board_d0[y][x], board_d1[y][x]);
if (pp >= 3) {
p = p - (pp * 5);
if (p < 5) {
p = 5;
}
} else if (pp == 1) {
p = p * 1.20000004768372;
}
}
kk0 = kiki0[y][x][0];
kk1 = kiki0[y][x][1];
if (koma0[i][2] & enemy) {
if (h == ke) {
if ((kiki0[y + 1][x][0] >= kiki0[y + 1][x][1]) and (board0[y + 1][x] == 0)) {
value = value - 10;
}
} else if (h == ka) {
if (kiki0[y + 1][x][0] >= kiki0[y + 1][x][1]) {
value = value - 2;
}
}
if (kk1 == 0) {
value = value - 1;
}
if (i == 2) {
} else if (0 < (kk0 - kk1)) {
value = value - p;
if ((koma0[board[y - 1][x]][2] == efu) and (board_d1[y][x] >= 3)) {
if (koma0[board[y + 1][x]][2] != fu) {
value = value + (p / 2);
}
}
} else if (kk0) {
min_point = 286;
j = 1;
while (kk0 >= j) {
ah = koma0[kiki_u0[y][x][0][j] % kan][2];
if (point[syuban][ah] < min_point) {
min_point = point[syuban][ah];
}
j++;
}
if (p >= min_point) {
value = value - ((p - min_point) + 6);
}
}
} else {
if ((h == hi) or (h == ry)) {
if ((y == k00) or (x == k01)) {
value = value - 3;
}
} else if (h == ky) {
if (x == k01) {
value = value - 3;
}
} else if ((h == ka) or (h == um)) {
if (math.abs(y - k00) == math.abs(x - k01)) {
value = value - 3;
}
}
tmp = 0;
if (0 < (kk1 - kk0)) {
tmp = p;
} else if (kk1) {
min_point = 286;
j = 1;
while (kk1 >= j) {
ah = koma0[kiki_u0[y][x][1][j] % kan][2] - enemy;
if (point[syuban][ah] < min_point) {
min_point = point[syuban][ah];
}
j++;
}
if (min_point < p) {
tmp = p - min_point;
}
}
if (board_d0[y][x] == 1) {
tmp = tmp * 3;
}
if (atari < tmp) {
atari2 = atari;
atari = tmp;
} else if (atari2 < tmp) {
atari2 = tmp;
}
}
}
i++;
}
if (1 < atari2) {
value = value + ((atari2 / 2) + 5);
} else if (1 < atari) {
value = value + ((atari / 30) + 5);
}
value = value + ((kiki_sum0[1] - kiki_sum0[0]) / 2);
if (best_value < value) {
change_best_value(he0, he, capture, fy, fx, tx, ty, value);
} else if (best_value2 < value) {
bb2 = he0;
cc2 = he;
dd2 = capture;
ii2 = fy;
jj2 = fx;
xx2 = tx;
yy2 = ty;
best_value2 = value;
}
}
function change_best_value(he0, he, capture, fy, fx, tx, ty, value) {
bb2 = bb;
cc2 = cc;
dd2 = dd;
ii2 = ii;
jj2 = jj;
xx2 = xx;
yy2 = yy;
best_value2 = best_value;
bb = he0;
cc = he;
dd = capture;
ii = fy;
jj = fx;
xx = tx;
yy = ty;
best_value = value;
}
function yukoda(c, i, j) {
var e;
var f;
var h;
var k;
var l;
var x;
var y;
var flag = false;
var oute = false;
var tataki = false;
k = 0;
while (k < can_n[c]) {
x = j + can_x[c][k];
y = i - can_y[c][k];
e = board[y][x];
if (e != ob) {
if (0 < e) {
h = koma[e][2];
if (h & enemy) {
if (kiki[y][x][0]) {
flag = true;
break;
}
} else {
flag = true;
break;
}
}
if (kiki[y][x][0] and (3 >= y)) {
m = 1;
while (kiki[y][x][0] >= m) {
if ((!(koma[kiki_u[y][x][0][m]][2] & promoted)) and (koma[kiki_u[y][x][0][m]][2] != ki)) {
flag = true;
break;
}
m++;
}
if (flag) {
break;
}
}
if (board_k[y][x]) {
flag = true;
break;
}
}
k++;
}
if (flag) {
} else if (c == fu) {
if ((i >= 6) and (kiki[i + 1][j][1] >= kiki[i + 1][j][0])) {
flag = true;
}
} else if (c == ky) {
k = 1;
while (k < masu) {
x = j;
y = i - (tobi[0][0][1] * k);
e = board[y][x];
if (e & ob) {
break;
}
if (0 < e) {
h = koma[e][2];
if (h & enemy) {
if ((((kiki[y][x][0] or (h == ehi)) or (h == ery)) or (h == eky)) or ((h == efu) and (y >= 6))) {
flag = true;
break;
}
break;
}
if (h == ou) {
oute = true;
}
flag = true;
break;
}
if (kiki[y][x][0] and (3 >= y)) {
m = 1;
while (kiki[y][x][0] >= m) {
if ((!(koma[kiki_u[y][x][0][m]][2] & promoted)) and (koma[kiki_u[y][x][0][m]][2] != ki)) {
flag = true;
break;
}
m++;
}
if (flag) {
break;
}
}
if (board_k[y][x]) {
flag = true;
break;
}
k++;
}
} else if (tobikoma[c]) {
if ((c == hi) or (c == ry)) {
g = 0;
} else {
g = 1;
}
k = 0;
while (k < 4) {
l = 1;
while (l < masu) {
x = j - (tobi[g][k][0] * l);
y = i - (tobi[g][k][1] * l);
e = board[y][x];
if (e & ob) {
break;
}
if (0 < e) {
h = koma[e][2];
if (h & enemy) {
if ((kiki[y][x][0] or ((g == 0) and ((h == ehi) or (h == ery)))) or ((g == 1) and ((h == eka) or (h == eum)))) {
flag = true;
break;
}
break;
}
if (h == ou) {
oute = true;
}
flag = true;
break;
}
if (kiki[y][x][0] and (3 >= y)) {
m = 1;
while (kiki[y][x][0] >= m) {
if ((!(koma[kiki_u[y][x][0][m]][2] & promoted)) and (koma[kiki_u[y][x][0][m]][2] != ki)) {
flag = true;
break;
}
m++;
}
if (flag) {
break;
}
}
if (board_k[y][x]) {
flag = true;
}
l++;
}
if (oute) {
break;
}
k++;
}
}
if (kiki[i][j][0]) {
if (kiki[i][j][1]) {
if (flag) {
return(true);
}
f = 0;
k = 1;
while (kiki[i][j][0] >= k) {
if (tobikoma[koma[kiki_u[i][j][0][k]][2]]) {
f = 1;
break;
}
k++;
}
if (f) {
return(true);
}
} else {
if (c == fu) {
e = board[i + 1][j];
if (((0 < e) and (e != ob)) and (!(koma[e][2] & enemy))) {
tataki = true;
}
} else if (c == ke) {
if ((i == (koma[1][0] - 2)) and (math.abs(j - koma[1][1]) == 1)) {
oute = true;
}
}
if (oute or tataki) {
return(true);
}
}
} else if (flag) {
return(true);
}
return(false);
}
function make_oute(yy, xx, sengo) {
var h;
var i;
var u;
var fy;
var pr;
var oy;
var ox;
b = board1[yy][xx];
if (b == ob) {
return(false);
}
if (0 < b) {
if (!(koma1[b][2] & enemy)) {
return(false);
}
}
oy = koma1[2][0];
ox = koma1[2][1];
if ((1 < kiki1[yy][xx][0]) and (kiki1[yy][xx][0] >= kiki1[yy][xx][1])) {
i = 1;
while (kiki1[yy][xx][0] >= i) {
u = kiki_u1[yy][xx][0][i];
if ((u < kan) and (2 < u)) {
h = koma1[u][2];
fy = koma1[u][0];
pr = 0;
if ((3 >= yy) or (3 >= fy)) {
if ((!(h & promoted)) and (h != ki)) {
pr = 1;
h = h + promoted;
}
}
if (yose[h][(oy - yy) + 1][(ox - xx) + 1]) {
assume(1, fy, koma1[u][1], yy, xx, pr);
if (tumi_check(oy, ox)) {
return(true);
}
}
}
i++;
}
}
if ((b == 0) and (kiki1[yy][xx][0] >= (kiki1[yy][xx][1] - 1))) {
i = 2;
while (7 >= i) {
if (motigoma1[i]) {
if (yose[i][(oy - yy) + 1][(ox - xx) + 1]) {
assume(1, 0, i, yy, xx, 0);
if (tumi_check(oy, ox)) {
return(true);
}
}
}
i++;
}
}
return(false);
}
function tumi_check(yy, xx) {
var b;
var h;
var i;
var j;
var u;
var sengo;
var y;
var x;
var dx;
var dy;
var dist;
var ax;
var ay;
var kk;
var mo_other;
var mo_fu;
var nifu;
var ka;
sengo = board0[yy][xx] - 1;
sengo_n = 1 - sengo;
i = -1;
while (1 >= i) {
j = -1;
while (1 >= j) {
y = yy + i;
x = xx + j;
b = board0[y][x];
if (b != ob) {
if ((b == 0) or (math.floor(koma0[b][2] / enemy) != sengo)) {
if (kiki0[y][x][sengo_n] == 0) {
return(false);
}
}
}
j++;
}
i++;
}
if (1 < kiki0[yy][xx][sengo_n]) {
ka = 0;
i = 1;
while (kiki0[yy][xx][sengo_n] >= i) {
if (!(kiki_u0[yy][xx][sengo_n][i] & kan)) {
ka++;
u = kiki_u0[yy][xx][sengo_n][i];
}
i++;
}
if (1 < ka) {
return(true);
}
} else {
u = kiki_u0[yy][xx][sengo_n][1];
}
h = koma0[u][2] % enemy;
y = koma0[u][0];
x = koma0[u][1];
if (tobikoma[h]) {
dy = yy - y;
dx = xx - x;
if (dy != 0) {
dist = math.abs(dy);
} else {
dist = math.abs(dx);
}
if (dist == 1) {
if (1 < kiki0[y][x][sengo]) {
if (sunuki_check(y, x)) {
return(true);
}
return(false);
}
return(true);
}
if (0 < kiki0[y][x][sengo]) {
if (sunuki_check(y, x)) {
return(true);
}
return(false);
}
mo_other = false;
mo_fu = false;
i = 2 + (sengo * enemy);
while ((7 + (sengo * enemy)) >= i) {
if (0 < motigoma0[i]) {
mo_other = true;
break;
}
i++;
}
if (0 < motigoma0[1 + (sengo * enemy)]) {
mo_fu = true;
}
i = 1;
while ((dist - 1) >= i) {
ay = y + ((dy / dist) * i);
ax = x + ((dx / dist) * i);
kk = kiki0[ay][ax][sengo];
if (1 < kk) {
if (sunuki_check(ay, ax)) {
return(true);
}
return(false);
}
if (kk == 1) {
if (mo_other) {
return(false);
}
if (mo_fu) {
nifu = false;
j = 1;
while (9 >= j) {
if (koma0[board0[j][ax]][2] == (fu + (enemy * sengo))) {
nifu = true;
break;
}
j++;
}
if (!nifu) {
return(false);
}
}
}
i++;
}
return(true);
}
kk = kiki0[y][x][sengo];
if (h == ke) {
kk++;
}
if (1 < kk) {
if (sunuki_check(y, x)) {
return(true);
}
return(false);
}
return(true);
}
function sunuki_check(yy, xx) {
var u;
var ut;
var h;
var i;
var j;
var k;
var y;
var x;
var y0;
var x0;
var dy;
var dx;
var sunuki;
var sengo;
var sengo_n;
sengo_n = math.floor(koma0[board0[yy][xx]][2] / enemy);
sengo = 1 - sengo_n;
i = 1;
while (kiki0[yy][xx][sengo] >= i) {
u = kiki_u0[yy][xx][sengo][i];
if ((2 < u) and (u < kan)) {
y0 = koma0[u][0];
x0 = koma0[u][1];
sunuki = false;
j = 1;
while (kiki0[y0][x0][sengo_n] >= j) {
ut = kiki_u0[y0][x0][sengo_n][j];
h = koma0[ut][2] % enemy;
if (tobikoma[h] and (ut < kan)) {
dy = y0 - koma0[ut][0];
dx = x0 - koma0[ut][1];
if (((h == ry) and ((dy * dx) != 0)) or ((h == um) and ((dy * dx) == 0))) {
} else {
if (dy != 0) {
dist = math.abs(dy);
} else {
dist = math.abs(dx);
}
k = 1;
while (8 >= k) {
y = y0 + ((dy / dist) * k);
x = x0 + ((dx / dist) * k);
if (0 < board0[y][x]) {
if ((y == koma0[sengo + 1][0]) and (x == koma0[sengo + 1][1])) {
sunuki = true;
break;
}
return(false);
}
k++;
}
if (sunuki) {
break;
}
}
}
j++;
}
if (!sunuki) {
return(false);
}
}
i++;
}
return(true);
}
function loadfrom_() {
var i;
var j;
var k;
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
board0[i][j] = board[i][j];
kiki0[i][j][0] = kiki[i][j][0];
kiki0[i][j][1] = kiki[i][j][1];
k = 1;
while (kiki0[i][j][0] >= k) {
kiki_u0[i][j][0][k] = kiki_u[i][j][0][k];
k++;
}
k = 1;
while (kiki0[i][j][1] >= k) {
kiki_u0[i][j][1][k] = kiki_u[i][j][1][k];
k++;
}
j++;
}
i++;
}
i = 1;
while (40 >= i) {
koma0[i][0] = koma[i][0];
koma0[i][1] = koma[i][1];
koma0[i][2] = koma[i][2];
i++;
}
i = 1;
while (7 >= i) {
motigoma0[i] = motigoma[i];
motigoma0[i + enemy] = motigoma[i + enemy];
j = 1;
while (motigoma0[i] >= j) {
motigoma_u0[i][j] = motigoma_u[i][j];
j++;
}
j = 1;
while (motigoma0[i + enemy] >= j) {
motigoma_u0[i + enemy][j] = motigoma_u[i + enemy][j];
j++;
}
i++;
}
kiki_sum0[0] = kiki_sum[0];
kiki_sum0[1] = kiki_sum[1];
}
function saveto1() {
var i;
var j;
var k;
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
board1[i][j] = board0[i][j];
kiki1[i][j][0] = kiki0[i][j][0];
kiki1[i][j][1] = kiki0[i][j][1];
k = 1;
while (kiki1[i][j][0] >= k) {
kiki_u1[i][j][0][k] = kiki_u0[i][j][0][k];
k++;
}
k = 1;
while (kiki1[i][j][1] >= k) {
kiki_u1[i][j][1][k] = kiki_u0[i][j][1][k];
k++;
}
j++;
}
i++;
}
i = 1;
while (40 >= i) {
koma1[i][0] = koma0[i][0];
koma1[i][1] = koma0[i][1];
koma1[i][2] = koma0[i][2];
i++;
}
i = 1;
while (7 >= i) {
motigoma1[i] = motigoma0[i];
motigoma1[i + enemy] = motigoma0[i + enemy];
j = 1;
while (motigoma1[i] >= j) {
motigoma_u1[i][j] = motigoma_u0[i][j];
j++;
}
j = 1;
while (motigoma1[i + enemy] >= j) {
motigoma_u1[i + enemy][j] = motigoma_u0[i + enemy][j];
j++;
}
i++;
}
kiki_sum1[0] = kiki_sum0[0];
kiki_sum1[1] = kiki_sum0[1];
}
function loadfrom1() {
var i;
var j;
var k;
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
board0[i][j] = board1[i][j];
kiki0[i][j][0] = kiki1[i][j][0];
kiki0[i][j][1] = kiki1[i][j][1];
k = 1;
while (kiki0[i][j][0] >= k) {
kiki_u0[i][j][0][k] = kiki_u1[i][j][0][k];
k++;
}
k = 1;
while (kiki0[i][j][1] >= k) {
kiki_u0[i][j][1][k] = kiki_u1[i][j][1][k];
k++;
}
j++;
}
i++;
}
i = 1;
while (40 >= i) {
koma0[i][0] = koma1[i][0];
koma0[i][1] = koma1[i][1];
koma0[i][2] = koma1[i][2];
i++;
}
i = 1;
while (7 >= i) {
motigoma0[i] = motigoma1[i];
motigoma0[i + enemy] = motigoma1[i + enemy];
j = 1;
while (motigoma0[i] >= j) {
motigoma_u0[i][j] = motigoma_u1[i][j];
j++;
}
j = 1;
while (motigoma0[i + enemy] >= j) {
motigoma_u0[i + enemy][j] = motigoma_u1[i + enemy][j];
j++;
}
i++;
}
kiki_sum0[0] = kiki_sum1[0];
kiki_sum0[1] = kiki_sum1[1];
}
function plus_kiki(yy, xx) {
var uni;
var he;
var sengo;
var pm;
var e;
var f;
var g;
var i;
var j;
var k;
var x;
var y;
var x0;
var y0;
var ka;
uni = board0[yy][xx];
he = koma0[uni][2] % enemy;
sengo = math.floor(koma0[uni][2] / enemy);
pm = 1 - (sengo * 2);
i = 0;
while (i < can_n[he]) {
x = xx + can_x[he][i];
y = yy + (can_y[he][i] * pm);
if (board0[y][x] != ob) {
kiki0[y][x][sengo]++;
kiki_u0[y][x][sengo][kiki0[y][x][sengo]] = uni;
kiki_sum0[sengo]++;
}
i++;
}
ka = 0;
if (he == ky) {
i = 1;
while (i < masu) {
x = xx;
y = yy + ((tobi[0][0][1] * i) * pm);
e = board0[y][x];
f = 0;
if (e & ob) {
break;
}
if (0 < e) {
if (math.floor(koma0[e][2] / enemy) == sengo) {
f = tobikoe[0][0][(koma0[e][2] % enemy) - 1];
} else if ((koma0[e][2] % enemy) == ou) {
f = 1;
}
if (f == 2) {
ka = kan;
} else {
if (f == 1) {
y0 = y + (tobi[0][0][1] * pm);
kiki0[y0][x][sengo]++;
kiki_u0[y0][x][sengo][kiki0[y0][x][sengo]] = uni + kan;
kiki_sum0[sengo]++;
}
kiki0[y][x][sengo]++;
kiki_u0[y][x][sengo][kiki0[y][x][sengo]] = uni + ka;
kiki_sum0[sengo]++;
break;
}
}
kiki0[y][x][sengo]++;
kiki_u0[y][x][sengo][kiki0[y][x][sengo]] = uni + ka;
kiki_sum0[sengo]++;
i++;
}
} else if (tobikoma[he]) {
if ((he == hi) or (he == ry)) {
g = 0;
} else {
g = 1;
}
k = 0;
while (k < 4) {
ka = 0;
i = 1;
while (i < masu) {
x = xx + ((tobi[g][k][0] * i) * pm);
y = yy + ((tobi[g][k][1] * i) * pm);
e = board0[y][x];
f = 0;
if (e & ob) {
break;
}
if (0 < e) {
if (math.floor(koma0[e][2] / enemy) == sengo) {
f = tobikoe[g][k][(koma0[e][2] % enemy) - 1];
} else if ((koma0[e][2] % enemy) == ou) {
f = 1;
}
if (f == 2) {
ka = kan;
} else {
if (f == 1) {
x0 = x + (tobi[g][k][0] * pm);
y0 = y + (tobi[g][k][1] * pm);
kiki0[y0][x0][sengo]++;
kiki_sum0[sengo]++;
kiki_u0[y0][x0][sengo][kiki0[y0][x0][sengo]] = uni + kan;
}
kiki0[y][x][sengo]++;
kiki_u0[y][x][sengo][kiki0[y][x][sengo]] = uni + ka;
kiki_sum0[sengo]++;
break;
}
}
kiki0[y][x][sengo]++;
kiki_u0[y][x][sengo][kiki0[y][x][sengo]] = uni + ka;
kiki_sum0[sengo]++;
i++;
}
k++;
}
}
}
function minus_kiki(yy, xx) {
var uni;
var he;
var sengo;
var pm;
var e;
var f;
var g;
var i;
var j;
var k;
var x;
var y;
var x0;
var y0;
uni = board0[yy][xx];
he = koma0[uni][2] % enemy;
sengo = math.floor(koma0[uni][2] / enemy);
pm = 1 - (sengo * 2);
i = 0;
while (i < can_n[he]) {
x = xx + can_x[he][i];
y = yy + (can_y[he][i] * pm);
if (board0[y][x] != ob) {
j = 1;
while (kiki0[y][x][sengo] >= j) {
if (kiki_u0[y][x][sengo][j] == uni) {
kiki_u0[y][x][sengo].splice(j, 1);
break;
}
j++;
}
kiki0[y][x][sengo]--;
kiki_sum0[sengo]--;
}
i++;
}
if (he == ky) {
i = 1;
while (i < masu) {
x = xx;
y = yy + ((tobi[0][0][1] * i) * pm);
e = board0[y][x];
f = 0;
if (e & ob) {
break;
}
if (0 < e) {
if (math.floor(koma0[e][2] / enemy) == sengo) {
f = tobikoe[0][0][(koma0[e][2] % enemy) - 1];
} else if ((koma0[e][2] % enemy) == ou) {
f = 1;
}
if (f < 2) {
if (f == 1) {
y0 = y + (tobi[0][0][1] * pm);
j = 1;
while (kiki0[y0][x][sengo] >= j) {
if (kiki_u0[y0][x][sengo][j] == uni) {
kiki_u0[y0][x][sengo].splice(j, 1);
break;
}
j++;
}
kiki0[y0][x][sengo]--;
kiki_sum0[sengo]--;
}
j = 1;
while (kiki0[y][x][sengo] >= j) {
if (kiki_u0[y][x][sengo][j] == uni) {
kiki_u0[y][x][sengo].splice(j, 1);
break;
}
j++;
}
kiki0[y][x][sengo]--;
kiki_sum0[sengo]--;
break;
}
}
j = 1;
while (kiki0[y][x][sengo] >= j) {
if (kiki_u0[y][x][sengo][j] == uni) {
kiki_u0[y][x][sengo].splice(j, 1);
break;
}
j++;
}
kiki0[y][x][sengo]--;
kiki_sum0[sengo]--;
i++;
}
} else if (tobikoma[he]) {
if ((he == hi) or (he == ry)) {
g = 0;
} else {
g = 1;
}
k = 0;
while (k < 4) {
i = 1;
while (i < masu) {
x = xx + ((tobi[g][k][0] * i) * pm);
y = yy + ((tobi[g][k][1] * i) * pm);
e = board0[y][x];
f = 0;
if (e & ob) {
break;
}
if (0 < e) {
if (math.floor(koma0[e][2] / enemy) == sengo) {
f = tobikoe[g][k][(koma0[e][2] % enemy) - 1];
} else if ((koma0[e][2] % enemy) == ou) {
f = 1;
}
if (f < 2) {
if (f == 1) {
x0 = x + (tobi[g][k][0] * pm);
y0 = y + (tobi[g][k][1] * pm);
j = 1;
while (kiki0[y0][x0][sengo] >= j) {
if (kiki_u0[y0][x0][sengo][j] == uni) {
kiki_u0[y0][x0][sengo].splice(j, 1);
break;
}
j++;
}
kiki0[y0][x0][sengo]--;
kiki_sum0[sengo]--;
}
j = 1;
while (kiki0[y][x][sengo] >= j) {
if (kiki_u0[y][x][sengo][j] == uni) {
kiki_u0[y][x][sengo].splice(j, 1);
break;
}
j++;
}
kiki0[y][x][sengo]--;
kiki_sum0[sengo]--;
break;
}
}
j = 1;
while (kiki0[y][x][sengo] >= j) {
if (kiki_u0[y][x][sengo][j] == uni) {
kiki_u0[y][x][sengo].splice(j, 1);
break;
}
j++;
}
kiki0[y][x][sengo]--;
kiki_sum0[sengo]--;
i++;
}
k++;
}
}
}
function assume(start, fy, fx, ty, tx, prom) {
var i;
var j;
var k;
var he_c;
var uni;
var uni_c;
var cu;
var ch;
var used = [];
var capturing = false;
var change = [];
var change_num = 0;
if (start == 0) {
loadfrom_();
} else if (start == 1) {
loadfrom1();
}
if (fy == 0) {
uni = motigoma_u0[fx][motigoma0[fx]];
motigoma0[fx]--;
} else {
uni = board0[fy][fx];
minus_kiki(fy, fx);
}
uni_c = board0[ty][tx];
if ((0 < uni_c) and (uni_c != ob)) {
capturing = true;
he_c = koma0[uni_c][2];
minus_kiki(ty, tx);
}
i = 0;
while (i < 2) {
j = 1;
while (kiki0[fy][fx][i] >= j) {
cu = kiki_u0[fy][fx][i][j] % kan;
ch = koma0[cu][2] % enemy;
if (tobikoma[ch]) {
if (used[cu] != 1) {
used[cu] = 1;
change[change_num] = cu;
change_num++;
}
}
j++;
}
j = 1;
while (kiki0[ty][tx][i] >= j) {
cu = kiki_u0[ty][tx][i][j] % kan;
ch = koma0[cu][2] % enemy;
if (tobikoma[ch]) {
if (used[cu] != 1) {
used[cu] = 1;
change[change_num] = cu;
change_num++;
}
}
j++;
}
i++;
}
i = 0;
while (i < change_num) {
minus_kiki(koma0[change[i]][0], koma0[change[i]][1]);
i++;
}
board0[ty][tx] = uni;
koma0[uni][0] = ty;
koma0[uni][1] = tx;
koma0[uni][2] = koma0[uni][2] + (prom * promoted);
if (fy != 0) {
board0[fy][fx] = 0;
}
if (capturing) {
koma0[uni_c][0] = 0;
if (he_c & promoted) {
he_c = he_c - promoted;
}
if (he_c & enemy) {
he_c = he_c - enemy;
} else {
he_c = he_c + enemy;
}
koma0[uni_c][2] = he_c;
motigoma0[he_c]++;
motigoma_u0[he_c][motigoma0[he_c]] = uni_c;
}
plus_kiki(ty, tx);
i = 0;
while (i < change_num) {
plus_kiki(koma0[change[i]][0], koma0[change[i]][1]);
i++;
}
}
function calc_kiki() {
var b;
var c;
var d;
var e;
var f;
var g;
var i;
var j;
var k;
var l;
var x;
var y;
var x0;
var y0;
var ka;
y = koma[1][0];
x = koma[1][1];
y0 = koma[2][0];
x0 = koma[2][1];
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
kiki[i][j][0] = 0;
kiki[i][j][1] = 0;
board_k[i][j] = 0;
board_d0[i][j] = math.max(math.abs(y - i), math.abs(x - j));
board_d1[i][j] = math.max(math.abs(y0 - i), math.abs(x0 - j));
j++;
}
i++;
}
i = 0;
while (1 >= i) {
j = -1;
while (1 >= j) {
board_k[(y + i) - 1][x + j] = 1;
board_k[y0 + i][x0 + j] = 2;
j++;
}
i++;
}
kiki_sum = [0, 0];
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
b = koma[board[i][j]][2];
if (b) {
c = b % enemy;
d = math.floor(b / enemy);
k = 0;
while (k < can_n[c]) {
x = j + can_x[c][k];
y = i + (can_y[c][k] * (1 - (d * 2)));
e = board[y][x];
if (e != ob) {
kiki[y][x][d]++;
kiki_u[y][x][d][kiki[y][x][d]] = board[i][j];
kiki_sum[d]++;
}
k++;
}
ka = 0;
if (c == ky) {
k = 1;
while (k < masu) {
x = j;
y = i + ((tobi[0][0][1] * k) * (1 - (d * 2)));
e = board[y][x];
f = 0;
if (e & ob) {
break;
}
if (0 < e) {
if (math.floor(koma[e][2] / enemy) == d) {
f = tobikoe[0][0][(koma[e][2] % enemy) - 1];
} else if ((koma[e][2] % enemy) == ou) {
f = 1;
}
if (f == 2) {
ka = kan;
} else {
if (f == 1) {
y0 = y + (tobi[0][0][1] * (1 - (d * 2)));
kiki[y0][x][d]++;
kiki_u[y0][x][d][kiki[y0][x][d]] = board[i][j] + kan;
kiki_sum[d]++;
}
kiki[y][x][d]++;
kiki_u[y][x][d][kiki[y][x][d]] = board[i][j] + ka;
kiki_sum[d]++;
break;
}
}
kiki[y][x][d]++;
kiki_u[y][x][d][kiki[y][x][d]] = board[i][j] + ka;
kiki_sum[d]++;
k++;
}
} else if (tobikoma[c]) {
if ((c == hi) or (c == ry)) {
g = 0;
} else {
g = 1;
}
k = 0;
while (k < 4) {
ka = 0;
l = 1;
while (l < masu) {
x = j + ((tobi[g][k][0] * l) * (1 - (d * 2)));
y = i + ((tobi[g][k][1] * l) * (1 - (d * 2)));
e = board[y][x];
f = 0;
if (e & ob) {
break;
}
if (0 < e) {
if (math.floor(koma[e][2] / enemy) == d) {
f = tobikoe[g][k][(koma[e][2] % enemy) - 1];
} else if ((koma[e][2] % enemy) == ou) {
f = 1;
}
if (f == 2) {
ka = kan;
} else {
if (f == 1) {
y0 = y + (tobi[g][k][1] * (1 - (d * 2)));
x0 = x + (tobi[g][k][0] * (1 - (d * 2)));
kiki[y0][x0][d]++;
kiki_u[y0][x0][d][kiki[y0][x0][d]] = board[i][j] + kan;
kiki_sum[d]++;
}
kiki[y][x][d]++;
kiki_u[y][x][d][kiki[y][x][d]] = board[i][j] + ka;
kiki_sum[d]++;
break;
}
}
kiki[y][x][d]++;
kiki_u[y][x][d][kiki[y][x][d]] = board[i][j] + ka;
kiki_sum[d]++;
l++;
}
k++;
}
}
}
j++;
}
i++;
}
}
function show_kiki() {
var i;
var j;
_root.txt2 = "";
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
_root.txt2 = _root.txt2 + (((kiki0[i][j][0] + "") + kiki0[i][j][1]) + " ");
if (j == 9) {
_root.txt2 = _root.txt2 + newline;
}
j++;
}
i++;
}
}
function show_board() {
var i;
var j;
_root.txt2 = "";
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
_root.txt2 = _root.txt2 + (board_d0[i][j] + " ");
if (j == 9) {
_root.txt2 = _root.txt2 + newline;
}
j++;
}
i++;
}
}
function show_kiki_u() {
calc_kiki();
_root.txt2 = "";
var i;
var a;
var b;
a = _root.mc20.txt1;
b = _root.mc20.txt2;
var i = 1;
while (kiki[a][b][0] >= i) {
_root.txt2 = _root.txt2 + (kiki_u[a][b][0][i] + ", ");
i++;
}
_root.txt2 = _root.txt2 + newline;
var i = 1;
while (kiki[a][b][1] >= i) {
_root.txt2 = _root.txt2 + (kiki_u[a][b][1][i] + ", ");
i++;
}
}
function r_back() {
if (!game_over) {
return(undefined);
}
if (tesu < 1) {
return(undefined);
}
_root.s1.play();
var yf = r_y_from[tesu];
var xf = r_x_from[tesu];
var yt = r_y_to[tesu];
var xt = r_x_to[tesu];
var yt2 = r_y_to[tesu - 1];
var xt2 = r_x_to[tesu - 1];
var c = r_capture[tesu];
_root.k[(("_" + yf) + "_") + xf]._visible = true;
if (yf == 0) {
motigoma[xf]++;
_root.n["_" + xf].t = motigoma[xf];
if (1 < motigoma[xf]) {
_root.n["_" + xf]._visible = true;
}
} else {
board[yf][xf] = board[yt][xt] - (r_promote[tesu] * promoted);
_root.k[(("_" + yf) + "_") + xf].g.gotoandstop(board[yf][xf]);
}
board[yt][xt] = c;
if (c) {
_root.k[(("_" + yt) + "_") + xt].g.gotoandstop(c);
_root.k[(("_" + yt) + "_") + xt]._visible = true;
if (c & promoted) {
c = c - promoted;
}
if (c & enemy) {
c = c - enemy;
} else {
c = c + enemy;
}
motigoma[c]--;
_root.n["_" + c].t = motigoma[c];
if (motigoma[c] < 1) {
_root.k["_0_" + c]._visible = false;
}
if (motigoma[c] < 2) {
_root.n["_" + c]._visible = false;
}
} else {
_root.k[(("_" + yt) + "_") + xt]._visible = false;
}
_root.k[(("_" + yt) + "_") + xt].b._visible = false;
_root.k[(("_" + yt2) + "_") + xt2].b._visible = true;
tesu--;
_root.t = tesu;
}
function r_forward() {
if (!game_over) {
return(undefined);
}
if (tesu >= tesu_max) {
return(undefined);
}
_root.s1.play();
tesu++;
_root.t = tesu;
var yf = r_y_from[tesu];
var xf = r_x_from[tesu];
var yt = r_y_to[tesu];
var xt = r_x_to[tesu];
var yt2 = r_y_to[tesu - 1];
var xt2 = r_x_to[tesu - 1];
var c = r_capture[tesu];
if (yf == 0) {
board[yt][xt] = xf;
motigoma[xf]--;
_root.n["_" + xf].t = motigoma[xf];
if (motigoma[xf] < 2) {
_root.n["_" + xf]._visible = false;
}
if (motigoma[xf] < 1) {
_root.k["_0_" + xf]._visible = false;
}
} else {
board[yt][xt] = board[yf][xf] + (r_promote[tesu] * promoted);
_root.k[(("_" + yf) + "_") + xf]._visible = false;
}
_root.k[(("_" + yt) + "_") + xt].g.gotoandstop(board[yt][xt]);
_root.k[(("_" + yt) + "_") + xt]._visible = true;
if (c) {
if (c & promoted) {
c = c - promoted;
}
if (c & enemy) {
c = c - enemy;
} else {
c = c + enemy;
}
motigoma[c]++;
_root.n["_" + c].t = motigoma[c];
_root.k["_0_" + c]._visible = true;
if (1 < motigoma[c]) {
_root.n["_" + c]._visible = true;
}
}
_root.k[(("_" + yt2) + "_") + xt2].b._visible = false;
_root.k[(("_" + yt) + "_") + xt].b._visible = true;
}
function r_start() {
if (!game_over) {
return(undefined);
}
_root.s1.play();
var i;
var j;
var k;
var obj;
tesu = 0;
_root.t = tesu;
i = 0;
while (i < masu) {
j = 0;
while (j < masu) {
board[i + 1][j + 1] = koma_def[board_def[i][j]][2];
j++;
}
i++;
}
i = 0;
while (i < 2) {
j = 0;
while (j < masu) {
if (board_num < 7) {
k = i + 7;
} else {
k = i;
}
board[k + 1][j + 1] = koma_def[boards[board_num][i][j]][2];
j++;
}
i++;
}
if (board_num == 12) {
i = 1;
while (9 >= i) {
board[3][i] = 0;
i++;
}
}
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
k = board[i][j];
obj = _root.k[(("_" + i) + "_") + j];
if (k) {
obj._visible = true;
obj.g.gotoandstop(k);
} else {
obj._visible = false;
}
obj.b._visible = false;
j++;
}
i++;
}
i = 0;
while (i < 24) {
motigoma[i] = 0;
_root.k["_0_" + i]._visible = false;
_root.n["_" + i].t = 0;
_root.n["_" + i]._visible = false;
i++;
}
}
function r_end() {
if (!game_over) {
return(undefined);
}
_root.s1.play();
var i;
var j;
var k;
var obj;
var yt2 = r_y_to[tesu_max];
var xt2 = r_x_to[tesu_max];
tesu = tesu_max;
_root.t = tesu;
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
board[i][j] = board_t[i - 1][j - 1];
k = board[i][j];
obj = _root.k[(("_" + i) + "_") + j];
if (k) {
obj._visible = true;
obj.g.gotoandstop(k);
} else {
obj._visible = false;
}
obj.b._visible = false;
j++;
}
i++;
}
_root.k[(("_" + yt2) + "_") + xt2].b._visible = true;
i = 0;
while (i < 24) {
motigoma[i] = motigoma_t[i];
j = motigoma[i];
if (j) {
_root.k["_0_" + i]._visible = true;
} else {
_root.k["_0_" + i]._visible = false;
}
_root.n["_" + i].t = j;
if (1 < j) {
_root.n["_" + i]._visible = true;
} else {
_root.n["_" + i]._visible = false;
}
i++;
}
}
function resign() {
if ((((((_root.s._visible or _root.ru._visible) or _root.j._visible) or _root.tr._visible) or _root.k.p_type._visible) or game_over) or pause) {
return(undefined);
}
winner = 1;
_root.s3.play();
game_end();
_root.h.gotoandstop("win");
}
function game_end() {
var i;
var j;
var w_m;
var w_h;
var tmp_rank;
var r = [7, 8, 9, 10, 11, 12, 13, 6, 5, 4, 3, 2, 1];
game_over = true;
i = 1;
while (9 >= i) {
j = 1;
while (9 >= j) {
board[i][j] = koma[board[i][j]][2];
board_t[i - 1][j - 1] = board[i][j];
j++;
}
i++;
}
i = 0;
while (i < 24) {
motigoma_t[i] = motigoma[i];
i++;
}
_root.r.gotoandstop(3);
_root.r.m.gotoandstop(winner + 1);
if (guide) {
hide_guide();
}
if ((0 < _root.m.won) or ((winner == 1) and (board_num == 12))) {
tmp_rank = r[board_num];
if (winner == 1) {
tmp_rank--;
_root.m.rank = math.min(_root.m.rank, tmp_rank);
} else {
_root.m.rank = math.max(_root.m.rank, tmp_rank);
var wme = [6, 12, 11, 10, 9, 8, 7, 5, 4, 3, 2, 1, 0];
_root.m.wm[wme[board_num]] = 1;
}
_root.txt5 = (_root.m.smsg[53] + _root.m.smsg[105 + _root.m.rank]) + _root.m.smsg[53];
}
if ((board_num == 0) and (5 < tesu_max)) {
sender_lv = new loadvars();
if (winner == 0) {
_root.m.loader_lv.onload = function () {
sender_lv.n = parseint(_root.m.loader_lv.n, 10) + 1;
sender_lv.sendandload("http://hozo.hp.infoseek.co.jp/cgi-bin/saveshogi_m.cgi", sender_lv, "POST");
};
_root.m.loader_lv.load("http://hozo.hp.infoseek.co.jp/cgi-bin/shogi_m.txt?" + new date());
} else {
_root.m.loader_lv.onload = function () {
sender_lv.n = parseint(_root.m.loader_lv.n, 10) + 1;
sender_lv.sendandload("http://hozo.hp.infoseek.co.jp/cgi-bin/saveshogi_h.cgi", sender_lv, "POST");
};
_root.m.loader_lv.load("http://hozo.hp.infoseek.co.jp/cgi-bin/shogi_h.txt?" + new date());
}
}
}
setup_line();
}
onClipEvent (mouseDown) {
move();
zzz_cnt = 0;
if (zzz) {
zzz = false;
if (_root.s._visible) {
_root.h.gotoandplay(1);
} else {
_root.h.gotoandstop("def");
}
}
}
onClipEvent (mouseMove) {
if (_root.k.p_type._visible) {
_root.k.p_type._x = _root._xmouse;
_root.k.p_type._y = _root._ymouse;
}
}
onClipEvent (enterFrame) {
if ((++zzz_cnt) == 1800) {
if ((!zzz) and (!game_over)) {
zzz = true;
_root.h.gotoandplay("zzz");
}
}
if (m_flag) {
_root.c._y = _root.c._y + m_dy;
_root.c._x = _root.c._x + m_dx;
_root.c._visible = true;
m_cnt++;
if (m_cnt >= 8) {
_root.s1.play();
if (100 < best_value) {
_root.h.gotoandplay("yuri2");
} else if (50 < best_value) {
_root.h.gotoandplay("yuri1");
} else if (best_value < (-100)) {
_root.h.gotoandplay("furi2");
} else if (best_value < (-50)) {
_root.h.gotoandplay("furi1");
}
_root.c._visible = false;
_root.c.gotoandstop(m_c);
m_flag = false;
c_flag = m_c_flag;
obj = _root.k[(("_" + m_y) + "_") + m_x];
obj._visible = true;
obj.g.gotoandstop(m_h);
if (m_win) {
_root.s3.play();
winner = 1;
game_end();
_root.h.gotoandstop("win");
}
_root.k[(("_" + bi) + "_") + bj].b._visible = false;
obj.b._visible = true;
bi = m_y;
bj = m_x;
if (guide and (!game_over)) {
show_guide();
}
pause = false;
}
} else if (c_flag) {
_root.c._y = _root.c._y + c_dy;
_root.c._x = _root.c._x + c_dx;
_root.c._visible = true;
c_cnt++;
if (c_cnt >= 4) {
_root.k["_0_" + c_h]._visible = true;
_root.n["_" + c_h].t = motigoma[c_h];
if (1 < motigoma[c_h]) {
_root.n["_" + c_h]._visible = true;
}
_root.c._visible = false;
c_flag = false;
_root.s8.play();
}
} else if ((++cnt) == 3) {
think();
}
}
onClipEvent (keyDown) {
if (((!_root.ru._visible) and (!_root.j._visible)) and (!_root.tr._visible)) {
if (key.isdown(key.left)) {
r_back();
} else if (key.isdown(key.right)) {
r_forward();
}
if (key.isdown(key.down)) {
r_start();
} else if (key.isdown(key.up)) {
r_end();
}
}
}
Instance of Symbol 165 MovieClip "mc10" in Frame 5
on (release) {
_root.h._visible = false;
_root.h_cheese.gotoandplay(1);
_root.h_cheese._visible = true;
}
on (rollOver) {
_root.s4.play();
}
Instance of Symbol 229 MovieClip "ru_button" in Frame 5
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
on (release) {
_root.s5.play();
if (!_root.k.p_type._visible) {
if (_root.ru._visible) {
_root.s._visible = _root.as.opening;
_root.ru._visible = false;
} else {
_root.s._visible = false;
_root.j._visible = false;
_root.tr._visible = false;
_root.ru._visible = true;
}
}
}
Instance of Symbol 235 MovieClip "mc16" in Frame 5
on (rollOver) {
this.gotoandstop(2);
_root.s4.play();
}
on (rollOut) {
this.gotoandstop(1);
}
on (release) {
_root.s5.play();
_root.prevframe();
}
Instance of Symbol 241 MovieClip "j_button" in Frame 5
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
on (release) {
_root.s5.play();
if (!_root.k.p_type._visible) {
if (_root.j._visible) {
_root.s._visible = _root.as.opening;
_root.j._visible = false;
} else {
_root.s._visible = false;
_root.ru._visible = false;
_root.tr._visible = false;
_root.j._visible = true;
}
}
}
Instance of Symbol 247 MovieClip "tr_button" in Frame 5
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
on (release) {
_root.s5.play();
if (!_root.k.p_type._visible) {
if (_root.tr._visible) {
_root.s._visible = _root.as.opening;
_root.tr._visible = false;
} else {
_root.s._visible = false;
_root.j._visible = false;
_root.ru._visible = false;
_root.tr._visible = true;
}
}
}
Symbol 5 MovieClip Frame 2
gotoAndPlay (1);
Symbol 57 MovieClip Frame 2
stop();
Symbol 57 MovieClip Frame 3
init();
Symbol 57 MovieClip Frame 4
doeffect();
Symbol 57 MovieClip Frame 5
gotoAndPlay (4);
Symbol 61 MovieClip Frame 2
stop();
Symbol 61 MovieClip Frame 3
init();
Symbol 61 MovieClip Frame 4
doeffect();
Symbol 61 MovieClip Frame 5
gotoAndPlay (4);
Symbol 65 MovieClip Frame 2
stop();
Symbol 65 MovieClip Frame 3
init();
Symbol 65 MovieClip Frame 4
doeffect();
Symbol 65 MovieClip Frame 5
gotoAndPlay (4);
Symbol 66 MovieClip Frame 1
function letterinit() {
if (this.timerstarted == 1) {
} else {
this.timerstarted = 0;
}
this._visible = true;
this.speed = this._parent.speed;
this.alphaspeed = this._parent.alphaspeed;
}
function effect() {
if (this.timerstarted == 0) {
this.start = getTimer();
this.timerstarted = 1;
this.gotoandplay(3);
} else if ((this.start + this._parent.startdelay) < getTimer()) {
this._xscale = this._xscale + this.speed;
this._yscale = this._yscale + this.speed;
this._alpha = this._alpha - this.alphaspeed;
if (this._xscale >= this._parent.scale) {
this.gotoandstop("end");
this._alpha = 100;
this._xscale = 100;
this._yscale = 100;
this._visible = false;
this.timerstarted = 0;
}
} else {
this.gotoandplay(3);
}
}
function shuffle() {
return(math.floor(math.random() * 3) - 1);
}
numchar = 3;
speed = 300;
random = 0;
reverse = 0;
alpha = 0;
delay = 400;
loop = 0;
loopdelay = 0;
waitcharend = 0;
scale = 5000;
startdelay = 1000;
mcn = "letter";
alphaspeed = math.floor((100 - alpha) / ((scale - 100) / speed));
aletters = new array();
i = 0;
while (i < numchar) {
aletters[i + 0] = i;
var letter = this[mcn + i];
letter._visible = true;
letter.init = letterinit;
letter.doeffect = effect;
letter.number = i;
i++;
}
if (random == 1) {
aletters.sort(shuffle);
}
if (reverse == 1) {
aletters.reverse();
}
Symbol 66 MovieClip Frame 2
i = 0;
now = getTimer();
loopnow = 0;
Symbol 66 MovieClip Frame 3
this[mcn + aletters[i]].gotoandplay(3);
now = getTimer();
i = i + 1;
if (i == numchar) {
gotoAndStop (7);
}
Symbol 66 MovieClip Frame 5
if (waitcharend == 1) {
if ((this[mcn + aletters[i - 1]]._currentframe == this[mcn + aletters[i - 1]]._totalframes) and ((now + delay) < getTimer())) {
gotoAndPlay(this._currentframe - 2);
}
gotoAndPlay(this._currentframe - 1);
}
if ((now + delay) < getTimer()) {
gotoAndPlay(this._currentframe - 2);
}
gotoAndPlay(this._currentframe - 1);
Symbol 66 MovieClip Frame 7
if (loop == 1) {
if (loopnow != 1) {
if (this[mcn + aletters[numchar - 1]]._currentframe == this[mcn + aletters[numchar - 1]]._totalframes) {
loopnow = 1;
now = getTimer();
}
}
if ((getTimer() >= (now + loopdelay)) and (loopnow == 1)) {
gotoAndPlay (2);
} else {
prevFrame();
play();
}
} else {
stop();
}
Symbol 70 MovieClip Frame 2
stop();
Symbol 70 MovieClip Frame 3
init();
Symbol 70 MovieClip Frame 4
doeffect();
Symbol 70 MovieClip Frame 5
gotoAndPlay (4);
Symbol 74 MovieClip Frame 2
stop();
Symbol 74 MovieClip Frame 3
init();
Symbol 74 MovieClip Frame 4
doeffect();
Symbol 74 MovieClip Frame 5
gotoAndPlay (4);
Symbol 78 MovieClip Frame 2
stop();
Symbol 78 MovieClip Frame 3
init();
Symbol 78 MovieClip Frame 4
doeffect();
Symbol 78 MovieClip Frame 5
gotoAndPlay (4);
Symbol 79 MovieClip Frame 1
function letterinit() {
this._visible = true;
this.speed = this._parent.speed;
this._xscale = this._parent.scale;
this._yscale = this._parent.scale;
this._alpha = this._parent.alpha;
this.alphaspeed = this._parent.alphaspeed;
}
function effect() {
this._xscale = this._xscale - this.speed;
this._yscale = this._yscale - this.speed;
this._alpha = this._alpha + this.alphaspeed;
if (100 >= this._xscale) {
this._xscale = 100;
this._yscale = 100;
this._alpha = 100;
this.gotoandstop("end");
}
}
function shuffle() {
return(math.floor(math.random() * 3) - 1);
}
numchar = 3;
speed = 300;
random = 0;
reverse = 0;
alpha = 0;
delay = 400;
loop = 0;
loopdelay = 0;
waitcharend = 0;
scale = 3000;
mcn = "letter";
alphaspeed = math.floor((100 - alpha) / ((scale - 100) / speed));
aletters = new array();
i = 0;
while (i < numchar) {
aletters[i + 0] = i;
var letter = this[mcn + i];
letter._visible = false;
letter.init = letterinit;
letter.doeffect = effect;
letter.number = i;
i++;
}
if (random == 1) {
aletters.sort(shuffle);
}
if (reverse == 1) {
aletters.reverse();
}
Symbol 79 MovieClip Frame 2
i = 0;
now = getTimer();
loopnow = 0;
Symbol 79 MovieClip Frame 3
this[mcn + aletters[i]].gotoandplay(3);
now = getTimer();
i = i + 1;
if (i == numchar) {
gotoAndStop (7);
}
Symbol 79 MovieClip Frame 5
if (waitcharend == 1) {
if ((this[mcn + aletters[i - 1]]._currentframe == this[mcn + aletters[i - 1]]._totalframes) and ((now + delay) < getTimer())) {
gotoAndPlay(this._currentframe - 2);
}
gotoAndPlay(this._currentframe - 1);
}
if ((now + delay) < getTimer()) {
gotoAndPlay(this._currentframe - 2);
}
gotoAndPlay(this._currentframe - 1);
Symbol 79 MovieClip Frame 7
if (loop == 1) {
if (loopnow != 1) {
if (this[mcn + aletters[numchar - 1]]._currentframe == this[mcn + aletters[numchar - 1]]._totalframes) {
loopnow = 1;
now = getTimer();
}
}
if ((getTimer() >= (now + loopdelay)) and (loopnow == 1)) {
gotoAndPlay (2);
} else {
prevFrame();
play();
}
} else {
stop();
}
Symbol 81 MovieClip Frame 1
stop();
Symbol 84 MovieClip Frame 1
stop();
Symbol 87 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 1
stop();
Symbol 93 MovieClip Frame 1
stop();
Symbol 96 MovieClip Frame 1
stop();
Symbol 99 MovieClip Frame 1
stop();
Symbol 102 MovieClip Frame 1
stop();
Symbol 105 MovieClip Frame 1
stop();
Symbol 109 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 2
stop();
Symbol 115 MovieClip Frame 3
stop();
Symbol 115 MovieClip Frame 4
stop();
Symbol 115 MovieClip Frame 5
stop();
Symbol 129 MovieClip Frame 1
stop();
Symbol 135 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 1
stop();
Symbol 155 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 2
stop();
Instance of Symbol 155 MovieClip "mc8" in Symbol 162 MovieClip Frame 1
on (release) {
_root.as.resign();
}
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
Symbol 162 MovieClip Frame 2
stop();
Symbol 162 MovieClip Frame 3
stop();
Instance of Symbol 129 MovieClip "mc6" in Symbol 162 MovieClip Frame 3
on (release) {
_root.as.r_back();
}
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
Instance of Symbol 135 MovieClip "mc7" in Symbol 162 MovieClip Frame 3
on (release) {
_root.as.r_forward();
}
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
Instance of Symbol 142 MovieClip "mc11" in Symbol 162 MovieClip Frame 3
on (release) {
_root.as.r_start();
}
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
Instance of Symbol 149 MovieClip "mc12" in Symbol 162 MovieClip Frame 3
on (release) {
_root.as.r_end();
}
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
Symbol 215 MovieClip Frame 11
gotoAndPlay (1);
Symbol 215 MovieClip Frame 45
if (6 < _root.as.board_num) {
_root.as.think();
}
Symbol 215 MovieClip Frame 50
stop();
Symbol 215 MovieClip Frame 68
gotoAndStop (50);
Symbol 215 MovieClip Frame 93
gotoAndStop (50);
Symbol 215 MovieClip Frame 118
gotoAndStop (50);
Symbol 215 MovieClip Frame 148
gotoAndStop (50);
Symbol 215 MovieClip Frame 216
gotoAndPlay (149);
Symbol 223 MovieClip Frame 24
_root.h._visible = true;
this._visible = false;
this.stop();
Symbol 229 MovieClip Frame 1
stop();
Symbol 235 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 1
stop();
Symbol 247 MovieClip Frame 1
stop();
Symbol 254 MovieClip Frame 1
stop();
_root.as.guide = false;
_root.as.hide_guide();
Symbol 254 MovieClip Frame 2
stop();
_root.as.guide = true;
_root.as.show_guide();
Symbol 317 MovieClip Frame 1
stop();
Symbol 317 MovieClip Frame 2
stop();
Symbol 317 MovieClip Frame 8
stop();
Symbol 317 MovieClip Frame 16
stop();
Symbol 317 MovieClip Frame 17
stop();
Instance of Symbol 318 MovieClip "p_type" in Symbol 321 MovieClip Frame 1
on (release) {
_root.as.ll = this.ll;
if (0 < this.ll) {
_root.as.pick();
}
}
Symbol 382 MovieClip Frame 1
stop();
Symbol 382 MovieClip Frame 2
stop();
Symbol 382 MovieClip Frame 8
stop();
Symbol 382 MovieClip Frame 16
stop();
Symbol 382 MovieClip Frame 17
stop();
Symbol 443 MovieClip Frame 1
stop();
Symbol 443 MovieClip Frame 2
stop();
Symbol 443 MovieClip Frame 8
stop();
Symbol 443 MovieClip Frame 16
stop();
Symbol 443 MovieClip Frame 17
stop();
Symbol 504 MovieClip Frame 1
stop();
Symbol 504 MovieClip Frame 2
stop();
Symbol 504 MovieClip Frame 8
stop();
Symbol 504 MovieClip Frame 16
stop();
Symbol 504 MovieClip Frame 17
stop();
Instance of Symbol 443 MovieClip "aa" in Symbol 506 MovieClip Frame 1
on (release) {
_root.as.choose(0);
}
Instance of Symbol 504 MovieClip "bb" in Symbol 506 MovieClip Frame 1
on (release) {
_root.as.choose(1);
}
Symbol 512 MovieClip Frame 1
stop();
Symbol 518 MovieClip Frame 1
stop();
Symbol 524 MovieClip Frame 1
stop();
Symbol 530 MovieClip Frame 1
stop();
Symbol 536 MovieClip Frame 1
stop();
Symbol 542 MovieClip Frame 1
stop();
Symbol 548 MovieClip Frame 1
stop();
Symbol 554 MovieClip Frame 1
stop();
Symbol 560 MovieClip Frame 1
stop();
Symbol 566 MovieClip Frame 1
stop();
Symbol 572 MovieClip Frame 1
stop();
Symbol 578 MovieClip Frame 1
stop();
Symbol 584 MovieClip Frame 1
stop();
Symbol 595 Button
on (release) {
_root.as.board_num = -1;
_root.as.setup();
}
Instance of Symbol 512 MovieClip "mc1" in Symbol 599 MovieClip Frame 1
on (release) {
_root.as.board_num = 7;
_root.as.setup();
}
on (rollOver) {
_root.s.ms._visible = true;
_root.s.ms.txt1 = _root.m.smsg[121];
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
_root.s.ms._visible = false;
this.gotoandstop(1);
}
Instance of Symbol 518 MovieClip "mc2" in Symbol 599 MovieClip Frame 1
on (release) {
_root.as.board_num = 0;
_root.as.setup();
}
on (rollOver) {
_root.s4.play();
_root.s.ms._visible = true;
_root.s.ms.txt1 = _root.m.smsg[119];
this.gotoandstop(2);
}
on (rollOut) {
_root.s.ms._visible = false;
this.gotoandstop(1);
}
Instance of Symbol 524 MovieClip "mc3" in Symbol 599 MovieClip Frame 1
on (release) {
_root.as.board_num = 8;
_root.as.setup();
}
on (rollOver) {
_root.s.ms._visible = true;
_root.s.ms.txt1 = _root.m.smsg[121];
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
_root.s.ms._visible = false;
this.gotoandstop(1);
}
Instance of Symbol 530 MovieClip "mc4" in Symbol 599 MovieClip Frame 1
on (release) {
_root.as.board_num = 9;
_root.as.setup();
}
on (rollOver) {
_root.s.ms._visible = true;
_root.s.ms.txt1 = _root.m.smsg[121];
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
_root.s.ms._visible = false;
this.gotoandstop(1);
}
Instance of Symbol 536 MovieClip "mc5" in Symbol 599 MovieClip Frame 1
on (release) {
_root.as.board_num = 10;
_root.as.setup();
}
on (rollOver) {
_root.s.ms._visible = true;
_root.s.ms.txt1 = _root.m.smsg[121];
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
_root.s.ms._visible = false;
this.gotoandstop(1);
}
Instance of Symbol 542 MovieClip "mc6" in Symbol 599 MovieClip Frame 1
on (release) {
_root.as.board_num = 11;
_root.as.setup();
}
on (rollOver) {
_root.s.ms._visible = true;
_root.s.ms.txt1 = _root.m.smsg[121];
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
_root.s.ms._visible = false;
this.gotoandstop(1);
}
Instance of Symbol 548 MovieClip "mc7" in Symbol 599 MovieClip Frame 1
on (release) {
_root.as.board_num = 12;
_root.as.setup();
}
on (rollOver) {
_root.s.ms._visible = true;
_root.s.ms.txt1 = _root.m.smsg[122];
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
_root.s.ms._visible = false;
this.gotoandstop(1);
}
Instance of Symbol 554 MovieClip "mc8" in Symbol 599 MovieClip Frame 1
on (release) {
_root.as.board_num = 1;
_root.as.setup();
}
on (rollOver) {
_root.s.ms._visible = true;
_root.s.ms.txt1 = _root.m.smsg[120];
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
_root.s.ms._visible = false;
this.gotoandstop(1);
}
Instance of Symbol 560 MovieClip "mc9" in Symbol 599 MovieClip Frame 1
on (release) {
_root.as.board_num = 2;
_root.as.setup();
}
on (rollOver) {
_root.s.ms._visible = true;
_root.s.ms.txt1 = _root.m.smsg[120];
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
_root.s.ms._visible = false;
this.gotoandstop(1);
}
Instance of Symbol 566 MovieClip "mc10" in Symbol 599 MovieClip Frame 1
on (release) {
_root.as.board_num = 3;
_root.as.setup();
}
on (rollOver) {
_root.s.ms._visible = true;
_root.s.ms.txt1 = _root.m.smsg[120];
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
_root.s.ms._visible = false;
this.gotoandstop(1);
}
Instance of Symbol 572 MovieClip "mc11" in Symbol 599 MovieClip Frame 1
on (release) {
_root.as.board_num = 4;
_root.as.setup();
}
on (rollOver) {
_root.s.ms._visible = true;
_root.s.ms.txt1 = _root.m.smsg[120];
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
_root.s.ms._visible = false;
this.gotoandstop(1);
}
Instance of Symbol 578 MovieClip "mc12" in Symbol 599 MovieClip Frame 1
on (release) {
_root.as.board_num = 5;
_root.as.setup();
}
on (rollOver) {
_root.s.ms._visible = true;
_root.s.ms.txt1 = _root.m.smsg[120];
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
_root.s.ms._visible = false;
this.gotoandstop(1);
}
Instance of Symbol 584 MovieClip "mc13" in Symbol 599 MovieClip Frame 1
on (release) {
_root.as.board_num = 6;
_root.as.setup();
}
on (rollOver) {
_root.s.ms._visible = true;
_root.s.ms.txt1 = _root.m.smsg[120];
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
_root.s.ms._visible = false;
this.gotoandstop(1);
}
Symbol 660 MovieClip Frame 1
stop();
Symbol 660 MovieClip Frame 2
stop();
Symbol 660 MovieClip Frame 8
stop();
Symbol 660 MovieClip Frame 16
stop();
Symbol 660 MovieClip Frame 17
stop();
Symbol 1049 MovieClip Frame 1
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 2
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 3
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 4
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 5
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 6
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 7
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 8
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 9
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 10
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 11
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 12
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 13
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 14
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 15
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 16
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 17
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 18
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 19
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 20
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 21
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 22
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 23
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 24
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 25
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 26
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 27
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 28
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 29
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 30
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 31
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 32
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 33
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 34
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe];
Symbol 1049 MovieClip Frame 35
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 36
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 37
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 38
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 39
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 40
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 41
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 42
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 43
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 44
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 45
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 46
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 47
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 48
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 49
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 50
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 51
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 52
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 53
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 54
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 55
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 56
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 57
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1049 MovieClip Frame 58
this.stop();
_root.j.txt1 = _root.m.smsg[this._currentframe + 33];
Symbol 1055 MovieClip Frame 1
stop();
Symbol 1061 MovieClip Frame 1
stop();
Symbol 1068 MovieClip Frame 1
stop();
Symbol 1074 MovieClip Frame 1
stop();
Symbol 1079 MovieClip Frame 1
stop();
Symbol 1084 MovieClip Frame 1
stop();
Symbol 1089 MovieClip Frame 1
stop();
Symbol 1094 MovieClip Frame 1
stop();
Symbol 1099 MovieClip Frame 1
stop();
Symbol 1104 MovieClip Frame 1
stop();
Instance of Symbol 1079 MovieClip "b1" in Symbol 1105 MovieClip Frame 1
on (release) {
_root.s5.play();
_root.j.p = 1;
_root.j.nextframe();
}
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
Instance of Symbol 1084 MovieClip "b2" in Symbol 1105 MovieClip Frame 1
on (release) {
_root.s5.play();
_root.j.p = 10;
_root.j.nextframe();
}
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
Instance of Symbol 1089 MovieClip "b3" in Symbol 1105 MovieClip Frame 1
on (release) {
_root.s5.play();
_root.j.p = 21;
_root.j.nextframe();
}
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
Instance of Symbol 1094 MovieClip "b4" in Symbol 1105 MovieClip Frame 1
on (release) {
_root.s5.play();
_root.j.p = 29;
_root.j.nextframe();
}
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
Instance of Symbol 1099 MovieClip "b5" in Symbol 1105 MovieClip Frame 1
on (release) {
_root.s5.play();
_root.j.p = 33;
_root.j.nextframe();
}
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
Instance of Symbol 1104 MovieClip "b6" in Symbol 1105 MovieClip Frame 1
on (release) {
_root.s5.play();
_root.j.p = 39;
_root.j.nextframe();
}
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
Symbol 1141 MovieClip Frame 1
this.stop();
_root.j.bb._visible = true;
Instance of Symbol 1074 MovieClip "mc12" in Symbol 1141 MovieClip Frame 1
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
on (release) {
_root.s5.play();
_root.s._visible = _root.as.opening;
_root.j._visible = false;
}
Symbol 1141 MovieClip Frame 2
this.stop();
_root.j.kh.gotoandstop(this.p);
_root.j.txt2 = this.p + "/58";
_root.j.bb._visible = false;
Instance of Symbol 1055 MovieClip "mc8" in Symbol 1141 MovieClip Frame 2
on (release) {
_root.s5.play();
_root.j.kh.prevframe();
_root.j.txt2 = _root.j.kh._currentframe + "/58";
}
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
Instance of Symbol 1061 MovieClip "mc9" in Symbol 1141 MovieClip Frame 2
on (release) {
_root.s5.play();
_root.j.kh.nextframe();
_root.j.txt2 = _root.j.kh._currentframe + "/58";
}
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
Instance of Symbol 1068 MovieClip "mc10" in Symbol 1141 MovieClip Frame 2
on (release) {
_root.s5.play();
_root.j.prevframe();
}
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
Symbol 1189 MovieClip Frame 1
stop();
Symbol 1226 MovieClip Frame 1
this.stop();
this.txt5 = _root.m.smsg[53 + this._currentframe];
Symbol 1226 MovieClip Frame 2
this.stop();
this.txt5 = _root.m.smsg[53 + this._currentframe];
Symbol 1226 MovieClip Frame 3
this.stop();
this.txt5 = _root.m.smsg[53 + this._currentframe];
Symbol 1226 MovieClip Frame 4
this.stop();
this.txt5 = _root.m.smsg[53 + this._currentframe];
Symbol 1226 MovieClip Frame 5
this.stop();
this.txt5 = _root.m.smsg[53 + this._currentframe];
Symbol 1226 MovieClip Frame 6
this.stop();
this.txt5 = _root.m.smsg[53 + this._currentframe];
Symbol 1226 MovieClip Frame 7
this.stop();
this.txt5 = _root.m.smsg[53 + this._currentframe];
Symbol 1226 MovieClip Frame 8
this.stop();
this.txt5 = _root.m.smsg[53 + this._currentframe];
Symbol 1226 MovieClip Frame 9
this.stop();
this.txt5 = _root.m.smsg[53 + this._currentframe];
Symbol 1226 MovieClip Frame 10
this.stop();
this.txt5 = _root.m.smsg[53 + this._currentframe];
Symbol 1226 MovieClip Frame 11
this.stop();
this.txt5 = _root.m.smsg[53 + this._currentframe];
Symbol 1226 MovieClip Frame 12
this.stop();
this.txt5 = _root.m.smsg[53 + this._currentframe];
Symbol 1226 MovieClip Frame 13
this.stop();
this.txt5 = _root.m.smsg[53 + this._currentframe];
Symbol 1226 MovieClip Frame 14
this.stop();
this.txt5 = _root.m.smsg[53 + this._currentframe];
Instance of Symbol 1144 MovieClip "mc2" in Symbol 1245 MovieClip Frame 1
on (rollOver) {
_root.ru.c._x = this._x;
_root.ru.c._y = this._y;
_root.ru.kk.gotoandstop(1);
}
Instance of Symbol 1147 MovieClip "mc3" in Symbol 1245 MovieClip Frame 1
on (rollOver) {
_root.ru.c._x = this._x;
_root.ru.c._y = this._y;
_root.ru.kk.gotoandstop(2);
}
Instance of Symbol 1150 MovieClip "mc4" in Symbol 1245 MovieClip Frame 1
on (rollOver) {
_root.ru.c._x = this._x;
_root.ru.c._y = this._y;
_root.ru.kk.gotoandstop(3);
}
Instance of Symbol 1153 MovieClip "mc5" in Symbol 1245 MovieClip Frame 1
on (rollOver) {
_root.ru.c._x = this._x;
_root.ru.c._y = this._y;
_root.ru.kk.gotoandstop(4);
}
Instance of Symbol 1156 MovieClip "mc6" in Symbol 1245 MovieClip Frame 1
on (rollOver) {
_root.ru.c._x = this._x;
_root.ru.c._y = this._y;
_root.ru.kk.gotoandstop(5);
}
Instance of Symbol 1159 MovieClip "mc7" in Symbol 1245 MovieClip Frame 1
on (rollOver) {
_root.ru.c._x = this._x;
_root.ru.c._y = this._y;
_root.ru.kk.gotoandstop(6);
}
Instance of Symbol 1162 MovieClip "mc8" in Symbol 1245 MovieClip Frame 1
on (rollOver) {
_root.ru.c._x = this._x;
_root.ru.c._y = this._y;
_root.ru.kk.gotoandstop(7);
}
Instance of Symbol 1165 MovieClip "mc9" in Symbol 1245 MovieClip Frame 1
on (rollOver) {
_root.ru.c._x = this._x;
_root.ru.c._y = this._y;
_root.ru.kk.gotoandstop(8);
}
Instance of Symbol 1168 MovieClip "mc10" in Symbol 1245 MovieClip Frame 1
on (rollOver) {
_root.ru.c._x = this._x;
_root.ru.c._y = this._y;
_root.ru.kk.gotoandstop(9);
}
Instance of Symbol 1171 MovieClip "mc11" in Symbol 1245 MovieClip Frame 1
on (rollOver) {
_root.ru.c._x = this._x;
_root.ru.c._y = this._y;
_root.ru.kk.gotoandstop(10);
}
Instance of Symbol 1174 MovieClip "mc12" in Symbol 1245 MovieClip Frame 1
on (rollOver) {
_root.ru.c._x = this._x;
_root.ru.c._y = this._y;
_root.ru.kk.gotoandstop(11);
}
Instance of Symbol 1177 MovieClip "mc13" in Symbol 1245 MovieClip Frame 1
on (rollOver) {
_root.ru.c._x = this._x;
_root.ru.c._y = this._y;
_root.ru.kk.gotoandstop(12);
}
Instance of Symbol 1180 MovieClip "mc14" in Symbol 1245 MovieClip Frame 1
on (rollOver) {
_root.ru.c._x = this._x;
_root.ru.c._y = this._y;
_root.ru.kk.gotoandstop(13);
}
Instance of Symbol 1183 MovieClip "mc15" in Symbol 1245 MovieClip Frame 1
on (rollOver) {
_root.ru.c._x = this._x;
_root.ru.c._y = this._y;
_root.ru.kk.gotoandstop(14);
}
Instance of Symbol 1189 MovieClip "mc17" in Symbol 1245 MovieClip Frame 1
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
on (release) {
_root.s5.play();
_root.s._visible = _root.as.opening;
_root.ru._visible = false;
}
Symbol 1251 MovieClip Frame 1
stop();
Symbol 1317 MovieClip Frame 1
stop();
Symbol 1317 MovieClip Frame 2
stop();
Symbol 1317 MovieClip Frame 8
stop();
Symbol 1317 MovieClip Frame 16
stop();
Symbol 1317 MovieClip Frame 17
stop();
Symbol 1334 MovieClip Frame 43
gotoAndPlay (1);
Symbol 1334 MovieClip Frame 78
if (_root.as.qcnt >= 14) {
if (_root.as.qcnt < 30) {
_root.tr.next._visible = true;
this.gotoandplay(1);
} else {
this.gotoandstop("sit");
}
} else {
_root.as.next_question();
this.gotoandplay(1);
}
Symbol 1361 Button
on (release) {
_root.as.next_question();
}
Instance of Symbol 1251 MovieClip "mc17" in Symbol 1364 MovieClip Frame 1
on (rollOver) {
_root.s4.play();
this.gotoandstop(2);
}
on (rollOut) {
this.gotoandstop(1);
}
on (release) {
_root.s5.play();
_root.s._visible = _root.as.opening;
_root.tr._visible = false;
}
Instance of Symbol 1317 MovieClip "gg" in Symbol 1364 MovieClip Frame 1
on (release) {
_root.as.qy = this.qy;
_root.as.qx = this.qx;
_root.as.question();
}
Instance of Symbol 1338 MovieClip "next" in Symbol 1364 MovieClip Frame 1
on (release) {
_root.s5.play();
this._visible = false;
_root.as.next_question();
}
on (rollOver) {
_root.s4.play();
}
Symbol 1366 Button
on (release) {
_root.as.show_kiki_u();
}
Symbol 1373 MovieClip Frame 215
this.stop();
this._visible = false;
Symbol 1395 Button
on (release) {
_root.as.show_kiki();
}
Symbol 1397 Button
on (release) {
_root.as.show_board();
}
Symbol 1399 Button
on (release) {
_root.as.test();
}