This preset now uses the new code for identifying check, checkmate, and stalemate. Let me know of any problems with it.

Syntax Error on line 287

The function 'BIL' has not been defined. Its arguments are d1

Edit the Settings File for ShortChess

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 echo This preset now uses the new code for identifying check, checkmate, and stalemate. Let me know of any problems with it.
   1 setflag a1 a8 h1 h8 e1 e8
   2 set k e8
   3 set K e1
   4 set ep false
   5 include chess
   6 sub postauto1
   7   if isupper old
   8     die You may not capture your own pieces.
   9   endif
  10   if not equal moved P
  11     set ep false
  12     if unequal space dest moved
  13       die You may not change the type of this piece.
  14     endif
  15   endif
  16   set legal false
  17   if match moved P K
  18     gosub moved origin dest
  19     if equal moved K
  20       set K dest
  21     endif
  22   elseif match moved Q R B N
  23     set legal fn moved origin dest
  24     if equal moved R
  25       unsetflag origin
  26     endif
  27   endif
  28   if not var legal
  29     die You may not move a moved from origin to dest
  30   endif
  31   if fn ATTACKEDBYB #K
  32     die You may not move into check.
  33   endif
  34 endsub
  35 sub postauto2
  36   if islower old
  37     die You may not capture your own pieces.
  38   endif
  39   if not equal moved p
  40     set ep false
  41     if unequal space dest moved
  42       die You may not change the type of this piece.
  43     endif
  44   endif
  45   set legal false
  46   if match moved p k
  47     gosub moved origin dest
  48     if equal moved k
  49       set k dest
  50     endif
  51   elseif match moved q r b n
  52     set legal fn toupper moved origin dest
  53     if equal moved r
  54       unsetflag origin
  55     endif
  56   endif
  57   if not var legal
  58     die You may not move a moved from origin to dest
  59   endif
  60   if fn ATTACKEDBYW #k
  61     die You may not move into check.
  62   endif
  63 endsub
  64 set checks sub checks #K
  65 if var checks
  66   if sub checkmated #K #checks
  67     say Checkmate! Black has won!
  68     won
  69   else
  70     say Check!
  71   endif
  72 elseif sub stalemated #K
  73   say Stalemate! The game is drawn.
  74   drawn
  75 endif
  76 end
  77 
  78 lib chess
  79 set wpr 2
  80 set bpr 7
  81 set fps 2
  82 set pzs 1
  83 set wcastle c1 g1
  84 set bcastle c8 g8
  85 do
  86   local x
  87   for x piecekeys
  88     if match #x P K p k
  89       continue
  90     elseif isupper #x
  91       push wprom #x
  92     elseif islower #x
  93       push bprom #x
  94     endif
  95   next
  96 loop never
  97 setsystem maxmove 2
  98 ban commands allmoves
  99 allow moves 1 captures 1 promotions 2
 100 def N checkleap #0 #1 1 2
 101 def B checkride #0 #1 1 1
 102 def R checkride #0 #1 1 0
 103 def Q fn B #0 #1 or fn R #0 #1
 104 def K checkleap #0 #1 1 1 or checkleap #0 #1 1 0
 105 def M fn N #0 #1 or fn R #0 #1
 106 def A fn N #0 #1 or fn B #0 #1
 107 def n checkleap #0 #1 1 2
 108 def b checkride #0 #1 1 1
 109 def r checkride #0 #1 1 0
 110 def q fn b #0 #1 or fn r #0 #1
 111 def k checkleap #0 #1 1 1 or checkleap #0 #1 1 0
 112 def m fn n #0 #1 or fn r #0 #1
 113 def a fn n #0 #1 or fn b #0 #1
 114 def P
remove var ep
and checkleap #0 #1 1 1
and == var ep join filename #1 rankname #0
or and checkride #0 #1 0 1 == rankname #0 var wpr
or checkleap #0 #1 0 1
and empty #1
or and islower space #1 checkleap #0 #1 1 1
and <= distance #0 #1 var fps
and > rank #1 rank #0
 115 def p
