Please report any bugs or errors to H.G. Muller

Syntax Error on line 991

l1 j1 h1 f1 d1 b1 k1 i1 g1 e1 c1 a1 is not a valid expression, because l1 is not a recognized piece, coordinate, command, or subroutine.

Edit the Settings File for Cetran Chess 3

For the sake of debugging, here is the full GAME Code program that this error occurred in. The lines have been properly indented to help you spot scope errors.

   0 include /membergraphics/MSgame-code-generation/betza.txt
   1 set legdefs
(0
1  1  0  1     1
1  1  1  1     2
1  1 -1  1     2
1  1  0  2   16577
1  1  1  1     4
1  1 -1  1     4
0
1  1  0 -1     1
1  1 -1 -1     2
1  1  1 -1     2
1  1  0 -2   16577
1  1 -1 -1     4
1  1  1 -1     4
0
1 99  0  1     3
1 99  1  1     3
1 99  1  0     3
1 99  1 -1     3
1 99  0 -1     3
1 99 -1 -1     3
1 99 -1  0     3
1 99 -1  1     3
0
1  1  0  1     3
1  1  1  1     3
1  1  1  0     3
1  1  1 -1     3
1  1  0 -1     3
1  1 -1 -1     3
1  1 -1  0     3
1  1 -1  1     3
0
1 99  1  1     3
1 99  1 -1     3
1 99 -1 -1     3
1 99 -1  1     3
1  1  1  2     3
1  1  2  1     3
1  1  2 -1     3
1  1  1 -2     3
1  1 -1 -2     3
1  1 -2 -1     3
1  1 -2  1     3
1  1 -1  2     3
0
1 99  0  1     3
1 99  1  0     3
1 99  0 -1     3
1 99 -1  0     3
1  1  1  2     3
1  1  2  1     3
1  1  2 -1     3
1  1  1 -2     3
1  1 -1 -2     3
1  1 -2 -1     3
1  1 -2  1     3
1  1 -1  2     3
0
1 99  0  1     3
1 99  1  1     3
1 99  1  0     3
1 99  1 -1     3
1 99  0 -1     3
1 99 -1 -1     3
1 99 -1  0     3
1 99 -1  1     3
1  1  1  2     3
1  1  2  1     3
1  1  2 -1     3
1  1  1 -2     3
1  1 -1 -2     3
1  1 -2 -1     3
1  1 -2  1     3
1  1 -1  2     3
0
1  1  0  1     3
1  1  1  0     3
1  1  0 -1     3
1  1 -1  0     3
2  1  0  1    33
99  1  1     3
2  1  1  0    33
99  1 -1     3
2  1  0 -1    33
99 -1 -1     3
2  1 -1  0    33
99 -1  1     3
2  1  0  1    33
99 -1  1     3
2  1  1  0    33
99  1  1     3
2  1  0 -1    33
99  1 -1     3
2  1 -1  0    33
99 -1 -1     3
0
1  1  1  1     3
1  1  1 -1     3
1  1 -1 -1     3
1  1 -1  1     3
2  1  1  1    33
99  1  0     3
2  1  1 -1    33
99  0 -1     3
2  1 -1 -1    33
99 -1  0     3
2  1 -1  1    33
99  0  1     3
2  1  1  1    33
99  0  1     3
2  1  1 -1    33
99  1  0     3
2  1 -1 -1    33
99  0 -1     3
2  1 -1  1    33
99 -1  0     3
0
1  1  0  1     3
1  1  1  0     3
1  1  0 -1     3
1  1 -1  0     3
1  1  1  2     3
1  1  2  1     3
1  1  2 -1     3
1  1  1 -2     3
1  1 -1 -2     3
1  1 -2 -1     3
1  1 -2  1     3
1  1 -1  2     3
0
1  1  1  1     3
1  1  1 -1     3
1  1 -1 -1     3
1  1 -1  1     3
1  1  1  2     3
1  1  2  1     3
1  1  2 -1     3
1  1  1 -2     3
1  1 -1 -2     3
1  1 -2 -1     3
1  1 -2  1     3
1  1 -1  2     3
0
1 99  1  1     3
1 99  1 -1     3
1 99 -1 -1     3
1 99 -1  1     3
1  1  0  1     3
1  1  1  0     3
1  1  0 -1     3
1  1 -1  0     3
0
1 99  0  1     3
1 99  1  0     3
1 99  0 -1     3
1 99 -1  0     3
1  1  1  1     3
1  1  1 -1     3
1  1 -1 -1     3
1  1 -1  1     3
0
2 99  0  1     1
99  1  1   32771
2 99  1  1     1
99  1  0   32771
2 99  1  0     1
99  1 -1   32771
2 99  1 -1     1
99  0 -1   32771
2 99  0 -1     1
99 -1 -1   32771
2 99 -1 -1     1
99 -1  0   32771
2 99 -1  0     1
99 -1  1   32771
2 99 -1  1     1
99  0  1   32771
2 99  0  1     1
99  1 -1   32771
2 99  1  1     1
99  0 -1   32771
2 99  1  0     1
99 -1 -1   32771
2 99  1 -1     1
99 -1  0   32771
2 99  0 -1     1
99 -1  1   32771
2 99 -1 -1     1
99  0  1   32771
2 99 -1  0     1
99  1  1   32771
2 99 -1  1     1
99  1  0   32771
2 99  0  1     1
99 -1 -1   32771
2 99  1  1     1
99 -1  0   32771
2 99  1  0     1
99 -1  1   32771
2 99  1 -1     1
99  0  1   32771
2 99  0 -1     1
99  1  1   32771
2 99 -1 -1     1
99  1  0   32771
2 99 -1  0     1
99  1 -1   32771
2 99 -1  1     1
99  0 -1   32771
2 99  0  1     1
99 -1  1   32771
2 99  1  1     1
99  0  1   32771
2 99  1  0     1
99  1  1   32771
2 99  1 -1     1
99  1  0   32771
2 99  0 -1     1
99  1 -1   32771
2 99 -1 -1     1
99  0 -1   32771
2 99 -1  0     1
99 -1 -1   32771
2 99 -1  1     1
99 -1  0   32771
0)
   2 def P cond #0 1 16
   3 def p cond #0 32 47
   4 def Q cond #0 63 0
   5 def q cond #0 63 0
   6 def K cond #0 104 0
   7 def k cond #0 104 0
   8 def A cond #0 145 0
   9 def a cond #0 145 0
  10 def C cond #0 206 0
  11 def c cond #0 206 0
  12 def Z cond #0 267 0
  13 def z cond #0 267 0
  14 def Y cond #0 348 0
  15 def y cond #0 348 0
  16 def X cond #0 441 0
  17 def x cond #0 441 0
  18 def N cond #0 534 0
  19 def n cond #0 534 0
  20 def M cond #0 595 0
  21 def m cond #0 595 0
  22 def B cond #0 656 0
  23 def b cond #0 656 0
  24 def R cond #0 697 0
  25 def r cond #0 697 0
  26 def S cond #0 738 0
  27 def s cond #0 738 0
  28 set extinction 1
  29 set promotables (P p)
  30 set supply (Q q A a C c Z z Y y X x N n M m B b R r S s)
  31 set promotab (
(q a c z y x n m b r s)
0
0
0
0
0
0
(Q A C Z Y X N M B R S)
)
  32 include /membergraphics/MSplay-test-applet-for-chess-variants/shuffle.txt
  33 set shufflespecs (
(Q K A C N M B R S X Y Z)
0
0
(q k a c n m b r s x y z)
0
0
)
  34 gosub ShuffleSetup
  35 set mypieces assoc
