游戏王残局简化版

Annotation For 残局文料/lua_lib/常用库.lua
Login

Annotation For 残局文料/lua_lib/常用库.lua

Origin for each line in 残局文料/lua_lib/常用库.lua from check-in d1b9d0d34f:

1fd4d78c98 2024-02-03    1: local d_4 = {}
1fd4d78c98 2024-02-03    2: local 简文件库 = require("lfs")
b29c01f0b6 2024-02-02    3: --~ 排
2c6261c44d 2024-02-03    4: --~ 办排中值的能
104e1f0af4 2024-02-03    5: --~ 入参2
104e1f0af4 2024-02-03    6: --~ 入参3
fb63b2804e 2024-02-03    7: --~ 入参4
1fd4d78c98 2024-02-03    8: function d_4.历排(o1_11, o1, o2, o3, o4)
39eed9e6f2 2024-02-02    9:   local k1_11
d6631e3f10 2024-02-03   10:   --~ 集排
39eed9e6f2 2024-02-02   11:   k1_11 = {}
39eed9e6f2 2024-02-02   12:   for o5 = 1, #o1_11 do
39eed9e6f2 2024-02-02   13:     k1_11[#k1_11 + 1] = o1(o1_11[o5], o2, o3, o4)
39eed9e6f2 2024-02-02   14:     end
39eed9e6f2 2024-02-02   15:   return k1_11
39eed9e6f2 2024-02-02   16:   end
fb63b2804e 2024-02-03   17: --~ 文
fb63b2804e 2024-02-03   18: --~ 历文的能
fb63b2804e 2024-02-03   19: --~ 入参2
fb63b2804e 2024-02-03   20: --~ 入参3
1fd4d78c98 2024-02-03   21: function d_4.历文(o1, o2, o3, o4)
e5e5b44097 2024-02-03   22:   local k1_9
0b316b136c 2024-02-03   23:   --~ 集排
e5e5b44097 2024-02-03   24:   k1_9 = {}
e5e5b44097 2024-02-03   25:   for o5 in o2(o1, o3, o4) do
e5e5b44097 2024-02-03   26:     k1_9[#k1_9 + 1] = o5
e5e5b44097 2024-02-03   27:     end
e5e5b44097 2024-02-03   28:   return k1_9
e5e5b44097 2024-02-03   29:   end
2fe4cafc95 2024-02-03   30: --~ 表中值
2fe4cafc95 2024-02-03   31: --~ 值类
2fe4cafc95 2024-02-03   32: --~ 办值的能
1fd4d78c98 2024-02-03   33: function d_4.操类(o1, o2, o3)
2fe4cafc95 2024-02-03   34:   if type(o1) == o2 then
2fe4cafc95 2024-02-03   35:     return o3(o1)
2fe4cafc95 2024-02-03   36:   else
2fe4cafc95 2024-02-03   37:     return o1
2fe4cafc95 2024-02-03   38:     end
2fe4cafc95 2024-02-03   39:   end
1fd4d78c98 2024-02-03   40: --~ 排中文
1fd4d78c98 2024-02-03   41: --~ 入参2
1fd4d78c98 2024-02-03   42: --~ 入参3
1fd4d78c98 2024-02-03   43: --~ 入参4
1fd4d78c98 2024-02-03   44: function d_4.全筛文(o1, o2, o3, o4)
d1b9d0d34f 2024-02-03   45:   if string.find(o1, o2, o3, o4) then
1fd4d78c98 2024-02-03   46:     return o1
1fd4d78c98 2024-02-03   47:     end
e94f91e6b3 2024-02-03   48:   end
e94f91e6b3 2024-02-03   49: --~ 文
e94f91e6b3 2024-02-03   50: --~ 前缀
e94f91e6b3 2024-02-03   51: function d_4.加前缀(o1, o2)
e94f91e6b3 2024-02-03   52:   return (o2 or "") .. o1
e94f91e6b3 2024-02-03   53:   end
e94f91e6b3 2024-02-03   54: --~ 文
e94f91e6b3 2024-02-03   55: --~ 后缀
e94f91e6b3 2024-02-03   56: function d_4.加后缀(o1, o2)
e94f91e6b3 2024-02-03   57:   return o1 .. (o2 or "")
e94f91e6b3 2024-02-03   58:   end
e94f91e6b3 2024-02-03   59: --~ 令
e94f91e6b3 2024-02-03   60: function d_4.办令(o1)
e94f91e6b3 2024-02-03   61:   print(o1)
e94f91e6b3 2024-02-03   62:   os.execute(o1)
1fd4d78c98 2024-02-03   63:   end
1fd4d78c98 2024-02-03   64: --~ 目表
1fd4d78c98 2024-02-03   65: function d_4.用令行工具操文件(o1)
1fd4d78c98 2024-02-03   66:   local k1_9
e6ccf9f6b1 2024-02-03   67:   --~ 令行排
1fd4d78c98 2024-02-03   68:   k1_9 = d_4.历文(o1.文件目, 简文件库.dir)
1fd4d78c98 2024-02-03   69:   k1_9 = d_4.历排(k1_9, d_4.全筛文, o1.文件类, -#o1.文件类, true)
1fd4d78c98 2024-02-03   70:   for o2 = 1, #k1_9 do
1fd4d78c98 2024-02-03   71:     k1_9[o2] = d_4.加前缀(k1_9[o2], o1.文件目 .. "/")
1fd4d78c98 2024-02-03   72:     k1_9[o2] = d_4.加前缀(k1_9[o2], [["]])
1fd4d78c98 2024-02-03   73:     k1_9[o2] = d_4.加后缀(k1_9[o2], [["]])
e94f91e6b3 2024-02-03   74:     k1_9[o2] = d_4.加前缀(k1_9[o2], o1.令行前缀)
e94f91e6b3 2024-02-03   75:     d_4.办令(k1_9[o2])
1fd4d78c98 2024-02-03   76:     end
1fd4d78c98 2024-02-03   77:   end
1fd4d78c98 2024-02-03   78: return d_4