Syntax Error on line 2

Unknown error concerning the definition of subroutine postauto1.

Edit the Settings File for Chess with Pawns II

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 fairychess
   1 set names assoc p "Black Pawn" P "White Pawn" b "Black Bishop" B "White Bishop" wz "Black Wizard" WZ "White Wizard" ch "Black Champion" CH "White Champion" r "Black Rook" R "White Rook" q "Black Queen" Q "White Queen" k "Black King" K "White King" cr "Black Crooked Rook" CR "White Crooked Rook"
   2 sub postauto1
   3   if not isconst alias $moved
   4     die The piece moved is undefined.
   5   elseif isupper $old
   6     die You may not capture your own pieces.
   7   elseif islower $moved
   8     die You may not move one of your opponent's pieces.
   9   endif
  10   if != const alias $moved White_Pawn
  11     set ep false
  12     if != space $dest $moved
  13       die You may not change the type of this piece.
  14     elseif capture
  15       set nopvc 0
  16     else
  17       inc nopvc
  18     endif
  19   endif
  20   set codename const alias $moved
  21   if sub #codename $origin $dest and issub #codename
  22   elseif fn #codename $origin $dest and isfunc #codename and not issub #codename
  23   else
  24     set name alias #codename
  25     set errmsg list "You may not move your" #name "from" $origin "to" join $dest ".