P "wpawn.gif" p "bpawn.gif"
Q "wqueen.gif" q "bqueen.gif"
K "wking.gif" k "bking.gif"
A "wcardinal.gif" a "bcardinal.gif"
C "wchancellor.gif" c "bchancellor.gif"
Z "wamazon.gif" z "bamazon.gif"
Y "../alfaeriemisc/good/waanca.gif" y "../alfaeriemisc/good/baanca.gif"
X "../alfaeriemisc/good/wgryphon.gif" x "../alfaeriemisc/good/bgryphon.gif"
N "wknightwazir.gif" n "bknightwazir.gif"
M "wknightferz.gif" m "bknightferz.gif"
B "wpromotedbishop.gif" b "bpromotedbishop.gif"
R "wpromotedrook.gif" r "bpromotedrook.gif"
S "../alfaeriemisc/lavallee/wsissa2.gif" s "../alfaeriemisc/lavallee/bsissa2.gif"
  36 setsystem dir "/graphics.dir/alfaerie/"
  37 setsystem pieces #mypieces
  38 setsystem flipped #mypieces
  39 sub postauto1
  40   gosub HandleMove false
  41 endsub
  42 sub postauto2
  43   gosub HandleMove true
  44 endsub
  45 gosub GameEnd true
  46 end
  47 
  48 lib /membergraphics/MSgame-code-generation/betza.txt
  49 if == thismove null
  50   say This rule-enforcing preset was created through the Play-Test Applet
  51 endif
  52 echo Please report any bugs or errors to H.G. Muller
  53 setsystem maxmove 4
  54 setsystem omitmoves 1
  55 ban commands
  56 allow pass 2 pass 3
  57 set pseudo 0
  58 set zonal 0
  59 set repeats 3
  60 set reploses 0
  61 set rulemoves 100
  62 set resetpieces (P p)
  63 set staledraw 1
  64 set checkrule 1
  65 set extinction 0
  66 set nullban 1
  67 set wroyal (K)
  68 set broyal (k)
  69 set iron array
  70 set protected array
  71 set restricted array
  72 set counterstrike array
  73 set negligible array
  74 set opaque array
  75 set brouhaha array
  76 set imitators array
  77 set inducers array
  78 set shooters array
  79 set morphers array
  80 set promotables array
  81 set inocheck (K k)
  82 set conversion array
  83 set method 1
  84 set dropdown 1
  85 set crappy 0
  86 set cap array
  87 set tempiron array
  88 set epsqrs 0
  89 set strike 0
  90 set traded 0
  91 set nopvc 0
  92 set toimitate p
  93 set lastfen 0
  94 set epmask 4
  95 set many ep 0 suicide 0 freedrop 0
  96 set converted 0
  97 set hist . "zzz," fencode
  98 def friends cond #0 (onlylower) (onlyupper)
  99 sub FastCastle start dx dy
 100   verify not flag #start
 101   my k r sqr cornr rook
 102   set r ray #start #dx #dy
 103   set k dec count #r
 104   set cornr elem #k #r
 105   set rook space #cornr
 106   verify != @ #rook and not flag #cornr
 107   do while #k
 108     dec k
 109     set sqr elem #k #r
 110     if == @ space #sqr
 111       if == 0 #k
 112         set realto #sqr
 113         set sqr #cornr
 114       endif
 115       gosub GotMove #start #sqr #cornr #start #rook 1
 116     endif
 117   loop
 118 endsub
 119 sub Promote player piece desti
 120   my choice r across
 121   verify mln
 122   set r rank #desti
 123   set across - lastrank * 2 #r
 124   if == #player < #across 0
 125     return
 126   endif
 127   if match #piece #promotables
 128     set choice elem #r #promotab
 129     if #choice
 130       if match self #choice
 131         push choice #piece
 132       endif
 133       set cap mergeall #cap #supply
 134       set choice intersection #cap #choice
 135     endif
 136   else
 137     set choice 0
 138   endif
 139   if #promo
 140     if not #choice
 141       die "You cannot promote on this move"
 142     elseif not match #promo #choice
 143       die "You cannot promote to such a piece"
 144     endif
 145   elseif #choice and not $answered
 146     askpromote #choice
 147   endif
 148 endsub
 149 sub GotMove orisqr destsqr locustsqr dropsqr unload implied
 150   if == 2 #zonal
 151     set k space #orisqr
 152     gosub GetMorph #k #destsqr
 153     verify != barred #k
 154   endif
 155   switch #task
 156     case 1
 157     set halfhit or #halfhit and #crappy and == #orisqr #ori == #locustsqr #desti
 158     verify == #orisqr #ori and == #destsqr #desti
 159     if == 1 #zonal
 160       verify not fn BadZone #orisqr #destsqr #locustsqr #dropsqr #unload
 161     endif
 162     if != 1 #implied
 163       if #firstpart
 164         set pseudohit + #pseudohit #crappy
 165         set autolocust #locustsqr
 166         set autodrop #dropsqr
 167         set dropped #unload
 168       endif
 169       if #sideeffect
 170         verify == #sideeffect #dropsqr
or == #sideeffect #locustsqr
 171         set suicide #locustsqr
 172         set freedrop #dropsqr
 173         set dropped #unload
 174       else
 175         verify == #locustsqr #suicide
 176         verify == #dropsqr #freedrop
 177         verify == #unload #dropped or not #dropsqr
 178       endif
 179     else
 180       verify not #suicide and not #freedrop
 181       if #locustsqr
 182         capture #locustsqr
 183         set imp 1
 184       endif
 185       set impliedkill #locustsqr
 186       set implieddrop #dropsqr
 187       set dropped #unload
 188     endif
 189     set neweps #eps
 190     set ep #destsqr
 191     set ok 1
 192     set desc #mv
 193     break
 194     case 2
 195     if == 1 #zonal
 196       verify not fn BadZone #orisqr #destsqr #locustsqr #dropsqr #unload
 197     endif
 198     if #locustsqr or #dropsqr and #dropdown and not #implied
 199       set m . space #orisqr . ws . #orisqr . chr 45 . #destsqr . chr 59 ws
 200       if #locustsqr
 201         set m . #m . "@-" #locustsqr
 202       elseif #dropsqr
 203         set m . #m . #unload . chr 45 #dropsqr
 204       endif
 205       push xtl #m
 206     else
 207       setlegal #orisqr #destsqr
 208     endif
 209     break
 210     case 9
 211     if == #locustsqr #kpos
 212       push checks #ss
 213       push checks #mv
 214       setelem #locustsqr 0 1
 215     endif
 216     break
 217     case 10
 218     case 7
 219     case 3
 220     set hit cond match space #destsqr #royal #orisqr #hit
 221     if != Xdummy space #locustsqr and #locustsqr
 222       set hit cond match space #locustsqr #royal Ughh #hit
 223     endif
 224     break
 225     case 12
 226     verify count var #orisqr
 227     case 11
 228     if & 1 elem 0 var #destsqr
