-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlambda_chess.rb
136 lines (130 loc) · 19.1 KB
/
lambda_chess.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
eval( q = %q~c = ->( λ ) { ->( b ) { ->( c ) { ->( d ) { ->(
e){->(f){->(g){->(h){->(i){->(j){->(k){->(l){->(m){->(n){->(
o){->(p){->(q){->(r){->(s){->(t){->(u){->(v){->(w){->(x){->(
y){->(z){->(α){->(β){->(γ){->(δ){->(ε){->(ζ){->(η){->(θ){->(
ι){->(κ){->(μ){->(ν){->(ξ){->(ο){->(π){->(ρ){->(ς){->(σ){->(
τ){->(υ){->(φ){->(χ){->(ψ){->(ω){->(а){->(б){->(в){->(г){->(
д){->(е){->(ж){->(з){->(и){->(й){->(к){->(л){->(м){->(н){->(
о){->(п){->(р){->(с){->(т){->(у){->(ф){->(х){->(♟){->(♞){->(
♚){->(♝){->(♜){->(♛){->(ч){->(a){->(ш){->(h){->(q){->(s){->(
t){->(u){->(z){((λ))[((ν))[((и))[а[h]][ψ[((h))]]]][->(ю){s[(
h)]}][->(ю){a[((h))][->(p){->(l){((λ))[n[l]][->(ю){->(k){((λ
))[->(j){->(e){((λ))[м[e][(л)[j][->(ю){((g))}]][->(b){->(c){
->(d){λ[((b))][->(ю){(g)}][->(ю){((п))[♚[ч][(д)[c][d][c][d][
j][l][r]]]}]}}}][f]][->(ю){(g)}][->(ю){р[j][(σ)[(e)]][ч]}]}[
л[((j))][->(λ){e[(μ)[(λ)]][((ι))[(λ)][(γ)]]}]]}[а[((((k))))]
]][->(ю){q[(k)]}][->(ю){t[((k))]}]}[->(λ){д[(ψ)[(λ)]][((ω))[
(λ)]][ψ[h]][ω[h]][а[λ]][г[λ]][в[(λ)]]}[m[l]]]}][->(ю){u[((p)
)]}]}[->(b){λ[(n)[(b)]][->(ю){a[(у)[m[b]][(p)]][->(λ){o[g][(
λ)]}][->(ю){o[f][l]}]}][->(ю){((b))}]}[->(e){λ[(w)[m[(e)]]][
->(ю){o[f][(l)]}][->(ю){->(b){o[g][(θ)[n[b]][m[(z)[->(λ){x[(
n)[(λ)]][m[b]][o[(v)[n[λ]][m[(b)]]][(l)]][o[(n)[(λ)]][n[λ]]]
}][o[z][(l)]]]]]}[τ[((e))][->(b){->(c){λ[(w)[m[(b)]]][->(ю){
ς[b][(c)]}][->(ю){y[(г)[(c)]][((г))[σ[(b)]]][ς[b][c]][x[(г)[
(c)]][г[(σ)[b]]][(ς)[ρ][(c)]][b]]}]}}][(ρ)]]}]}[τ[(ш)[p][g][
л[(а)[(p)]][->(λ){c[(ν)[((λ))]]}]]][->(c){->(d){ς[c][(τ)[ш[d
][f][(ς)[ρ][ω[((d))]]]][->(λ){->(b){x[(г)[(b)]][г[λ]][λ][у[λ
][b]]}}][(d)]]}}][((ρ))]]]]}][->(ю){s[(h)]}]}]}}}}}}}[->(λ){
->(b){->(c){->(d){м[(л)[d][b[ν][(μ)]]][c][->(e){->(f){->(g){
a[(д)[f][g][б[λ]][χ[λ]][d][l][b[s][(r)]]][->(λ){ς[e][(λ)]}][
->(ю){e}]}}}][ρ]}[а[((λ))]]}}}]}[->(b){->(t){->(c){->(d){λ[(
п)[(t)]][->(ю){((c))[->(d){д[(ψ)[(b)]][((ω))[(b)]][ψ[(b)]][(
ω)[(b)]][d][->(e){ж[((d))][->(f){->(g){->(h){p[(ν)[g][p][v][
f][ζ[(g)]]][λ[(μ)[(g)]][->(ю){λ[(ι)[g][(γ)]][->(ю){((п))[ч[(
и)[d][(e)]][д[e][h][e][e][d][l][(s)]]][z[α][q]][((l))]}][->(
ю){l}]}][->(ю){l}]]}}}][z[α][(q)]]}[ω[(b)]]][в[(b)]]}[t[т][(
(l))][->(λ){->(b){->(c){->(d){->(e){с[(т)[λ][b][c][(d)]][e][
e][(φ)]}[o[(n)[(c)]][m[b]]]}}}}][->(d){->(λ){->(b){->(c){->(
e){т[(т)[d][λ][b][(c)]][o[(e)[l][(β)]][m[(λ)]]][o[(e)[i][(q)
]][m[(λ)]]][(c)]}[x[(n)[(λ)]][n[b]]]}}}}][с][а[b]][ψ[b]][ω[b
]][в[(b)]]]]}][->(ю){d[(λ)]}]}}}[ч[(и)[а[(b)]][(ψ)[b]]][b]]}
]}[->(λ){λ[λ]}[->(b){->(c){ι[c][k][♟][(ι)[c][->(λ){->(b){λ[(
λ)[λ[(λ)[b]]]]}}][(♜)][((ι))[c][j][♞][(ι)[c][i][♝][ι[c][q][♛
][(ι)[c][γ][♚][->(λ){->(λ){(н)}}]]]]]][->(c){b[b][c]}]}}]]}[
->(λ){->(b){->(c){d[(c)[♜[(λ)]]][c[(♝)[λ]]][о][н]}[->(λ){п[(
λ)[(b)]]}]}}]}[((х))[->(λ){->(b){d[(w)[(λ)]][w[b]]}}]]}[(х)[
->(λ){->(b){y[λ][(b)]}}]]}[((ф))[->(d){->(i){λ[(e)[x[k][(υ)[
ψ[d]][ω[d]][n]]][(x)[k][υ[(ψ)[(d)]][ω[d]][m]]]][->(ю){(о)}][
->(ю){е[((d))][->(k){->(p){->(q){λ[(e)[y[j][(υ)[p][q][n]]][(w)[
υ[p][q][((m))]]]][->(ю){->(r){->(s){->(t){->(v){((λ))[->(λ){->(d){
b[(ι)[λ][(γ)]][c[(δ)[λ]]][(ι)[d][(h)]][c[(δ)[d]]][(к)[k][p][s][u]]}}[
и[k][p]][и[k][(s)]]][->(ю){λ[(р)[т[k][p][p][l]][p][(i)]][->(ю){λ[(р)[т[
k][p][v][l]][v][(i)]][->(ю){(g)}][t]}][(t)]}][t]}}}[o[(r)[l][(β)]][m[(p)]
]][->(ю){(f)}][o[(r)[u][t][n[(p)]]][m[p]]]}[(x)[n[p]][n[q]]]}][->(ю){((f))}
]}}}][->(λ){->(λ){->(λ){->(b){->(λ){b}}}}}][н]}]}}]]}[((ф))[->(λ){->(ю){->(b){
->(c){d[(e)[y[j][b]][y[k][(c)]]][e[(y)[k][(b)]][y[j][(c)]]][о][н]}}[(υ)[ψ[λ]][ω[
λ]][(n)]][υ[(ψ)[(λ)]][ω[λ]][m]]}}]]}[((ф))[->(h){->(ю){е[((h))][->(i){->(f){->(p){
->(z){->(q){ ->(r){λ[(z)[w[(v)[q][r]]][(w)[v[r][((q))]]]][->(ю){->(t){λ[(y)[k][(t)]][
->(ю){->(u){->(v){λ[(w)[(u)]][->(ю){ξ[(и)[i][(p)]][y[r][(z)[β][(l)]][->(ю){->(ю){->(ю){
->(ю){->(λ){λ}}}}}][о]][((н))]}][->(ю){λ[(y)[k][(u)]][->(ю){λ[(ξ)[и[i][(p)]]][->(ю){->(x){
b[((g))][з[v][(o)[n[p]][((q))]]][ι[((x))][(k)]][z[μ][ν][x]][y[(υ)[б[h]][v][(m)]][(j)]][->(ю
){->(ю){->(λ){->(ю){->(ю){λ}}}}}][н]}[и[i][((v))]]}][->(ю){о}]}][->(ю){н}]}]}}[(υ)[f][p][(n)]
][χ[((h))]]}][->(ю){λ[(y)[j][(t)]][->(ю){λ[(w)[υ[f][p][(n)]]][->(ю){e[(ξ)[и[i][(p)]]][e[(ξ)[и[i
][(o)[n[p]][й[f][p][m][q]]]]][c[(δ)[и[i][f]]]]][о][((н))]}][->(ю){н}]}][->(ю){(н)}]}]}[υ[f][p][((
m))]]}][->(ю){(н)}]}}}[ν[(и)[i][f]]][(m)[(f)]][m[p]]}}}]}}]]}[->(b){((ф))[->(c){->(ю){е[((c))][->(d
){->(e){->(f){λ[(b)[υ[e][f][n]][υ[e][f][(m)]]][->(ю){к[d][e][f][u][о][(н)]}][->(ю){((н))}]}}}]}}]}]}[
->(o){->(n){->(m){е[((m))][->(l){->(k){->(j){λ[(κ)[и[l][(k)]][(ν)[и[l][(j)]]][μ[(и)[l][j]]][f]][->(ю){(
н)}][->(ю){->(i){λ[(п)[(i)]][->(ю){->(c){->(d){->(h){τ[((h))][->(c){->(b){λ[((c))][->(ю){р[d][b][n][g][(f
)]}][->(ю){(f)}]}}][(g)]}[л[((d))][->(λ){e[(ι)[λ][(γ)]][ν[λ][(ν)[(c)]][μ[c]]]}]]}}[и[l][k]][т[l][k][j][l]][
i][((н))]}][->(ю){i}]}[(o)[m][n]]}]}}}]}}}]}[->(λ){->(b){д[(ψ)[(λ)]][ω[λ]][ψ[b]][ω[b]][а[b]][г[b]][в[(λ)]]}}]
}[->(λ){->(b){->(c){->(ю){с[λ][b][c][(и)[λ][(b)]]}}}}]}[->(b){->(c){->(d){->(e){ο[b][((α))][->(w){->(y){ο[w][((
α))][->(z){->(x){λ[(з)[o[x][y]][(d)]][->(ю){o[(o)[η[e]][ζ[(e)]]][o[(ε)[(e)]][g]]}][->(ю){з[(o)[x][(y)]][c][φ][((z)
)]}]}}]}}]}}}}]}[->(b){->(d){->(e){м[(л)[b][->(λ){ν[(и)[b][(d)]][μ[λ]][ν[λ]]}]][ς[ρ][d]][->(g){->(h){->(d){λ[((g))][
->(ю){c[(п)[e[(и)[(b)][h]][д[h][d][h][d][b][l][(l)]]]]}][->(ю){f}]}}}][(g)]}}}]}[->(λ){λ[g][f][g][g][((g))]}]}[->(λ){->(
ю){->(ю){->(ю){->(ю){λ}}}}}]}[->(ю){->(λ){->(ю){->(ю){->(ю){ λ}}}}}]}[->(λ){->(b){->(c){->(d){τ[((λ))][->(e){->(f){τ[((b)
)][->(g){->(h){c[g][f][h]}}][e]}}][((d))]}}}}]}[->(λ){->(b){ ж[((λ))][->(c){->(d){->(e){((b))[d][ς[c][e]][(c)]}}}][(ρ)]}}
]}[->(b){->(c){->(e){->(h){->(i){->(j){λ[(d)[d[(w)[(i)]][w[( j)]]][y[i][(j)]]][->(ю){m[(h)[w[i][(υ)[c][e][(m)]][(i)]][->(
λ){->(c){o[c][(m)[λ][ξ[(и)[b][c]]][(f)]]}[o[(й)[c][e][n][n[( n)[λ]]]][й[c][e][m][(m)[n[λ]]]]]}][(o)[c][(g)]]]}][->(ю){f}]
}}[υ[c][e][n]][υ[c][e][m]]}}}}]}[->(λ){->(b){->(c){->(d){->( e){x[d][e][(y)[d][e][->(f){(f)}][(u)]][t]}}[(c)[(λ)]][c[((b)
)]]}}}]}[->(λ){->(b){θ[(θ)[λ][m[(b)]]][n[(b)]]}}]}[->(λ){->( b){e[(y)[n[λ]][n[(b)]]][y[(m)[(λ)]][m[((b))]]]}}]}[->(λ){->(
b){->(c){π[λ][((α))][->(d){->(e){->(f){π[e][((α))][->(d){->( g){->(h){b[d][g][(o)[h][f]]}}}][d]}}}][((c))]}}}]}[->(λ){->(
b){b[(а)[(λ)]][ψ[λ]][ω[(λ)]]}}]}[->(λ){->(b){->(c){->(d){->( e){->(f){->(g){o[(o)[o[λ][b]][o[e][(f)]]][o[g][(o)[c][((d))]
]]}}}}}}}]}[->(λ){δ[(n)[(λ)]]}]}[->(λ){n[(m)[(λ)]]}]}[->(λ){ n[(δ)[(λ)]]}]}[->(λ){ε[(n)[(λ)]]}]}[->(λ){m[(η)[(λ)]]}]}[->(
λ){n[(η)[(λ)]]}]}[->(λ){m[(δ)[(λ)]]}]}[o[((o))[((g))][(l)]][ o[f][((f))]]]}[->(λ){->(b){->(c){->(λ){->(b){x[λ][b][(v)[λ][
(b)]][v[b][λ]]}}[(c)[(λ)]][c[((b))]]}}}]}[->(λ){->(b){->(c){ π[(n)[(λ)]][m[λ]][->(d){->(e){->(ю){b[d][e]}}}][((c))]}}}]}[
->(λ){θ[(n)[(λ)]][l]}]}[->(λ){->(b){o[(o)[b][n[(λ)]]][t[(m)[ λ]]]}}]}[o[l][(l)]]}[->(λ){->(b){->(c){->(d){n[(b)[->(e){o[(
c)[n[e]][θ[λ][(m)[e]]][(m)[e]]][(t)[m[e]]]}][o[((d))][((l))] ]]}}}}]}[->(λ){->(b){->(c){n[(b)[->(d){o[(o)[c[(θ)[(λ)][(m)[
((d))]]][m[(d)]]][n[(d)]]][u[(m)[(d)]]]}][o[l][(u)[((b))]]]] }}}]}[->(λ){c[(ε)[(λ)]]}]}[->(λ){κ[λ][g][f][((f))]}]}[->(λ){
κ[λ][f][g][((f))]}]}[->(λ){->(b){->(c){->(d){ε[λ][(η)[λ][b][ (c)]][d]}}}}]}[->(λ){->(b){y[b][(ζ)[((λ))]]}}]}[->(λ){->(b){
n[(b)[m][((λ))]]}}]}[->(λ){n[(n)[(λ)]]}]}[->(λ){m[(n)[(λ)]]} ]}[->(λ){n[(m)[(λ)]]}]}[->(λ){m[(m)[(λ)]]}]}[z[j][(i)]]}[p[i
][(h)]]}[z[j][(h)]]}[->(λ){->(b){->(c){->((d)){(λ)[->(w){b[c ][(w)]}][d]}}}}]}[->(b){->(c){λ[(x)[b][(c)]][->(ю){x[c][(b)]
}][->(ю){((f))}]}}]}[->(λ){->(b){w[(v)[b][((λ))]]}}]}[->(λ){ ((λ))[->(ю){(f)}][g]}]}[->(λ){->(b){->(c){->(d){b[u][λ][c][(
(d))]}}}}]}[->(λ){m[(λ)[->(b){o[(t)[n[(b)]]][n[b]]}][(o)[l][ ((l))]]]}]}[->(λ){p[k][λ]}]}[(o)[o[g][q]][o[g][g]]]}[(o)[o[f
][q]][o[g][g]]]}[(p)[j][((i))]]}[->(λ){->(b){->(c){->(d){b[c ][(λ)[c][(d)]]}}}}]}[->(λ){->(b){->(c){c[λ][(b)]}}}]}[->(λ){
λ[((g))]}]}[->(λ){λ[((f))]}]}[->(λ){->(b){b}}]}[->(λ){->(b){ λ[b]}}]}[->(λ){->(b){λ[(λ)[((b))]]}}]}[->(λ){->(b){λ[(λ)[λ[(
(b))]]]}}]}[->(λ){->(b){λ[(λ)[λ[(λ)[(b)]]]]}}]}[->(λ){->(ю){ λ}}]}[->(ю){->(λ){λ}}]}[->(λ){->(b){->(c){->(d){λ[(b)[c][(d)
]][d]}}}}]}[->(λ){->(b){->(c){->(d){λ[c][(b)[(c)][(((d)))]]} }}}]}[->(λ){->(b){->(c){λ[c][(b)]}}}]}[->(λ){->(b){->(c){->(
d){->(e){-> (f){->(g){λ[(b )[c[(d)[ e[f][g ]][(g)]][(g)]][(g )]][ g]}}}}}}}] }[ ->(λ){->(b){ ->(c){λ[b][((c))][( λ)]}}}];
l=[-10,-8,-9,-11,-12,-9,-8,-10,-7,-7,-7,-7,-7,-7,-7,-7,0,0,0,0,0,0,0,0,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,-1,-1,-1,-1,-1,-4,-2,-3,-5,-6,-3,-2,-4];
copyright="© 2016 Colin Fulton. Licensed under BSD 3-clause. See LICENSE.txt included with file.";
t=[];b=[0,0,0,0];s=rand(100);;
require(('zlib'+''));;require( "base64");k= l;m='';a="}}#{ }];";cd,rs=q.split(a);cd= (cd+a).gsub(/[\n #]+/,'');rs .slice!(/\A.+?;;\s+(?>\n)/m)
g=eval(Zlib.inflate Base64.decode64 "eNrFVslu4z"+ "AM/RUjuuYQWf" +"KSAsmPtD3NaYCiKObSQ9F/" +"ryJK5aLFTiJnA"+"seRKJnvkXyi8/X" +"0eTrvX"+"t67xh+lxET5T1xQqj0kx"+
"QzDCKa2goyhIXi"+"EhGsLSJ9KuAlIv7QJZPS" +"OBHgtX953"+ "++7pbRMpdSTQ" +"GHUc+N8NITG1aHkIXFTtVi" +"XNIXa"+"bR0mrlqsjyOhvExkRtLSGaQoS"+ "ei0SgCXkRwiDF41L9K2mHMLFc"+"sFHD+DA"+
"dI0SUKy"+"/bMAho4a8Er"+"C3CTWANv+k2mSvOo"+ "6nKkRWmcsLV" +"Xu5AJx7yUU2" +"LFWwl/YXMlO0q8L2PHd6n"+ "pfzrupUSo669flV2WxGcTPuq"+"kjyP+a95J" +"7nXfb"+"MR+q9crBrmoFz++90ft65QfJFJ3"+
"EW"+"0nHl4pov"+"SV"+"TJ"+"n5"+"zRyX"+"VAkjc" +"n0DieJRgZy" +"w0wwnsGrIh"+ "2f/IqRbo7gwIsh1bUBAl8P"+ "Vyn"+"KoKrzALW"+ "qztOH"+"6fzl3ZH"+ "6rnXbp"+"q5T/tu" +"3Hfz"+"Zeh+Tbz"+
"Gi2H2a1"+"NYOwb" +"r4K293zasNm"+ "g3tQHW/Uxt"+ "OPG1ARAZ7rJ"+ "BMOsls9mHbgOiuzSEdzFYWP" +"P+4BESOjHrAM" +"MsxrsycTtc"+ "3q2J5jFuMZi"+ "XHg2Q6AEfdAB"+
"6CGMIZ66HAz"+ "RJOBdSBxYP5jh" +"hb6TFkvySS" +"DQxG0QeWSRu" +"ONciMRjJH"+ "HiiK0DIS4Zol6" +"hn8laiV3iC1"+ "znKJDEkjxjga5" +"Dv8Q6+C5q3U"+
"tEj4853LD+Sc" +"rf540l12bN" +"amXgstFQnyV" +"ELgyWSN0Gh" +"eo5q9eT1oR"+ "H7386QZOwGg"+
"yUKLxAfJG9D"+ "2gNtFRoRet"+ "pBgq5/1ZO0O"+ "OhXPTuIC0pP" +"DImPTAXSV04"+ "hEl"+"IBuoWkk"+
"DbKAXdPTL7Gc" +"+LN5Kr3QOI" +"jDWrEmGDfUT" +"SXvBXSpaW"+ "ke3lA"+"+Xts4Y" +"UKp8DWjrDur"+
"+PLKSRJTjJ2w" +"9s3VznB+l"+ "D7X3DD/fX7+"+ "wdFf7Sb");n= ->(λ){λ[->x{x+1 }][0]};e=->(λ){
->(y){->(x){λ .times{x=y[x]};x}}};r=->λ{->r{r}}; f=->f{->d{f}};d=->f{->d{ d}};h=->(p){p[f ]};j=->(p){p[d]
};p=->h{->j{-> λ{λ[h][j]}}};i=->λ{(((λ))).reverse .inject(r){|λ,a|p[a][λ]} };;u=->(λ){as=λ. abs;p[p[as>(6)?
f:d][e[as>6?as- 6:as]]][p[as==0?d:f][as>0?d:f]]};; ll=/^[a-h]/;nn=/^[1-8]/; ;ln=->(λ){λ.ord- 97};lm=->(λ){(λ
.to_i-8).abs}; lu=->λ{{q:5,k:2,r:4,b:3}[λ.to_sym] };ms=->λ,fx,fy,tx,ty,pr{ p[p[p[p[e[(fx)] ][e[(fy)]]][p[e[
tx]][e[ty]]]][ p[i[[*λ.each_slice(8)].map{|r|i[(r ).map{|p|u[p]}]}]][r]]][ p[u[lu[(pr)]]][ p[p[e[b[(0)]]][e[
b[1]]]][p[e[b[ (2)]]][e[b[3]] ]]]]};;gt=->λ{ j[j[(λ)]]};mv= (ARGV).join;mv= mv.downcase.gsub(
/\W+/,'');mv+= ?q if(mv).size ==4;;fx,fy,tx, ty,pr=mv.chars ;ud=->λ{k=[λ] .flatten;;;a=->k,
a{b=[];a.times {b<<h[k];;k=j[ k]};b};;k=a[h[ j[h[λ]]],((8)) ].map{|λ|a[λ,(8) ].map{|λ|h[j[(λ)
]][(n[j[h[λ]]] +h[h[(λ)]][6][ 0])*j[j[(λ)]][ (1)][-1]][(0)] }}.flatten;;;z,w =[l,k].map{|b|(b)
.sort.reject(& :zero?).map(&( ((:abs))))};;1 .upto(12){|v|u =w.count(v);x=z. count(v);((x-u))
.times{t<<v}}; if(ty)==?8&&l[ ln[(((((fx)))) )]+lm[(fy)]*8] ==1;then;t.sort! .shift;;t<<lu[pr]
end;;b=[h[h[gt[ λ]]],j[h[gt[λ]] ],h[j[gt[((λ)) ]]],j[j[gt[λ]] ]].map{|λ|n[(( λ))]}};(mv.size== 5&&fx[ll]&&tx[ll ]&&fy[nn]&&ty[ nn]&&pr[/^[qkrb]/
])?c[ms[((k)),ln[ (fx)],lm[fy],ln[ tx],lm[ty],pr] ][->λ{ud[λ]}][ ->λ{m=g[:i]}][ ->(λ){ud[(λ)];m= g[:l]}][->(λ){ud[ λ];m=g[(:w)]}][ e[(s)]]:mv.size==
0?nil:m=(g[(:i)]); ct=->s{(s).center( 195)};re=->bo, λ,vf{vf=[[vf]] *13;λ=[λ];((((((bo)))))) .each_slice((((8)))).inject((([]))){|m,r |m+[λ]+r.inject(((vf))){|m,p|(m).zip(
g[:p][p.abs]).zip(vf).map(&:flatten)}}.+([( λ)]).inject([] ){|m,r|m<<ct[r .each_slice((2)).inject( ''){|m,(chars,spaces)|m+?4*chars+" "* (spaces||(0))}]}.reject(&:empty?)}
ba=re[k,195,3];ф=re[t,0,0];tr=(?4*(((cd) ).size+10-(ba+ ф).join.count( ?4))).gsub((/.{195}/)){| l|l+((?\n))}.split;mb=[(tr.pop) .center(195)];bb,tb=([[],[]]+[*tr
.each_slice([1,(tr.size/2.0).ceil].max )]).compact[-2 ..-1];ba=((tb) +ba.zip(g[((:r))]).map(& :join)+bb+mb+ф);ba.first .slice!((185),195);ba=ba
.join(?\n).gsub(/[^ \n#]+/){|λ|cd. slice!((0),(λ) .size)}.split( ?\n);st=->(obj){((obj)). inspect.gsub(/\s+/ ,'')};puts(m+g[
:c]+"eval(q=%q#{126.chr+ba.join(?\n)}\n"+[ct["l=#{st[k]}"],ct["copyright=#{copyright.inspect}"],ct["t=#{st[t]};b=#{st[b]};s=Random.new(#{s}).rand(100);;"]].join(?\n)+"\n\n\n"+rs+126.chr+?))~)