remove var ep
and checkleap #0 #1 1 1
and == var ep join filename #1 rankname #0
or and checkride #0 #1 0 1 == rankname #0 var bpr
or checkleap #0 #1 0 1
and empty #1
or and isupper space #1 checkleap #0 #1 1 1
and <= distance #0 #1 var fps
and < rank #1 rank #0
 116 sub capturep p
 117   empty #p
 118   return true
 119 endsub
 120 sub checks king
 121   if not dest
 122     return false
 123   endif
 124   my checks c
 125   set checks ()
 126   if fn space dest dest #king
 127     setelem checks dest space dest
 128   endif
 129   set c sub checkedthru #king origin
 130   if #c
 131     setelem checks #c space #c
 132   elseif #epc
 133     set c sub checkedthru #king #epc
 134     if #c
 135       setelem checks #c space #c
 136     endif
 137   endif
 138   return var checks
 139 endsub
 140 sub checkmated king checks
 141   local from piece to key legalmove piece nopawn
 142   store
 143   if isupper space #king
 144     def friends onlyupper
 145     def friend isupper #0
 146     set attacked ATTACKEDBYB
 147   else
 148     def friends onlylower
 149     def friend islower #0
 150     set attacked ATTACKEDBYW
 151   endif
 152   set kingmoves fn KL #king
 153   for to #kingmoves
 154     if not fn friend space #to and onboard #to
 155       move #king #to
 156       set incheck fn var attacked #to
 157       restore
 158       if not #incheck
 159         setlegal #king #to
 160       endif
 161     endif
 162   next
 163   if == count var checks 1
 164     for (key enemy) var checks
 165       set possible path #king #key
 166       push possible #key
 167       if == #key #ep
 168         push possible cond isupper space #ep where #ep 0 -1 where #ep 0 1
 169       endif
 170       for (from piece) fn friends
 171         if == #from #king
 172           continue
 173         endif
 174         for to #possible
 175           if fn #piece #from #to
 176             move #from #to
 177             set incheck fn var attacked #king
 178             if not #incheck
 179               setlegal #from #to
 180             endif
 181           endif
 182           restore
 183         next
 184       next
 185     next
 186   endif
 187   return cond count system legalmoves false true and checks
 188 endsub
 189 def PL array where #0 0 2 where #0 0 1 where #0 -1 1 where #0 1 1
 190 def pL array where #0 0 -2 where #0 0 -1 where #0 -1 -1 where #0 1 -1
 191 def NL leaps #0 1 2
 192 def BL rays #0 1 1
 193 def RL rays #0 1 0
 194 def VL rays #0 1 1
 195 def CL rays #0 1 0
 196 def QL merge rays #0 1 0 rays #0 1 1
 197 def KL merge leaps #0 1 0 leaps #0 1 1
 198 def AL merge leaps #0 1 2 rays #0 1 1
 199 def ML merge rays #0 1 0 leaps #0 1 2
 200 def nL leaps #0 1 2
 201 def bL rays #0 1 1
 202 def rL rays #0 1 0
 203 def vL rays #0 1 1
 204 def cL rays #0 1 0
 205 def qL merge rays #0 1 0 rays #0 1 1
 206 def kL merge leaps #0 1 0 leaps #0 1 1
 207 def aL merge leaps #0 1 2 rays #0 1 1
 208 def mL merge rays #0 1 0 leaps #0 1 2
 209 sub castlepos from to
 210   local c RPOS RDEST xdir safe
 211   verify flag #from
 212   verify empty #to
 213   if isupper space #king
 214     def friend isupper #0
 215     def friends onlyupper
 216     set attacked ATTACKEDBYB
 217   else
 218     def friend islower #0
 219     def friends onlylower
 220     set attacked ATTACKEDBYW
 221   endif
 222   set xdir sign minus file #to file #from
 223   verify checkaride #from #to #xdir 0
 224   verify not fn var attacked #from
 225   set c #to
 226   do
 227     set c where #c #xdir 0
 228     if flag #c
 229       break
 230     endif
 231     verify onboard #c
 232     verify empty #c
 233   loop
 234   verify flag #c
 235   set RPOS #c
 236   store
 237   for c path #from #to
 238     move #from #c
 239     set safe not fn var attacked #c
 240     restore
 241     verify #safe
 242   next
 243   move #from #to
 244   set RDEST where #to neg #xdir 0
 245   move #RPOS #RDEST
 246   return true
 247 endsub
 248 sub stalemated king
 249   local legalmove temp from piece to attacked ra
 250   if isupper space #king
 251     def friend isupper #0
 252     def friends onlyupper
 253     set attacked ATTACKEDBYB
 254     set cspaces var wcastle
 255   else
 256     def friend islower #0
 257     def friends onlylower
 258     set attacked ATTACKEDBYW
 259     set cspaces var bcastle
 260   endif
 261   store
 262   set kingmoves fn KL #king
 263   for to #kingmoves
 264     if not fn friend space #to and onboard #to
 265       move #king #to
 266       set incheck fn var attacked #to
 267       restore
 268       if not #incheck
 269         setlegal #king #to
 270       endif
 271     endif
 272   next
 273   for to var cspaces
 274     if sub castlepos #king #to
 275       set incheck fn var attacked #to
 276       restore
 277       if not #incheck
 278         setlegal #king #to
 279       endif
 280     endif
 281   next
 282   restore
 283   for (from piece) fn friends
 284     if == #from #king
 285       continue
 286     endif
 287     for to fn join #piece L #from
 288       if fn #piece #from #to and not fn friend space #to and onboard #to
 289         move #from #to
 290         set incheck fn var attacked #king
 291         if not #incheck
 292           setlegal #from #to
 293         endif
 294       endif
 295       restore
 296     next
 297   next
 298   return cond count system legalmoves false true
 299 endsub
 300 def WPAWN match P what #0 1 -1 what #0 -1 -1
 301 def BPAWN match p what #0 1 1 what #0 -1 1
 302 def KNIGHT check what #0 1 2 check what #0 -1 2 check what #0 1 -2 check what #0 -1 -2 check what #0 2 1 check what #0 -2 1 check what #0 2 -1 check what #0 -2 -1 target #1
 303 def WAZIR check what #0 0 -1 check what #0 -1 0 check what #0 0 1 check what #0 1 0 target #1
 304 def FERZ check what #0 -1 -1 check what #0 -1 1 check what #0 1 -1 check what #0 1 1 target #1
 305 def KING fn WAZIR #0 #1 or fn FERZ #0 #1
 306 def ROOK check insight #0 0 -1 check insight #0 -1 0 check insight #0 0 1 check insight #0 1 0 target #1
 307 def BISHOP check insight #0 -1 -1 check insight #0 -1 1 check insight #0 1 -1 check insight #0 1 1 target #1
 308 def ATTACKEDBYB fn KING #0 k or fn BPAWN #0 or fn KNIGHT #0 (n a m) or fn ROOK #0 (r q m) or fn BISHOP #0 (b q a)
 309 def ATTACKEDBYW fn KING #0 K or fn WPAWN #0 or fn KNIGHT #0 (N A M) or fn ROOK #0 (R Q M) or fn BISHOP #0 (B Q A)
 310 sub P from to
 311   local ydir
 312   if == file #from file #to and not capture
 313     set legal checkaleap #from #to 0 1
 314     if var legal
 315       set ep false
 316     else
 317       set legal checkaride #from #to 0 1 and <= distance #from #to #fps and or == rankname #from #wpr < #wpr 0
 318       set ep #to
 319     endif
 320     set epc false
 321   elseif capture or #ep
 322     set legal checkaleap #from #to -1 1 or checkaleap #from #to 1 1
 323     set epc false
 324     if not capture and var legal
 325       set legal > rank #to rank #ep and < rankname #to #bpr and == file #to file #ep
 326       if var legal
 327         capture #ep
 328         set epc #ep
 329       endif
 330     endif
 331     set ep false
 332   endif
 333   if != space #to moved and onboard where #to 0 #pzs
 334     die "You may not promote a Pawn until it reaches the promotion zone."
 335   endif
 336   if not onboard where #to 0 1
 337     if == P space #to
 338       askpromote #wprom
 339     elseif not match space #to var wprom
 340       set np space #to
 341       die "You may not promote your Pawn to a" #np
 342     endif
 343   endif
 344 endsub
 345 sub p from to
 346   if == file #from file #to and not capture
 347     set legal checkaleap #from #to 0 -1
 348     if var legal
 349       set ep false
 350     else
 351       set legal checkaride #from #to 0 -1 and <= distance #from #to #fps and or == rankname #from #bpr > #bpr lastrank
 352       set ep #to
 353     endif
 354     set epc false
 355   elseif capture or #ep
 356     set legal checkaleap #from #to -1 -1 or checkaleap #from #to 1 -1
 357     set epc false
 358     if not capture and var legal
 359       set legal < rank #to rank #ep and > rankname #to #wpr and == file #to file #ep
 360       if var legal
 361         capture #ep
 362         set epc #ep
 363       endif
 364     endif
 365     set ep false
 366   endif
 367   if != space #to moved and onboard where #to 0 neg #pzs
 368     die You may not promote a Pawn until it reaches the promotion zone.
 369   endif
 370   if not onboard where #to 0 -1
 371     if == p space #to
 372       askpromote #bprom
 373     elseif not match space #to var bprom
 374       set np space #to
 375       die You may not promote your Pawn to a #np
 376     endif
 377   endif
 378 endsub
 379 sub K from to
 380   if match #to var wcastle and flag #from
 381     set legal sub castle
 382   else
 383     set legal fn K #from #to
 384   endif
 385   set K #to
 386   unsetflag e1
 387 endsub
 388 sub k from to
 389   if match #to var bcastle and flag #from
 390     set legal sub castle
 391   else
 392     set legal fn k #from #to
 393   endif
 394   set k #to
 395   unsetflag e8
 396 endsub
 397 sub castle
 398   local ATTACKED c RPOS RDEST xdir
 399   if not flag #from
 400     die A King may not castle after it moves.
 401   endif
 402   if capture
 403     die A King may not castle to an occupied space.
 404   endif
 405   set xdir sign minus file #to file #from
 406   if not checkaride #from #to #xdir 0
 407     die A King may not castle across any occupied space.
 408   endif
 409   set c #to
 410   do
 411     set c where #c #xdir 0
 412     if flag #c
 413       break
 414     elseif not onboard #c
 415       die No piece was found to castle with.
 416     elseif not empty #c
 417       die The King cannot castle with the piece at #c
 418     endif
 419   loop
 420   set RPOS #c
 421   set ATTACKED ATTACKEDBYW unless isupper moved ATTACKEDBYB
 422   if fn var ATTACKED #from
 423     die A King may not castle out of check.
 424   endif
 425   for c path #from #to
 426     if fn var ATTACKED #c
 427       die A King may not castle through check.
 428     endif
 429   next
 430   if == count var subargs 0
 431     set RDEST where #to neg #xdir 0
 432   else
 433     set RDEST elem 0 subarg
 434   endif
 435   unsetflag #RPOS
 436   move #RPOS #RDEST
 437   return true
 438 endsub
 439 sub checkedthru king loc
 440   my dir c
 441   set c revealed #king #loc
 442   verify fn space #c #c #king and not samecase space #king space #c and onboard #c and #c
 443   return #c
 444 endsub
 445 def fn checkedfrom fn space #1 #0 and xor isupper space #0 isupper space #1 and not empty #1
 446 sub P1 from to
 447   if == file #from file #to
 448     return not capture
 449   elseif capture
 450     return true
 451   elseif == file #to file #ep and == rank #from rank #ep and #ep
 452     capture #ep
 453     return true
 454   endif
 455   return false
 456 endsub
 457 sub PP from to
 458   if checkatwostep #from #to 0 1 0 1 or checkaleap #from #to 0 1
 459     return empty #to
 460   elseif not checkaleap #from #to 1 1 and not checkaleap #from #to -1 1
 461     return false
 462   elseif not empty #to
 463     return true
 464   elseif == file #to file #ep and == rank #from rank #ep and #ep
 465     capture #ep
 466     return true
 467   endif
 468   return false
 469 endsub
 470 sub pp from to
 471   if checkatwostep #from #to 0 -1 0 -1 or checkaleap #from #to 0 -1
 472     return empty #to
 473   elseif not checkaleap #from #to 1 -1 and not checkaleap #from #to -1 -1
 474     return false
 475   elseif not empty #to
 476     return true
 477   elseif == file #to file #ep and == rank #from rank #ep and #ep
 478     capture #ep
 479     return true
 480   endif
 481   return false
 482 endsub
 483 endlib