and == #orisqr #kpos
 229       break
 230     endif
 231     case 4
 232     case 8
 233     if == 1 #zonal
 234       verify not fn BadZone #orisqr #destsqr #locustsqr #dropsqr #unload
 235     endif
 236     my victim locustvictim
 237     set victim space #destsqr
 238     set locustvictim space #locustsqr
 239     if #locustsqr
 240       empty #locustsqr
 241     endif
 242     move #orisqr #destsqr
 243     if #dropsqr
 244       add #unload #dropsqr
 245     endif
 246     dec task
 247     set hit 0
 248     if == 10 #task
 249       if #checked
 250         gosub GenAttacks checks
 251       endif
 252       gosub GenAttacks #orisqr
 253       gosub GenAttacks #destsqr
 254       if #locustsqr
 255         gosub GenAttacks #locustsqr
 256       endif
 257       if #dropsqr
 258         gosub GenAttacks #dropsqr
 259       endif
 260     else
 261       if #threat and != #threat Ughh
 262         set checker space #threat
 263         if cond #xside islower #checker isupper #checker
 264           gosub GenMoves #checker #threat 1
 265         endif
 266       endif
 267       if not #hit
 268         gosub GenAll #xside
 269       endif
 270     endif
 271     inc task
 272     move #destsqr #orisqr
 273     if != #dropsqr #orisqr and #dropsqr
 274       empty #dropsqr
 275     endif
 276     if #locustsqr
 277       add #locustvictim #locustsqr
 278     endif
 279     add #victim #destsqr
 280     if == 4 #task
 281       set threat #hit
 282       set hit not #hit
 283     elseif #hit
 284       set hit 0
 285     elseif #locustsqr or #dropsqr and #dropdown and not #implied
 286       set m . space #orisqr . ws . #orisqr . chr 45 . #destsqr . chr 59 ws
 287       if #locustsqr
 288         if match #mover #shooters
 289           set m . #m . "@-" #locustsqr
 290         else
 291           set m . space #orisqr . ws . #orisqr . chr 45 . #locustsqr . chr 59 ws
 292           set m . #m . space #orisqr . ws . #locustsqr . chr 45 #destsqr
 293         endif
 294       elseif #dropsqr
 295         set m . #m . #unload . chr 45 #dropsqr
 296       endif
 297       push xtl #m
 298     else
 299       setlegal #orisqr #destsqr
 300     endif
 301     break
 302     case 5
 303     verify == #locustsqr #desti
 304     setlegal #locustsqr #destsqr
 305     break
 306     case 6
 307     verify == #ori #orisqr and == #desti #destsqr
 308     if #dropsqr
 309       setlegal #desti #dropsqr
 310     elseif #locustsqr
 311       setlegal #desti #locustsqr
 312     endif
 313     break
 314     case 13
 315     verify not #dropsqr and #locustsqr or not empty #destsqr
 316     set hit 1
 317     break
 318   endswitch
 319 endsub
 320 sub NextLeg togo legindex startsqr cursqr locustsqr dropsqr iso
 321   my rng dx dy mode to tosqrs k len newindex hx hy side r fratricide stopper
 322   set rng elem #legindex #legdefs
 323   set dx elem + 1 #legindex #legdefs
 324   set dy elem + 2 #legindex #legdefs
 325   set mode elem + 3 #legindex #legdefs
 326   if & 64 #mode
 327     verify not flag #startsqr
 328     if match space #startsqr #inocheck
 329       verify != #task 11 or not #checked
 330       push eps #startsqr
 331     endif
 332   endif
 333   if > 0 #rng
 334     switch #rng
 335       case -1
 336       set rng cond < 0 #dy rank #cursqr - lastrank rank #cursqr
 337       set rng - >> lastrank 1 #rng
 338       set rng max 1 #rng
 339       set eps array
 340       set mode | << 1 23 #mode
 341       break
 342       case -2
 343       gosub GenMoves #toimitate #startsqr 1
 344       return
 345       case -3
 346       gosub #mode #startsqr #dx #dy
 347       return
 348     endswitch
 349   endif
 350   set tosqrs ride #cursqr #dx #dy
 351   set r count #tosqrs
 352   if not #r
 353     if & #mode << 1 27
 354       gosub GotMove #startsqr #cursqr #locustsqr #dropsqr 0 0
 355     else
 356       return
 357     endif
 358   endif
 359   set r min #rng #r
 360   if & 128 #mode
 361     set hx >> + 8 * 5 #dx 4
 362     set hy >> + 8 * 5 #dy 4
 363     set k ride #startsqr #hx #hy
 364     set len count #k
 365     set len * #len + abs #hx abs #hy
 366     set len / #len + abs #dx abs #dy
 367     if < #len #r
 368       set r #len
 369       if == 9 #task
 370         pop k to
 371         push #to #ss
 372         push #to #mv
 373       endif
 374     endif
 375     verify #len
 376     if & << 1 14 #mode
 377       set eps array
 378       set to where #cursqr #dx #dy
 379       set k #cursqr
 380       do while != #to #k and onboard #k
 381         set k where #k #hx #hy
 382         if != #k #to
 383           push eps #k
 384         endif
 385       loop
 386     endif
 387   endif
 388   dec togo
 389   if & << 1 21 #mode
 390     set dropsqr #cursqr
 391   endif
 392   if & << 1 15 #mode
 393     verify >= #r #iso
 394     set r #iso
 395   elseif < 1 #r
 396     if & 1 #mode
 397       set k 1
 398       do while < #k #r
 399         set to elem dec #k #tosqrs
 400         if #togo
 401           set newindex + 4 #legindex
 402           gosub NextLeg #togo #newindex #startsqr #to #locustsqr #dropsqr #k
 403         else
 404           gosub GotMove #startsqr #to #locustsqr #dropsqr 0 0
 405         endif
 406         if & << 1 23 #mode
 407           push eps #to
 408         endif
 409         inc k
 410         verify not #hit
 411       loop
 412     endif
 413     if & #epmask #mode
 414       set k 1
 415       do while < #k #r
 416         set to elem dec #k #tosqrs
 417         if match #to #epsqrs
 418           if #togo
 419             set newindex + 4 #legindex
 420             gosub NextLeg #togo #newindex #startsqr #to #ep #dropsqr #k
 421           else
 422             gosub GotMove #startsqr #to #ep #dropsqr 0 1
 423           endif
 424         endif
 425         inc k
 426       loop
 427     endif
 428     if & 18 #mode and == 9 #task
 429       set k 1
 430       do while < #k #r
 431         set to elem dec #k #tosqrs
 432         if #togo
 433           push #to #ss
 434           push #to #mv
 435         endif
 436         if & 2 #mode
 437           if #togo
 438             if == #to #kpos
 439               set newindex + 4 #legindex
 440               gosub NextLeg #togo #newindex #startsqr #to #to #dropsqr #k
 441             endif
 442           else
 443             setelem #to 0 | 1 elem 0 var #to
 444             if == #to #kpos
 445               push checks #ss
 446               push checks #mv
 447             endif
 448           endif
 449         endif
 450         inc k
 451       loop
 452     endif
 453   endif
 454   set len cond == 1 #rng #iso #r
 455   set to elem dec #r #tosqrs
 456   if == 9 #task
 457     if cond empty #to