" 26 set desc join #codename "-Desc" 27 set errmsg str_replace "_" " " join #errmsg str_replace "%s" #name var #desc 28 die #errmsg 29 endif 30 if sub checked var Kpos 31 die You may not move into check. 32 endif 33 unsetflag $origin $dest 34 set posvar join "w" join fencode boardflags 35 inc #posvar 36 if not isalnum origin 37 if capture 38 die You may not drop a piece on an occupied space. 39 elseif and equal moved P equal rankname dest 8 40 die You may not drop a Pawn on your last rank. 41 elseif unequal space dest moved 42 die You may not promote a Pawn while dropping it. 43 elseif not isalnum dest 44 die You may not drop a piece off the board. 45 endif 46 set legal true 47 elseif ... 48 endsub 49 set pawndropfunc lambda (#0 onlyif onboard where #0 0 var forward) 50 sub stalemated king 51 local legalmove temp from piece to attacked ra 52 if isupper space #king 53 def friend isupper #0 54 def friends onlyupper 55 set attacked ATTACKEDBYB 56 set cspaces var wcastle 57 set pawn P 58 set forward 1 59 else 60 def friend islower #0 61 def friends onlylower 62 set attacked ATTACKEDBYW 63 set cspaces var bcastle 64 set pawn p 65 set forward -1 66 endif 67 store 68 set kingmoves fn KL #king 69 for to #kingmoves 70 if not fn friend space #to and onboard #to 71 move #king #to 72 set incheck fn var attacked #to 73 restore 74 if not #incheck 75 setlegal #king #to 76 endif 77 endif 78 next 79 for to var cspaces 80 if sub castlepos #king #to 81 set incheck fn var attacked #to 82 restore 83 if not #incheck 84 setlegal #king #to 85 endif 86 endif 87 next 88 set piecedrops aggregate lambda (#0 onlyif and empty #0 isalnum #0) spaces 89 set pawndrops aggregate var pawndropfunc #piecedrops 90 restore 91 for (from piece) fn friends 92 if == #from #king 93 continue 94 endif 95 if isalnum #from 96 for to fn join #piece L #from 97 if fn #piece #from #to and not fn friend space #to and onboard #to 98 move #from #to 99 set incheck fn var attacked #king 100 if not #incheck 101 setlegal #from #to 102 endif 103 endif 104 restore 105 next 106 elseif == #piece #pawn 107 for to #pawndrops 108 setlegal #from #to 109 next 110 else 111 for to #piecedrops 112 setlegal #from #to 113 next 114 endif 115 next 116 return cond count system legalmoves false true 117 endsub 118 end 119 120 lib fairychess 121 if flag use-chess-defaults 122 setconst k King 123 setconst K King 124 setconst q Queen 125 setconst Q Queen 126 setconst r Rook 127 setconst R Rook 128 setconst b Bishop 129 setconst B Bishop 130 setconst n Knight 131 setconst N Knight 132 setconst p Black_Pawn 133 setconst P White_Pawn 134 endif 135 if flag use-chess-defaults 136 set wpr 2 137 set bpr 7 138 set fps 2 139 set pzs 1 140 set wcastle c1 g1 141 set bcastle c8 g8 142 set wprom Q R B N 143 set bprom q r b n 144 set promotable p P 145 elseif not isset wpr 146 set message join "Set the wpr variable to the value of White's Pawn Rank. This is the single rank on which all of White's Pawns start. This would be 2 for Chess.
" var message 147 elseif not isset bpr 148 set message join "Set the bpr variable to the value of Black's Pawn Rank. This is the single rank on which all of Black's Pawns start. This would be 7 for Chess.
" var message 149 elseif not isset fps 150 set message join "Set the fps variable to the value of the maximum number of spaces a Pawn may move on its first move. This would be 2 in Chess.
" var message 151 elseif not isset pzs 152 set message join "Set the pzs variable to the value of the Promotion Zone Size. This is the number of ranks on the opposite side of the board on which Pawns may promote. This would be 1 for Chess.
" var message 153 elseif not isset wcastle 154 set message join "Set the wcastle variable to a space-separated list of the coordinates of the spaces the White King may move to when castling. This would be c1 g1 for Chess.
" var message 155 elseif not isset bcastle 156 set message join "Set the bcastle variable to a space-separated list of the coordinates of the spaces the Black King may move to when castling. This would be c8 g8 for Chess.
" var message 157 elseif not isset wprom 158 set message join "Set the wprom variable to the pieces that a White Pawn may promote to on reaching the Promotion Zone. White's pieces will normally be uppercase, and this would be Q R B N for Chess.
" var message 159 elseif not isset bprom 160 set message join "Set the bprom variable to the pieces that a Black Pawn may promote to on reaching the Promotion Zone. Black's pieces will normally be lowercase, and this would be q r b n for Chess.
" var message 161 endif 162 set ep false 163 setsystem maxmove 2 164 ban commands allmoves 165 allow moves 1 captures 1 promotions 2 166 set Aanca-Desc "The %s may move one space orthgonally, and so long as it is unblocked, it may continue its move in an outward diagonal direction." 167 def Aanca fn (checkride #0 #1 1 1 and empty #0) where #0 0 sign - rank #1 rank #0 #1 or fn (checkride #0 #1 1 1 and empty #0) where #0 sign - file #1 file #0 0 #1 or checkleap #0 #1 1 0 168 def Aanca-Range mergeall leaps #0 1 0 rays where #0 0 1 1 1 rays where #0 0 -1 1 1 rays where #0 1 0 1 1 rays where #0 -1 0 1 1 169 set Amazon-Desc "The %s may move in a straight line in any direction, as a Queen does, or it may leap the the opposite end of a 1x2 rectangle, as a Knight does." 170 def Amazon fn Bishop #0 #1 or fn Rook #0 #1 or fn Knight #0 #1 171 def Amazon-Range merge leaps # 1 2 merge rays #0 1 0 rays #0 1 1 172 set Bede-Desc "The %s may move along any diagonal line, as a Bishop does, or it may leap two spaces away in any orthogonal direction, as a Dabababah does." 173 def Bede checkride #0 #1 1 1 or checkleap #0 #1 0 2 174 def Bede-Range merge rays #0 1 1 leaps #0 0 2 175 def White_Berolina_Pawn remove var epc and checkleap #0 #1 1 0 and == #1 var epp or and checkride #0 #1 1 1 == rankname #0 var wpr or checkleap #0 #1 1 1 and empty #1 or and islower space #1 checkleap #0 #1 1 0 and <= distance #0 #1 var fps and > rank #1 rank #0 176 def Black_Berolina_Pawn remove var epc and checkleap #0 #1 1 0 and == #1 var epp or and checkride #0 #1 1 1 == rankname #0 var bpr or checkleap #0 #1 1 1 and empty #1 or and isupper space #1 checkleap #0 #1 1 0 and <= distance #0 #1 var fps and < rank #1 rank #0 177 def White_Berolina_Pawn-Range filter lambda (onboard #1) mergeall where #ori 0 1 values lambda (where #ori neg #1 #1) range 1 var fps values lambda (where #ori #1 #1) range 1 var fps =ori 178 def Black_Berolina_Pawn-Range filter lambda (onboard #1) mergeall where #ori 0 -1 values lambda (where #ori neg #1 neg #1) range 1 var fps values lambda (where #ori #1 neg #1) range 1 var fps =ori 179 set White_Berolina_Pawn-Desc "The %s may move one space diagonally forward without capturing, or it may move one space straight forward to capture. On its first move, it may move two spaces diagonally forward without capturing so long as it isn't blocked. If this move takes it next to an enemy %s that could have captured it if it had just moved one space, that %s may immediately capture it by en passant, moving to the space it passed over. On reaching the last rank, it may promote." 180 set Black_Berolina_Pawn-Desc var White_Berolina_Pawn-Desc 181 sub White_Berolina_Pawn from to 182 verify > rank #to rank #from 183 verify <= distance #to #from #fps 184 if capture 185 verify checkleap #from #to 1 0 186 set epp false 187 set epc false 188 elseif checkleap #from #to 1 0 and == #to #epp 189 capture #epc 190 set epp false 191 set epc false 192 elseif > distance #to #from 1 193 verify == rankname #from #wpr 194 verify checkride #from #to 1 1 195 set epp elem 0 path #from #to 196 set epc #to 197 else 198 verify checkleap #from #to 1 1 199 set epp false 200 set epc false 201 endif 202 if onboard where #to 0 #pzs 203 if != space #to $moved 204 set name alias const alias $moved 205 die "You may not promote a" #name "until it reaches the promotion zone." 206 endif 207 elseif onboard where #to 0 1 208 if == White_Berolina_Pawn const alias space #to and count var wprom 209 if not $answered and == mln $maxmln 210 push wprom space #to 211 askpromote #wprom 212 endif 213 elseif not match space #to var wprom and != White_Pawn const alias space #to 214 set name alias const alias $moved 215 set newname alias const alias space #to 216 set msg list "You may not promote your" #name "to a" join #newname ".
" 217 set msg str_replace "_" " " var msg 218 die #msg 219 endif 220 elseif count var wprom 221 if == White_Berolina_Pawn const alias space #to 222 if == count var wprom 1 223 set newpiece join list var wprom 224 set newmove join #newpiece "-dest" 225 add #newpiece $dest 226 appendmove #newmove 227 else 228 askpromote #wprom 229 endif 230 elseif not match space #to var wprom 231 set name alias const alias $moved 232 set newname alias const alias space #to 233 set msg list "You may not promote your" #name "to a" join #newname ".
" 234 set msg str_replace "_" " " var msg 235 die #msg 236 endif 237 else 238 set name alias const alias $moved 239 set msg list "You may not advance your" #name "to the last rank, because there is nothing you may promote it to." 240 set msg str_replace "_" " " var msg 241 die #msg 242 endif 243 set nopvc 0 244 return true 245 endsub 246 sub Black_Berolina_Pawn from to 247 verify < rank #to rank #from 248 verify <= distance #to #from #fps 249 if capture 250 verify checkleap #from #to 1 0 251 set epp false 252 set epc false 253 elseif checkleap #from #to 1 0 and == #to #epp 254 capture #epc 255 set epp false 256 set epc false 257 elseif > distance #to #from 1 258 verify == rankname #from #bpr 259 verify checkride #from #to 1 1 260 set epp elem 0 path #from #to 261 set epc #to 262 else 263 verify checkleap #from #to 1 1 264 set epp false 265 set epc false 266 endif 267 if onboard where #to 0 neg #pzs 268 if != space #to $moved 269 set name alias const alias $moved 270 die "You may not promote a" #name "until it reaches the promotion zone." 271 endif 272 elseif onboard where #to 0 -1 273 if == Black_Berolina_Pawn const alias space #to and count var bprom 274 if not $answered and == mln $maxmln 275 push bprom space #to 276 askpromote #bprom 277 endif 278 elseif not match space #to var bprom and != Black_Pawn const alias space #to 279 set name alias const alias $moved 280 set newname alias const alias space #to 281 set msg list "You may not promote your" #name "to a" join #newname ".
" 282 set msg str_replace "_" " " var msg 283 die #msg 284 endif 285 elseif count var bprom 286 if == Black_Berolina_Pawn const alias space #to 287 if == count var bprom 1 288 set newpiece join list var bprom 289 set newmove join #newpiece "-dest" 290 add #newpiece $dest 291 appendmove #newmove 292 else 293 askpromote #bprom 294 endif 295 elseif not match space #to var bprom 296 set name alias const alias $moved 297 set newname alias const alias space #to 298 set msg list "You may not promote your" #name "to a" join #newname ".
" 299 set msg str_replace "_" " " var msg 300 die #msg 301 endif 302 else 303 set name alias const alias $moved 304 set msg list "You may not advance your" #name "to the last rank, because there is nothing you may promote it to." 305 set msg str_replace "_" " " var msg 306 die #msg 307 endif 308 set nopvc 0 309 return true 310 endsub 311 def Bishop checkride #0 #1 1 1 312 def Bishop-Range rays #0 1 1 313 set Bishop-Desc "The %s may move diagonally any number of spaces until it reaches an occupied space." 314 def Cannon cond cond empty #0 capture (not empty #1) (checkhop #0 #1 0 1) (checkride #0 #1 0 1) and #1 315 def Cannon-Range rays #0 1 0 316 set Cannon-Desc "The %s moves any number of spaces orthogonally, as a Rook does, but it must hop over an intervening piece to capture." 317 def Camel checkleap #0 #1 1 3 318 def Camel-Range leaps #0 1 3 319 set Camel-Desc "The %s leaps to any space at the opposite corner of a 1x3 rectangle." 320 def Camelrider checkride #0 #1 1 3 321 def Camelrider-Range rays #0 1 3 322 set Camelrider-Desc "The %s may make any number of Camel moves in the same direction until it lands on an occupied space." 323 def Cardinal fn Bishop #0 #1 or fn Knight #0 #1 324 def Cardinal-Range merge leaps #0 1 2 rays #0 1 1 325 set Cardinal-Desc "The %s may move along diagonals as a Bishop or leap as a Knight." 326 def Centaur checkleap #0 #1 1 1 or checkleap #0 #1 1 0 or checkleap #0 #1 1 2 327 def Centaur-Range merge leaps #0 1 2 merge leaps #0 1 0 leaps #0 1 1 328 set Centaur-Desc "The %s may move to any adjacent space as a King or leap like a Knight." 329 def Champion fn Elephant #0 #1 or fn Dabbabah #0 #1 or fn Wazir #0 #1 330 def Champion-Range mergeall leaps #0 2 2 leaps #0 2 0 leaps #0 1 0 331 set Champion-Desc "The %s may leap one or two spaces orthogonally or two spaces diagonally." 332 def White_Charging_Knight cond < rank #0 rank #1 (checkleap #0 #1 1 2) (checkleap #0 #1 1 1 or checkleap #0 #1 1 0) 333 def White_Charging_Knight-Range mergeall leaps #0 1 2 leaps #0 1 1 leaps #0 1 0 334 set White_Charging_Knight-Desc "The %s may leap forward as a Knight or move one space sideways or backwards like a King." 335 def Black_Charging_Knight cond > rank #0 rank #1 (checkleap #0 #1 1 2) (checkleap #0 #1 1 1 or checkleap #0 #1 1 0) 336 def Black_Charging_Knight-Range mergeall leaps #0 1 2 leaps #0 1 1 leaps #0 1 0 337 set Black_Charging_Knight-Desc "The %s may leap forward as a Knight or move one space sideways or backwards like a King." 338 def White_Charging_Rook checkride #0 #1 1 0 and <= rank #0 rank #1 or checkaleap #0 #1 -1 -1 or checkaleap #0 #1 -1 0 or checkaleap #0 #1 -1 1 339 def White_Charging_Rook-Range mergeall ray #0 0 -1 ray #0 1 0 ray #0 0 1 where #0 -1 1 where #0 1 0 where #0 1 1 340 set White_Charging_Rook-Desc "The %s may move forward or sideways along its file or rank like a Rook, or it may move one space backwards in any direction like a King." 341 def Black_Charging_Rook checkride #0 #1 1 0 and >= rank #0 rank #1 or checkaleap #0 #1 -1 1 or checkaleap #0 #1 1 0 or checkaleap #0 #1 1 1 342 def Black_Charging_Rook-Range mergeall ray #0 0 -1 ray #0 -1 0 ray #0 0 1 where #0 -1 1 where #0 1 0 where #0 1 1 343 set Black_Charging_Rook-Desc "The %s may move forward or sideways along its file or rank like a Rook, or it may move one space backwards in any direction like a King." 344 def Chinese_Elephant checkpath #0 #1 1 1 1 1 345 def Chinese_Elephant-Range leaps #0 2 2 346 set Chinese_Elephant-Desc "The %s may move two spaces diagonally so long as the space in between is empty." 347 def White_Chinese_Elephant checkpath #0 #1 1 1 1 1 and < rank #1 + 1 / lastrank 2 348 def White_Chinese_Elephant-Range leaps #0 2 2 349 set White_Chinese_Elephant-Desc "The %s may move two spaces diagonally so long as the space in between is empty, but it is confined to the ranks on its own side of the board." 350 def Black_Chinese_Elephant checkpath #0 #1 1 1 1 1 and >= rank #1 + 1 / lastrank 2 351 def Black_Chinese_Elephant-Range leaps #0 2 2 352 set Black_Chinese_Elephant-Desc "The %s may move two spaces diagonally so long as the space in between is empty, but it is confined to the ranks on its own side of the board." 353 def Chinese_General checkride #0 #1 1 0 and == Chinese_General const alias cond empty #0 capture space #1 or checkleap #0 #1 0 1 and flag #1 354 def Chinese_General checkride #0 #1 1 0 and == Chinese_General const alias cond empty #0 capture space #1 or checkleap #0 #1 0 1 and flag #1 355 def Chinese_General == distance #0 #1 1 or == var movetype CHECK and checkride #0 #1 1 0 and flag #1 356 def Chinese_General-Range leaps #0 1 0 357 set Chinese_General-Desc "The %s may move one space orthogonally within the confines of the Palace, but it may not face the opponent's %s along an open file." 358 def Chinese_Guard checkleap #0 #1 1 1 and flag #1 359 def Chinese_Guard-Range leaps #0 1 1 360 set Chinese_Guard-Desc "The %s may move one space diagonally within the confines of the palace." 361 def White_Chinese_Pawn checkaleap #0 #1 -1 0 or checkaleap #0 #1 1 0 and >= rank #0 + 1 / lastrank 2 or checkaleap #0 #1 0 1 362 def Black_Chinese_Pawn checkaleap #0 #1 -1 0 or checkaleap #0 #1 1 0 and < rank #0 + 1 / lastrank 2 or checkaleap #0 #1 0 -1 363 def White_Chinese_Pawn-Range leaps #0 1 0 364 def Black_Chinese_Pawn-Range leaps #0 1 0 365 set White_Chinese_Pawn-Desc "The %s may move one space forward. Once it has reached the other side of the board, it may also move one space sideways." 366 set Black_Chinese_Pawn-Desc "The %s may move one space forward. Once it has reached the other side of the board, it may also move one space sideways." 367 def White_Colonel checkride #0 #1 1 0 or checkleap #0 #1 1 2 and >= rank #1 rank #0 or checkleap #0 #1 1 1 or checkleap #0 #1 1 0 368 def White_Colonel mergeall rays #0 1 0 leaps #0 1 2 leaps #0 1 1 369 set White_Colonel-Desc "The %s may move forward or sideways as a Rook, forward as a Knight, and one space in any direction as a King." 370 def Black_Colonel checkride #0 #1 1 0 or checkleap #0 #1 1 2 and <= rank #1 rank #0 or checkleap #0 #1 1 1 or checkleap #0 #1 1 0 371 def Black_Colonel mergeall rays #0 1 0 leaps #0 1 2 leaps #0 1 1 372 set Black_Colonel-Desc "The %s may move forward or sideways as a Rook, forward as a Knight, and one space in any direction as a King." 373 def Dabbabah checkleap #0 #1 0 2 374 def Dabbabah-Range leaps #0 0 2 375 set Dabbabah-Desc "The %s may leap two spaces vertically or horizontally." 376 def Dabbabahrider checkride #0 #1 0 2 377 def Dabbabahrider-Range rays #0 0 2 378 set Dabbabahrider-Desc "The %s may make any number of two space orthogonal leaps in the same direction until it reaches an occupied space." 379 def Dragon_Horse checkride #0 #1 1 1 or checkleap #0 #1 1 0 380 def Dragon_Horse-Range merge leaps #0 1 0 rays #0 1 1 381 set Dragon_Horse-Desc "The %s may move along diagonals as a Bishop or move one space orthogonally as a Wazir." 382 def Dragon_King checkride #0 #1 1 0 or checkleap #0 #1 1 1 383 def Dragon_King-Range merge leaps #0 1 1 rays #0 1 0 384 set Dragon_King-Desc "The %s may move along its rank or file as a Rook or one space diagonally as a Ferz." 385 def Elephant checkleap #0 #1 2 2 386 def Elephant-Range leaps #0 2 2 387 set Elephant-Desc "The %s may leap two spaces in any diagonal direction." 388 def Elephantrider checkride #0 #1 2 2 389 def Elephantrider-Range rays #0 2 2 390 set Elephantrider-Desc "The %s may make a series of two-space diagonal leaps in the same direction. Each leap but the last must be to an empty space, though a leap may take it over an intervening piece." 391 def Eques_Rex checkleap #0 #1 1 1 or checkleap #0 #1 1 0 or checkleap #0 #1 1 2 392 def Eques_Rex-Range merge leaps #0 1 2 merge leaps #0 1 0 leaps #0 1 1 393 set Eques_Rex-Desc "The %s may move to any adjacent space as a King or leap like a Knight." 394 def Fad checkleap #0 #1 1 1 or checkleap #0 #1 2 2 or checkleap #0 #1 2 0 395 def Fad-Range mergeall leaps #0 1 1 leaps #0 2 2 leaps #0 2 0 396 set Fad-Desc "The %s may move one space diagonally, or it may leap two spaces diagonally or orthogonally." 397 def Ferz checkleap #0 #1 1 1 398 def Ferz-Range leaps #0 1 1 399 set Ferz-Desc "The %s may move one space diagonally." 400 def Fibnif checkleap #0 #1 1 2 or checkleap #0 #1 1 1 and == 1 abs - file #0 file #1 401 def Fibnif-Range merge leaps #0 1 2 leaps #0 1 1 402 set Fibnif-Desc "The %s may move one space diagonally or leap as a Knight to any space that is one file and two ranks away." 403 def Giraffe checkleap #0 #1 1 4 404 def Giraffe-Range leaps #0 1 4 405 set Giraffe-Desc "The %s may leap to any space that is one file and four ranks or one rank and four files away." 406 def White_Gold_General checkaleap #0 #1 1 1 or checkaleap #0 #1 -1 1 or checkleap #0 #1 0 1 407 def White_Gold_General-Range mergeall leaps #0 1 0 where #0 1 1 where #0 -1 1 408 set White_Gold_General-Desc "The %s may move one space in any orthgonal direction or one space diagonally forward." 409 def Black_Gold_General checkaleap #0 #1 1 -1 or checkaleap #0 #1 -1 -1 or checkleap #0 #1 0 1 410 def Black_Gold_General-Range mergeall leaps #0 1 0 where #0 1 -1 where #0 -1 -1 411 set Black_Gold_General-Desc "The %s may move one space in any orthgonal direction or one space diagonally forward." 412 def Grasshopper checkgrasshop #0 #1 1 1 or checkgrasshop #0 #1 1 0 413 def Grasshopper-Range merge rays #0 1 0 rays #0 1 1 414 set "The %s moves any number of spaces orthogonally or diagonally like a Queen except that it must hop over exactly one piece, and it must end its move immediately after the piece it hopped over." 415 def Griffon fn (checkride #0 #1 1 0 and empty #0) where #0 sign - file #1 file #0 sign - rank #1 rank #0 #1 and != file #1 file #0 and != rank #1 rank #0 or checkleap #0 #1 1 1 416 def Griffon-Range mergeall leaps #0 1 1 rays where #0 1 1 1 0 rays where #0 1 -1 1 0 rays where #0 -1 -1 1 0 rays where #0 -1 1 1 0 417 set Griffon-Desc "The %s may move one space diagonally, and it may continue its move by moving as a Rook in an outward orthogonal direction. It may not pass over other pieces." 418 def King checkleap #0 #1 1 1 or checkleap #0 #1 1 0 419 def King-Range merge leaps #0 1 0 leaps #0 1 1 420 set King-Desc "The %s leaps one space in any direction. It may castle with a Rook on its first move so long as it is not in check, there is nothing in between it and the Rook, it doesn't pass through check while castling, and the Rook hasn't moved. In castling, it moves two spaces toward the Rook, and the Rook moves to the space the %s passed over." 421 sub King from to 422 if not fn King #from #to 423 verify sub castle #from #to and match #to var cond isupper space #to wcastle bcastle 424 endif 425 if isupper space #to 426 set Kpos #to 427 else 428 set kpos #to 429 endif 430 return true 431 endsub 432 def Knight checkleap #0 #1 1 2 433 def Knight-Range leaps #0 1 2 434 set Knight-Desc "The %s may leap to any space that is one rank and two files away or two ranks and one file away." 435 def Korean_Elephant checkpath #0 #1 1 0 1 1 1 1 436 def Korean_Elephant-Range leaps #0 2 3 437 set "The %s may move one space orthogonally, followed by two more spaces in the same outward diagonal direction. It must complete every part of its move, and it may not pass over an occupied space." 438 def White_Lance checkaride #0 #1 0 1 439 def White_Lance-Range ray #0 0 1 440 set "The %s may move forward in its file as a Rook." 441 def Black_Lance checkaride #0 #1 0 -1 442 def Black_Lance-Range ray #0 0 -1 443 set "The %s may move forward in its file as a Rook." 444 def Leo fn Vao #0 #1 or fn Cannon #0 #1 445 def Leo-Range merge rays #0 1 0 rays #0 1 1 446 set Leo-Desc "The %s may move any number of spaces diagonally or orthogonally, as a Queen does, but it must hop over one intervening piece when it captures." 447 def Mao checktwostep #0 #1 0 1 1 1 448 def Mao-Range leaps #0 1 2 449 set Mao-Desc "The %s moves one space orthogonally, followed by one more space in an outward diagonal direction. It must complete both parts of its move, and it may not pass over an occupied space. It can reach the same spaces as a Knight except that it can be blocked on the first step of its two-space move." 450 def Marshall fn Knight #0 #1 or fn Rook #0 #1 451 def Marshall-Range merge rays #0 1 0 leaps #0 1 2 452 set Marshall-Desc "The %s moves orthogonally as a Rook or leaps as a Knight." 453 def Moa checktwostep #0 #1 1 1 0 1 454 def Moa-Range leaps #0 1 2 455 set Moa-Desc "The %s moves one space diagonally, followed by one more space in an outward orthogonal direction. It must complete both parts of its move, and it may not pass over an occupied space. It can reach the same spaces as a Knight except that it can be blocked on the first step of its two-space move." 456 def Murray_Lion checkleap #0 #1 1 0 or checkleap #0 #1 1 1 and cond empty #0 capture (not empty #1) or checkleap #0 #1 2 2 or checkleap #0 #1 0 2 457 def Murray_Lion-Range merge merge leaps #0 2 0 leaps #0 2 2 merge leaps #0 1 0 leaps #0 1 1 458 set Murray_Lion-Desc "The %s may leap two spaces in any diagonal or orthogonal direction, and it may capture (but not otherwise move) one space in any direction." 459 def Nightrider checkride #0 #1 1 2 460 def Nightrider-Range rays #0 1 2 461 set Nightrider-Desc "The %s may leap as a Knight any number of times in the same direction. While each Knight leap may take it over other pieces, each leap but the last must be to an empty space." 462 set White_Pawn-Desc "The %s may move one space straight forward without capturing, or it may move one space diagonally forward to capture. On its first move, it may move two spaces forward without capturing so long as it isn't blocked. If this move takes it over a space an enemy %s could have captured it on if it had moved there, that %s may immediately capture it by en passant by moving to that space. On reaching the last rank, it must promote to any other piece except the King." 463 set Black_Pawn-Desc var White_Pawn-Desc 464 def White_Pawn remove var ep and < rankname #1 var bpr and < rankname var ep rankname #1 and == filename var ep filename #1 and checkleap #0 #1 1 1 and var ep or and checkride #0 #1 0 1 == rankname #0 var wpr or checkleap #0 #1 0 1 and empty #1 and != var movetype CHECK or and not empty #1 checkleap #0 #1 1 1 and any onboard where #1 0 1 == var movetype CHECK count var wprom and <= distance #0 #1 var fps and > rank #1 rank #0 465 def Black_Pawn remove var ep and > rankname #1 var wpr and > rankname var ep rankname #1 and == filename var ep filename #1 and checkleap #0 #1 1 1 and var ep or and checkride #0 #1 0 1 == rankname #0 var bpr or checkleap #0 #1 0 1 and empty #1 and != var movetype CHECK or and not empty #1 checkleap #0 #1 1 1 and any count var bprom onboard where #1 0 -1 == var movetype CHECK and <= distance #0 #1 var fps and < rank #1 rank #0 466 def White_Pawn-Range filter lambda (onboard #1) mergeall where #ori -1 1 where #ori 1 1 values lambda (where #ori 0 #1) range 1 var fps =ori 467 def Black_Pawn-Range filter lambda (onboard #1) mergeall where #ori -1 -1 where #ori 1 -1 values lambda (where #ori 0 neg #1) range 1 var fps =ori 468 def White_Pawn-Promote var wprom 469 def Black_Pawn-Promote var bprom 470 sub White_Pawn from to 471 my newpiece 472 my newmove 473 my prom 474 verify > rank #to rank #from 475 verify <= distance #to #from #fps 476 if capture 477 verify checkleap #from #to 1 1 478 set ep false 479 elseif checkleap #from #to 1 1 and #ep 480 verify == filename var ep filename #to 481 verify < rankname var ep rankname #to 482 verify < rankname #to var bpr 483 capture #ep 484 set ep false 485 elseif > distance #to #from 1 486 verify == rankname #from #wpr 487 verify checkride #from #to 0 1 488 set ep #to 489 else 490 verify checkleap #from #to 0 1 491 set ep false 492 endif 493 set prom fn White_Pawn-Promote #to 494 if onboard where #to 0 #pzs 495 if != space #to $moved 496 set name alias const alias $moved 497 die "You may not promote a" #name "until it reaches the promotion zone." 498 endif 499 elseif onboard where #to 0 1 500 if == White_Pawn const alias space #to and count var prom 501 if not $answered and == mln $maxmln and not strstr thismove chr 59 502 if not match alias space #to var prom 503 push prom space #to 504 endif 505 askpromote #prom 506 endif 507 elseif not match space #to var prom and != White_Pawn const alias space #to 508 set name alias const alias $moved 509 set newname alias const alias space #to 510 set msg list "You may not promote your" #name "to a" join #newname ".
" 511 set msg str_replace "_" " " var msg 512 die #msg 513 endif 514 elseif count var prom 515 if == White_Pawn const alias space #to 516 if == count var prom 1 517 set newpiece alias list var prom 518 set pieceid realname #newpiece 519 set newmove join #newpiece "-dest" 520 add #pieceid $dest 521 appendmove #newmove 522 else 523 askpromote #prom 524 endif 525 elseif not match alias space #to var prom 526 set name alias const alias $moved 527 set newname alias const alias space #to 528 set msg list "You may not promote your" #name "to a" join #newname ".
" 529 set msg str_replace "_" " " var msg 530 die #msg 531 endif 532 else 533 set name alias const alias $moved 534 set msg list "You may not advance your" #name "to the last rank, because there is nothing you may promote it to." 535 set msg str_replace "_" " " var msg 536 die #msg 537 endif 538 set nopvc 0 539 return true 540 endsub 541 sub Black_Pawn from to 542 my newpiece, pieceid 543 my newmove 544 my prom 545 verify < rank #to rank #from 546 verify <= distance #to #from #fps 547 if capture 548 verify checkleap #from #to 1 1 549 set ep false 550 elseif checkleap #from #to 1 1 and #ep 551 verify == filename var ep filename #to 552 verify > rankname var ep rankname #to 553 verify > rankname #to var wpr 554 capture #ep 555 set ep false 556 elseif > distance #to #from 1 557 verify == rankname #from #bpr 558 verify checkride #from #to 0 1 559 set ep #to 560 else 561 verify checkleap #from #to 0 1 562 set ep false 563 endif 564 set prom fn Black_Pawn-Promote #to 565 if onboard where #to 0 neg #pzs 566 if != space #to $moved 567 set name alias const alias $moved 568 die "You may not promote a" #name "until it reaches the promotion zone." 569 endif 570 elseif onboard where #to 0 -1 571 if == Black_Pawn const alias space #to and count var prom 572 if not $answered and == mln $maxmln and not strstr thismove chr 59 573 push prom space #to 574 askpromote #prom 575 endif 576 elseif not match space #to var prom and != Black_Pawn const alias space #to 577 set name alias const alias $moved 578 set newname alias const alias space #to 579 set msg list "You may not promote your" #name "to a" join #newname ".
" 580 set msg str_replace "_" " " var msg 581 die #msg 582 endif 583 elseif count var prom 584 if == Black_Pawn const alias space #to 585 if == count var prom 1 586 set newpiece alias list var prom 587 set newmove join #newpiece "-dest" 588 set pieceid realname var newpiece 589 add #pieceid $dest 590 appendmove #newmove 591 else 592 askpromote #prom 593 endif 594 elseif not match alias space #to var prom 595 set name alias const alias $moved 596 set newname alias const alias space #to 597 set msg list "You may not promote your" #name "to a" join #newname ".
" 598 set msg str_replace "_" " " var msg 599 die #msg 600 endif 601 else 602 set name alias const alias $moved 603 set msg list "You may not advance your" #name "to the last rank, because there is nothing you may promote it to." 604 set msg str_replace "_" " " var msg 605 die #msg 606 endif 607 set nopvc 0 608 return true 609 endsub 610 set White_Quick_Pawn-Desc "The %s may move one or two spaces straight forward without capturing, or it may move one space diagonally forward to capture. If its two-space move takes it over a space an enemy %s could have captured it on if it had moved there, that %s may immediately capture it by en passant by moving to that space. On reaching the last rank, it must promote to any other piece except the King." 611 set Black_Quick_Pawn-Desc var White_Quick_Pawn-Desc 612 def White_Quick_Pawn remove var ep and < rankname #1 rankname var epf and < rankname var ep rankname #1 and == filename var ep filename #1 and checkleap #0 #1 1 1 and var ep or checkride #0 #1 0 1 and empty #1 and != var movetype CHECK or and or not empty #1 == var movetype CHECK checkleap #0 #1 1 1 and any onboard where #1 0 1 == var movetype CHECK count var wprom and <= distance #0 #1 var fps and > rank #1 rank #0 613 def Black_Quick_Pawn remove var ep and > rankname #1 rankname var epf and > rankname var ep rankname #1 and == filename var ep filename #1 and checkleap #0 #1 1 1 and var ep or checkride #0 #1 0 1 and empty #1 and != var movetype CHECK or and or not empty #1 == var movetype CHECK checkleap #0 #1 1 1 and any count var bprom onboard where #1 0 -1 == var movetype CHECK and <= distance #0 #1 var fps and < rank #1 rank #0 614 def White_Quick_Pawn-Range filter lambda (onboard #1) mergeall where #ori -1 1 where #ori 1 1 values lambda (where #ori 0 #1) range 1 var fps =ori 615 def Black_Quick_Pawn-Range filter lambda (onboard #1) mergeall where #ori -1 -1 where #ori 1 -1 values lambda (where #ori 0 neg #1) range 1 var fps =ori 616 def White_Quick_Pawn-Promote var wprom 617 def Black_Quick_Pawn-Promote var bprom 618 sub White_Quick_Pawn from to 619 my newpiece 620 my newmove 621 my prom 622 verify > rank #to rank #from 623 verify <= distance #to #from #fps 624 if capture 625 verify checkleap #from #to 1 1 626 set epf false 627 set ep false 628 elseif checkleap #from #to 1 1 and #ep 629 verify == filename var ep filename #to 630 verify < rankname var ep rankname #to 631 verify < rankname #to rankname var epf 632 capture #ep 633 set epf false 634 set ep false 635 elseif > distance #to #from 1 636 verify checkride #from #to 0 1 637 set epf #from 638 set ep #to 639 else 640 verify checkleap #from #to 0 1 641 set epf false 642 set ep false 643 endif 644 set prom fn White_Quick_Pawn-Promote #to 645 if onboard where #to 0 #pzs 646 if != space #to $moved 647 set name alias const alias $moved 648 die "You may not promote a" #name "from" $moved "to" {space #to} "until it reaches the promotion zone." 649 endif 650 elseif onboard where #to 0 1 651 if == White_Quick_Pawn const alias space #to and count var prom 652 if not $answered and == mln $maxmln and not strstr thismove chr 59 653 if not match alias space #to var prom 654 push prom space #to 655 endif 656 askpromote #prom 657 endif 658 elseif not match space #to var prom and != White_Quick_Pawn const alias space #to 659 set name alias const alias $moved 660 set newname alias const alias space #to 661 set msg list "You may not promote your" #name "to a" join #newname ".
" 662 set msg str_replace "_" " " var msg 663 die #msg 664 endif 665 elseif count var prom 666 if == White_Quick_Pawn const alias space #to 667 if == count var prom 1 668 set newpiece alias list var prom 669 set pieceid realname #newpiece 670 set newmove join #newpiece "-dest" 671 add #pieceid $dest 672 appendmove #newmove 673 else 674 askpromote #prom 675 endif 676 elseif not match alias space #to var prom 677 set name alias const alias $moved 678 set newname alias const alias space #to 679 set msg list "You may not promote your" #name "to a" join #newname ".
" 680 set msg str_replace "_" " " var msg 681 die #msg 682 endif 683 else 684 set name alias const alias $moved 685 set msg list "You may not advance your" #name "to the last rank, because there is nothing you may promote it to." 686 set msg str_replace "_" " " var msg 687 die #msg 688 endif 689 set nopvc 0 690 return true 691 endsub 692 sub Black_Quick_Pawn from to 693 my newpiece, pieceid 694 my newmove 695 my prom 696 verify < rank #to rank #from 697 verify <= distance #to #from #fps 698 if capture 699 verify checkleap #from #to 1 1 700 set ep false 701 set epf false 702 elseif checkleap #from #to 1 1 and #ep 703 verify == filename var ep filename #to 704 verify > rankname var ep rankname #to 705 verify > rankname #to rankname var epf 706 capture #ep 707 set ep false 708 set epf false 709 elseif > distance #to #from 1 710 verify checkride #from #to 0 1 711 set ep #to 712 set epf #from 713 else 714 verify checkleap #from #to 0 1 715 set ep false 716 set epf false 717 endif 718 set prom fn Black_Quick_Pawn-Promote #to 719 if onboard where #to 0 neg #pzs 720 if != space #to $moved 721 set name alias const alias $moved 722 die "You may not promote a" #name "until it reaches the promotion zone." 723 endif 724 elseif onboard where #to 0 -1 725 if == Black_Quick_Pawn const alias space #to and count var prom 726 if not $answered and == mln $maxmln and not strstr thismove chr 59 727 push prom space #to 728 askpromote #prom 729 endif 730 elseif not match space #to var prom and != Black_Quick_Pawn const alias space #to 731 set name alias const alias $moved 732 set newname alias const alias space #to 733 set msg list "You may not promote your" #name "to a" join #newname ".
" 734 set msg str_replace "_" " " var msg 735 die #msg 736 endif 737 elseif count var prom 738 if == Black_Quick_Pawn const alias space #to 739 if == count var prom 1 740 set newpiece alias list var prom 741 set newmove join #newpiece "-dest" 742 set pieceid realname var newpiece 743 add #pieceid $dest 744 appendmove #newmove 745 else 746 askpromote #prom 747 endif 748 elseif not match alias space #to var prom 749 set name alias const alias $moved 750 set newname alias const alias space #to 751 set msg list "You may not promote your" #name "to a" join #newname ".
" 752 set msg str_replace "_" " " var msg 753 die #msg 754 endif 755 else 756 set name alias const alias $moved 757 set msg list "You may not advance your" #name "to the last rank, because there is nothing you may promote it to." 758 set msg str_replace "_" " " var msg 759 die #msg 760 endif 761 set nopvc 0 762 return true 763 endsub 764 def Queen fn Bishop #0 #1 or fn Rook #0 #1 765 def Queen-Range merge rays #0 1 0 rays #0 1 1 766 set Queen-Desc "The %s may move as a Rook or a Bishop." 767 def Rhino windingride #0 #1 1 0 1 1 or windingride #0 #1 0 1 1 1 768 def Rhino-Range merge eval (windingrays #0 1 0 1 1) windingrays #0 0 1 1 1 769 set Rhino-Desc "The %s moves along a winding path that alternates between the same one-space orthogonal move and the same one-space diagonal move both in the same general direction." 770 def Rook checkride #0 #1 1 0 771 def Rook-Range rays #0 1 0 772 set Rook-Desc "The %s may move any number of spaces in any vertical or horizontal direction until it reaches an occupied space." 773 def Short_Rook checkride #0 #1 1 0 and <= distance #0 #1 4 774 def Short_Rook-Range merge merge leaps #0 1 0 leaps #0 2 0 merge leaps #0 3 0 leaps #0 4 0 775 set "The %s may move up to four spaces along its rank or file as a Rook." 776 def White_Shogi_Knight checkaleap #0 #1 1 2 or checkaleap #0 #1 -1 2 777 def White_Shogi_Knight-Range array where #0 1 2 where #0 -1 2 778 set White_Shogi_Knight-Desc "The %s may leap to either space that is two ranks ahead and one file to the side." 779 def Black_Shogi_Knight checkaleap #0 #1 1 -2 or checkaleap #0 #1 -1 -2 780 def Black_Shogi_Knight-Range array where #0 1 -2 where #0 -1 -2 781 set Black_Shogi_Knight-Desc "The %s may leap to either space that is two ranks ahead and one file to the side." 782 def White_Shogi_Pawn checkaleap #0 #1 0 1 783 def White_Shogi_Pawn-Range array where #0 0 1 784 set White_Shogi_Pawn-Desc "The %s map move one space forward in the same file." 785 def Black_Shogi_Pawn checkaleap #0 #1 0 -1 786 def Black_Shogi_Pawn-Range array where #0 0 -1 787 set Black_Shogi_Pawn-Desc "The %s map move one space forward in the same file." 788 def White_Silver_General checkaleap #0 #1 0 1 or checkleap #0 #1 1 1 789 def White_Silver_General-Range mergeall leaps #0 1 1 where #0 0 1 790 set White_Silver_General-Desc "The %s may move one space in any diagonal direction or one space vertically foward." 791 def Black_Silver_General checkaleap #0 #1 0 -1 or checkleap #0 #1 1 1 792 def Black_Silver_General-Range mergeall leaps #0 1 1 where #0 0 -1 793 set Black_Silver_General-Desc "The %s may move one space in any diagonal direction or one space vertically foward." 794 def Squirrel fn Elephant #0 #1 or fn Dabbabah #0 #1 or fn Knight #0 #1 795 def Squirrel-Range mergeall leaps #0 2 2 leaps #0 2 0 leaps #0 1 2 796 set Squirrel-Desc "The %s may leap any non-adjacent space that is no more than two spaces away." 797 def Spider fn Dabbabah #0 #1 or fn Elephant #0 #1 798 def Spider-Range merge leaps #0 2 2 leaps #0 0 2 799 set Spider-Desc "The %s may leap to any space that is two spaces away orthogonally or diagonally." 800 def Spider-rider fn Dabbabahrider #0 #1 or fn Elephantrider #0 #1 801 def Spider-rider-Range merge rays #0 2 2 rays #0 0 2 802 set Spider-rider-Desc "The %s may make any number of two-space leaps in a single orthogonal or diagonal direction. While each leap may take it over an occupied space, each leap but the last must be to an empty space." 803 def Squire checktwostep #0 #1 0 1 1 1 or checktwostep #0 #1 1 1 0 1 804 def Squire-Range leaps #0 1 2 805 set Squire-Desc "The %s may move one space orthogonally, followed by one more space in an outward diagonal direction, or it may move one space diagonally, followed by one more space in an outward orthogonal direction. It must complete both parts of its move, and it may not pass over an occupied space. It can reach the same spaces as a Knight except that it can be blocked on the first step of its two-space move." 806 def Unicorn fn Nightrider #0 #1 or fn Bishop #0 #1 807 def Unicorn-Range merge rays #0 1 2 rays #0 1 1 808 set Unicorn-Desc "The %s may make consecutive Knight moves in the same direction, as a Nightrider does, or it may move diagonally as a Bishop." 809 def Vao cond cond empty #0 capture (not empty #1) (checkhop #0 #1 1 1) (checkride #0 #1 1 1) and #1 810 def Vao-Range rays #0 1 1 811 set Vao-Desc "The %s may move diagonally as a Bishop, but it must hop over exactly one intervening piece when it captures." 812 def Wazir checkleap #0 #1 1 0 813 def Wazir-Range leaps #0 1 0 814 set Wazir-Desc "The %s may move one space horizontally or vertically." 815 def Wizard fn Ferz #0 #1 or fn Camel #0 #1 816 def Wizard-Range merge leaps #0 1 1 leaps #0 1 3 817 set Wizard-Desc "The %s may move one space diagonally, or it may leap to a space three ranks and one file or three files and one rank away, as a Camel does." 818 def Woody_Rook checkleap #0 #1 0 2 or checkleap #0 #1 0 1 819 def Woody_Rook-Range merge leaps #0 0 1 leaps #0 0 2 820 set Woody_Rook-Desc "The %s may leap one or two spaces orthogonally. It may pass over another piece when moving two spaces." 821 def Zebra checkleap #0 #1 2 3 822 def Zebra-Range leaps #0 2 3 823 set Zebra-Desc "The %s may leap to any space that is 2 ranks and 3 files or 2 files and 3 ranks away." 824 def Elephant_Ferz fn Ferz #0 #1 or fn Elephant #0 #1 825 def Elephant_Ferz-Range merge leaps #0 2 2 leaps #0 1 1 826 set Elephant_Ferz-Desc "The %s may leap one or two spaces diagonally. It may pass over another piece when moving two spaces." 827 def Elephant_Wazir fn Wazir #0 #1 or fn Elephant #0 #1 828 def Elephant_Wazir-Range merge leaps #0 2 2 leaps #0 1 0 829 set Elephant_Wazir-Desc "The %s may move one space orthogonally, as a Wazir, or leap two spaces diagonally, as an Elephant." 830 def Kylin fn Ferz #0 #1 or fn Dabbabah #0 #1 831 def Kylin-Range mergeall leaps #0 1 1 leaps #0 2 0 832 set Kylin-Desc "The %s may move one space diagonally, or it may leap 2 spaces orthogonally, passing over any pieces in the way." 833 def Half_Duck fn Ferz #0 #1 or fn Dabbabah #0 #1 or checkleap #0 #1 3 0 834 def Half_Duck-Range mergeall leaps #0 1 1 leaps #0 2 0 leaps #0 3 0 835 set Half_Duck-Desc "The %s may move one space diagonally, or it may leap 2 or 3 spaces orthogonally, passing over any pieces in the way." 836 def Knight_Wazir fn Knight #0 #1 or fn Wazir #0 #1 837 def Knight_Wazir-Range merge leaps #0 1 2 leaps #0 1 0 838 set Knight_Wazir-Desc "The %s may move one space orthogonally, as a Wazir, or it may leap as a Knight to any space one file and two ranks or two files and one rank away." 839 def Frog fn Ferz #0 #1 or checkleap #0 #1 3 0 840 def Frog-Range merge leaps #0 1 1 leaps #0 3 0 841 set Frog-Desc "The %s may move one space diagonally or directly leap 3 spaces orthogonally." 842 def Buffalo fn Knight #0 #1 or fn Camel #0 #1 or fn Zebra #0 #1 843 def Buffalo-Range mergeall leaps #0 1 2 leaps #0 1 3 leaps #0 2 3 844 set Buffalo-Desc "The %s Buffalo may leap (1, 2) as a Knight, (1, 3) as a Camel, or (2, 3) as a Zebra." 845 def @ false 846 sub attacked start finish 847 my from piece actual 848 local movetype 849 set movetype MOVE 850 if empty #start 851 set actual true 852 move #finish #start 853 add $old #finish 854 endif 855 if isupper space #start 856 def enemies onlylower 857 else 858 def enemies onlyupper 859 endif 860 for (from piece) fn enemies 861 if fn const alias #piece #from #to 862 if #actual 863 move #start #finish 864 endif 865 return #from 866 endif 867 next 868 if #actual 869 move #start #finish 870 endif 871 return false 872 endsub 873 sub fission-attacked start finish 874 my from piece p1 p2 875 local movetype 876 set p1 space #start 877 set p2 space #finish 878 set movetype CHECK 879 if isupper #p1 880 def enemies onlylower 881 else 882 def enemies onlyupper 883 endif 884 empty #finish 885 for (from piece) fn enemies 886 if fn const alias #piece #from #start 887 add #p2 #finish 888 return #from 889 endif 890 next 891 add #p2 #finish 892 return false 893 endsub 894 sub checked king 895 my from piece 896 local movetype 897 set movetype CHECK 898 if isupper cond empty var king $moved space var king 899 def enemies onlylower 900 else 901 def enemies onlyupper 902 endif 903 for (from piece) fn enemies 904 if fn const alias #piece #from var king and isfunc const alias #piece 905 return #from 906 endif 907 next 908 return false 909 endsub 910 def checked anytrue lambda (fn const alias #0 var key var king) cond isupper space var king (onlylower) (onlyupper) =movetype CHECK =king 911 def threatened anytrue lambda (fn const alias space #0 #0 var king) elem var king threats =movetype CHECK =king 912 sub uncheckedpath start finish 913 my from to piece kingpos 914 local movetype 915 set movetype CHECK 916 if empty #finish 917 set kingpos #start 918 else 919 set kingpos #finish 920 endif 921 if isupper space #kingpos 922 def enemies onlylower 923 else 924 def enemies onlyupper 925 endif 926 for to path #start #finish 927 move #kingpos #to 928 for (from piece) fn enemies 929 if fn const alias #piece #from #to 930 move #to #kingpos 931 return false 932 endif 933 next 934 move #to #kingpos 935 next 936 return true 937 endif 938 sub uncheckedknightleap start finish 939 my from to piece kingpos kingpiece checkedpaths 940 local movetype 941 set movetype CHECK 942 if empty #start 943 set kingpos #finish 944 else 945 set kingpos #start 946 endif 947 if isupper space #kingpos 948 def enemies onlylower 949 else 950 def enemies onlyupper 951 endif 952 set kingpiece space #kingpos 953 set avenues merge intersection leaps #start 1 0 leaps #finish 1 1 intersection leaps #start 1 1 leaps #finish 1 0 954 set checkdpaths 0 955 for to #avenues 956 if empty #to 957 move #kingpos #to 958 else 959 empty #kingpos 960 endif 961 for (from piece) fn enemies 962 if fn const alias #piece #from #to 963 inc checkedpaths 964 break 965 endif 966 next 967 if == space #to #kingpiece 968 move #to #kingpos 969 else 970 add #kingpiece #kingpos 971 endif 972 if == checkedpaths 0 973 break 974 endif 975 next 976 return < var checkedpaths 2 977 endif 978 sub castle from to 979 local coord RPOS RDEST xdir 980 if not flag #from 981 die A King may not castle after it moves. 982 endif 983 if capture 984 die A King may not castle to an occupied space. 985 endif 986 set xdir sign minus file #to file #from 987 if not checkaride #from #to #xdir 0 988 die A King may not castle across any occupied space. 989 endif 990 set coord #to 991 do 992 set coord where #coord #xdir 0 993 if flag #coord 994 break 995 elseif not onboard #coord 996 die No piece was found to castle with. 997 elseif not empty #coord 998 die The King cannot castle with the piece at #coord 999 endif 1000 loop 1001 set RPOS #coord 1002 move #to #from 1003 if sub checked #from 1004 die A King may not castle out of check. 1005 endif 1006 store 1007 for coord path #from #to 1008 move #from #coord 1009 if sub checked #coord 1010 die A King may not castle through check. 1011 endif 1012 restore 1013 next 1014 move #from #to 1015 set RDEST where #to neg #xdir 0 1016 move #RPOS #RDEST 1017 return true 1018 endsub 1019 sub castlepos from to 1020 local coord RPOS RDEST xdir safe 1021 verify flag #from 1022 verify empty #to 1023 set xdir sign minus file #to file #from 1024 verify checkaride #from #to #xdir 0 1025 verify not sub checked #from 1026 set coord #to 1027 do 1028 set coord where #coord #xdir 0 1029 if flag #coord 1030 break 1031 endif 1032 verify onboard #coord 1033 verify empty #coord 1034 loop 1035 verify flag #coord 1036 set RPOS #coord 1037 store 1038 for coord path #from #to 1039 move #from #coord 1040 set safe not sub checked #coord 1041 restore 1042 verify #safe 1043 next 1044 move #from #to 1045 set RDEST where #to neg #xdir 0 1046 move #RPOS #RDEST 1047 set safe not sub checked #to 1048 restore 1049 return #safe 1050 endsub 1051 sub castle2 kingfrom kingto rookfrom rookto 1052 local coord xdir king rook 1053 if not flag #kingfrom 1054 die A King may not castle after it moves. 1055 endif 1056 if not flag #rookfrom 1057 die A King may not castle with a piece that has already moved. 1058 endif 1059 if not match @ $lastcaptured $prevcaptured 1060 die Castling to an occupied space is not allowed. 1061 endif 1062 if empty #kingto 1063 die There is nothing on #kingto. Did you move a piece there and then move it away? 1064 endif 1065 if empty #rookto 1066 die There is nothing on #rookto. Did you move a piece there and then move it away? 1067 endif 1068 set king space #kingto 1069 set rook space #rookto 1070 if == #king #rook 1071 die "Castling must be between different pieces. These two are both {#king}. What happened?" 1072 endif 1073 empty #kingto 1074 empty #rookto 1075 add #king #kingfrom 1076 add #rook #rookfrom 1077 set xdir sign minus file #kingto file #kingfrom 1078 if not checkaride #kingfrom #kingto #xdir 0 1079 die A King may not castle across any occupied space. 1080 endif 1081 if not checkaride #rookto #rookfrom #xdir 0 1082 die A Rook may not castle across an occupied space. 1083 endif 1084 if sub checked #kingfrom 1085 die A King may not castle out of check. 1086 endif 1087 store 1088 for coord path #kingfrom #kingto 1089 move #kingfrom #coord 1090 if sub checked #coord 1091 die A King may not castle through check. 1092 endif 1093 restore 1094 next 1095 empty #kingfrom 1096 empty #rookfrom 1097 add #king #kingto 1098 add #rook #rookto 1099 unsetflag #kingfrom #rookfrom 1100 if isupper space #kingto 1101 set Kpos #kingto 1102 else 1103 set kpos #kingto 1104 endif 1105 return true 1106 endsub 1107 sub castlepos2 kingfrom kingto rookfrom rookto 1108 echo "Calling castlepos2" #kingfrom #kingto #rookfrom #rookto 1109 local coord xdir safe 1110 verify flag #kingfrom and flag #rookfrom 1111 echo "Verified flags" 1112 verify empty #kingto or == #kingto #rookfrom 1113 verify empty #rookto or == #rookto #kingfrom 1114 echo "Verified empty destinations" 1115 set xdir sign minus file #kingto file #kingfrom 1116 echo "xdir is {#xdir}" 1117 verify checkride #kingfrom #kingto #xdir 0 1118 echo "Verified checkride {#kingfrom} {#kingto} {#xdir} 0" 1119 verify checkride #rookto #rookfrom #xdir 0 1120 echo "Verified checkride {#kingto} {#kingfrom} {#xdir} 0" 1121 verify not sub checked #kingfrom 1122 echo "Verified not checked" 1123 store 1124 for coord path #kingfrom #kingto 1125 move #kingfrom #coord 1126 set safe not sub checked #coord 1127 restore 1128 verify #safe 1129 next 1130 move #kingfrom #kingto 1131 move #rookfrom #rookto 1132 set safe not sub checked #kingto 1133 restore 1134 return #safe 1135 endsub 1136 sub stalemated kingpos 1137 store 1138 local cspaces friend friends from king piece to movetype np prom promfn 1139 set movetype MOVE 1140 set king alias space #kingpos 1141 if hasupper #king 1142 set friends lambda (onlyupper) 1143 set free lambda (haslower #0 or not hasupper #0) 1144 set pzone lambda (not onboard where #0 0 var pzs) 1145 set cspaces var wcastle 1146 set prom var wprom 1147 else 1148 set friends lambda (onlylower) 1149 set free lambda (hasupper #0 or not haslower #0) 1150 set pzone lambda (not onboard where #0 0 neg var pzs) 1151 set cspaces var bcastle 1152 set prom var bprom 1153 endif 1154 store 1155 for (from piece) fn #friends 1156 set af alias #from 1157 for to fn join const alias #piece "-Range" #from 1158 set at alias #to 1159 if fn const alias #piece #from #to and fn #free alias space #to and onboard #to 1160 set ap alias #piece 1161 move #from #to 1162 if not sub checked cond == #from #kingpos #to #kingpos 1163 set promfn join const alias #piece "-Promote" 1164 if fn #pzone #to and match #piece #promotable 1165 if > count var prom 0 1166 for np var prom 1167 setlegal "{#ap} {#af}-{#at}; {#np}-{#at}" 1168 next 1169 endif 1170 elseif fn #pzone #to and isfunc var promfn 1171 set prom fn var promfn #to 1172 if > count var prom 0 1173 for np var prom 1174 setlegal "{#ap} {#af}-{#at}; {#np}-{#at}" 1175 next 1176 endif 1177 elseif fn #pzone #to and match #piece #promotable 1178 if > count var prom 0 1179 for np var prom 1180 setlegal "{#ap} {#af}-{#at}; {#np}-{#at}" 1181 next 1182 endif 1183 else 1184 setlegal "{#ap} {#af}-{#at}" 1185 endif 1186 endif 1187 endif 1188 restore 1189 next 1190 next 1191 if > count var cspaces 0 1192 for to var cspaces 1193 if sub castlepos #kingpos #to 1194 setlegal "{#king} {#kingpos}-{#to}" 1195 endif 1196 next 1197 endif 1198 setsystem autorules sub describe_rules 1199 return cond count system legalmoves false true 1200 endsub 1201 sub stalemated-quick kingpos 1202 store 1203 local checked checkpos cspaces enemies friend friends from in king piece threats to movetype np prom promfn 1204 set movetype MOVE 1205 set king alias space #kingpos 1206 if hasupper #king 1207 set friends lambda (onlyupper) 1208 set enemies lambda (onlylower) 1209 set free lambda (haslower #0 or not hasupper #0) 1210 set pzone lambda (not onboard where #0 0 var pzs) 1211 set cspaces var wcastle 1212 set prom var wprom 1213 else 1214 set friends lambda (onlylower) 1215 set enemies lambda (onlyupper) 1216 set free lambda (hasupper #0 or not haslower #0) 1217 set pzone lambda (not onboard where #0 0 neg var pzs) 1218 set cspaces var bcastle 1219 set prom var bprom 1220 endif 1221 set krange merge fn join const alias space #kingpos "-Range" #kingpos #kingpos 1222 set threats () 1223 for to #krange 1224 set threats.{#to} () 1225 next 1226 for (from piece) fn #enemies 1227 set in intersection var krange fn join const alias var piece "-Range" var from 1228 for to #in 1229 push threats.{#to} #from 1230 next 1231 next 1232 store 1233 for (from piece) fn #friends 1234 set af alias #from 1235 for to fn join const alias #piece "-Range" #from 1236 set at alias #to 1237 if fn const alias #piece #from #to and fn #free alias space #to and onboard #to 1238 set ap alias #piece 1239 set checkpos cond == #from #kingpos #to #kingpos 1240 set checked false 1241 if count elem var checkpos threats 1242 move #from #to 1243 set checked fn threatened #checkpos 1244 restore 1245 endif 1246 if not #checked 1247 set promfn join const alias #piece "-Promote" 1248 if fn #pzone #to and match #piece #promotable 1249 if > count var prom 0 1250 for np var prom 1251 setlegal "{#ap} {#af}-{#at}; {#np}-{#at}" 1252 next 1253 endif 1254 elseif fn #pzone #to and isfunc var promfn 1255 set prom fn var promfn #to 1256 if > count var prom 0 1257 for np var prom 1258 setlegal "{#ap} {#af}-{#at}; {#np}-{#at}" 1259 next 1260 endif 1261 elseif fn #pzone #to and match #piece #promotable 1262 if > count var prom 0 1263 for np var prom 1264 setlegal "{#ap} {#af}-{#at}; {#np}-{#at}" 1265 next 1266 endif 1267 else 1268 setlegal "{#ap} {#af}-{#at}" 1269 endif 1270 endif 1271 endif 1272 restore 1273 next 1274 next 1275 if > count var cspaces 0 1276 for to var cspaces 1277 if sub castlepos #kingpos #to 1278 setlegal "{#king} {#kingpos}-{#to}" 1279 endif 1280 next 1281 endif 1282 setsystem autorules sub describe_rules 1283 return cond count system legalmoves false true 1284 endsub 1285 sub stalemated2 kingpos 1286 store 1287 local cspaces friend friends from piece to movetype 1288 set movetype MOVE 1289 if isupper space #kingpos 1290 set friends (onlyupper) 1291 set friend (isupper #0) 1292 set cspaces var wcastle 1293 else 1294 set friends (onlylower) 1295 set friend (islower #0) 1296 set cspaces var bcastle 1297 endif 1298 set royal space var kingpos 1299 store 1300 for (from piece) fn #friends 1301 for to fn join const alias #piece "-Range" #from 1302 if fn const alias #piece #from #to and not fn #friend space #to and onboard #to 1303 move #from #to 1304 if not sub checked cond == #from #kingpos #to #kingpos 1305 set ap alias #piece 1306 setlegal "{#ap} {#from}-{#to}" 1307 endif 1308 endif 1309 restore 1310 next 1311 next 1312 if > count var cspaces 0 and flag #kingpos 1313 for mvs var cspaces 1314 if sub castlepos2 #mvs.0 #mvs.1 #mvs.2 #mvs.3 and == #kingpos #mvs.0 1315 set pk alias space #mvs.0 1316 set pr alias space #mvs.2 1317 setlegal "{#pk} {#mvs.0}-{#mvs.1}; {#pr} {#mvs.2}-{#mvs.3}" 1318 endif 1319 next 1320 endif 1321 setsystem autorules sub describe_rules 1322 return cond count system legalmoves false true 1323 endsub 1324 sub fusion-stalemated kingpos 1325 store 1326 local cspaces friend friends from piece to movetype mv ss 1327 set movetype MOVE 1328 set ss join chr 47 chr 47 1329 if isupper space #kingpos 1330 set friends (onlyupper) 1331 set friend (isupper #0) 1332 set cspaces var wcastle 1333 else 1334 set friends (onlylower) 1335 set friend (islower #0) 1336 set cspaces var bcastle 1337 endif 1338 set royal space var kingpos 1339 store 1340 set kp #kingpos 1341 for (from piece) fn #friends 1342 set ap alias #piece 1343 for to fn join const #ap "-Range" #from 1344 if != space #to #piece and match toupper alias space #to K R B N and match toupper alias #piece R B N or not fn #friend space #to and fn const alias #piece #from #to and onboard #to 1345 move #from #to 1346 if match #ap K KR KB KN k kr kb kn 1347 set kp #to 1348 endif 1349 if not sub checked #kp 1350 setlegal "{#ap} {#from}-{#to}" 1351 endif 1352 restore 1353 set kp #kingpos 1354 endif 1355 if not sub checked #from and empty #to and == strlen alias #piece 2 1356 set compound alias #piece 1357 set simple1 leftstr #compound 1 1358 set simple2 rightstr #compound 1 1359 if != not fn #friend space #to and fn const alias #simple1 #from #to 1360 add #simple1 #to 1361 add #simple2 #from 1362 if match #simple1 K k 1363 set kp #to 1364 endif 1365 if not sub checked #kp 1366 setlegal "{#simple1} {#from}-{#to}; {#ss} {#simple2}-{#from}" 1367 endif 1368 restore 1369 set kp #kingpos 1370 endif 1371 if != not fn #friend space #to and fn const alias #simple2 #from #to 1372 add #simple2 #to 1373 add #simple1 #from 1374 if match #simple1 K k 1375 set kp #from 1376 endif 1377 if not sub checked #kp 1378 setlegal "{#simple2} {#from}-{#to}; {#ss} {#simple1}-{#from}" 1379 endif 1380 restore 1381 set kp #kingpos 1382 endif 1383 endif 1384 next 1385 next 1386 if > count var cspaces 0 1387 for to var cspaces 1388 if sub castlepos #kingpos #to 1389 setlegal (#kingpos #to) 1390 endif 1391 next 1392 endif 1393 setsystem autorules sub describe_rules 1394 return cond count system legalmoves false true 1395 endsub 1396 sub describe_rules 1397 my c piecenames notation values val id ref rules desc name codename rangefn 1398 set c.0 join filename 0 rankname 0 1399 set c.1 join filename >> lastfile 1 rankname 1 1400 set c.2 join filename inc >> lastfile 1 rankname 1 1401 set c.3 join filename >> lastfile 1 rankname inc >> lastrank 1 1402 set c.4 join filename inc >> lastfile 1 rankname >> lastrank 1 1403 set c.5 join filename >> lastfile 1 rankname dec lastrank 1404 set c.6 join filename inc >> lastfile 1 rankname dec lastrank 1405 set c.7 join filename lastfile rankname lastrank 1406 foreach p keys $pieces 1407 if isconst alias #p 1408 set codename const alias #p 1409 set name alias #codename 1410 set notation.{#name} alias #p 1411 if match #codename const alias space #kpos const alias space #Kpos 1412 set values.{#name} * 8 count spaces 1413 else 1414 set rangefn join #codename "-Range" 1415 set values.{#name} sum lambda (count fn #rangefn #0) #c 1416 endif 1417 endif 1418 next 1419 set values reverse asort #values 1420 set rules "
" 1421 foreach (name val) #values 1422 set codename realname #name 1423 if == null var #codename 1424 set codename #name 1425 endif 1426 set ref join #codename "-Desc" 1427 set desc str_replace "%s" #name var #ref 1428 set desc str_replace "_" " " #desc 1429 set id realname #notation.{#name} 1430 set rules join #rules "
[pc {#id} {#name}]{#desc}[/pc]
" 1431 next 1432 set rules join #rules "
" 1433 return #rules 1434 endsub 1435 sub findmates side 1436 local enemyking king mates moves mv 1437 if match #side 1 white White first 1438 set king #Kpos 1439 set enemyking #kpos 1440 else 1441 set king #kpos 1442 set enemyking #Kpos 1443 endif 1444 set mates () 1445 ban none 1446 setsystem maxmove 0 1447 store main 1448 setsystem legalmoves () 1449 if not sub stalemated #king 1450 set lglmvs $legalmoves 1451 foreach move #lglmvs 1452 set moves explode chr 59 #move 1453 foreach mv #moves 1454 set mv trim #mv 1455 eval "MOVE: {#mv}" 1456 next 1457 if sub checked #enemyking 1458 setsystem legalmoves () 1459 if sub stalemated #enemyking 1460 push mates #move 1461 endif 1462 endif 1463 restore main 1464 next 1465 endif 1466 setsystem legalmoves #mates 1467 endsub 1468 endlib

functions

Array ( [Aanca] => Array ( [0] => fn [1] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => and [6] => empty [7] => #0 ) [2] => where [3] => #0 [4] => 0 [5] => sign [6] => - [7] => rank [8] => #1 [9] => rank [10] => #0 [11] => #1 [12] => or [13] => fn [14] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => and [6] => empty [7] => #0 ) [15] => where [16] => #0 [17] => sign [18] => - [19] => file [20] => #1 [21] => file [22] => #0 [23] => 0 [24] => #1 [25] => or [26] => checkleap [27] => #0 [28] => #1 [29] => 1 [30] => 0 ) [Aanca-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 1 [4] => 0 [5] => rays [6] => where [7] => #0 [8] => 0 [9] => 1 [10] => 1 [11] => 1 [12] => rays [13] => where [14] => #0 [15] => 0 [16] => -1 [17] => 1 [18] => 1 [19] => rays [20] => where [21] => #0 [22] => 1 [23] => 0 [24] => 1 [25] => 1 [26] => rays [27] => where [28] => #0 [29] => -1 [30] => 0 [31] => 1 [32] => 1 ) [Amazon] => Array ( [0] => fn [1] => Bishop [2] => #0 [3] => #1 [4] => or [5] => fn [6] => Rook [7] => #0 [8] => #1 [9] => or [10] => fn [11] => Knight [12] => #0 [13] => #1 ) [Amazon-Range] => Array ( [0] => merge [1] => leaps [2] => # [3] => 1 [4] => 2 [5] => merge [6] => rays [7] => #0 [8] => 1 [9] => 0 [10] => rays [11] => #0 [12] => 1 [13] => 1 ) [Bede] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => or [6] => checkleap [7] => #0 [8] => #1 [9] => 0 [10] => 2 ) [Bede-Range] => Array ( [0] => merge [1] => rays [2] => #0 [3] => 1 [4] => 1 [5] => leaps [6] => #0 [7] => 0 [8] => 2 ) [White_Berolina_Pawn] => Array ( [0] => remove [1] => var [2] => epc [3] => and [4] => checkleap [5] => #0 [6] => #1 [7] => 1 [8] => 0 [9] => and [10] => == [11] => #1 [12] => var [13] => epp [14] => or [15] => and [16] => checkride [17] => #0 [18] => #1 [19] => 1 [20] => 1 [21] => == [22] => rankname [23] => #0 [24] => var [25] => wpr [26] => or [27] => checkleap [28] => #0 [29] => #1 [30] => 1 [31] => 1 [32] => and [33] => empty [34] => #1 [35] => or [36] => and [37] => islower [38] => space [39] => #1 [40] => checkleap [41] => #0 [42] => #1 [43] => 1 [44] => 0 [45] => and [46] => <= [47] => distance [48] => #0 [49] => #1 [50] => var [51] => fps [52] => and [53] => > [54] => rank [55] => #1 [56] => rank [57] => #0 ) [Black_Berolina_Pawn] => Array ( [0] => remove [1] => var [2] => epc [3] => and [4] => checkleap [5] => #0 [6] => #1 [7] => 1 [8] => 0 [9] => and [10] => == [11] => #1 [12] => var [13] => epp [14] => or [15] => and [16] => checkride [17] => #0 [18] => #1 [19] => 1 [20] => 1 [21] => == [22] => rankname [23] => #0 [24] => var [25] => bpr [26] => or [27] => checkleap [28] => #0 [29] => #1 [30] => 1 [31] => 1 [32] => and [33] => empty [34] => #1 [35] => or [36] => and [37] => isupper [38] => space [39] => #1 [40] => checkleap [41] => #0 [42] => #1 [43] => 1 [44] => 0 [45] => and [46] => <= [47] => distance [48] => #0 [49] => #1 [50] => var [51] => fps [52] => and [53] => < [54] => rank [55] => #1 [56] => rank [57] => #0 ) [White_Berolina_Pawn-Range] => Array ( [0] => filter [1] => lambda [2] => Array ( [0] => onboard [1] => #1 ) [3] => mergeall [4] => where [5] => #ori [6] => 0 [7] => 1 [8] => values [9] => lambda [10] => Array ( [0] => where [1] => #ori [2] => neg [3] => #1 [4] => #1 ) [11] => range [12] => 1 [13] => var [14] => fps [15] => values [16] => lambda [17] => Array ( [0] => where [1] => #ori [2] => #1 [3] => #1 ) [18] => range [19] => 1 [20] => var [21] => fps [22] => =ori ) [Black_Berolina_Pawn-Range] => Array ( [0] => filter [1] => lambda [2] => Array ( [0] => onboard [1] => #1 ) [3] => mergeall [4] => where [5] => #ori [6] => 0 [7] => -1 [8] => values [9] => lambda [10] => Array ( [0] => where [1] => #ori [2] => neg [3] => #1 [4] => neg [5] => #1 ) [11] => range [12] => 1 [13] => var [14] => fps [15] => values [16] => lambda [17] => Array ( [0] => where [1] => #ori [2] => #1 [3] => neg [4] => #1 ) [18] => range [19] => 1 [20] => var [21] => fps [22] => =ori ) [Bishop] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 1 ) [Bishop-Range] => Array ( [0] => rays [1] => #0 [2] => 1 [3] => 1 ) [Cannon] => Array ( [0] => cond [1] => cond [2] => empty [3] => #0 [4] => capture [5] => Array ( [0] => not [1] => empty [2] => #1 ) [6] => Array ( [0] => checkhop [1] => #0 [2] => #1 [3] => 0 [4] => 1 ) [7] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 0 [4] => 1 ) [8] => and [9] => #1 ) [Cannon-Range] => Array ( [0] => rays [1] => #0 [2] => 1 [3] => 0 ) [Camel] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 3 ) [Camel-Range] => Array ( [0] => leaps [1] => #0 [2] => 1 [3] => 3 ) [Camelrider] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 3 ) [Camelrider-Range] => Array ( [0] => rays [1] => #0 [2] => 1 [3] => 3 ) [Cardinal] => Array ( [0] => fn [1] => Bishop [2] => #0 [3] => #1 [4] => or [5] => fn [6] => Knight [7] => #0 [8] => #1 ) [Cardinal-Range] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 1 [4] => 2 [5] => rays [6] => #0 [7] => 1 [8] => 1 ) [Centaur] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => or [6] => checkleap [7] => #0 [8] => #1 [9] => 1 [10] => 0 [11] => or [12] => checkleap [13] => #0 [14] => #1 [15] => 1 [16] => 2 ) [Centaur-Range] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 1 [4] => 2 [5] => merge [6] => leaps [7] => #0 [8] => 1 [9] => 0 [10] => leaps [11] => #0 [12] => 1 [13] => 1 ) [Champion] => Array ( [0] => fn [1] => Elephant [2] => #0 [3] => #1 [4] => or [5] => fn [6] => Dabbabah [7] => #0 [8] => #1 [9] => or [10] => fn [11] => Wazir [12] => #0 [13] => #1 ) [Champion-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 2 [4] => 2 [5] => leaps [6] => #0 [7] => 2 [8] => 0 [9] => leaps [10] => #0 [11] => 1 [12] => 0 ) [White_Charging_Knight] => Array ( [0] => cond [1] => < [2] => rank [3] => #0 [4] => rank [5] => #1 [6] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 2 ) [7] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => or [6] => checkleap [7] => #0 [8] => #1 [9] => 1 [10] => 0 ) ) [White_Charging_Knight-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 1 [4] => 2 [5] => leaps [6] => #0 [7] => 1 [8] => 1 [9] => leaps [10] => #0 [11] => 1 [12] => 0 ) [Black_Charging_Knight] => Array ( [0] => cond [1] => > [2] => rank [3] => #0 [4] => rank [5] => #1 [6] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 2 ) [7] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => or [6] => checkleap [7] => #0 [8] => #1 [9] => 1 [10] => 0 ) ) [Black_Charging_Knight-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 1 [4] => 2 [5] => leaps [6] => #0 [7] => 1 [8] => 1 [9] => leaps [10] => #0 [11] => 1 [12] => 0 ) [White_Charging_Rook] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 0 [5] => and [6] => <= [7] => rank [8] => #0 [9] => rank [10] => #1 [11] => or [12] => checkaleap [13] => #0 [14] => #1 [15] => -1 [16] => -1 [17] => or [18] => checkaleap [19] => #0 [20] => #1 [21] => -1 [22] => 0 [23] => or [24] => checkaleap [25] => #0 [26] => #1 [27] => -1 [28] => 1 ) [White_Charging_Rook-Range] => Array ( [0] => mergeall [1] => ray [2] => #0 [3] => 0 [4] => -1 [5] => ray [6] => #0 [7] => 1 [8] => 0 [9] => ray [10] => #0 [11] => 0 [12] => 1 [13] => where [14] => #0 [15] => -1 [16] => 1 [17] => where [18] => #0 [19] => 1 [20] => 0 [21] => where [22] => #0 [23] => 1 [24] => 1 ) [Black_Charging_Rook] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 0 [5] => and [6] => >= [7] => rank [8] => #0 [9] => rank [10] => #1 [11] => or [12] => checkaleap [13] => #0 [14] => #1 [15] => -1 [16] => 1 [17] => or [18] => checkaleap [19] => #0 [20] => #1 [21] => 1 [22] => 0 [23] => or [24] => checkaleap [25] => #0 [26] => #1 [27] => 1 [28] => 1 ) [Black_Charging_Rook-Range] => Array ( [0] => mergeall [1] => ray [2] => #0 [3] => 0 [4] => -1 [5] => ray [6] => #0 [7] => -1 [8] => 0 [9] => ray [10] => #0 [11] => 0 [12] => 1 [13] => where [14] => #0 [15] => -1 [16] => 1 [17] => where [18] => #0 [19] => 1 [20] => 0 [21] => where [22] => #0 [23] => 1 [24] => 1 ) [Chinese_Elephant] => Array ( [0] => checkpath [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => 1 [6] => 1 ) [Chinese_Elephant-Range] => Array ( [0] => leaps [1] => #0 [2] => 2 [3] => 2 ) [White_Chinese_Elephant] => Array ( [0] => checkpath [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => 1 [6] => 1 [7] => and [8] => < [9] => rank [10] => #1 [11] => + [12] => 1 [13] => / [14] => lastrank [15] => 2 ) [White_Chinese_Elephant-Range] => Array ( [0] => leaps [1] => #0 [2] => 2 [3] => 2 ) [Black_Chinese_Elephant] => Array ( [0] => checkpath [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => 1 [6] => 1 [7] => and [8] => >= [9] => rank [10] => #1 [11] => + [12] => 1 [13] => / [14] => lastrank [15] => 2 ) [Black_Chinese_Elephant-Range] => Array ( [0] => leaps [1] => #0 [2] => 2 [3] => 2 ) [Chinese_General] => Array ( [0] => == [1] => distance [2] => #0 [3] => #1 [4] => 1 [5] => or [6] => == [7] => var [8] => movetype [9] => CHECK [10] => and [11] => checkride [12] => #0 [13] => #1 [14] => 1 [15] => 0 [16] => and [17] => flag [18] => #1 ) [Chinese_General-Range] => Array ( [0] => leaps [1] => #0 [2] => 1 [3] => 0 ) [Chinese_Guard] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => and [6] => flag [7] => #1 ) [Chinese_Guard-Range] => Array ( [0] => leaps [1] => #0 [2] => 1 [3] => 1 ) [White_Chinese_Pawn] => Array ( [0] => checkaleap [1] => #0 [2] => #1 [3] => -1 [4] => 0 [5] => or [6] => checkaleap [7] => #0 [8] => #1 [9] => 1 [10] => 0 [11] => and [12] => >= [13] => rank [14] => #0 [15] => + [16] => 1 [17] => / [18] => lastrank [19] => 2 [20] => or [21] => checkaleap [22] => #0 [23] => #1 [24] => 0 [25] => 1 ) [Black_Chinese_Pawn] => Array ( [0] => checkaleap [1] => #0 [2] => #1 [3] => -1 [4] => 0 [5] => or [6] => checkaleap [7] => #0 [8] => #1 [9] => 1 [10] => 0 [11] => and [12] => < [13] => rank [14] => #0 [15] => + [16] => 1 [17] => / [18] => lastrank [19] => 2 [20] => or [21] => checkaleap [22] => #0 [23] => #1 [24] => 0 [25] => -1 ) [White_Chinese_Pawn-Range] => Array ( [0] => leaps [1] => #0 [2] => 1 [3] => 0 ) [Black_Chinese_Pawn-Range] => Array ( [0] => leaps [1] => #0 [2] => 1 [3] => 0 ) [White_Colonel] => Array ( [0] => mergeall [1] => rays [2] => #0 [3] => 1 [4] => 0 [5] => leaps [6] => #0 [7] => 1 [8] => 2 [9] => leaps [10] => #0 [11] => 1 [12] => 1 ) [Black_Colonel] => Array ( [0] => mergeall [1] => rays [2] => #0 [3] => 1 [4] => 0 [5] => leaps [6] => #0 [7] => 1 [8] => 2 [9] => leaps [10] => #0 [11] => 1 [12] => 1 ) [Dabbabah] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 0 [4] => 2 ) [Dabbabah-Range] => Array ( [0] => leaps [1] => #0 [2] => 0 [3] => 2 ) [Dabbabahrider] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 0 [4] => 2 ) [Dabbabahrider-Range] => Array ( [0] => rays [1] => #0 [2] => 0 [3] => 2 ) [Dragon_Horse] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => or [6] => checkleap [7] => #0 [8] => #1 [9] => 1 [10] => 0 ) [Dragon_Horse-Range] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 1 [4] => 0 [5] => rays [6] => #0 [7] => 1 [8] => 1 ) [Dragon_King] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 0 [5] => or [6] => checkleap [7] => #0 [8] => #1 [9] => 1 [10] => 1 ) [Dragon_King-Range] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 1 [4] => 1 [5] => rays [6] => #0 [7] => 1 [8] => 0 ) [Elephant] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 2 [4] => 2 ) [Elephant-Range] => Array ( [0] => leaps [1] => #0 [2] => 2 [3] => 2 ) [Elephantrider] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 2 [4] => 2 ) [Elephantrider-Range] => Array ( [0] => rays [1] => #0 [2] => 2 [3] => 2 ) [Eques_Rex] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => or [6] => checkleap [7] => #0 [8] => #1 [9] => 1 [10] => 0 [11] => or [12] => checkleap [13] => #0 [14] => #1 [15] => 1 [16] => 2 ) [Eques_Rex-Range] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 1 [4] => 2 [5] => merge [6] => leaps [7] => #0 [8] => 1 [9] => 0 [10] => leaps [11] => #0 [12] => 1 [13] => 1 ) [Fad] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => or [6] => checkleap [7] => #0 [8] => #1 [9] => 2 [10] => 2 [11] => or [12] => checkleap [13] => #0 [14] => #1 [15] => 2 [16] => 0 ) [Fad-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 1 [4] => 1 [5] => leaps [6] => #0 [7] => 2 [8] => 2 [9] => leaps [10] => #0 [11] => 2 [12] => 0 ) [Ferz] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 1 ) [Ferz-Range] => Array ( [0] => leaps [1] => #0 [2] => 1 [3] => 1 ) [Fibnif] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 2 [5] => or [6] => checkleap [7] => #0 [8] => #1 [9] => 1 [10] => 1 [11] => and [12] => == [13] => 1 [14] => abs [15] => - [16] => file [17] => #0 [18] => file [19] => #1 ) [Fibnif-Range] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 1 [4] => 2 [5] => leaps [6] => #0 [7] => 1 [8] => 1 ) [Giraffe] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 4 ) [Giraffe-Range] => Array ( [0] => leaps [1] => #0 [2] => 1 [3] => 4 ) [White_Gold_General] => Array ( [0] => checkaleap [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => or [6] => checkaleap [7] => #0 [8] => #1 [9] => -1 [10] => 1 [11] => or [12] => checkleap [13] => #0 [14] => #1 [15] => 0 [16] => 1 ) [White_Gold_General-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 1 [4] => 0 [5] => where [6] => #0 [7] => 1 [8] => 1 [9] => where [10] => #0 [11] => -1 [12] => 1 ) [Black_Gold_General] => Array ( [0] => checkaleap [1] => #0 [2] => #1 [3] => 1 [4] => -1 [5] => or [6] => checkaleap [7] => #0 [8] => #1 [9] => -1 [10] => -1 [11] => or [12] => checkleap [13] => #0 [14] => #1 [15] => 0 [16] => 1 ) [Black_Gold_General-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 1 [4] => 0 [5] => where [6] => #0 [7] => 1 [8] => -1 [9] => where [10] => #0 [11] => -1 [12] => -1 ) [Grasshopper] => Array ( [0] => checkgrasshop [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => or [6] => checkgrasshop [7] => #0 [8] => #1 [9] => 1 [10] => 0 ) [Grasshopper-Range] => Array ( [0] => merge [1] => rays [2] => #0 [3] => 1 [4] => 0 [5] => rays [6] => #0 [7] => 1 [8] => 1 ) [Griffon] => Array ( [0] => fn [1] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 0 [5] => and [6] => empty [7] => #0 ) [2] => where [3] => #0 [4] => sign [5] => - [6] => file [7] => #1 [8] => file [9] => #0 [10] => sign [11] => - [12] => rank [13] => #1 [14] => rank [15] => #0 [16] => #1 [17] => and [18] => != [19] => file [20] => #1 [21] => file [22] => #0 [23] => and [24] => != [25] => rank [26] => #1 [27] => rank [28] => #0 [29] => or [30] => checkleap [31] => #0 [32] => #1 [33] => 1 [34] => 1 ) [Griffon-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 1 [4] => 1 [5] => rays [6] => where [7] => #0 [8] => 1 [9] => 1 [10] => 1 [11] => 0 [12] => rays [13] => where [14] => #0 [15] => 1 [16] => -1 [17] => 1 [18] => 0 [19] => rays [20] => where [21] => #0 [22] => -1 [23] => -1 [24] => 1 [25] => 0 [26] => rays [27] => where [28] => #0 [29] => -1 [30] => 1 [31] => 1 [32] => 0 ) [King] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => or [6] => checkleap [7] => #0 [8] => #1 [9] => 1 [10] => 0 ) [King-Range] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 1 [4] => 0 [5] => leaps [6] => #0 [7] => 1 [8] => 1 ) [Knight] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 2 ) [Knight-Range] => Array ( [0] => leaps [1] => #0 [2] => 1 [3] => 2 ) [Korean_Elephant] => Array ( [0] => checkpath [1] => #0 [2] => #1 [3] => 1 [4] => 0 [5] => 1 [6] => 1 [7] => 1 [8] => 1 ) [Korean_Elephant-Range] => Array ( [0] => leaps [1] => #0 [2] => 2 [3] => 3 ) [White_Lance] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => 0 [4] => 1 ) [White_Lance-Range] => Array ( [0] => ray [1] => #0 [2] => 0 [3] => 1 ) [Black_Lance] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => 0 [4] => -1 ) [Black_Lance-Range] => Array ( [0] => ray [1] => #0 [2] => 0 [3] => -1 ) [Leo] => Array ( [0] => fn [1] => Vao [2] => #0 [3] => #1 [4] => or [5] => fn [6] => Cannon [7] => #0 [8] => #1 ) [Leo-Range] => Array ( [0] => merge [1] => rays [2] => #0 [3] => 1 [4] => 0 [5] => rays [6] => #0 [7] => 1 [8] => 1 ) [Mao] => Array ( [0] => checktwostep [1] => #0 [2] => #1 [3] => 0 [4] => 1 [5] => 1 [6] => 1 ) [Mao-Range] => Array ( [0] => leaps [1] => #0 [2] => 1 [3] => 2 ) [Marshall] => Array ( [0] => fn [1] => Knight [2] => #0 [3] => #1 [4] => or [5] => fn [6] => Rook [7] => #0 [8] => #1 ) [Marshall-Range] => Array ( [0] => merge [1] => rays [2] => #0 [3] => 1 [4] => 0 [5] => leaps [6] => #0 [7] => 1 [8] => 2 ) [Moa] => Array ( [0] => checktwostep [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => 0 [6] => 1 ) [Moa-Range] => Array ( [0] => leaps [1] => #0 [2] => 1 [3] => 2 ) [Murray_Lion] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 0 [5] => or [6] => checkleap [7] => #0 [8] => #1 [9] => 1 [10] => 1 [11] => and [12] => cond [13] => empty [14] => #0 [15] => capture [16] => Array ( [0] => not [1] => empty [2] => #1 ) [17] => or [18] => checkleap [19] => #0 [20] => #1 [21] => 2 [22] => 2 [23] => or [24] => checkleap [25] => #0 [26] => #1 [27] => 0 [28] => 2 ) [Murray_Lion-Range] => Array ( [0] => merge [1] => merge [2] => leaps [3] => #0 [4] => 2 [5] => 0 [6] => leaps [7] => #0 [8] => 2 [9] => 2 [10] => merge [11] => leaps [12] => #0 [13] => 1 [14] => 0 [15] => leaps [16] => #0 [17] => 1 [18] => 1 ) [Nightrider] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 2 ) [Nightrider-Range] => Array ( [0] => rays [1] => #0 [2] => 1 [3] => 2 ) [White_Pawn] => Array ( [0] => remove [1] => var [2] => ep [3] => and [4] => < [5] => rankname [6] => #1 [7] => var [8] => bpr [9] => and [10] => < [11] => rankname [12] => var [13] => ep [14] => rankname [15] => #1 [16] => and [17] => == [18] => filename [19] => var [20] => ep [21] => filename [22] => #1 [23] => and [24] => checkleap [25] => #0 [26] => #1 [27] => 1 [28] => 1 [29] => and [30] => var [31] => ep [32] => or [33] => and [34] => checkride [35] => #0 [36] => #1 [37] => 0 [38] => 1 [39] => == [40] => rankname [41] => #0 [42] => var [43] => wpr [44] => or [45] => checkleap [46] => #0 [47] => #1 [48] => 0 [49] => 1 [50] => and [51] => empty [52] => #1 [53] => and [54] => != [55] => var [56] => movetype [57] => CHECK [58] => or [59] => and [60] => not [61] => empty [62] => #1 [63] => checkleap [64] => #0 [65] => #1 [66] => 1 [67] => 1 [68] => and [69] => any [70] => onboard [71] => where [72] => #1 [73] => 0 [74] => 1 [75] => == [76] => var [77] => movetype [78] => CHECK [79] => count [80] => var [81] => wprom [82] => and [83] => <= [84] => distance [85] => #0 [86] => #1 [87] => var [88] => fps [89] => and [90] => > [91] => rank [92] => #1 [93] => rank [94] => #0 ) [Black_Pawn] => Array ( [0] => remove [1] => var [2] => ep [3] => and [4] => > [5] => rankname [6] => #1 [7] => var [8] => wpr [9] => and [10] => > [11] => rankname [12] => var [13] => ep [14] => rankname [15] => #1 [16] => and [17] => == [18] => filename [19] => var [20] => ep [21] => filename [22] => #1 [23] => and [24] => checkleap [25] => #0 [26] => #1 [27] => 1 [28] => 1 [29] => and [30] => var [31] => ep [32] => or [33] => and [34] => checkride [35] => #0 [36] => #1 [37] => 0 [38] => 1 [39] => == [40] => rankname [41] => #0 [42] => var [43] => bpr [44] => or [45] => checkleap [46] => #0 [47] => #1 [48] => 0 [49] => 1 [50] => and [51] => empty [52] => #1 [53] => and [54] => != [55] => var [56] => movetype [57] => CHECK [58] => or [59] => and [60] => not [61] => empty [62] => #1 [63] => checkleap [64] => #0 [65] => #1 [66] => 1 [67] => 1 [68] => and [69] => any [70] => count [71] => var [72] => bprom [73] => onboard [74] => where [75] => #1 [76] => 0 [77] => -1 [78] => == [79] => var [80] => movetype [81] => CHECK [82] => and [83] => <= [84] => distance [85] => #0 [86] => #1 [87] => var [88] => fps [89] => and [90] => < [91] => rank [92] => #1 [93] => rank [94] => #0 ) [White_Pawn-Range] => Array ( [0] => filter [1] => lambda [2] => Array ( [0] => onboard [1] => #1 ) [3] => mergeall [4] => where [5] => #ori [6] => -1 [7] => 1 [8] => where [9] => #ori [10] => 1 [11] => 1 [12] => values [13] => lambda [14] => Array ( [0] => where [1] => #ori [2] => 0 [3] => #1 ) [15] => range [16] => 1 [17] => var [18] => fps [19] => =ori ) [Black_Pawn-Range] => Array ( [0] => filter [1] => lambda [2] => Array ( [0] => onboard [1] => #1 ) [3] => mergeall [4] => where [5] => #ori [6] => -1 [7] => -1 [8] => where [9] => #ori [10] => 1 [11] => -1 [12] => values [13] => lambda [14] => Array ( [0] => where [1] => #ori [2] => 0 [3] => neg [4] => #1 ) [15] => range [16] => 1 [17] => var [18] => fps [19] => =ori ) [White_Pawn-Promote] => Array ( [0] => var [1] => wprom ) [Black_Pawn-Promote] => Array ( [0] => var [1] => bprom ) [White_Quick_Pawn] => Array ( [0] => remove [1] => var [2] => ep [3] => and [4] => < [5] => rankname [6] => #1 [7] => rankname [8] => var [9] => epf [10] => and [11] => < [12] => rankname [13] => var [14] => ep [15] => rankname [16] => #1 [17] => and [18] => == [19] => filename [20] => var [21] => ep [22] => filename [23] => #1 [24] => and [25] => checkleap [26] => #0 [27] => #1 [28] => 1 [29] => 1 [30] => and [31] => var [32] => ep [33] => or [34] => checkride [35] => #0 [36] => #1 [37] => 0 [38] => 1 [39] => and [40] => empty [41] => #1 [42] => and [43] => != [44] => var [45] => movetype [46] => CHECK [47] => or [48] => and [49] => or [50] => not [51] => empty [52] => #1 [53] => == [54] => var [55] => movetype [56] => CHECK [57] => checkleap [58] => #0 [59] => #1 [60] => 1 [61] => 1 [62] => and [63] => any [64] => onboard [65] => where [66] => #1 [67] => 0 [68] => 1 [69] => == [70] => var [71] => movetype [72] => CHECK [73] => count [74] => var [75] => wprom [76] => and [77] => <= [78] => distance [79] => #0 [80] => #1 [81] => var [82] => fps [83] => and [84] => > [85] => rank [86] => #1 [87] => rank [88] => #0 ) [Black_Quick_Pawn] => Array ( [0] => remove [1] => var [2] => ep [3] => and [4] => > [5] => rankname [6] => #1 [7] => rankname [8] => var [9] => epf [10] => and [11] => > [12] => rankname [13] => var [14] => ep [15] => rankname [16] => #1 [17] => and [18] => == [19] => filename [20] => var [21] => ep [22] => filename [23] => #1 [24] => and [25] => checkleap [26] => #0 [27] => #1 [28] => 1 [29] => 1 [30] => and [31] => var [32] => ep [33] => or [34] => checkride [35] => #0 [36] => #1 [37] => 0 [38] => 1 [39] => and [40] => empty [41] => #1 [42] => and [43] => != [44] => var [45] => movetype [46] => CHECK [47] => or [48] => and [49] => or [50] => not [51] => empty [52] => #1 [53] => == [54] => var [55] => movetype [56] => CHECK [57] => checkleap [58] => #0 [59] => #1 [60] => 1 [61] => 1 [62] => and [63] => any [64] => count [65] => var [66] => bprom [67] => onboard [68] => where [69] => #1 [70] => 0 [71] => -1 [72] => == [73] => var [74] => movetype [75] => CHECK [76] => and [77] => <= [78] => distance [79] => #0 [80] => #1 [81] => var [82] => fps [83] => and [84] => < [85] => rank [86] => #1 [87] => rank [88] => #0 ) [White_Quick_Pawn-Range] => Array ( [0] => filter [1] => lambda [2] => Array ( [0] => onboard [1] => #1 ) [3] => mergeall [4] => where [5] => #ori [6] => -1 [7] => 1 [8] => where [9] => #ori [10] => 1 [11] => 1 [12] => values [13] => lambda [14] => Array ( [0] => where [1] => #ori [2] => 0 [3] => #1 ) [15] => range [16] => 1 [17] => var [18] => fps [19] => =ori ) [Black_Quick_Pawn-Range] => Array ( [0] => filter [1] => lambda [2] => Array ( [0] => onboard [1] => #1 ) [3] => mergeall [4] => where [5] => #ori [6] => -1 [7] => -1 [8] => where [9] => #ori [10] => 1 [11] => -1 [12] => values [13] => lambda [14] => Array ( [0] => where [1] => #ori [2] => 0 [3] => neg [4] => #1 ) [15] => range [16] => 1 [17] => var [18] => fps [19] => =ori ) [White_Quick_Pawn-Promote] => Array ( [0] => var [1] => wprom ) [Black_Quick_Pawn-Promote] => Array ( [0] => var [1] => bprom ) [Queen] => Array ( [0] => fn [1] => Bishop [2] => #0 [3] => #1 [4] => or [5] => fn [6] => Rook [7] => #0 [8] => #1 ) [Queen-Range] => Array ( [0] => merge [1] => rays [2] => #0 [3] => 1 [4] => 0 [5] => rays [6] => #0 [7] => 1 [8] => 1 ) [Rhino] => Array ( [0] => windingride [1] => #0 [2] => #1 [3] => 1 [4] => 0 [5] => 1 [6] => 1 [7] => or [8] => windingride [9] => #0 [10] => #1 [11] => 0 [12] => 1 [13] => 1 [14] => 1 ) [Rhino-Range] => Array ( [0] => merge [1] => eval [2] => Array ( [0] => windingrays [1] => #0 [2] => 1 [3] => 0 [4] => 1 [5] => 1 ) [3] => windingrays [4] => #0 [5] => 0 [6] => 1 [7] => 1 [8] => 1 ) [Rook] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 0 ) [Rook-Range] => Array ( [0] => rays [1] => #0 [2] => 1 [3] => 0 ) [Short_Rook] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 0 [5] => and [6] => <= [7] => distance [8] => #0 [9] => #1 [10] => 4 ) [Short_Rook-Range] => Array ( [0] => merge [1] => merge [2] => leaps [3] => #0 [4] => 1 [5] => 0 [6] => leaps [7] => #0 [8] => 2 [9] => 0 [10] => merge [11] => leaps [12] => #0 [13] => 3 [14] => 0 [15] => leaps [16] => #0 [17] => 4 [18] => 0 ) [White_Shogi_Knight] => Array ( [0] => checkaleap [1] => #0 [2] => #1 [3] => 1 [4] => 2 [5] => or [6] => checkaleap [7] => #0 [8] => #1 [9] => -1 [10] => 2 ) [White_Shogi_Knight-Range] => Array ( [0] => array [1] => where [2] => #0 [3] => 1 [4] => 2 [5] => where [6] => #0 [7] => -1 [8] => 2 ) [Black_Shogi_Knight] => Array ( [0] => checkaleap [1] => #0 [2] => #1 [3] => 1 [4] => -2 [5] => or [6] => checkaleap [7] => #0 [8] => #1 [9] => -1 [10] => -2 ) [Black_Shogi_Knight-Range] => Array ( [0] => array [1] => where [2] => #0 [3] => 1 [4] => -2 [5] => where [6] => #0 [7] => -1 [8] => -2 ) [White_Shogi_Pawn] => Array ( [0] => checkaleap [1] => #0 [2] => #1 [3] => 0 [4] => 1 ) [White_Shogi_Pawn-Range] => Array ( [0] => array [1] => where [2] => #0 [3] => 0 [4] => 1 ) [Black_Shogi_Pawn] => Array ( [0] => checkaleap [1] => #0 [2] => #1 [3] => 0 [4] => -1 ) [Black_Shogi_Pawn-Range] => Array ( [0] => array [1] => where [2] => #0 [3] => 0 [4] => -1 ) [White_Silver_General] => Array ( [0] => checkaleap [1] => #0 [2] => #1 [3] => 0 [4] => 1 [5] => or [6] => checkleap [7] => #0 [8] => #1 [9] => 1 [10] => 1 ) [White_Silver_General-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 1 [4] => 1 [5] => where [6] => #0 [7] => 0 [8] => 1 ) [Black_Silver_General] => Array ( [0] => checkaleap [1] => #0 [2] => #1 [3] => 0 [4] => -1 [5] => or [6] => checkleap [7] => #0 [8] => #1 [9] => 1 [10] => 1 ) [Black_Silver_General-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 1 [4] => 1 [5] => where [6] => #0 [7] => 0 [8] => -1 ) [Squirrel] => Array ( [0] => fn [1] => Elephant [2] => #0 [3] => #1 [4] => or [5] => fn [6] => Dabbabah [7] => #0 [8] => #1 [9] => or [10] => fn [11] => Knight [12] => #0 [13] => #1 ) [Squirrel-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 2 [4] => 2 [5] => leaps [6] => #0 [7] => 2 [8] => 0 [9] => leaps [10] => #0 [11] => 1 [12] => 2 ) [Spider] => Array ( [0] => fn [1] => Dabbabah [2] => #0 [3] => #1 [4] => or [5] => fn [6] => Elephant [7] => #0 [8] => #1 ) [Spider-Range] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 2 [4] => 2 [5] => leaps [6] => #0 [7] => 0 [8] => 2 ) [Spider-rider] => Array ( [0] => fn [1] => Dabbabahrider [2] => #0 [3] => #1 [4] => or [5] => fn [6] => Elephantrider [7] => #0 [8] => #1 ) [Spider-rider-Range] => Array ( [0] => merge [1] => rays [2] => #0 [3] => 2 [4] => 2 [5] => rays [6] => #0 [7] => 0 [8] => 2 ) [Squire] => Array ( [0] => checktwostep [1] => #0 [2] => #1 [3] => 0 [4] => 1 [5] => 1 [6] => 1 [7] => or [8] => checktwostep [9] => #0 [10] => #1 [11] => 1 [12] => 1 [13] => 0 [14] => 1 ) [Squire-Range] => Array ( [0] => leaps [1] => #0 [2] => 1 [3] => 2 ) [Unicorn] => Array ( [0] => fn [1] => Nightrider [2] => #0 [3] => #1 [4] => or [5] => fn [6] => Bishop [7] => #0 [8] => #1 ) [Unicorn-Range] => Array ( [0] => merge [1] => rays [2] => #0 [3] => 1 [4] => 2 [5] => rays [6] => #0 [7] => 1 [8] => 1 ) [Vao] => Array ( [0] => cond [1] => cond [2] => empty [3] => #0 [4] => capture [5] => Array ( [0] => not [1] => empty [2] => #1 ) [6] => Array ( [0] => checkhop [1] => #0 [2] => #1 [3] => 1 [4] => 1 ) [7] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 1 ) [8] => and [9] => #1 ) [Vao-Range] => Array ( [0] => rays [1] => #0 [2] => 1 [3] => 1 ) [Wazir] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 0 ) [Wazir-Range] => Array ( [0] => leaps [1] => #0 [2] => 1 [3] => 0 ) [Wizard] => Array ( [0] => fn [1] => Ferz [2] => #0 [3] => #1 [4] => or [5] => fn [6] => Camel [7] => #0 [8] => #1 ) [Wizard-Range] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 1 [4] => 1 [5] => leaps [6] => #0 [7] => 1 [8] => 3 ) [Woody_Rook] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 0 [4] => 2 [5] => or [6] => checkleap [7] => #0 [8] => #1 [9] => 0 [10] => 1 ) [Woody_Rook-Range] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 0 [4] => 1 [5] => leaps [6] => #0 [7] => 0 [8] => 2 ) [Zebra] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 2 [4] => 3 ) [Zebra-Range] => Array ( [0] => leaps [1] => #0 [2] => 2 [3] => 3 ) [Elephant_Ferz] => Array ( [0] => fn [1] => Ferz [2] => #0 [3] => #1 [4] => or [5] => fn [6] => Elephant [7] => #0 [8] => #1 ) [Elephant_Ferz-Range] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 2 [4] => 2 [5] => leaps [6] => #0 [7] => 1 [8] => 1 ) [Elephant_Wazir] => Array ( [0] => fn [1] => Wazir [2] => #0 [3] => #1 [4] => or [5] => fn [6] => Elephant [7] => #0 [8] => #1 ) [Elephant_Wazir-Range] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 2 [4] => 2 [5] => leaps [6] => #0 [7] => 1 [8] => 0 ) [Kylin] => Array ( [0] => fn [1] => Ferz [2] => #0 [3] => #1 [4] => or [5] => fn [6] => Dabbabah [7] => #0 [8] => #1 ) [Kylin-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 1 [4] => 1 [5] => leaps [6] => #0 [7] => 2 [8] => 0 ) [Half_Duck] => Array ( [0] => fn [1] => Ferz [2] => #0 [3] => #1 [4] => or [5] => fn [6] => Dabbabah [7] => #0 [8] => #1 [9] => or [10] => checkleap [11] => #0 [12] => #1 [13] => 3 [14] => 0 ) [Half_Duck-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 1 [4] => 1 [5] => leaps [6] => #0 [7] => 2 [8] => 0 [9] => leaps [10] => #0 [11] => 3 [12] => 0 ) [Knight_Wazir] => Array ( [0] => fn [1] => Knight [2] => #0 [3] => #1 [4] => or [5] => fn [6] => Wazir [7] => #0 [8] => #1 ) [Knight_Wazir-Range] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 1 [4] => 2 [5] => leaps [6] => #0 [7] => 1 [8] => 0 ) [Frog] => Array ( [0] => fn [1] => Ferz [2] => #0 [3] => #1 [4] => or [5] => checkleap [6] => #0 [7] => #1 [8] => 3 [9] => 0 ) [Frog-Range] => Array ( [0] => merge [1] => leaps [2] => #0 [3] => 1 [4] => 1 [5] => leaps [6] => #0 [7] => 3 [8] => 0 ) [Buffalo] => Array ( [0] => fn [1] => Knight [2] => #0 [3] => #1 [4] => or [5] => fn [6] => Camel [7] => #0 [8] => #1 [9] => or [10] => fn [11] => Zebra [12] => #0 [13] => #1 ) [Buffalo-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 1 [4] => 2 [5] => leaps [6] => #0 [7] => 1 [8] => 3 [9] => leaps [10] => #0 [11] => 2 [12] => 3 ) [@] => Array ( [0] => false ) [checked] => Array ( [0] => anytrue [1] => lambda [2] => Array ( [0] => fn [1] => const [2] => alias [3] => #0 [4] => var [5] => key [6] => var [7] => king ) [3] => cond [4] => isupper [5] => space [6] => var [7] => king [8] => Array ( [0] => onlylower ) [9] => Array ( [0] => onlyupper ) [10] => =movetype [11] => CHECK [12] => =king ) [threatened] => Array ( [0] => anytrue [1] => lambda [2] => Array ( [0] => fn [1] => const [2] => alias [3] => space [4] => #0 [5] => #0 [6] => var [7] => king ) [3] => elem [4] => var [5] => king [6] => threats [7] => =movetype [8] => CHECK [9] => =king ) )

uservar

Array ( [0] => Array ( [main] => Array ( [message] => Set the wpr variable to the value of White's Pawn Rank. This is the single rank on which all of White's Pawns start. This would be 2 for Chess.
[ep] => [Aanca-Desc] => The %s may move one space orthgonally, and so long as it is unblocked, it may continue its move in an outward diagonal direction. [Amazon-Desc] => The %s may move in a straight line in any direction, as a Queen does, or it may leap the the opposite end of a 1x2 rectangle, as a Knight does. [Bede-Desc] => The %s may move along any diagonal line, as a Bishop does, or it may leap two spaces away in any orthogonal direction, as a Dabababah does. [White_Berolina_Pawn-Desc] => The %s may move one space diagonally forward without capturing, or it may move one space straight forward to capture. On its first move, it may move two spaces diagonally forward without capturing so long as it isn't blocked. If this move takes it next to an enemy %s that could have captured it if it had just moved one space, that %s may immediately capture it by en passant, moving to the space it passed over. On reaching the last rank, it may promote. [Black_Berolina_Pawn-Desc] => The %s may move one space diagonally forward without capturing, or it may move one space straight forward to capture. On its first move, it may move two spaces diagonally forward without capturing so long as it isn't blocked. If this move takes it next to an enemy %s that could have captured it if it had just moved one space, that %s may immediately capture it by en passant, moving to the space it passed over. On reaching the last rank, it may promote. [Bishop-Desc] => The %s may move diagonally any number of spaces until it reaches an occupied space. [Cannon-Desc] => The %s moves any number of spaces orthogonally, as a Rook does, but it must hop over an intervening piece to capture. [Camel-Desc] => The %s leaps to any space at the opposite corner of a 1x3 rectangle. [Camelrider-Desc] => The %s may make any number of Camel moves in the same direction until it lands on an occupied space. [Cardinal-Desc] => The %s may move along diagonals as a Bishop or leap as a Knight. [Centaur-Desc] => The %s may move to any adjacent space as a King or leap like a Knight. [Champion-Desc] => The %s may leap one or two spaces orthogonally or two spaces diagonally. [White_Charging_Knight-Desc] => The %s may leap forward as a Knight or move one space sideways or backwards like a King. [Black_Charging_Knight-Desc] => The %s may leap forward as a Knight or move one space sideways or backwards like a King. [White_Charging_Rook-Desc] => The %s may move forward or sideways along its file or rank like a Rook, or it may move one space backwards in any direction like a King. [Black_Charging_Rook-Desc] => The %s may move forward or sideways along its file or rank like a Rook, or it may move one space backwards in any direction like a King. [Chinese_Elephant-Desc] => The %s may move two spaces diagonally so long as the space in between is empty. [White_Chinese_Elephant-Desc] => The %s may move two spaces diagonally so long as the space in between is empty, but it is confined to the ranks on its own side of the board. [Black_Chinese_Elephant-Desc] => The %s may move two spaces diagonally so long as the space in between is empty, but it is confined to the ranks on its own side of the board. [Chinese_General-Desc] => The %s may move one space orthogonally within the confines of the Palace, but it may not face the opponent's %s along an open file. [Chinese_Guard-Desc] => The %s may move one space diagonally within the confines of the palace. [White_Chinese_Pawn-Desc] => The %s may move one space forward. Once it has reached the other side of the board, it may also move one space sideways. [Black_Chinese_Pawn-Desc] => The %s may move one space forward. Once it has reached the other side of the board, it may also move one space sideways. [White_Colonel-Desc] => The %s may move forward or sideways as a Rook, forward as a Knight, and one space in any direction as a King. [Black_Colonel-Desc] => The %s may move forward or sideways as a Rook, forward as a Knight, and one space in any direction as a King. [Dabbabah-Desc] => The %s may leap two spaces vertically or horizontally. [Dabbabahrider-Desc] => The %s may make any number of two space orthogonal leaps in the same direction until it reaches an occupied space. [Dragon_Horse-Desc] => The %s may move along diagonals as a Bishop or move one space orthogonally as a Wazir. [Dragon_King-Desc] => The %s may move along its rank or file as a Rook or one space diagonally as a Ferz. [Elephant-Desc] => The %s may leap two spaces in any diagonal direction. [Elephantrider-Desc] => The %s may make a series of two-space diagonal leaps in the same direction. Each leap but the last must be to an empty space, though a leap may take it over an intervening piece. [Eques_Rex-Desc] => The %s may move to any adjacent space as a King or leap like a Knight. [Fad-Desc] => The %s may move one space diagonally, or it may leap two spaces diagonally or orthogonally. [Ferz-Desc] => The %s may move one space diagonally. [Fibnif-Desc] => The %s may move one space diagonally or leap as a Knight to any space that is one file and two ranks away. [Giraffe-Desc] => The %s may leap to any space that is one file and four ranks or one rank and four files away. [White_Gold_General-Desc] => The %s may move one space in any orthgonal direction or one space diagonally forward. [Black_Gold_General-Desc] => The %s may move one space in any orthgonal direction or one space diagonally forward. [The %s moves any number of spaces orthogonally or diagonally like a Queen except that it must hop over exactly one piece, and it must end its move immediately after the piece it hopped over] => Array ( [] => ) [Griffon-Desc] => The %s may move one space diagonally, and it may continue its move by moving as a Rook in an outward orthogonal direction. It may not pass over other pieces. [King-Desc] => The %s leaps one space in any direction. It may castle with a Rook on its first move so long as it is not in check, there is nothing in between it and the Rook, it doesn't pass through check while castling, and the Rook hasn't moved. In castling, it moves two spaces toward the Rook, and the Rook moves to the space the %s passed over. [Knight-Desc] => The %s may leap to any space that is one rank and two files away or two ranks and one file away. [The %s may move one space orthogonally, followed by two more spaces in the same outward diagonal direction] => Array ( [ It must complete every part of its move, and it may not pass over an occupied space] => Array ( [] => ) ) [The %s may move forward in its file as a Rook] => Array ( [] => ) [Leo-Desc] => The %s may move any number of spaces diagonally or orthogonally, as a Queen does, but it must hop over one intervening piece when it captures. [Mao-Desc] => The %s moves one space orthogonally, followed by one more space in an outward diagonal direction. It must complete both parts of its move, and it may not pass over an occupied space. It can reach the same spaces as a Knight except that it can be blocked on the first step of its two-space move. [Marshall-Desc] => The %s moves orthogonally as a Rook or leaps as a Knight. [Moa-Desc] => The %s moves one space diagonally, followed by one more space in an outward orthogonal direction. It must complete both parts of its move, and it may not pass over an occupied space. It can reach the same spaces as a Knight except that it can be blocked on the first step of its two-space move. [Murray_Lion-Desc] => The %s may leap two spaces in any diagonal or orthogonal direction, and it may capture (but not otherwise move) one space in any direction. [Nightrider-Desc] => The %s may leap as a Knight any number of times in the same direction. While each Knight leap may take it over other pieces, each leap but the last must be to an empty space. [White_Pawn-Desc] => The %s may move one space straight forward without capturing, or it may move one space diagonally forward to capture. On its first move, it may move two spaces forward without capturing so long as it isn't blocked. If this move takes it over a space an enemy %s could have captured it on if it had moved there, that %s may immediately capture it by en passant by moving to that space. On reaching the last rank, it must promote to any other piece except the King. [Black_Pawn-Desc] => The %s may move one space straight forward without capturing, or it may move one space diagonally forward to capture. On its first move, it may move two spaces forward without capturing so long as it isn't blocked. If this move takes it over a space an enemy %s could have captured it on if it had moved there, that %s may immediately capture it by en passant by moving to that space. On reaching the last rank, it must promote to any other piece except the King. [White_Quick_Pawn-Desc] => The %s may move one or two spaces straight forward without capturing, or it may move one space diagonally forward to capture. If its two-space move takes it over a space an enemy %s could have captured it on if it had moved there, that %s may immediately capture it by en passant by moving to that space. On reaching the last rank, it must promote to any other piece except the King. [Black_Quick_Pawn-Desc] => The %s may move one or two spaces straight forward without capturing, or it may move one space diagonally forward to capture. If its two-space move takes it over a space an enemy %s could have captured it on if it had moved there, that %s may immediately capture it by en passant by moving to that space. On reaching the last rank, it must promote to any other piece except the King. [Queen-Desc] => The %s may move as a Rook or a Bishop. [Rhino-Desc] => The %s moves along a winding path that alternates between the same one-space orthogonal move and the same one-space diagonal move both in the same general direction. [Rook-Desc] => The %s may move any number of spaces in any vertical or horizontal direction until it reaches an occupied space. [The %s may move up to four spaces along its rank or file as a Rook] => Array ( [] => ) [White_Shogi_Knight-Desc] => The %s may leap to either space that is two ranks ahead and one file to the side. [Black_Shogi_Knight-Desc] => The %s may leap to either space that is two ranks ahead and one file to the side. [White_Shogi_Pawn-Desc] => The %s map move one space forward in the same file. [Black_Shogi_Pawn-Desc] => The %s map move one space forward in the same file. [White_Silver_General-Desc] => The %s may move one space in any diagonal direction or one space vertically foward. [Black_Silver_General-Desc] => The %s may move one space in any diagonal direction or one space vertically foward. [Squirrel-Desc] => The %s may leap any non-adjacent space that is no more than two spaces away. [Spider-Desc] => The %s may leap to any space that is two spaces away orthogonally or diagonally. [Spider-rider-Desc] => The %s may make any number of two-space leaps in a single orthogonal or diagonal direction. While each leap may take it over an occupied space, each leap but the last must be to an empty space. [Squire-Desc] => The %s may move one space orthogonally, followed by one more space in an outward diagonal direction, or it may move one space diagonally, followed by one more space in an outward orthogonal direction. It must complete both parts of its move, and it may not pass over an occupied space. It can reach the same spaces as a Knight except that it can be blocked on the first step of its two-space move. [Unicorn-Desc] => The %s may make consecutive Knight moves in the same direction, as a Nightrider does, or it may move diagonally as a Bishop. [Vao-Desc] => The %s may move diagonally as a Bishop, but it must hop over exactly one intervening piece when it captures. [Wazir-Desc] => The %s may move one space horizontally or vertically. [Wizard-Desc] => The %s may move one space diagonally, or it may leap to a space three ranks and one file or three files and one rank away, as a Camel does. [Woody_Rook-Desc] => The %s may leap one or two spaces orthogonally. It may pass over another piece when moving two spaces. [Zebra-Desc] => The %s may leap to any space that is 2 ranks and 3 files or 2 files and 3 ranks away. [Elephant_Ferz-Desc] => The %s may leap one or two spaces diagonally. It may pass over another piece when moving two spaces. [Elephant_Wazir-Desc] => The %s may move one space orthogonally, as a Wazir, or leap two spaces diagonally, as an Elephant. [Kylin-Desc] => The %s may move one space diagonally, or it may leap 2 spaces orthogonally, passing over any pieces in the way. [Half_Duck-Desc] => The %s may move one space diagonally, or it may leap 2 or 3 spaces orthogonally, passing over any pieces in the way. [Knight_Wazir-Desc] => The %s may move one space orthogonally, as a Wazir, or it may leap as a Knight to any space one file and two ranks or two files and one rank away. [Frog-Desc] => The %s may move one space diagonally or directly leap 3 spaces orthogonally. [Buffalo-Desc] => The %s Buffalo may leap (1, 2) as a Knight, (1, 3) as a Camel, or (2, 3) as a Zebra. [names] => Array ( [p] => Black Pawn [P] => White Pawn [b] => Black Bishop [B] => White Bishop [wz] => Black Wizard [WZ] => White Wizard [ch] => Black Champion [CH] => White Champion [r] => Black Rook [R] => White Rook [q] => Black Queen [Q] => White Queen [k] => Black King [K] => White King [cr] => Black Crooked Rook [CR] => White Crooked Rook ) ) ) )

mline

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

allmoves

Array ( )

movelist

constants

Array ( )