2019-07-07 07:36:22 UNSELECTED

Unknown type code

Copy Copied! Full
elseif TARG_NUM < 23 then --香車 hosei = 1 for i = 1, 4 do if i == 1 then hosei = 10 for i2 = 1, 8 do if ((BORD_NUM + hosei * i2) <= #BOARD_NUM) and ((BORD_NUM + hosei * i2) > 0) and (((BORD_NUM - 1) % 9 + i2) < 9) then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM + hosei * i2]] then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 0 break elseif BOARD_NUM[BORD_NUM + hosei * i2] > 0 then break end end end elseif i == 2 then hosei = -10 for i2 = 1, 8 do if ((BORD_NUM + hosei * i2) <= #BOARD_NUM) and ((BORD_NUM + hosei * i2) > 0) and (((BORD_NUM - 1) % 9 - i2) >= 0) then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM + hosei * i2]] then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 0 break elseif BOARD_NUM[BORD_NUM + hosei * i2] > 0 then break end end end elseif i == 3 then hosei = 8 for i2 = 1, 8 do if ((BORD_NUM + hosei * i2) <= #BOARD_NUM) and ((BORD_NUM + hosei * i2) > 0) and (((BORD_NUM - 1) % 9 - i2) >= 0) then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM + hosei * i2]] then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 0 break elseif BOARD_NUM[BORD_NUM + hosei * i2] > 0 then break end end end elseif i == 4 then hosei = -8 for i2 = 1, 8 do if ((BORD_NUM + hosei * i2) <= #BOARD_NUM) and ((BORD_NUM + hosei * i2) > 0) and (((BORD_NUM - 1) % 9 + i2) < 9) then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM + hosei * i2]] then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 0 break elseif BOARD_NUM[BORD_NUM + hosei * i2] > 0 then break end end end end end if URA_FLG[TARG_NUM] == 180 then hosei = 1 for i = 1, 4 do if i == 1 then hosei = 9 elseif i == 2 then hosei = -9 elseif i == 3 then hosei = 1 elseif i == 4 then hosei = -1 end for i2 = 1, 1 do if ((BORD_NUM + hosei * i2) <= #BOARD_NUM) and ((BORD_NUM + hosei * i2) > 0) then if i < 3 then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM + hosei * i2]] then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 0 break elseif BOARD_NUM[BORD_NUM + hosei * i2] > 0 then break end else if (math.floor((BORD_NUM - 1 + hosei * i2) / 9) == math.floor((BORD_NUM - 1) / 9)) then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM + hosei * i2]] then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 0 break elseif BOARD_NUM[BORD_NUM + hosei * i2] > 0 then break end end end end end end end BOARD_POSSIBLE[BORD_NUM] = 1 elseif TARG_NUM < 27 then --桂馬 if URA_FLG[TARG_NUM] == 0 then if ANG_NUM[TARG_NUM] == 90 then hosei = 9 else hosei = -9 end for i2 = 1, 9 do if ((BORD_NUM + hosei * i2) <= #BOARD_NUM) and ((BORD_NUM + hosei * i2) > 0) then if ((BORD_NUM + hosei * i2) <= #BOARD_NUM) and ((BORD_NUM + hosei * i2) > 0) then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM + hosei * i2]] then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 0 break elseif BOARD_NUM[BORD_NUM + hosei * i2] > 0 then break end end end end else if ANG_NUM[TARG_NUM] == 90 then for i = 1, 4 do if i == 1 then hosei = 7 for i2 = 1, 3 do if ((BORD_NUM + hosei + i2) <= #BOARD_NUM) and ((BORD_NUM + hosei + i2) > 0) and (math.floor(1 + (BORD_NUM - 1) / 9) == math.floor((BORD_NUM - 1 + hosei + i2) / 9)) then BOARD_POSSIBLE[BORD_NUM + hosei + i2] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM + hosei + i2]] then BOARD_POSSIBLE[BORD_NUM + hosei + i2] = 0 end end end elseif i == 2 then hosei = -1 if ((BORD_NUM + hosei) <= #BOARD_NUM) and ((BORD_NUM + hosei) > 0) and (math.floor((BORD_NUM - 1) / 9) == math.floor((BORD_NUM - 1 + hosei) / 9)) then BOARD_POSSIBLE[BORD_NUM + hosei] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM + hosei]] then BOARD_POSSIBLE[BORD_NUM + hosei] = 0 end end elseif i == 3 then hosei = 1 if ((BORD_NUM + hosei) <= #BOARD_NUM) and ((BORD_NUM + hosei) > 0) and (math.floor((BORD_NUM - 1) / 9) == math.floor((BORD_NUM - 1 + hosei) / 9)) then BOARD_POSSIBLE[BORD_NUM + hosei] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM + hosei]] then BOARD_POSSIBLE[BORD_NUM + hosei] = 0 end end elseif i == 4 then hosei = -9 if ((BORD_NUM + hosei) <= #BOARD_NUM) and ((BORD_NUM + hosei) > 0) and (math.floor(-1 + (BORD_NUM - 1) / 9) == math.floor((BORD_NUM - 1 + hosei) / 9)) then BOARD_POSSIBLE[BORD_NUM + hosei] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM + hosei]] then BOARD_POSSIBLE[BORD_NUM + hosei] = 0 end end end end else for i = 1, 4 do if i == 1 then hosei = 7 for i2 = 1, 3 do if ((BORD_NUM - hosei - i2) <= #BOARD_NUM) and ((BORD_NUM - hosei - i2) > 0) and (math.floor(-1 + (BORD_NUM - 1) / 9) == math.floor((BORD_NUM - 1 - hosei - i2) / 9)) then BOARD_POSSIBLE[BORD_NUM - hosei - i2] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM - hosei - i2]] then BOARD_POSSIBLE[BORD_NUM - hosei - i2] = 0 end end end elseif i == 2 then hosei = -1 if ((BORD_NUM - hosei) <= #BOARD_NUM) and ((BORD_NUM - hosei) > 0) and (math.floor((BORD_NUM - 1) / 9) == math.floor((BORD_NUM - 1 - hosei) / 9)) then BOARD_POSSIBLE[BORD_NUM - hosei] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM - hosei]] then BOARD_POSSIBLE[BORD_NUM - hosei] = 0 end end elseif i == 3 then hosei = 1 if ((BORD_NUM - hosei) <= #BOARD_NUM) and ((BORD_NUM - hosei) > 0) and (math.floor((BORD_NUM - 1) / 9) == math.floor((BORD_NUM - 1 - hosei) / 9)) then BOARD_POSSIBLE[BORD_NUM - hosei] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM - hosei]] then BOARD_POSSIBLE[BORD_NUM - hosei] = 0 end end elseif i == 4 then hosei = -9 if ((BORD_NUM - hosei) <= #BOARD_NUM) and ((BORD_NUM - hosei) > 0) and (math.floor(1 + (BORD_NUM - 1) / 9) == math.floor((BORD_NUM - 1 - hosei) / 9)) then BOARD_POSSIBLE[BORD_NUM - hosei] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM - hosei]] then BOARD_POSSIBLE[BORD_NUM - hosei] = 0 end end end end end end BOARD_POSSIBLE[BORD_NUM] = 1 elseif TARG_NUM < 31 then --銀 if URA_FLG[TARG_NUM] == 0 then for i2 = 1, 9 do if ANG_NUM[TARG_NUM] == 90 then if i2 < 2 then hosei = 19 for i2 = 1, 1 do if ((BORD_NUM + hosei * i2) <= #BOARD_NUM) and ((BORD_NUM + hosei * i2) > 0) then if ((BORD_NUM + hosei * i2) <= #BOARD_NUM) and ((BORD_NUM + hosei * i2) > 0) and (((BORD_NUM - 1) % 9 + i2) < 9) then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM + hosei * i2]] then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 0 break elseif BOARD_NUM[BORD_NUM + hosei * i2] > 0 then break end end end end else hosei = 17 for i2 = 1, 1 do if ((BORD_NUM + hosei * i2) <= #BOARD_NUM) and ((BORD_NUM + hosei * i2) > 0) then if ((BORD_NUM + hosei * i2) <= #BOARD_NUM) and ((BORD_NUM + hosei * i2) > 0) and (((BORD_NUM - 1) % 9 - i2) >= 0) then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM + hosei * i2]] then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 0 break elseif BOARD_NUM[BORD_NUM + hosei * i2] > 0 then break end end end end end else if i2 < 2 then hosei = -19 for i2 = 1, 1 do if ((BORD_NUM + hosei * i2) <= #BOARD_NUM) and ((BORD_NUM + hosei * i2) > 0) then if ((BORD_NUM + hosei * i2) <= #BOARD_NUM) and ((BORD_NUM + hosei * i2) > 0) and (((BORD_NUM - 1) % 9 - i2) >= 0) then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM + hosei * i2]] then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 0 break elseif BOARD_NUM[BORD_NUM + hosei * i2] > 0 then break end end end end else hosei = -17 for i2 = 1, 1 do if ((BORD_NUM + hosei * i2) <= #BOARD_NUM) and ((BORD_NUM + hosei * i2) > 0) then if ((BORD_NUM + hosei * i2) <= #BOARD_NUM) and ((BORD_NUM + hosei * i2) > 0) and (((BORD_NUM - 1) % 9 + i2) < 9) then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM + hosei * i2]] then BOARD_POSSIBLE[BORD_NUM + hosei * i2] = 0 break elseif BOARD_NUM[BORD_NUM + hosei * i2] > 0 then break end end end end end end end else if ANG_NUM[TARG_NUM] == 90 then for i = 1, 4 do if i == 1 then hosei = 7 for i2 = 1, 3 do if ((BORD_NUM + hosei + i2) <= #BOARD_NUM) and ((BORD_NUM + hosei + i2) > 0) and (math.floor(1 + (BORD_NUM - 1) / 9) == math.floor((BORD_NUM - 1 + hosei + i2) / 9)) then BOARD_POSSIBLE[BORD_NUM + hosei + i2] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM + hosei + i2]] then BOARD_POSSIBLE[BORD_NUM + hosei + i2] = 0 end end end elseif i == 2 then hosei = -1 if ((BORD_NUM + hosei) <= #BOARD_NUM) and ((BORD_NUM + hosei) > 0) and (math.floor((BORD_NUM - 1) / 9) == math.floor((BORD_NUM - 1 + hosei) / 9)) then BOARD_POSSIBLE[BORD_NUM + hosei] = 1 if ANG_NUM[BOARD_NUM[BORD_NUM]] == ANG_NUM[BOARD_NUM[BORD_NUM + hosei]] then BOARD_POSSIBLE[BORD_NUM + hosei] = 0 end end