functions

Array ( [N] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 2 ) [B] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 1 ) [R] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 0 ) [Q] => Array ( [0] => fn [1] => B [2] => #0 [3] => #1 [4] => or [5] => fn [6] => R [7] => #0 [8] => #1 ) [K] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => or [6] => checkleap [7] => #0 [8] => #1 [9] => 1 [10] => 0 ) [M] => Array ( [0] => fn [1] => N [2] => #0 [3] => #1 [4] => or [5] => fn [6] => R [7] => #0 [8] => #1 ) [A] => Array ( [0] => fn [1] => N [2] => #0 [3] => #1 [4] => or [5] => fn [6] => B [7] => #0 [8] => #1 ) [n] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 2 ) [b] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 1 ) [r] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 0 ) [q] => Array ( [0] => fn [1] => b [2] => #0 [3] => #1 [4] => or [5] => fn [6] => r [7] => #0 [8] => #1 ) [k] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => or [6] => checkleap [7] => #0 [8] => #1 [9] => 1 [10] => 0 ) [m] => Array ( [0] => fn [1] => n [2] => #0 [3] => #1 [4] => or [5] => fn [6] => r [7] => #0 [8] => #1 ) [a] => Array ( [0] => fn [1] => n [2] => #0 [3] => #1 [4] => or [5] => fn [6] => b [7] => #0 [8] => #1 ) [P] => Array ( [0] => remove [1] => var [2] => ep [3] => and [4] => checkleap [5] => #0 [6] => #1 [7] => 1 [8] => 1 [9] => and [10] => == [11] => var [12] => ep [13] => join [14] => filename [15] => #1 [16] => rankname [17] => #0 [18] => or [19] => and [20] => checkride [21] => #0 [22] => #1 [23] => 0 [24] => 1 [25] => == [26] => rankname [27] => #0 [28] => var [29] => wpr [30] => or [31] => checkleap [32] => #0 [33] => #1 [34] => 0 [35] => 1 [36] => and [37] => empty [38] => #1 [39] => or [40] => and [41] => islower [42] => space [43] => #1 [44] => checkleap [45] => #0 [46] => #1 [47] => 1 [48] => 1 [49] => and [50] => <= [51] => distance [52] => #0 [53] => #1 [54] => var [55] => fps [56] => and [57] => > [58] => rank [59] => #1 [60] => rank [61] => #0 ) [p] => Array ( [0] => remove [1] => var [2] => ep [3] => and [4] => checkleap [5] => #0 [6] => #1 [7] => 1 [8] => 1 [9] => and [10] => == [11] => var [12] => ep [13] => join [14] => filename [15] => #1 [16] => rankname [17] => #0 [18] => or [19] => and [20] => checkride [21] => #0 [22] => #1 [23] => 0 [24] => 1 [25] => == [26] => rankname [27] => #0 [28] => var [29] => bpr [30] => or [31] => checkleap [32] => #0 [33] => #1 [34] => 0 [35] => 1 [36] => and [37] => empty [38] => #1 [39] => or [40] => and [41] => isupper [42] => space [43] => #1 [44] => checkleap [45] => #0 [46] => #1 [47] => 1 [48] => 1 [49] => and [50] => <= [51] => distance [52] => #0 [53] => #1 [54] => var [55] => fps [56] => and [57] => < [58] => rank [59] => #1 [60] => rank [61] => #0 ) [PL] => Array ( [0] => array [1] => where [2] => #0 [3] => 0 [4] => 2 [5] => where [6] => #0 [7] => 0 [8] => 1 [9] => where [10] => #0 [11] => -1 [12] => 1 [13] => where [14] => #0 [15] => 1 [16] => 1 ) [pL] => Array ( [0] => array [1] => where [2] => #0 [3] => 0 [4] => -2 [5] => where [6] => #0 [7] => 0 [8] => -1 [9] => where [10] => #0 [11] => -1 [12] => -1 [13] => where [14] => #0 [15] => 1 [16] => -1 ) [NL] => Array ( [0] => leaps [1] => #0 [2] => 1 [3] => 2 ) [BL] => Array ( [0] => rays [1] => #0 [2] => 1 [3] => 1 ) [RL] => Array ( [0] => rays [1] => #0 [2] => 1 [3] => 0 ) [VL] => Array ( [0] => rays [1] => #0 [2] => 1 [3] => 1 ) [CL] => Array ( [0] => rays [1] => #0 [2] => 1 [3] => 0 ) [QL] => Array ( [0] => merge [1] => rays [2] => #0 [3] => 1 [4] => 0 [5] => rays [6] => #0 [7] => 1 [8] => 1 ) [KL] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 1 [4] => 0 [5] => leaps [6] => #0 [7] => 1 [8] => 1 ) [AL] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 1 [4] => 2 [5] => rays [6] => #0 [7] => 1 [8] => 1 ) [ML] => Array ( [0] => merge [1] => rays [2] => #0 [3] => 1 [4] => 0 [5] => leaps [6] => #0 [7] => 1 [8] => 2 ) [nL] => Array ( [0] => leaps [1] => #0 [2] => 1 [3] => 2 ) [bL] => Array ( [0] => rays [1] => #0 [2] => 1 [3] => 1 ) [rL] => Array ( [0] => rays [1] => #0 [2] => 1 [3] => 0 ) [vL] => Array ( [0] => rays [1] => #0 [2] => 1 [3] => 1 ) [cL] => Array ( [0] => rays [1] => #0 [2] => 1 [3] => 0 ) [qL] => Array ( [0] => merge [1] => rays [2] => #0 [3] => 1 [4] => 0 [5] => rays [6] => #0 [7] => 1 [8] => 1 ) [kL] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 1 [4] => 0 [5] => leaps [6] => #0 [7] => 1 [8] => 1 ) [aL] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 1 [4] => 2 [5] => rays [6] => #0 [7] => 1 [8] => 1 ) [mL] => Array ( [0] => merge [1] => rays [2] => #0 [3] => 1 [4] => 0 [5] => leaps [6] => #0 [7] => 1 [8] => 2 ) [WPAWN] => Array ( [0] => match [1] => P [2] => what [3] => #0 [4] => 1 [5] => -1 [6] => what [7] => #0 [8] => -1 [9] => -1 ) [BPAWN] => Array ( [0] => match [1] => p [2] => what [3] => #0 [4] => 1 [5] => 1 [6] => what [7] => #0 [8] => -1 [9] => 1 ) [KNIGHT] => Array ( [0] => check [1] => what [2] => #0 [3] => 1 [4] => 2 [5] => check [6] => what [7] => #0 [8] => -1 [9] => 2 [10] => check [11] => what [12] => #0 [13] => 1 [14] => -2 [15] => check [16] => what [17] => #0 [18] => -1 [19] => -2 [20] => check [21] => what [22] => #0 [23] => 2 [24] => 1 [25] => check [26] => what [27] => #0 [28] => -2 [29] => 1 [30] => check [31] => what [32] => #0 [33] => 2 [34] => -1 [35] => check [36] => what [37] => #0 [38] => -2 [39] => -1 [40] => target [41] => #1 ) [WAZIR] => Array ( [0] => check [1] => what [2] => #0 [3] => 0 [4] => -1 [5] => check [6] => what [7] => #0 [8] => -1 [9] => 0 [10] => check [11] => what [12] => #0 [13] => 0 [14] => 1 [15] => check [16] => what [17] => #0 [18] => 1 [19] => 0 [20] => target [21] => #1 ) [FERZ] => Array ( [0] => check [1] => what [2] => #0 [3] => -1 [4] => -1 [5] => check [6] => what [7] => #0 [8] => -1 [9] => 1 [10] => check [11] => what [12] => #0 [13] => 1 [14] => -1 [15] => check [16] => what [17] => #0 [18] => 1 [19] => 1 [20] => target [21] => #1 ) [KING] => Array ( [0] => fn [1] => WAZIR [2] => #0 [3] => #1 [4] => or [5] => fn [6] => FERZ [7] => #0 [8] => #1 ) [ROOK] => Array ( [0] => check [1] => insight [2] => #0 [3] => 0 [4] => -1 [5] => check [6] => insight [7] => #0 [8] => -1 [9] => 0 [10] => check [11] => insight [12] => #0 [13] => 0 [14] => 1 [15] => check [16] => insight [17] => #0 [18] => 1 [19] => 0 [20] => target [21] => #1 ) [BISHOP] => Array ( [0] => check [1] => insight [2] => #0 [3] => -1 [4] => -1 [5] => check [6] => insight [7] => #0 [8] => -1 [9] => 1 [10] => check [11] => insight [12] => #0 [13] => 1 [14] => -1 [15] => check [16] => insight [17] => #0 [18] => 1 [19] => 1 [20] => target [21] => #1 ) [ATTACKEDBYB] => Array ( [0] => fn [1] => KING [2] => #0 [3] => k [4] => or [5] => fn [6] => BPAWN [7] => #0 [8] => or [9] => fn [10] => KNIGHT [11] => #0 [12] => Array ( [0] => n [1] => a [2] => m ) [13] => or [14] => fn [15] => ROOK [16] => #0 [17] => Array ( [0] => r [1] => q [2] => m ) [18] => or [19] => fn [20] => BISHOP [21] => #0 [22] => Array ( [0] => b [1] => q [2] => a ) ) [ATTACKEDBYW] => Array ( [0] => fn [1] => KING [2] => #0 [3] => K [4] => or [5] => fn [6] => WPAWN [7] => #0 [8] => or [9] => fn [10] => KNIGHT [11] => #0 [12] => Array ( [0] => N [1] => A [2] => M ) [13] => or [14] => fn [15] => ROOK [16] => #0 [17] => Array ( [0] => R [1] => Q [2] => M ) [18] => or [19] => fn [20] => BISHOP [21] => #0 [22] => Array ( [0] => B [1] => Q [2] => A ) ) [fn] => Array ( [0] => checkedfrom [1] => fn [2] => space [3] => #1 [4] => #0 [5] => and [6] => xor [7] => isupper [8] => space [9] => #0 [10] => isupper [11] => space [12] => #1 [13] => and [14] => not [15] => empty [16] => #1 ) [friend] => Array ( [0] => isupper [1] => #0 ) [friends] => Array ( [0] => onlyupper ) )

uservar

Array ( [0] => Array ( [main] => Array ( [k] => e8 [K] => e1 [ep] => [wpr] => 2 [bpr] => 7 [fps] => 2 [pzs] => 1 [wcastle] => Array ( [0] => g1 [1] => c1 ) [bcastle] => Array ( [0] => g8 [1] => c8 ) [bprom] => Array ( [0] => bi ) [wprom] => Array ( [0] => BI ) [checks] => [cspaces] => Array ( [0] => g1 [1] => c1 ) [kingmoves] => Array ( [0] => f1 [1] => d1 [2] => e2 [3] => f2 [4] => d2 ) [incheck] => ) ) [2] => Array ( [stalemated] => Array ( [subargs] => Array ( [0] => e1 ) ) [main] => Array ( [king] => e1 [legalmove] => 0 [temp] => 0 [from] => d1 [piece] => BI [to] => [attacked] => ATTACKEDBYB [ra] => 0 ) ) )

mline

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

allmoves

Array ( )

movelist

constants

Array ( )