(& 18 #mode and #togo)
(not & << 1 15 #mode and
!= #r #rng and
or & 2 #mode #togo or
and & 1 #mode
#togo)
 458       push #to #ss
 459       push #to #mv
 460     endif
 461     if & + 2 << 1 13 #mode and == #to #kpos
 462       if #togo
 463         set newindex + 4 #legindex
 464         gosub NextLeg #togo #newindex #startsqr #to #to #dropsqr #len
 465       else
 466         push checks #ss
 467         push checks #mv
 468       endif
 469     endif
 470     if & 2 #mode and not #togo
 471       setelem #to 0 | 1 elem 0 var #to
 472     endif
 473   endif
 474   if match #to #epsqrs and & #epmask #mode
 475     if #togo
 476       set newindex + 4 #legindex
 477       gosub NextLeg #togo #newindex #startsqr #to #ep #dropsqr #len
 478     else
 479       gosub GotMove #startsqr #to #ep 0 0 1
 480     endif
 481   endif
 482   set stopper cond != #to #startsqr space #to @
 483   if == @ #stopper
 484     verify & 1 #mode
 485   else
 486     if & 16 #mode
 487       if not match #stopper #opaque or
not match space #startsqr #opaque
 488         set newindex + 4 #legindex
 489         gosub NextLeg #togo #newindex #startsqr #to #locustsqr #dropsqr #len
 490       endif
 491     endif
 492     set side islower space #startsqr
 493     set fratricide cond #side islower #stopper isupper #stopper
 494     if #fratricide
 495       if & 8 #mode
 496         verify match #to #partners
 497         verify not flag #to
 498         set locustsqr #to
 499         set to where #startsqr elem + 5 #legindex #legdefs 0
 500         set dropsqr where #to - 0 #dx #dy
 501         set eps array
 502         set k #startsqr
 503         do while != #k #to
 504           push eps #k
 505           set k where #k #dx 0
 506         loop
 507         set realto #to
 508         gosub GotMove #startsqr #to #locustsqr #dropsqr #stopper 1
 509         return
 510       elseif & 2048 #mode
 511         if #togo
 512           set newindex + 4 #legindex
 513           gosub NextLeg #togo #newindex #to #to 0 0 #len
 514         elseif != #stopper space #startsqr
 515           gosub GenMoves #stopper #startsqr 1
 516         endif
 517       endif
 518       verify & 4096 #mode
 519     else
 520       verify match #stopper #royal and
& << 1 13 #mode or & 2 #mode
 521       verify not match #stopper #tempiron
 522     endif
 523     if #togo
 524       set locustsqr #to
 525     endif
 526   endif
 527   if #togo
 528     set newindex + 4 #legindex
 529     gosub NextLeg #togo #newindex #startsqr #to #locustsqr #dropsqr #len
 530   else
 531     gosub GotMove #startsqr #to #locustsqr #dropsqr #stopper 0
 532   endif
 533 endsub
 534 sub GenMoves piece sqr all
 535   my index legcount startindex
 536   set side islower #piece
 537   set ss #sqr
 538   set index fn #piece #all
 539   do
 540     set legcount elem #index #legdefs
 541     verify #legcount
 542     set mv #index
 543     inc index
 544     if flag #sqr or not match #piece #conversion
or not & cond #side #converted << #converted 2
+ 64 & 64 elem + 3 #index #legdefs
 545       set eps 0
 546       gosub NextLeg #legcount #index #sqr #sqr 0 0 1
 547     endif
 548     set index + #index * 4 #legcount
 549   loop until #hit
 550 endsub
 551 sub GenAttacks sqr
 552   my k n togo leg piece
 553   set k 1
 554   set n count var #sqr
 555   do while < #k #n
 556     set start elem #k var #sqr
 557     inc k
 558     set leg elem #k var #sqr
 559     inc k
 560     set piece space #start
 561     if not cond #xside
(islower #piece)
(isupper #piece)
 562       continue
 563     endif
 564     set togo elem #leg #legdefs
 565     inc leg
 566     gosub NextLeg #togo #leg #start #start 0 0 1
 567   loop
 568 endsub
 569 sub GenAll player
 570   my from piece
 571   set hit false
 572   for (from piece) fn friends #player
 573     gosub GenMoves #piece #from 1
 574     verify not #hit
 575   next
 576 endsub
 577 sub GetRoyals player
 578   my i nr type myroyal cnt
 579   set myroyal cond #player (#broyal) (#wroyal)
 580   set many i 0 nr 0 hit 0
 581   set royal array
 582   set troy array
 583   do while < #i count #myroyal
 584     set type elem #i #myroyal
 585     set cnt elem #type piececount
 586     if + 0 #cnt
 587       set nr + #nr #cnt
 588       push royal #type
 589       push troy #cnt
 590     endif
 591     inc i
 592   loop
 593   set dead count #royal and not #nr
 594   if < 1 #nr and #extinction
 595     set royal array
 596   endif
 597 endsub
 598 sub InCheck player
 599   GetRoyals #player
 600   set task 3
 601   verify count #royal
 602   if #traded
 603     add Xdummy #desti
 604     push royal Xdummy
 605   endif
 606   if count #epsqrs and
match space #ep #royal
 607     set epmask 6
 608   endif
 609   set player not #player
 610   gosub GenAll #player
 611   set epmask 4
 612   if #traded
 613     add #traded #desti
 614   endif
 615 endsub
 616 sub ParseMove player
 617   my i j parts sqrs sqr
 618   set many suicide 0 freedrop 0 promo 0 sideeffect 0
 619   set mvs explode chr 59 thismove
 620   set parts explode ws trim elem 0 #mvs
 621   set i count #parts
 622   if > #i 2
 623     die "move must be piece ID plus board step"
 624   endif
 625   set sqrs explode chr 45 trim elem dec #i #parts
 626   if != 2 count #sqrs
 627     if == resign thismove
 628       resign
 629     elseif == drawn thismove
 630       drawn
 631     endif
 632     die "board step does not mention two squares"
 633   endif
 634   set ori elem 0 #sqrs
 635   set desti elem 1 #sqrs
 636   if not onboard #desti
 637     set msg join #desti " is not a valid square"
 638     die #msg
 639   endif
 640   if not onboard #ori
 641     set msg join #ori " is not a valid square"
 642     die #msg
 643   endif
 644   set mover space #ori
 645   if not cond #player islower #mover isupper #mover
 646     set msg cond == @ #mover (. #ori " is empty")
("you cannot move opponent pieces")
 647     die #msg
 648   endif
 649   set firstpart 1
 650   set j 1
 651   do while < #j count #mvs
 652     set parts trim elem #j #mvs
 653     if == "pass" #parts or == "skip" #parts
 654       set firstpart 0
 655       inc j
 656       continue
 657     endif
 658     set parts explode ws trim #parts
 659     set i dec count #parts
 660     set sqrs explode chr 45 trim elem #i #parts
 661     if != 2 count #sqrs
 662       set msg join elem #i #parts " is malformed"
 663       die #msg
 664     endif
 665     set sqr elem 1 #sqrs
 666     set sqr cond == "dest" #sqr #desti #sqr
 667     if not onboard #sqr
 668       set msg join #sqr " is not a valid square"
 669       die #msg
 670     elseif onboard elem 0 #sqrs
 671       if != #desti elem 0 #sqrs
 672         die "you can only continue with same piece"
 673       endif
 674       set firstpart 0
 675       if match #mover #shooters
 676         set sideeffect #sqr
 677         return
 678       endif
 679       if #suicide
 680         die "cannot have more than one locust victim"
 681       endif
 682       set suicide #desti
 683       set desti #sqr
 684     elseif == #desti #sqr
 685       set promo elem 0 #sqrs
 686     elseif == @ elem 0 #sqrs
 687       if empty #sqr
 688         set msg . "there is nothing on " . #sqr " to capture"
 689         die #msg
 690       endif
 691       if #suicide
 692         die "cannot have more than one locust victim"
 693       endif
 694       set suicide #sqr
 695       set firstpart 0
 696     else
 697       if #freedrop
 698         die "cannot kick more than one piece"
 699       endif
 700       set dropped elem 0 #sqrs
 701       set freedrop #sqr
 702       set firstpart 0
 703     endif
 704     inc j
 705   loop
 706 endsub
 707 sub HandleMove player
 708   set stm #player
 709   gosub ParseMove #player
 710   set all == mln $maxmln
 711   set many ok 0 hit 0 task 1 halfhit 0 implieddrop 0 imp 0 neweps 0
 712   set pseudohit 0
 713   set realto 0
 714   set k #all or not flag #ori and match #mover #conversion
 715   gosub GenMoves #mover #ori #k
 716   if not match #mover #shooters
and #firstpart and #halfhit
 717     set ok 2
 718     set task 5
 719     gosub GenMoves #mover #ori 1
 720     set msg . "Enter second leg or pass"
 721     remind #msg
 722   elseif #all
 723     set cap unique keys capturedpieces
 724     set lastfen fencode
 725     if not #ok
 726       set pseudohit 0
 727       gosub GenAll #player
 728     endif
 729     if #sideeffect
 730       rewritemove . elem 0 #mvs . "; " . cond #freedrop #dropped @ . chr 45 #sideeffect
 731       set sideeffect 0
 732       gosub ParseMove #player
 733     endif
 734     if match #mover #shooters and < 1 #pseudohit
 735       set ok 2
 736       set task 6
 737       gosub GenAll #player
 738       if #hit
 739         set msg . "Type side effect of move, or pass"
 740       else
 741         set msg . "Type side effect of move"
 742       endif
 743       remind #msg
 744     elseif not #ok
 745       if == 1 #pseudohit
 746         if #autolocust
 747           appendmove join "@-" #autolocust
 748         endif
 749         if #autodrop
 750           appendmove join #dropped join chr 45 #autodrop
 751         endif
 752         gosub ParseMove #player
 753       elseif #pseudohit
 754         set msg . "Type side effects of move"
 755         remind #msg
 756         continuemove
 757         return
 758       else
 759         set msg . thismove . " is not even pseudo-legal for a " toupper #mover
 760         die #msg
 761       endif
 762     endif
 763   endif
 764   set victim cond != #desti #ori space #desti @
 765   set traded cond and or match space #suicide #negligible
not #suicide
and match #victim #protected
match #mover #restricted #mover 0
 766   set strike and match #victim #counterstrike
not match #mover #counterstrike
 767   set k 0
 768   do while < var k count var mvs
 769     eval join "MOVE: " trim elem var k var mvs
 770     inc k
 771   loop
 772   if != #ori #freedrop and match #ori #brouhaha
 773     delete #ori
 774   endif
 775   if #implieddrop
 776     add #dropped #implieddrop
 777     if == #desti #impliedkill
 778       move #desti #realto
 779     endif
 780   endif
 781   set tempiron #iron
 782   if #strike
 783     set tempiron mergeall #tempiron #counterstrike
 784   endif
 785   set toimitate flipcase cond match #mover #imitators #toimitate #mover
 786   setflag #desti
 787   set posvar join cond #player "w" "b" fencode
 788   inc #posvar
 789   inc nopvc
 790   if #imp
 791     set hist . #hist . "," mln
 792   endif
 793   if #suicide and not #freedrop or #promo
or != @ #victim or match #mover #resetpieces
 794     set nopvc 0
 795   endif
 796   set epsqrs #neweps
 797   if not flag #ori and match #mover #conversion
 798     set k + 64 & 64 elem + 4 #desc #legdefs
 799     set k cond #player #k >> #k 2
 800     if & #k #converted
 801       die This move violates the conversion rule that applies to this piece.
 802     endif
 803     set converted + #converted #k
 804   endif
 805   gosub GetMorph #mover #desti
 806   if #k
 807     add #k #desti
 808   endif
 809 endsub
 810 sub GetMorph piece sqr
 811   set k 0
 812   if match #piece #morphers
 813     set i elem #piece #morphs
 814     set j rank #sqr
 815     if not islower #piece
 816       set j - lastrank #j
 817     endif
 818     if >= #j count #i
 819       return
 820     endif
 821     set i elem #j #i
 822     if #i
 823       if == All elem 0 #i
 824         set k elem 1 #i
 825       else
 826         set k elem file #sqr #i
 827       endif
 828     endif
 829   endif
 830 endsub
 831 sub GameEnd player
 832   my side
 833   if == 2 #ok
 834     continuemove
 835     return
 836   endif
 837   set side not #player
 838   gosub GetRoyals #side
 839   if #dead
 840     set msg join cond #player "White" "Black" " lost by absence of royalty!"
 841     say #msg
 842     won
 843   elseif == #lastfen fencode and #nullban
 844     die "This is a null move!"
 845   endif
 846   gosub InCheck #player
 847   if == #hit Xdummy
 848     die "Trading of this piece is not allowed"
 849   elseif #checkrule and #hit
 850     if == #hit Ughh
 851       die "That moves through or out of check"
 852     else
 853       die "This exposes your royal piece to capture"
 854     endif
 855   endif
 856   if >= 1 count fn friends #player and #baring
 857     if >= 1 count fn friends #side
 858       say Draw by mutual baring
 859       drawn
 860     else
 861       set msg . cond #player "Black" "White" " loses by baring"
 862       say #msg
 863       lost
 864     endif
 865     return
 866   endif
 867   gosub Promote #player #mover #desti
 868   gosub GetRoyals #side
 869   if count #royal
and #checkrule
 870     set task 4
 871     set xside #player
 872     set threat 0
 873     gosub GenAll #side
 874     if not #hit
 875       if #staledraw
 876         dec task
 877         gosub GenAll #player
 878         if #hit
 879           say Checkmate!
 880           won
 881         else
 882           say Stalemate!
 883           drawn
 884         endif
 885       else
 886         say Mate!
 887         won
 888       endif
 889       return
 890     endif
 891   endif
 892   set posvar join cond #player "w" "b" fencode
 893   if >= var #posvar #repeats
 894     if #reploses
 895       set msg join cond #player "Black" "White" " loses by repetition!"
 896       say #msg
 897       lost
 898     else
 899       say "Draw by repetition!"
 900       drawn
 901     endif
 902   elseif >= #nopvc #rulemoves
 903     say "Game declared draw due to prolongued lack of progress!"
 904     drawn
 905   endif
 906   set ltst #checkrule and count #royal and not #pseudo
 907   set xtl array
 908   if == 1 #method and #ltst
 909     for sqr spaces
 910       set #sqr array 0
 911     next
 912     set task 9
 913     set king elem 0 #royal
 914     set kpos search #king $space
 915     empty #kpos
 916     set checks array 0
 917     gosub GenAll #player
 918     add #king #kpos
 919     set checked & 1 elem 0 var #kpos
 920     if #checked
 921       say "check!"
 922     endif
 923     set task 11
 924     gosub GenAll #side
 925   else
 926     set task cond #ltst 8 2
 927     gosub GenAll #side
 928   endif
 929   setjsvar impmoves #hist
 930   setsystem legalmoves merge $legalmoves #xtl
 931 endsub
 932 set posvar join "w" fencode
 933 inc #posvar
 934 endlib
 935 lib /membergraphics/MSplay-test-applet-for-chess-variants/shuffle.txt
 936 sub GetSquares toshuffle
 937   my sqr piece
 938   set left array
 939   set light array
 940   set dark array
 941   for (sqr piece) $space
 942     if match var piece #toshuffle
 943       if < * 2 file #sqr lastfile
 944         push left #sqr
 945       endif
 946       if & 1 + file #sqr rank #sqr
 947         push dark #sqr
 948       else
 949         push light #sqr
 950       endif
 951     endif
 952   next
 953 endsub
 954 sub ShuffleWings sym others
 955   my toshuffle sqr piece rsqr p s allsqrs
 956   set toshuffle mergeall #sym #others
 957   gosub GetSquares #toshuffle
 958   verify < 1 count #left
 959   set allsqrs mergeall #dark #light
 960   eval merge #left "shuffle"
 961   for sqr #left
 962     set piece space #sqr
 963     if match #piece #sym
 964       set rsqr join chr + 97 - lastfile file #sqr substr #sqr 1 0
 965       verify match #rsqr #allsqrs
 966       set p space #rsqr
 967       if != #p #piece
 968         for s #allsqrs
 969           if not match #s #left
and == #piece space #s
 970             swap #s #rsqr
 971             break
 972           endif
 973         next
 974       endif
 975     endif
 976   next
 977   gosub GetSquares #others
 978   set dark mergeall #dark #light
 979   eval merge #dark "shuffle"
 980 endsub
 981 sub ShuffleOne shaded others
 982   my toshuffle
 983   set toshuffle mergeall #shaded #others
 984   gosub GetSquares #toshuffle
 985   if count #shaded
 986     eval merge #light "shuffle"
 987     eval merge #dark "shuffle"
 988     gosub GetSquares #others
 989   endif
 990   set dark mergeall #dark #light
 991   eval merge #dark "shuffle"
 992 endsub
 993 sub CenterKing types
 994   verify count #types
 995   my mid s royal right
 996   gosub GetSquares #types
 997   set dark sort merge #dark #light
 998   set royal elem 0 #types
 999   pop dark right
1000   pop dark mid
1001   pop dark left
1002   if != #royal space #mid
1003     set s cond == #royal space #left #left #right
1004     swap #s #mid
1005   endif
1006 endsub
1007 sub Symmetrize
1008   my sqr piece
1009   for (sqr piece) onlyupper
1010     set s join substr #sqr 0 1 + - 1 rank "a1" - lastrank rank #sqr
1011     copy #sqr #s
1012     flip #s
1013   next
1014 endsub
1015 sub ShuffleOnePlayer otherset symset shadeset
1016   if count #symset
1017     gosub ShuffleWings #symset #otherset
1018   else
1019     gosub ShuffleOne #shadeset #otherset
1020   endif
1021 endsub
1022 set shaded array
1023 set symmetrized array
1024 set centralize array
1025 set blackset array
1026 set blacksym array
1027 set blackshaded array
1028 set shufflespecs 0
1029 sub ShuffleSetup
1030   if isconst startshuffle
1031     setsystem space @startshuffle
1032   else
1033     if #shufflespecs
1034       my i a b c
1035       set i 0
1036       do while < #i count #shufflespecs
1037         set a elem #i #shufflespecs
1038         if not #a
1039           gosub Symmetrize
1040           break
1041         endif
1042         set b elem inc #i #shufflespecs
1043         set c elem + 2 #i #shufflespecs
1044         if not #b
1045           set b array
1046         endif
1047         if not #c
1048           set c array
1049         endif
1050         gosub ShuffleOnePlayer #a #b #c
1051         set i + 3 #i
1052       loop
1053     else
1054       gosub ShuffleOnePlayer #shuffleset #symmetrized #shaded
1055       if count #blackset
1056         gosub ShuffleOnePlayer #blackset #blacksym #blackshaded
1057       else
1058         gosub CenterKing #centralize
1059         gosub Symmetrize
1060       endif
1061     endif
1062     setconst startshuffle $space
1063   endif
1064 endsub
1065 endlib

functions

Array ( [friends] => Array ( [0] => cond [1] => #0 [2] => Array ( [0] => onlylower ) [3] => Array ( [0] => onlyupper ) ) [P] => Array ( [0] => cond [1] => #0 [2] => 1 [3] => 16 ) [p] => Array ( [0] => cond [1] => #0 [2] => 32 [3] => 47 ) [Q] => Array ( [0] => cond [1] => #0 [2] => 63 [3] => 0 ) [q] => Array ( [0] => cond [1] => #0 [2] => 63 [3] => 0 ) [K] => Array ( [0] => cond [1] => #0 [2] => 104 [3] => 0 ) [k] => Array ( [0] => cond [1] => #0 [2] => 104 [3] => 0 ) [A] => Array ( [0] => cond [1] => #0 [2] => 145 [3] => 0 ) [a] => Array ( [0] => cond [1] => #0 [2] => 145 [3] => 0 ) [C] => Array ( [0] => cond [1] => #0 [2] => 206 [3] => 0 ) [c] => Array ( [0] => cond [1] => #0 [2] => 206 [3] => 0 ) [Z] => Array ( [0] => cond [1] => #0 [2] => 267 [3] => 0 ) [z] => Array ( [0] => cond [1] => #0 [2] => 267 [3] => 0 ) [Y] => Array ( [0] => cond [1] => #0 [2] => 348 [3] => 0 ) [y] => Array ( [0] => cond [1] => #0 [2] => 348 [3] => 0 ) [X] => Array ( [0] => cond [1] => #0 [2] => 441 [3] => 0 ) [x] => Array ( [0] => cond [1] => #0 [2] => 441 [3] => 0 ) [N] => Array ( [0] => cond [1] => #0 [2] => 534 [3] => 0 ) [n] => Array ( [0] => cond [1] => #0 [2] => 534 [3] => 0 ) [M] => Array ( [0] => cond [1] => #0 [2] => 595 [3] => 0 ) [m] => Array ( [0] => cond [1] => #0 [2] => 595 [3] => 0 ) [B] => Array ( [0] => cond [1] => #0 [2] => 656 [3] => 0 ) [b] => Array ( [0] => cond [1] => #0 [2] => 656 [3] => 0 ) [R] => Array ( [0] => cond [1] => #0 [2] => 697 [3] => 0 ) [r] => Array ( [0] => cond [1] => #0 [2] => 697 [3] => 0 ) [S] => Array ( [0] => cond [1] => #0 [2] => 738 [3] => 0 ) [s] => Array ( [0] => cond [1] => #0 [2] => 738 [3] => 0 ) )

uservar

Array ( [0] => Array ( [main] => Array ( [pseudo] => 0 [zonal] => 0 [repeats] => 3 [reploses] => 0 [rulemoves] => 100 [resetpieces] => Array ( [0] => P [1] => p ) [staledraw] => 1 [checkrule] => 1 [extinction] => 1 [nullban] => 1 [wroyal] => Array ( [0] => K ) [broyal] => Array ( [0] => k ) [iron] => Array ( ) [protected] => Array ( ) [restricted] => Array ( ) [counterstrike] => Array ( ) [negligible] => Array ( ) [opaque] => Array ( ) [brouhaha] => Array ( ) [imitators] => Array ( ) [inducers] => Array ( ) [shooters] => Array ( ) [morphers] => Array ( ) [promotables] => Array ( [0] => P [1] => p ) [inocheck] => Array ( [0] => K [1] => k ) [conversion] => Array ( ) [method] => 1 [dropdown] => 1 [crappy] => 0 [cap] => Array ( ) [tempiron] => Array ( ) [epsqrs] => 0 [strike] => 0 [traded] => 0 [nopvc] => 0 [toimitate] => p [lastfen] => 0 [epmask] => 4 [ep] => 0 [suicide] => 0 [freedrop] => 0 [converted] => 0 [hist] => zzz,asbqcxkrnzmypppppppppppp48PPPPPPPPPPPPNAXYSRKMCBZQ [posvar] => wasbqcxkrnzmypppppppppppp48PPPPPPPPPPPPNAXYSRKMCBZQ [wasbqcxkrnzmypppppppppppp48PPPPPPPPPPPPNAXYSRKMCBZQ] => 1 [legdefs] => Array ( [0] => 0 [1] => 1 [2] => 1 [3] => 0 [4] => 1 [5] => 1 [6] => 1 [7] => 1 [8] => 1 [9] => 1 [10] => 2 [11] => 1 [12] => 1 [13] => -1 [14] => 1 [15] => 2 [16] => 1 [17] => 1 [18] => 0 [19] => 2 [20] => 16577 [21] => 1 [22] => 1 [23] => 1 [24] => 1 [25] => 4 [26] => 1 [27] => 1 [28] => -1 [29] => 1 [30] => 4 [31] => 0 [32] => 1 [33] => 1 [34] => 0 [35] => -1 [36] => 1 [37] => 1 [38] => 1 [39] => -1 [40] => -1 [41] => 2 [42] => 1 [43] => 1 [44] => 1 [45] => -1 [46] => 2 [47] => 1 [48] => 1 [49] => 0 [50] => -2 [51] => 16577 [52] => 1 [53] => 1 [54] => -1 [55] => -1 [56] => 4 [57] => 1 [58] => 1 [59] => 1 [60] => -1 [61] => 4 [62] => 0 [63] => 1 [64] => 99 [65] => 0 [66] => 1 [67] => 3 [68] => 1 [69] => 99 [70] => 1 [71] => 1 [72] => 3 [73] => 1 [74] => 99 [75] => 1 [76] => 0 [77] => 3 [78] => 1 [79] => 99 [80] => 1 [81] => -1 [82] => 3 [83] => 1 [84] => 99 [85] => 0 [86] => -1 [87] => 3 [88] => 1 [89] => 99 [90] => -1 [91] => -1 [92] => 3 [93] => 1 [94] => 99 [95] => -1 [96] => 0 [97] => 3 [98] => 1 [99] => 99 [100] => -1 [101] => 1 [102] => 3 [103] => 0 [104] => 1 [105] => 1 [106] => 0 [107] => 1 [108] => 3 [109] => 1 [110] => 1 [111] => 1 [112] => 1 [113] => 3 [114] => 1 [115] => 1 [116] => 1 [117] => 0 [118] => 3 [119] => 1 [120] => 1 [121] => 1 [122] => -1 [123] => 3 [124] => 1 [125] => 1 [126] => 0 [127] => -1 [128] => 3 [129] => 1 [130] => 1 [131] => -1 [132] => -1 [133] => 3 [134] => 1 [135] => 1 [136] => -1 [137] => 0 [138] => 3 [139] => 1 [140] => 1 [141] => -1 [142] => 1 [143] => 3 [144] => 0 [145] => 1 [146] => 99 [147] => 1 [148] => 1 [149] => 3 [150] => 1 [151] => 99 [152] => 1 [153] => -1 [154] => 3 [155] => 1 [156] => 99 [157] => -1 [158] => -1 [159] => 3 [160] => 1 [161] => 99 [162] => -1 [163] => 1 [164] => 3 [165] => 1 [166] => 1 [167] => 1 [168] => 2 [169] => 3 [170] => 1 [171] => 1 [172] => 2 [173] => 1 [174] => 3 [175] => 1 [176] => 1 [177] => 2 [178] => -1 [179] => 3 [180] => 1 [181] => 1 [182] => 1 [183] => -2 [184] => 3 [185] => 1 [186] => 1 [187] => -1 [188] => -2 [189] => 3 [190] => 1 [191] => 1 [192] => -2 [193] => -1 [194] => 3 [195] => 1 [196] => 1 [197] => -2 [198] => 1 [199] => 3 [200] => 1 [201] => 1 [202] => -1 [203] => 2 [204] => 3 [205] => 0 [206] => 1 [207] => 99 [208] => 0 [209] => 1 [210] => 3 [211] => 1 [212] => 99 [213] => 1 [214] => 0 [215] => 3 [216] => 1 [217] => 99 [218] => 0 [219] => -1 [220] => 3 [221] => 1 [222] => 99 [223] => -1 [224] => 0 [225] => 3 [226] => 1 [227] => 1 [228] => 1 [229] => 2 [230] => 3 [231] => 1 [232] => 1 [233] => 2 [234] => 1 [235] => 3 [236] => 1 [237] => 1 [238] => 2 [239] => -1 [240] => 3 [241] => 1 [242] => 1 [243] => 1 [244] => -2 [245] => 3 [246] => 1 [247] => 1 [248] => -1 [249] => -2 [250] => 3 [251] => 1 [252] => 1 [253] => -2 [254] => -1 [255] => 3 [256] => 1 [257] => 1 [258] => -2 [259] => 1 [260] => 3 [261] => 1 [262] => 1 [263] => -1 [264] => 2 [265] => 3 [266] => 0 [267] => 1 [268] => 99 [269] => 0 [270] => 1 [271] => 3 [272] => 1 [273] => 99 [274] => 1 [275] => 1 [276] => 3 [277] => 1 [278] => 99 [279] => 1 [280] => 0 [281] => 3 [282] => 1 [283] => 99 [284] => 1 [285] => -1 [286] => 3 [287] => 1 [288] => 99 [289] => 0 [290] => -1 [291] => 3 [292] => 1 [293] => 99 [294] => -1 [295] => -1 [296] => 3 [297] => 1 [298] => 99 [299] => -1 [300] => 0 [301] => 3 [302] => 1 [303] => 99 [304] => -1 [305] => 1 [306] => 3 [307] => 1 [308] => 1 [309] => 1 [310] => 2 [311] => 3 [312] => 1 [313] => 1 [314] => 2 [315] => 1 [316] => 3 [317] => 1 [318] => 1 [319] => 2 [320] => -1 [321] => 3 [322] => 1 [323] => 1 [324] => 1 [325] => -2 [326] => 3 [327] => 1 [328] => 1 [329] => -1 [330] => -2 [331] => 3 [332] => 1 [333] => 1 [334] => -2 [335] => -1 [336] => 3 [337] => 1 [338] => 1 [339] => -2 [340] => 1 [341] => 3 [342] => 1 [343] => 1 [344] => -1 [345] => 2 [346] => 3 [347] => 0 [348] => 1 [349] => 1 [350] => 0 [351] => 1 [352] => 3 [353] => 1 [354] => 1 [355] => 1 [356] => 0 [357] => 3 [358] => 1 [359] => 1 [360] => 0 [361] => -1 [362] => 3 [363] => 1 [364] => 1 [365] => -1 [366] => 0 [367] => 3 [368] => 2 [369] => 1 [370] => 0 [371] => 1 [372] => 33 [373] => 99 [374] => 1 [375] => 1 [376] => 3 [377] => 2 [378] => 1 [379] => 1 [380] => 0 [381] => 33 [382] => 99 [383] => 1 [384] => -1 [385] => 3 [386] => 2 [387] => 1 [388] => 0 [389] => -1 [390] => 33 [391] => 99 [392] => -1 [393] => -1 [394] => 3 [395] => 2 [396] => 1 [397] => -1 [398] => 0 [399] => 33 [400] => 99 [401] => -1 [402] => 1 [403] => 3 [404] => 2 [405] => 1 [406] => 0 [407] => 1 [408] => 33 [409] => 99 [410] => -1 [411] => 1 [412] => 3 [413] => 2 [414] => 1 [415] => 1 [416] => 0 [417] => 33 [418] => 99 [419] => 1 [420] => 1 [421] => 3 [422] => 2 [423] => 1 [424] => 0 [425] => -1 [426] => 33 [427] => 99 [428] => 1 [429] => -1 [430] => 3 [431] => 2 [432] => 1 [433] => -1 [434] => 0 [435] => 33 [436] => 99 [437] => -1 [438] => -1 [439] => 3 [440] => 0 [441] => 1 [442] => 1 [443] => 1 [444] => 1 [445] => 3 [446] => 1 [447] => 1 [448] => 1 [449] => -1 [450] => 3 [451] => 1 [452] => 1 [453] => -1 [454] => -1 [455] => 3 [456] => 1 [457] => 1 [458] => -1 [459] => 1 [460] => 3 [461] => 2 [462] => 1 [463] => 1 [464] => 1 [465] => 33 [466] => 99 [467] => 1 [468] => 0 [469] => 3 [470] => 2 [471] => 1 [472] => 1 [473] => -1 [474] => 33 [475] => 99 [476] => 0 [477] => -1 [478] => 3 [479] => 2 [480] => 1 [481] => -1 [482] => -1 [483] => 33 [484] => 99 [485] => -1 [486] => 0 [487] => 3 [488] => 2 [489] => 1 [490] => -1 [491] => 1 [492] => 33 [493] => 99 [494] => 0 [495] => 1 [496] => 3 [497] => 2 [498] => 1 [499] => 1 [500] => 1 [501] => 33 [502] => 99 [503] => 0 [504] => 1 [505] => 3 [506] => 2 [507] => 1 [508] => 1 [509] => -1 [510] => 33 [511] => 99 [512] => 1 [513] => 0 [514] => 3 [515] => 2 [516] => 1 [517] => -1 [518] => -1 [519] => 33 [520] => 99 [521] => 0 [522] => -1 [523] => 3 [524] => 2 [525] => 1 [526] => -1 [527] => 1 [528] => 33 [529] => 99 [530] => -1 [531] => 0 [532] => 3 [533] => 0 [534] => 1 [535] => 1 [536] => 0 [537] => 1 [538] => 3 [539] => 1 [540] => 1 [541] => 1 [542] => 0 [543] => 3 [544] => 1 [545] => 1 [546] => 0 [547] => -1 [548] => 3 [549] => 1 [550] => 1 [551] => -1 [552] => 0 [553] => 3 [554] => 1 [555] => 1 [556] => 1 [557] => 2 [558] => 3 [559] => 1 [560] => 1 [561] => 2 [562] => 1 [563] => 3 [564] => 1 [565] => 1 [566] => 2 [567] => -1 [568] => 3 [569] => 1 [570] => 1 [571] => 1 [572] => -2 [573] => 3 [574] => 1 [575] => 1 [576] => -1 [577] => -2 [578] => 3 [579] => 1 [580] => 1 [581] => -2 [582] => -1 [583] => 3 [584] => 1 [585] => 1 [586] => -2 [587] => 1 [588] => 3 [589] => 1 [590] => 1 [591] => -1 [592] => 2 [593] => 3 [594] => 0 [595] => 1 [596] => 1 [597] => 1 [598] => 1 [599] => 3 [600] => 1 [601] => 1 [602] => 1 [603] => -1 [604] => 3 [605] => 1 [606] => 1 [607] => -1 [608] => -1 [609] => 3 [610] => 1 [611] => 1 [612] => -1 [613] => 1 [614] => 3 [615] => 1 [616] => 1 [617] => 1 [618] => 2 [619] => 3 [620] => 1 [621] => 1 [622] => 2 [623] => 1 [624] => 3 [625] => 1 [626] => 1 [627] => 2 [628] => -1 [629] => 3 [630] => 1 [631] => 1 [632] => 1 [633] => -2 [634] => 3 [635] => 1 [636] => 1 [637] => -1 [638] => -2 [639] => 3 [640] => 1 [641] => 1 [642] => -2 [643] => -1 [644] => 3 [645] => 1 [646] => 1 [647] => -2 [648] => 1 [649] => 3 [650] => 1 [651] => 1 [652] => -1 [653] => 2 [654] => 3 [655] => 0 [656] => 1 [657] => 99 [658] => 1 [659] => 1 [660] => 3 [661] => 1 [662] => 99 [663] => 1 [664] => -1 [665] => 3 [666] => 1 [667] => 99 [668] => -1 [669] => -1 [670] => 3 [671] => 1 [672] => 99 [673] => -1 [674] => 1 [675] => 3 [676] => 1 [677] => 1 [678] => 0 [679] => 1 [680] => 3 [681] => 1 [682] => 1 [683] => 1 [684] => 0 [685] => 3 [686] => 1 [687] => 1 [688] => 0 [689] => -1 [690] => 3 [691] => 1 [692] => 1 [693] => -1 [694] => 0 [695] => 3 [696] => 0 [697] => 1 [698] => 99 [699] => 0 [700] => 1 [701] => 3 [702] => 1 [703] => 99 [704] => 1 [705] => 0 [706] => 3 [707] => 1 [708] => 99 [709] => 0 [710] => -1 [711] => 3 [712] => 1 [713] => 99 [714] => -1 [715] => 0 [716] => 3 [717] => 1 [718] => 1 [719] => 1 [720] => 1 [721] => 3 [722] => 1 [723] => 1 [724] => 1 [725] => -1 [726] => 3 [727] => 1 [728] => 1 [729] => -1 [730] => -1 [731] => 3 [732] => 1 [733] => 1 [734] => -1 [735] => 1 [736] => 3 [737] => 0 [738] => 2 [739] => 99 [740] => 0 [741] => 1 [742] => 1 [743] => 99 [744] => 1 [745] => 1 [746] => 32771 [747] => 2 [748] => 99 [749] => 1 [750] => 1 [751] => 1 [752] => 99 [753] => 1 [754] => 0 [755] => 32771 [756] => 2 [757] => 99 [758] => 1 [759] => 0 [760] => 1 [761] => 99 [762] => 1 [763] => -1 [764] => 32771 [765] => 2 [766] => 99 [767] => 1 [768] => -1 [769] => 1 [770] => 99 [771] => 0 [772] => -1 [773] => 32771 [774] => 2 [775] => 99 [776] => 0 [777] => -1 [778] => 1 [779] => 99 [780] => -1 [781] => -1 [782] => 32771 [783] => 2 [784] => 99 [785] => -1 [786] => -1 [787] => 1 [788] => 99 [789] => -1 [790] => 0 [791] => 32771 [792] => 2 [793] => 99 [794] => -1 [795] => 0 [796] => 1 [797] => 99 [798] => -1 [799] => 1 [800] => 32771 [801] => 2 [802] => 99 [803] => -1 [804] => 1 [805] => 1 [806] => 99 [807] => 0 [808] => 1 [809] => 32771 [810] => 2 [811] => 99 [812] => 0 [813] => 1 [814] => 1 [815] => 99 [816] => 1 [817] => -1 [818] => 32771 [819] => 2 [820] => 99 [821] => 1 [822] => 1 [823] => 1 [824] => 99 [825] => 0 [826] => -1 [827] => 32771 [828] => 2 [829] => 99 [830] => 1 [831] => 0 [832] => 1 [833] => 99 [834] => -1 [835] => -1 [836] => 32771 [837] => 2 [838] => 99 [839] => 1 [840] => -1 [841] => 1 [842] => 99 [843] => -1 [844] => 0 [845] => 32771 [846] => 2 [847] => 99 [848] => 0 [849] => -1 [850] => 1 [851] => 99 [852] => -1 [853] => 1 [854] => 32771 [855] => 2 [856] => 99 [857] => -1 [858] => -1 [859] => 1 [860] => 99 [861] => 0 [862] => 1 [863] => 32771 [864] => 2 [865] => 99 [866] => -1 [867] => 0 [868] => 1 [869] => 99 [870] => 1 [871] => 1 [872] => 32771 [873] => 2 [874] => 99 [875] => -1 [876] => 1 [877] => 1 [878] => 99 [879] => 1 [880] => 0 [881] => 32771 [882] => 2 [883] => 99 [884] => 0 [885] => 1 [886] => 1 [887] => 99 [888] => -1 [889] => -1 [890] => 32771 [891] => 2 [892] => 99 [893] => 1 [894] => 1 [895] => 1 [896] => 99 [897] => -1 [898] => 0 [899] => 32771 [900] => 2 [901] => 99 [902] => 1 [903] => 0 [904] => 1 [905] => 99 [906] => -1 [907] => 1 [908] => 32771 [909] => 2 [910] => 99 [911] => 1 [912] => -1 [913] => 1 [914] => 99 [915] => 0 [916] => 1 [917] => 32771 [918] => 2 [919] => 99 [920] => 0 [921] => -1 [922] => 1 [923] => 99 [924] => 1 [925] => 1 [926] => 32771 [927] => 2 [928] => 99 [929] => -1 [930] => -1 [931] => 1 [932] => 99 [933] => 1 [934] => 0 [935] => 32771 [936] => 2 [937] => 99 [938] => -1 [939] => 0 [940] => 1 [941] => 99 [942] => 1 [943] => -1 [944] => 32771 [945] => 2 [946] => 99 [947] => -1 [948] => 1 [949] => 1 [950] => 99 [951] => 0 [952] => -1 [953] => 32771 [954] => 2 [955] => 99 [956] => 0 [957] => 1 [958] => 1 [959] => 99 [960] => -1 [961] => 1 [962] => 32771 [963] => 2 [964] => 99 [965] => 1 [966] => 1 [967] => 1 [968] => 99 [969] => 0 [970] => 1 [971] => 32771 [972] => 2 [973] => 99 [974] => 1 [975] => 0 [976] => 1 [977] => 99 [978] => 1 [979] => 1 [980] => 32771 [981] => 2 [982] => 99 [983] => 1 [984] => -1 [985] => 1 [986] => 99 [987] => 1 [988] => 0 [989] => 32771 [990] => 2 [991] => 99 [992] => 0 [993] => -1 [994] => 1 [995] => 99 [996] => 1 [997] => -1 [998] => 32771 [999] => 2 [1000] => 99 [1001] => -1 [1002] => -1 [1003] => 1 [1004] => 99 [1005] => 0 [1006] => -1 [1007] => 32771 [1008] => 2 [1009] => 99 [1010] => -1 [1011] => 0 [1012] => 1 [1013] => 99 [1014] => -1 [1015] => -1 [1016] => 32771 [1017] => 2 [1018] => 99 [1019] => -1 [1020] => 1 [1021] => 1 [1022] => 99 [1023] => -1 [1024] => 0 [1025] => 32771 [1026] => 0 ) [supply] => Array ( [0] => Q [1] => q [2] => A [3] => a [4] => C [5] => c [6] => Z [7] => z [8] => Y [9] => y [10] => X [11] => x [12] => N [13] => n [14] => M [15] => m [16] => B [17] => b [18] => R [19] => r [20] => S [21] => s ) [promotab] => Array ( [0] => Array ( [0] => q [1] => a [2] => c [3] => z [4] => y [5] => x [6] => n [7] => m [8] => b [9] => r [10] => s ) [1] => 0 [2] => 0 [3] => 0 [4] => 0 [5] => 0 [6] => 0 [7] => Array ( [0] => Q [1] => A [2] => C [3] => Z [4] => Y [5] => X [6] => N [7] => M [8] => B [9] => R [10] => S ) ) [shaded] => Array ( ) [symmetrized] => Array ( ) [centralize] => Array ( ) [blackset] => Array ( ) [blacksym] => Array ( ) [blackshaded] => Array ( ) [shufflespecs] => Array ( [0] => Array ( [0] => Q [1] => K [2] => A [3] => C [4] => N [5] => M [6] => B [7] => R [8] => S [9] => X [10] => Y [11] => Z ) [1] => 0 [2] => 0 [3] => Array ( [0] => q [1] => k [2] => a [3] => c [4] => n [5] => m [6] => b [7] => r [8] => s [9] => x [10] => y [11] => z ) [4] => 0 [5] => 0 ) [left] => Array ( [0] => a1 [1] => b1 [2] => c1 [3] => d1 [4] => e1 [5] => f1 ) [light] => Array ( [0] => a1 [1] => c1 [2] => e1 [3] => g1 [4] => i1 [5] => k1 ) [dark] => Array ( [0] => a1 [1] => c1 [2] => e1 [3] => g1 [4] => i1 [5] => k1 [6] => b1 [7] => d1 [8] => f1 [9] => h1 [10] => j1 [11] => l1 ) [RESULT] => ) ) [1] => Array ( [ShuffleSetup] => Array ( [subargs] => Array ( ) ) ) [3] => Array ( [ShuffleSetup] => Array ( [i] => 0 [a] => Array ( [0] => Q [1] => K [2] => A [3] => C [4] => N [5] => M [6] => B [7] => R [8] => S [9] => X [10] => Y [11] => Z ) [b] => Array ( ) [c] => Array ( ) ) ) [5] => Array ( [ShuffleOnePlayer] => Array ( [subargs] => Array ( [0] => Array ( [0] => Q [1] => K [2] => A [3] => C [4] => N [5] => M [6] => B [7] => R [8] => S [9] => X [10] => Y [11] => Z ) [1] => Array ( ) [2] => Array ( ) ) ) [main] => Array ( [otherset] => Array ( [0] => Q [1] => K [2] => A [3] => C [4] => N [5] => M [6] => B [7] => R [8] => S [9] => X [10] => Y [11] => Z ) [symset] => Array ( ) [shadeset] => Array ( ) ) ) [7] => Array ( [ShuffleOne] => Array ( [subargs] => Array ( [0] => Array ( ) [1] => Array ( [0] => Q [1] => K [2] => A [3] => C [4] => N [5] => M [6] => B [7] => R [8] => S [9] => X [10] => Y [11] => Z ) ) [toshuffle] => Array ( [0] => Q [1] => K [2] => A [3] => C [4] => N [5] => M [6] => B [7] => R [8] => S [9] => X [10] => Y [11] => Z ) ) [main] => Array ( [shaded] => Array ( ) [others] => Array ( [0] => Q [1] => K [2] => A [3] => C [4] => N [5] => M [6] => B [7] => R [8] => S [9] => X [10] => Y [11] => Z ) ) ) )

mline

Array ( [0] => MoveLine Object ( [movenum] => 0 [move] => [level] => 0 [comment] => [length] => 0 [newturn] => [turn] => 0 ) )

allmoves

Array ( )

movelist

constants

Array ( )