游戏王残局简化版

Annotation For 残局文料/lib_lua/ipml_mj_ysaf.lua
Login

Annotation For 残局文料/lib_lua/ipml_mj_ysaf.lua

Origin for each line in 残局文料/lib_lua/ipml_mj_ysaf.lua from check-in 14ff7a9f5f:

14ff7a9f5f 2024-01-24  顽雨沉风: package.path = [[.\lib_lua\?.lua;]] .. package.path
14ff7a9f5f 2024-01-24  顽雨沉风: package.cpath = [[.\lib_dll\?.dll;]] .. package.cpath
6cde949a2c 2024-01-23  顽雨沉风: local 字集码互转库 = require("u8_to_a")
bb2048dbf7 2024-01-23  顽雨沉风: local d_5 = {}
bb2048dbf7 2024-01-23  顽雨沉风: local 简件系库 = require("lfs")
14ff7a9f5f 2024-01-24  顽雨沉风: --~ function _G.require_u8(modname)
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ return require(字集码互转库.u8_to_a(modname))
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ end
bb2048dbf7 2024-01-23  顽雨沉风: do
bb2048dbf7 2024-01-23  顽雨沉风: local k1 = 0
bb2048dbf7 2024-01-23  顽雨沉风: function _G.递增示()
bb2048dbf7 2024-01-23  顽雨沉风:   k1 = k1 + 1
bb2048dbf7 2024-01-23  顽雨沉风:   print(k1)
bb2048dbf7 2024-01-23  顽雨沉风:   end
bb2048dbf7 2024-01-23  顽雨沉风:   end
bb2048dbf7 2024-01-23  顽雨沉风: --~ do
bb2048dbf7 2024-01-23  顽雨沉风: --~ local k1 = os.execute
bb2048dbf7 2024-01-23  顽雨沉风: --~ function _G.os.execute(command)
6cde949a2c 2024-01-23  顽雨沉风: --~ return k1(字集码互转库.u2a(command))
bb2048dbf7 2024-01-23  顽雨沉风: --~ end
bb2048dbf7 2024-01-23  顽雨沉风: --~ end
bb2048dbf7 2024-01-23  顽雨沉风: function d_5.读件(o1, o2)
bb2048dbf7 2024-01-23  顽雨沉风:   local k1
bb2048dbf7 2024-01-23  顽雨沉风:   local k1_3
bb2048dbf7 2024-01-23  顽雨沉风:   k1_3 = io.open(o1, o2 or "r")
bb2048dbf7 2024-01-23  顽雨沉风:   k1 = k1_3:read("a")
bb2048dbf7 2024-01-23  顽雨沉风:   k1_3:flush()
bb2048dbf7 2024-01-23  顽雨沉风:   k1_3:close()
bb2048dbf7 2024-01-23  顽雨沉风:   return k1
bb2048dbf7 2024-01-23  顽雨沉风:   end
bb2048dbf7 2024-01-23  顽雨沉风: function d_5.读件排(o1_9, o1)
bb2048dbf7 2024-01-23  顽雨沉风:   local k1_9
bb2048dbf7 2024-01-23  顽雨沉风:   k1_9 = {}
bb2048dbf7 2024-01-23  顽雨沉风:   for o2 = 1, #o1_9 do
bb2048dbf7 2024-01-23  顽雨沉风:     k1_9[#k1_9 + 1] = d_5.读件(o1_9[o2], o1)
bb2048dbf7 2024-01-23  顽雨沉风:     end
bb2048dbf7 2024-01-23  顽雨沉风:   return k1_9
bb2048dbf7 2024-01-23  顽雨沉风:   end
bb2048dbf7 2024-01-23  顽雨沉风: function d_5.写件(o1, o2, o3)
bb2048dbf7 2024-01-23  顽雨沉风:   local k1_3
bb2048dbf7 2024-01-23  顽雨沉风:   k1_3 = io.open(o1, o3 or "w")
bb2048dbf7 2024-01-23  顽雨沉风:   k1_3:write(o2)
bb2048dbf7 2024-01-23  顽雨沉风:   k1_3:flush()
bb2048dbf7 2024-01-23  顽雨沉风:   k1_3:close()
bb2048dbf7 2024-01-23  顽雨沉风:   end
bb2048dbf7 2024-01-23  顽雨沉风: function d_5.写件_一维(o1, o1_9, o2, o3)
bb2048dbf7 2024-01-23  顽雨沉风:   local k1 = table.concat(o1_9, "\n")
bb2048dbf7 2024-01-23  顽雨沉风:   if o3 then
bb2048dbf7 2024-01-23  顽雨沉风:     k1 = o3(k1)
bb2048dbf7 2024-01-23  顽雨沉风:     end
bb2048dbf7 2024-01-23  顽雨沉风:   d_5.写件(o1, k1, o2)
bb2048dbf7 2024-01-23  顽雨沉风:   end
14ff7a9f5f 2024-01-24  顽雨沉风: --~ function d_5.删制表符(o1)
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ return o1:gsub("\t", "")
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ end
0243e12f54 2024-01-23  顽雨沉风: function d_5.删空格与制表符(o1)
0243e12f54 2024-01-23  顽雨沉风:   o1 = d_5.删空格(o1)
0243e12f54 2024-01-23  顽雨沉风:   return d_5.删制表符(o1)
0243e12f54 2024-01-23  顽雨沉风:   end
0243e12f54 2024-01-23  顽雨沉风: function d_5.文转排(text)
0243e12f54 2024-01-23  顽雨沉风:   local lines = {}
0243e12f54 2024-01-23  顽雨沉风:   for line in text:gmatch("[^\n]+") do
0243e12f54 2024-01-23  顽雨沉风:     table.insert(lines, line)
0243e12f54 2024-01-23  顽雨沉风:     end
0243e12f54 2024-01-23  顽雨沉风:   return lines
7ba1ff2268 2024-01-23  顽雨沉风:   end
7ba1ff2268 2024-01-23  顽雨沉风: function d_5.删前缀(o1, o2)
7ba1ff2268 2024-01-23  顽雨沉风:   if o1:find(o2, 1, true) then
7ba1ff2268 2024-01-23  顽雨沉风:     return o1:sub(#o2 + 1)
7ba1ff2268 2024-01-23  顽雨沉风:     end
7ba1ff2268 2024-01-23  顽雨沉风:   end
7ba1ff2268 2024-01-23  顽雨沉风: function d_5.删后缀(o1, o2)
7ba1ff2268 2024-01-23  顽雨沉风:   if o1:find(o2, -1, true) then
7ba1ff2268 2024-01-23  顽雨沉风:     return o1:sub(1, #o1 - #o2)
7ba1ff2268 2024-01-23  顽雨沉风:     end
7ba1ff2268 2024-01-23  顽雨沉风:   end
14ff7a9f5f 2024-01-24  顽雨沉风: --~ function d_5.删空行_不虑首末态(o1)
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ return o1:gsub("\n+", "\n")
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ end
14ff7a9f5f 2024-01-24  顽雨沉风: --~ function d_5.删空行(o1)
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ o1 = d_5.删空行_不虑首末态(o1)
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ o1 = d_5.删前缀(o1, "\n")
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ return d_5.删后缀(o1, "\n")
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ end
14ff7a9f5f 2024-01-24  顽雨沉风: --~ function d_5.删空格(o1)
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ return o1:gsub(" ", "")
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ end
bb2048dbf7 2024-01-23  顽雨沉风: function d_5.筛排(o1_9, o1, o2, o3)
bb2048dbf7 2024-01-23  顽雨沉风:   local k1_8
bb2048dbf7 2024-01-23  顽雨沉风:   local k1_9
bb2048dbf7 2024-01-23  顽雨沉风:   k1_9 = {}
bb2048dbf7 2024-01-23  顽雨沉风:   for o4 = 1, #o1_9 do
bb2048dbf7 2024-01-23  顽雨沉风:     k1_8 = o1(o1_9[o4], o2, o3)
bb2048dbf7 2024-01-23  顽雨沉风:     if k1_8 then
bb2048dbf7 2024-01-23  顽雨沉风:       k1_9[#k1_9 + 1] = k1_8
bb2048dbf7 2024-01-23  顽雨沉风:       end
bb2048dbf7 2024-01-23  顽雨沉风:     end
bb2048dbf7 2024-01-23  顽雨沉风:   return k1_9
bb2048dbf7 2024-01-23  顽雨沉风:   end
14ff7a9f5f 2024-01-24  顽雨沉风: function d_5.捕排(o1, o2, o3)
bb2048dbf7 2024-01-23  顽雨沉风:   local k1_9
bb2048dbf7 2024-01-23  顽雨沉风:   k1_9 = {}
14ff7a9f5f 2024-01-24  顽雨沉风:   for o4 in o1(o2, o3) do
14ff7a9f5f 2024-01-24  顽雨沉风:     k1_9[#k1_9 + 1] = o4
bb2048dbf7 2024-01-23  顽雨沉风:     end
bb2048dbf7 2024-01-23  顽雨沉风:   return k1_9
bb2048dbf7 2024-01-23  顽雨沉风:   end
14ff7a9f5f 2024-01-24  顽雨沉风: function d_5.留文(o1, o2)
14ff7a9f5f 2024-01-24  顽雨沉风:   if o1:match(o2 or ".") then
14ff7a9f5f 2024-01-24  顽雨沉风:     return o1
14ff7a9f5f 2024-01-24  顽雨沉风:     end
14ff7a9f5f 2024-01-24  顽雨沉风:   end
14ff7a9f5f 2024-01-24  顽雨沉风: function d_5.筛件径(o1, o2)
14ff7a9f5f 2024-01-24  顽雨沉风:   local k1_9
14ff7a9f5f 2024-01-24  顽雨沉风:   k1_9 = d_5.捕排(简件系库.dir, o1)
14ff7a9f5f 2024-01-24  顽雨沉风:   k1_9 = d_5.筛排(k1_9, d_5.加前缀, o1 .. "/")
14ff7a9f5f 2024-01-24  顽雨沉风:   return d_5.筛排(k1_9, d_5.留文, o2)
14ff7a9f5f 2024-01-24  顽雨沉风:   end
14ff7a9f5f 2024-01-24  顽雨沉风: --~ function d_5.筛件径(o1, o2)
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ local k1
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ local k1_9
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ k1_9 = {}
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ for o3 in 简件系库.dir(o1) do
14ff7a9f5f 2024-01-24  顽雨沉风:     --~ if o3:match(o2 or ".") then
14ff7a9f5f 2024-01-24  顽雨沉风:       --~ k1_9[#k1_9 + 1] = o1 .. "/" .. o3
14ff7a9f5f 2024-01-24  顽雨沉风:       --~ end
14ff7a9f5f 2024-01-24  顽雨沉风:     --~ end
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ return k1_9
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ end
bb2048dbf7 2024-01-23  顽雨沉风: function d_5.加前缀(o1, o2)
bb2048dbf7 2024-01-23  顽雨沉风:   return o2 .. o1
bb2048dbf7 2024-01-23  顽雨沉风:   end
14ff7a9f5f 2024-01-24  顽雨沉风: --~ function d_5.加前缀与后缀(o1, o2, o3)
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ return o2 .. o1 .. o3
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ end
bb2048dbf7 2024-01-23  顽雨沉风: function d_5.加后缀(o1, o2)
bb2048dbf7 2024-01-23  顽雨沉风:   return o1 .. o2
bb2048dbf7 2024-01-23  顽雨沉风:   end
bb2048dbf7 2024-01-23  顽雨沉风: function d_5.filterLinesWithCharacter(text, character)
bb2048dbf7 2024-01-23  顽雨沉风:   local result = {}
0243e12f54 2024-01-23  顽雨沉风:   local lines = d_5.文转排(text)
bb2048dbf7 2024-01-23  顽雨沉风:   -- 遍历每一行,检查是否包含目标字符
bb2048dbf7 2024-01-23  顽雨沉风:   for i, line in ipairs(lines) do
bb2048dbf7 2024-01-23  顽雨沉风:     if line:find(character, 1, true) then
bb2048dbf7 2024-01-23  顽雨沉风:       table.insert(result, line)
bb2048dbf7 2024-01-23  顽雨沉风:       end
bb2048dbf7 2024-01-23  顽雨沉风:     end
bb2048dbf7 2024-01-23  顽雨沉风:   return result
bb2048dbf7 2024-01-23  顽雨沉风:   end
bb2048dbf7 2024-01-23  顽雨沉风: function d_5.办并说(o1)
bb2048dbf7 2024-01-23  顽雨沉风:   print(o1)
bb2048dbf7 2024-01-23  顽雨沉风:   os.execute(o1)
bb2048dbf7 2024-01-23  顽雨沉风:   end
14ff7a9f5f 2024-01-24  顽雨沉风: --~ function d_5.筛单行等式_左右值态(o1)
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ local k1_11
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ k1_11 = {}
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ for o2 in k1_11:gmatch("[^\n= \t]+") do
14ff7a9f5f 2024-01-24  顽雨沉风:     --~ table.insert(k1_11, o2)
14ff7a9f5f 2024-01-24  顽雨沉风:     --~ end
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ return o2
14ff7a9f5f 2024-01-24  顽雨沉风:   --~ end
bb2048dbf7 2024-01-23  顽雨沉风: return d_5