2019-11-26 00:08:08 UNSELECTED

Unknown type code

Copy Copied! Full
--計算 function Estimate(fn_flg, fn_bl_wh) local data1 = 0 local flg = {} local count_data1 = 0 local count_data2 = 0 for i = 1, #fn_flg do if fn_flg[i] == cpu_bl_flg then flg[i] = 0 count_data1 = count_data1 + 1 elseif fn_flg[i] == (cpu_bl_flg + 1) % 2 then flg[i] = 1 count_data2 = count_data2 + 1 else flg[i] = 2 end end data1 = data1 + (count_data1 - count_data2) * 35 if (flg[1] == 0 and flg[2] == 0 and flg[3] == 0 and flg[4] == 0) then data1 = data1 + 500 else if (flg[1] == 0 and flg[2] == 0 and flg[3] == 0) then data1 = data1 + 390 else if (flg[1] == 0 and flg[2] == 0) then data1 = data1 + 200 else if flg[2] == 0 and flg[3] == 1 then data1 = data1 - 100 end end if flg[3] == 0 then data1 = data1 + 30 end end end if (flg[1] == 1 and flg[2] == 1 and flg[3] == 1 and flg[4] == 1) then data1 = data1 - 500 else if (flg[1] == 1 and flg[2] == 1 and flg[3] == 1) then data1 = data1 - 390 else if (flg[1] == 1 and flg[2] == 1) then data1 = data1 - 200 else if flg[2] == 1 and flg[3] == 0 then data1 = data1 + 100 end end if flg[3] == 1 then data1 = data1 - 30 end end end if (flg[5] == 0 and flg[6] == 0 and flg[7] == 0 and flg[8] == 0) then data1 = data1 + 500 else if (flg[6] == 0 and flg[7] == 0 and flg[8] == 0) then data1 = data1 + 390 else if (flg[7] == 0 and flg[8] == 0) then data1 = data1 + 200 else if flg[7] == 0 and flg[6] == 1 then data1 = data1 - 100 end end if flg[6] == 0 then data1 = data1 + 30 end end end if (flg[5] == 1 and flg[6] == 1 and flg[7] == 1 and flg[8] == 1) then data1 = data1 - 500 else if (flg[6] == 1 and flg[7] == 1 and flg[8] == 1) then data1 = data1 - 390 else if (flg[7] == 1 and flg[8] == 1) then data1 = data1 - 200 else if flg[7] == 1 and flg[6] == 0 then data1 = data1 + 100 end end if flg[6] == 1 then data1 = data1 - 30 end end end if (flg[57] == 0 and flg[58] == 0 and flg[59] == 0 and flg[60] == 0) then data1 = data1 + 500 else if (flg[57] == 0 and flg[58] == 0 and flg[59] == 0) then data1 = data1 + 390 else if (flg[57] == 0 and flg[58] == 0) then data1 = data1 + 200 else if flg[58] == 0 and flg[59] == 1 then data1 = data1 - 100 end end if flg[57] == 0 then data1 = data1 + 30 end end end if (flg[57] == 1 and flg[58] == 1 and flg[59] == 1 and flg[60] == 1) then data1 = data1 - 500 else if (flg[57] == 1 and flg[58] == 1 and flg[59] == 1) then data1 = data1 - 390 else if (flg[57] == 1 and flg[58] == 1) then data1 = data1 - 200 else if flg[58] == 1 and flg[59] == 0 then data1 = data1 + 100 end end if flg[57] == 1 then data1 = data1 - 30 end end end if (flg[61] == 0 and flg[62] == 0 and flg[63] == 0 and flg[64] == 0) then data1 = data1 + 500 else if (flg[62] == 0 and flg[63] == 0 and flg[64] == 0) then data1 = data1 + 390 else if (flg[63] == 0 and flg[64] == 0) then data1 = data1 + 200 else if flg[63] == 0 and flg[62] == 1 then data1 = data1 - 100 end end if flg[62] == 0 then data1 = data1 + 30 end end end if (flg[61] == 1 and flg[62] == 1 and flg[63] == 1 and flg[64] == 1) then data1 = data1 - 500 else if (flg[62] == 1 and flg[63] == 1 and flg[64] == 1) then data1 = data1 - 390 else if (flg[63] == 1 and flg[64] == 1) then data1 = data1 - 200 else if flg[63] == 1 and flg[62] == 0 then data1 = data1 + 100 end end if flg[62] == 1 then data1 = data1 - 30 end end end if (flg[1] == 0 and flg[9] == 0 and flg[17] == 0 and flg[25] == 0) then data1 = data1 + 500 else if (flg[1] == 0 and flg[9] == 0 and flg[17] == 0) then data1 = data1 + 390 else if (flg[1] == 0 and flg[9] == 0) then data1 = data1 + 200 else if flg[9] == 0 and flg[17] == 1 then data1 = data1 - 100 end end if flg[17] == 0 then data1 = data1 + 30 end end end if (flg[1] == 1 and flg[9] == 1 and flg[17] == 1 and flg[25] == 1) then data1 = data1 - 500 else if (flg[1] == 1 and flg[9] == 1 and flg[17] == 1) then data1 = data1 - 390 else if (flg[1] == 1 and flg[9] == 1) then data1 = data1 - 200 else if flg[9] == 1 and flg[17] == 0 then data1 = data1 + 100 end end if flg[17] == 1 then data1 = data1 - 30 end end end if (flg[33] == 0 and flg[41] == 0 and flg[49] == 0 and flg[57] == 0) then data1 = data1 + 500 else if (flg[41] == 0 and flg[49] == 0 and flg[57] == 0) then data1 = data1 + 390 else if (flg[49] == 0 and flg[57] == 0) then data1 = data1 + 200 else if flg[49] == 0 and flg[41] == 1 then data1 = data1 - 100 end end if flg[41] == 0 then data1 = data1 + 30 end end end if (flg[33] == 1 and flg[41] == 1 and flg[49] == 1 and flg[57] == 1) then data1 = data1 - 500 else if (flg[41] == 1 and flg[49] == 1 and flg[57] == 1) then data1 = data1 - 390 else if (flg[49] == 1 and flg[57] == 1) then data1 = data1 - 200 else if flg[49] == 1 and flg[41] == 0 then data1 = data1 + 100 end end if flg[41] == 1 then data1 = data1 - 30 end end end if (flg[8] == 0 and flg[16] == 0 and flg[24] == 0 and flg[32] == 0) then data1 = data1 + 500 else if (flg[8] == 0 and flg[16] == 0 and flg[24] == 0) then data1 = data1 + 390 else if (flg[8] == 0 and flg[16] == 0) then data1 = data1 + 200 else if flg[16] == 0 and flg[24] == 1 then data1 = data1 - 100 end end if flg[24] == 0 then data1 = data1 + 30 end end end if (flg[8] == 1 and flg[16] == 1 and flg[24] == 1 and flg[32] == 1) then data1 = data1 - 500 else if (flg[8] == 1 and flg[16] == 1 and flg[24] == 1) then data1 = data1 - 390 else if (flg[8] == 1 and flg[16] == 1) then data1 = data1 - 200 else if flg[16] == 1 and flg[24] == 0 then data1 = data1 + 100 end end if flg[24] == 1 then data1 = data1 - 30 end end end if (flg[40] == 0 and flg[48] == 0 and flg[56] == 0 and flg[64] == 0) then data1 = data1 + 500 else if (flg[48] == 0 and flg[56] == 0 and flg[64] == 0) then data1 = data1 + 390 else if (flg[56] == 0 and flg[64] == 0) then data1 = data1 + 200 else if flg[56] == 0 and flg[48] == 1 then data1 = data1 - 100 end end if flg[48] == 0 then data1 = data1 + 30 end end end if (flg[40] == 1 and flg[48] == 1 and flg[56] == 1 and flg[64] == 1) then data1 = data1 - 500 else if (flg[48] == 1 and flg[56] == 1 and flg[64] == 1) then data1 = data1 - 390 else if (flg[56] == 1 and flg[64] == 1) then data1 = data1 - 200 else if flg[56] == 1 and flg[48] == 0 then data1 = data1 + 100 end end if flg[48] == 1 then data1 = data1 - 30 end end end if (flg[1] == 0 and flg[10] == 0 and flg[19] == 0 and flg[28] == 0) then data1 = data1 + 500 else if (flg[1] == 0 and flg[10] == 0 and flg[19] == 0) then data1 = data1 + 390 else if (flg[1] == 0 and flg[10] == 0) then data1 = data1 + 200 else if flg[10] == 0 and flg[19] == 1 then data1 = data1 - 100 end end if flg[19] == 0 then data1 = data1 + 30 end end end if (flg[1] == 1 and flg[10] == 1 and flg[19] == 1 and flg[28] == 1) then data1 = data1 - 500 else if (flg[1] == 1 and flg[10] == 1 and flg[19] == 1) then data1 = data1 - 390 else if (flg[1] == 1 and flg[10] == 1) then data1 = data1 - 200 else if flg[10] == 1 and flg[19] == 0 then data1 = data1 + 100 end end if flg[19] == 1 then data1 = data1 - 30 end end end if (flg[37] == 0 and flg[46] == 0 and flg[55] == 0 and flg[64] == 0) then data1 = data1 + 500 else if (flg[46] == 0 and flg[55] == 0 and flg[64] == 0) then data1 = data1 + 390 else if (flg[55] == 0 and flg[64] == 0) then data1 = data1 + 200 else if flg[55] == 0 and flg[46] == 1 then data1 = data1 - 100 end end if flg[46] == 0 then data1 = data1 + 30 end end end if (flg[37] == 1 and flg[46] == 1 and flg[55] == 1 and flg[64] == 1) then data1 = data1 - 500 else if (flg[46] == 1 and flg[55] == 1 and flg[64] == 1) then data1 = data1 - 390 else if (flg[55] == 1 and flg[64] == 1) then data1 = data1 - 200 else if flg[55] == 1 and flg[46] == 0 then data1 = data1 + 100 end end if flg[46] == 1 then data1 = data1 - 30 end end end if (flg[8] == 0 and flg[15] == 0 and flg[22] == 0 and flg[29] == 0) then data1 = data1 + 500 else if (flg[8] == 0 and flg[15] == 0 and flg[22] == 0) then data1 = data1 + 390 else if (flg[8] == 0 and flg[15] == 0) then data1 = data1 + 200 else if flg[15] == 0 and flg[22] == 1 then data1 = data1 - 100 end end if flg[22] == 0 then data1 = data1 + 30 end end end if (flg[8] == 1 and flg[15] == 1 and flg[22] == 1 and flg[29] == 1) then data1 = data1 - 500 else if (flg[8] == 1 and flg[15] == 1 and flg[22] == 1) then data1 = data1 - 390 else if (flg[8] == 1 and flg[15] == 1) then data1 = data1 - 200 else if flg[15] == 1 and flg[22] == 0 then data1 = data1 + 100 end end if flg[22] == 1 then data1 = data1 - 30 end end end if (flg[36] == 0 and flg[43] == 0 and flg[50] == 0 and flg[57] == 0) then data1 = data1 + 500 else if (flg[43] == 0 and flg[50] == 0 and flg[57] == 0) then data1 = data1 + 390 else if (flg[50] == 0 and flg[57] == 0) then data1 = data1 + 200 else if flg[50] == 0 and flg[43] == 1 then data1 = data1 - 100 end end if flg[43] == 0 then data1 = data1 + 30 end end end if (flg[36] == 1 and flg[43] == 1 and flg[50] == 1 and flg[57] == 1) then data1 = data1 - 500 else if (flg[43] == 1 and flg[50] == 1 and flg[57] == 1) then data1 = data1 - 390 else if (flg[50] == 1 and flg[57] == 1) then data1 = data1 - 200 else if flg[50] == 1 and flg[43] == 0 then data1 = data1 + 100 end end if flg[43] == 1 then data1 = data1 - 30 end end end --print(data1) return data1 end --計算 function DeepEstimate(fn_flg, fn_bl_wh) local data1 = 0 for i = 1, #fn_flg do if fn_flg[i] == cpu_bl_flg then data1 = data1 + 350 end end return data1 end function onUse(use) for i = 1, REVERSE_GAME.max_player do --駒を出す if use == REVERSE_GAME.str[i] then local stone = REVERSE_GAME.str_stone_subitem[REVERSE_GAME.stone_PL[i]] stone.SetLocalScale( Vector3.__new(REVERSE_GAME.stone_scale, REVERSE_GAME.stone_scale, REVERSE_GAME.stone_scale) ) local pos = REVERSE_GAME.str_subitem[i].GetPosition() pos.y = pos.y + REVERSE_GAME.PL_stone_pos stone.SetPosition(pos) Rot_Quat_Euler(stone, REVERSE_GAME.bl_wh_PL[i] * 180, 0, 0) end if use == REVERSE_GAME.str_stone .. tostring(REVERSE_GAME.stone_PL[i]) then vci.message.Emit(REVERSE_GAME.str_stone, i) end end if use == REVERSE_GAME.str[REVERSE_GAME.first_num] then vci.message.Emit(REVERSE_GAME.str[REVERSE_GAME.first_num], true) end if use == REVERSE_GAME.str[REVERSE_GAME.return_num] then vci.message.Emit(REVERSE_GAME.str[REVERSE_GAME.return_num], true) end if use == REVERSE_GAME.str[REVERSE_GAME.cpu_num] then vci.message.Emit(REVERSE_GAME.str[REVERSE_GAME.cpu_num], true) end if use == REVERSE_GAME.str[REVERSE_GAME.bl_wh_num] then vci.message.Emit(REVERSE_GAME.str[REVERSE_GAME.bl_wh_num], true) end if use == REVERSE_GAME.str[REVERSE_GAME.auto_permission_num] then vci.message.Emit(REVERSE_GAME.str[REVERSE_GAME.auto_permission_num], true) end end function onUngrab(target) for i = 1, REVERSE_GAME.max_player do if grab_flg == i and target == REVERSE_GAME.str_stone .. tostring(REVERSE_GAME.stone_PL[i]) then local stone = REVERSE_GAME.str_stone_subitem[REVERSE_GAME.stone_PL[i]] stone.SetPosition(Vector3.__new(0, -10000000, 0)) grab_flg = 0 end end end function TableCreate(table_data) local new = {} for k, v in ipairs(table_data) do new[k] = v end return new end function FirstDataInput() for i = 1, REVERSE_GAME.max_player do local stone = REVERSE_GAME.str_stone_subitem[REVERSE_GAME.stone_PL[i]] if stone.IsMine then local pos = Vector3.__new(0, 10000000, 0) stone.SetPosition(pos) end end if ASSET.IsMine then min_num1 = 0 min_num2 = 0 koma_first = 2 auto_permission_flg = 0 --0 return_data = nil grab_flg = 0 time3_flg = true for i = 1, REVERSE_GAME.stone_max do REVERSE_GAME.put_flg[i] = 2 if i == 29 or i == 36 then REVERSE_GAME.put_flg[i] = 0 elseif i == 28 or i == 37 then REVERSE_GAME.put_flg[i] = 1 end --REVERSE_GAME.put_flg[i] = 0 --if i == 1 then -- REVERSE_GAME.put_flg[i] = 1 --elseif i == 64 then -- REVERSE_GAME.put_flg[i] = 2 --end end for i = 1, REVERSE_GAME.stone_PL[2] do local stone = REVERSE_GAME.str_stone_subitem[i] local pos = Vector3.__new(0, 10000000, 0) stone.SetPosition(pos) end end end
RECOMMEND