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

\count is 3

Syntax Error on line 282

The first argument to the move command, #K, is not a recognized coordinate.

Edit the Settings File for Chess'

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

uservar

Array ( [0] => Array ( [main] => Array ( [kpos] => e8 [Kpos] => 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] => r [1] => n [2] => b [3] => q ) [wprom] => Array ( [0] => R [1] => N [2] => B [3] => Q ) [checks] => [cspaces] => Array ( [0] => g8 [1] => c8 ) [kingmoves] => Array ( [0] => b1 [1] => a2 [2] => b2 ) ) ) [2] => Array ( [stalemated] => Array ( [subargs] => Array ( [0] => #K ) ) [main] => Array ( [king] => #K [legalmove] => 0 [temp] => 0 [from] => 0 [piece] => 0 [to] => b1 [attacked] => ATTACKEDBYW [ra] => 0 ) ) )

mline

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

allmoves

Array ( )

movelist

constants

Array ( )