Viewing Game
1 | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | |||||||||||||
3 | |||||||||||||
4 | |||||||||||||
5 | |||||||||||||
6 | |||||||||||||
7 | |||||||||||||
8 | |||||||||||||
9 | |||||||||||||
10 | |||||||||||||
11 | |||||||||||||
12 | |||||||||||||
l | k | j | i | h | g | f | e | d | c | b | a |
Rules of Tiger Chess
All rules are as in Chess except for castling and pawn promotion. Instead of castling, the King may leap up to three squares away if he hasn't moved yet and is not in check. Pawns promte immediately on reaching the opposite pawn rank to whichever piece begins on that file, or to a Queen on the King's file.
The Tiger leaps as a zebra and may then slide outward as a bishop.
The Pegasus leaps as a knight and may then slide outward as a rook.
The Astrologer leaps as a camel and may then slide outward as a bishop.
How to Move Pieces
Full Algebraic Notation
Algebraic notation identifies each space by a coordinate that begins with its file label and ends with its rank label. On the Chess board, files go up and down from one player to the other, and ranks go from left to right. In most games, files are represented by letters, and ranks are represented by numbers, but there is no fixed rule requiring this for all games, and some games, such as Shogi, reverse this convention. If you look at the diagram, you will usually see the file labels going from left to right and the file labels going up and down. And if you hover your mouse over a space, you will normally see the name of the coordinate appear in a tooltip.
It is not uncommon to see algebraic notation being used for Chess, but it is often in an abbreviated format that requires you to know both the rules of the game and the current position to know exactly which piece moves where. For example, the notation "Ne6" indicates that a Knight is moving to e6, but it doesn't indicate which Knight, and it doesn't specify where the Knight is coming from. To figure this out, you need to know how a Knight moves and which Knight on the board can make a legal move to e6.
Although rules may be programmed for individual games, Game Courier itself does not know the rules of any game, and it is unable to parse abbreviated algebraic notation. Therefore, it relies on full algebraic notation, which completely specifies the move without requiring any knowledge of the game's rules or the current position. The most usual type of full algebraic notation indicates the piece that is moving by its label, the space it is moving from, and the space it moving to. In Chess, a typical first move might be written as "P e2-e4". When you hover your mouse over a piece, you will normally see the piece label followed by the coordinate for the space, and when you hover it over an empty space, you will normally see the coordinate label. Including the piece label in your notation allows Game Courier to check that the piece you're moving is the right one, and it makes game notation easier to follow, but it is not mandatory.
You may promote a piece by including a promotion move after your regular move. A promotion move has a piece go directly to a coordinate. Here is an example: "p e7-e8; q-e8".
You may remove a piece from a space by adding an @ to the space or by omitting the destination coordinate. For example, both "@-e4" and "e4-" would remove the piece on "e4". This is useful for en passant when you are playing a game that does not handle this automatically. For example, "P d5-e6; e5-" removes the Pawn on e5 after a Pawn moves from d5 to e6.
You will not need to remove spaces for most games, but if you should need to, you can do this by omitting the first coordinate in a move. For example, "-e4" would remove e4 from the board. To add or return a space to the board, you may add an @ or any other piece to it.
Available Pieces
Pieces are represented by labels, usually using uppercase letters for White and lowercase letter for Black. When you enter a move or specify the starting position for a game, you should remember that piece labels are case-sensitive. Many piece sets are available for use with Game Courier, and this table shows you which pieces belong to the piece set you are currently using.
These pieces come from a set containing more pieces, but this preset has had the set of pieces reduced to those used in the game.
Syntax Error on line 0
Each value of the $pieces array should be a string
Edit the Settings File for Tiger Chess
For the sake of debugging, here is the full GAME Code program that this error occurred in. The lines have been properly indented to help you spot scope errors.
0 include fairychess 1 setsystem groupsets array alfaerie-allsvg 2 set mypieces () 3 set mypieces.k $pieces.k 4 set mypieces.K $pieces.K 5 set mypieces.q $pieces.q 6 set mypieces.Q $pieces.Q 7 set mypieces.r $pieces.r 8 set mypieces.R $pieces.R 9 set mypieces.b $pieces.b 10 set mypieces.B $pieces.B 11 set mypieces.n $pieces.n 12 set mypieces.N $pieces.N 13 set mypieces.p $pieces.p 14 set mypieces.P $pieces.P 15 if == pieceset alfaerie-allsvg 16 set mypieces.A pieceimg .W 17 set mypieces.a pieceimg .w 18 set mypieces.G pieceimg .P 19 set mypieces.g pieceimg .p 20 set mypieces.T $pieces.T 21 set mypieces.t $pieces.t 22 endif 23 setsystem pieces #mypieces 24 add A b1 A k1 G c1 G j1 a b12 a k12 g c12 g j12 25 set kpos findpiece k spaces 26 set Kpos findpiece K spaces 27 set ep false 28 set wpr 4 29 set bpr 9 30 set fps 2 31 set pzs 1 32 set wprom "" 33 set bprom "" 34 setflag g1 g12 35 setconst p Black_Pawn 36 setconst P White_Pawn 37 setconst q Queen 38 setconst Q Queen 39 setconst r Rook 40 setconst R Rook 41 setconst b Bishop 42 setconst B Bishop 43 setconst G Pegasus 44 setconst g Pegasus 45 setconst A Astrologer 46 setconst a Astrologer 47 setconst T Tiger 48 setconst t Tiger 49 setconst K King 50 setconst k King 51 def Tiger fn (checkaride #0 #1 1 1 and empty #0) where #0 2 3 #1 or fn (checkaride #0 #1 1 -1 and empty #0) where #0 2 -3 #1 or fn (checkaride #0 #1 -1 1 and empty #0) where #0 -2 3 #1 or fn (checkaride #0 #1 -1 -1 and empty #0) where #0 -2 -3 #1 or fn (checkaride #0 #1 1 1 and empty #0) where #0 3 2 #1 or fn (checkaride #0 #1 1 -1 and empty #0) where #0 3 -2 #1 or fn (checkaride #0 #1 -1 1 and empty #0) where #0 -3 2 #1 or fn (checkaride #0 #1 -1 -1 and empty #0) where #0 -3 -2 #1 or checkleap #0 #1 3 2 52 def Tiger-Range mergeall leaps #0 3 2 ray where #0 2 3 1 1 ray where #0 2 -3 1 -1 ray where #0 -2 3 -1 1 ray where #0 -2 -3 -1 -1 ray where #0 3 2 1 1 ray where #0 3 -2 1 -1 ray where #0 -3 2 -1 1 ray where #0 -3 -2 -1 -1 53 set Tiger-Desc "The %s makes a 3-2 leap, and may then continue its move by sliding away from its starting square as a bishop." 54 def Astrologer fn (checkaride #0 #1 1 1 and empty #0) where #0 1 3 #1 or fn (checkaride #0 #1 1 -1 and empty #0) where #0 1 -3 #1 or fn (checkaride #0 #1 -1 1 and empty #0) where #0 -1 3 #1 or fn (checkaride #0 #1 -1 -1 and empty #0) where #0 -1 -3 #1 or fn (checkaride #0 #1 1 1 and empty #0) where #0 3 1 #1 or fn (checkaride #0 #1 1 -1 and empty #0) where #0 3 -1 #1 or fn (checkaride #0 #1 -1 1 and empty #0) where #0 -3 1 #1 or fn (checkaride #0 #1 -1 -1 and empty #0) where #0 -3 -1 #1 or checkleap #0 #1 3 1 55 def Astrologer-Range mergeall leaps #0 3 1 ray where #0 1 3 1 1 ray where #0 1 -3 1 -1 ray where #0 -1 3 -1 1 ray where #0 -1 -3 -1 -1 ray where #0 3 1 1 1 ray where #0 3 -1 1 -1 ray where #0 -3 1 -1 1 ray where #0 -3 -1 -1 -1 56 set Astrologer-Desc "The %s makes a 3-1 leap, and may then continue its move by sliding away from its starting square as a bishop." 57 def Pegasus fn (checkaride #0 #1 0 1 and empty #0) where #0 1 2 #1 or fn (checkaride #0 #1 0 -1 and empty #0) where #0 1 -2 #1 or fn (checkaride #0 #1 0 1 and empty #0) where #0 -1 2 #1 or fn (checkaride #0 #1 0 -1 and empty #0) where #0 -1 -2 #1 or fn (checkaride #0 #1 1 0 and empty #0) where #0 2 1 #1 or fn (checkaride #0 #1 1 0 and empty #0) where #0 2 -1 #1 or fn (checkaride #0 #1 -1 0 and empty #0) where #0 -2 1 #1 or fn (checkaride #0 #1 -1 0 and empty #0) where #0 -2 -1 #1 or checkleap #0 #1 2 1 58 def Pegasus-Range mergeall leaps #0 2 1 ray where #0 1 2 0 1 ray where #0 1 -2 0 -1 ray where #0 -1 2 0 1 ray where #0 -1 -2 0 -1 ray where #0 2 1 1 0 ray where #0 2 -1 1 0 ray where #0 -2 1 -1 0 ray where #0 -2 -1 -1 0 59 set Pegasus-Desc "The %s makes a 2-1 leap, and may then continue its move by sliding away from its starting square as a rook." 60 def King checkleap #0 #1 0 2 or checkleap #0 #1 1 2 or checkleap #0 #1 2 2 or checkleap #0 #1 0 3 or checkleap #0 #1 1 3 or checkleap #0 #1 2 3 or checkleap #0 #1 3 3 and not sub checked #0 and empty #1 and not match #1 g1 g12 and flag #0 or checkleap #0 #1 1 0 or checkleap #0 #1 1 1 61 def King-Range mergeall leaps #0 1 0 leaps #0 1 1 leaps #0 0 2 leaps #0 1 2 leaps #0 2 2 leaps #0 0 3 leaps #0 1 3 leaps #0 2 3 leaps #0 3 3 62 sub King from to 63 if checkleap #from #to 1 1 or checkleap #from #to 1 0 64 return true 65 endif 66 move #to #from 67 if checkleap #from #to 0 2 or checkleap #from #to 1 2 or checkleap #from #to 2 2 or checkleap #from #to 0 3 or checkleap #from #to 1 3 or checkleap #from #to 2 3 or checkleap #from #to 3 3 and flag #from 68 if sub checked #from 69 die You may not perform the special moves out of check. 70 endif 71 move #from #to 72 return true 73 endif 74 endsub 75 set King-Desc "The %s King moves 1 square as a regular king but as his first move of the game may jump anywhere 2 or 3 spaces away, unless he is in check." 76 sub Black_Pawn from to 77 my newpiece 78 my newmove 79 verify < rank #to rank #from 80 verify <= distance #to #from #fps 81 if capture 82 verify checkleap #from #to 1 1 83 set ep false 84 elseif checkleap #from #to 1 1 and #ep 85 verify == filename var ep filename #to 86 verify > rankname var ep rankname #to 87 verify > rankname #to var wpr 88 capture #ep 89 set ep false 90 elseif > distance #to #from 1 91 verify == rankname #from #bpr 92 verify checkride #from #to 0 1 93 set ep #to 94 else 95 verify checkleap #from #to 0 1 96 set ep false 97 endif 98 if == rankname #to 4 99 if or == #to a4 == #to l4 100 add r #to 101 elseif or == #to b4 == #to k4 102 add a #to 103 elseif or == #to c4 == #to j4 104 add g #to 105 elseif or == #to d4 == #to i4 106 add t #to 107 elseif or == #to e4 == #to h4 108 add b #to 109 elseif or == #to f4 == #to g4 110 add q #to 111 endif 112 endif 113 set nopvc 0 114 return true 115 endsub 116 sub White_Pawn from to 117 my newpiece 118 my newmove 119 verify > rank #to rank #from 120 verify <= distance #to #from #fps 121 if capture 122 verify checkleap #from #to 1 1 123 set ep false 124 elseif checkleap #from #to 1 1 and #ep 125 verify == filename var ep filename #to 126 verify < rankname var ep rankname #to 127 verify < rankname #to var bpr 128 capture #ep 129 set ep false 130 elseif > distance #to #from 1 131 verify == rankname #from #wpr 132 verify checkride #from #to 0 1 133 set ep #to 134 else 135 verify checkleap #from #to 0 1 136 set ep false 137 endif 138 if == rankname #to 9 139 if or == #to a9 == #to l9 140 add R #to 141 elseif or == #to b9 == #to k9 142 add A #to 143 elseif or == #to c9 == #to j9 144 add G #to 145 elseif or == #to d9 == #to i9 146 add T #to 147 elseif or == #to e9 == #to h9 148 add B #to 149 elseif or == #to f9 == #to g9 150 add Q #to 151 endif 152 endif 153 set nopvc 0 154 return true 155 endsub 156 setsystem originalpieces currentpieces 157 set cap unique keys capturedpieces 158 sub postauto1 159 if not isconst alias $moved 160 die The piece moved is undefined. 161 elseif isupper $old 162 die You may not capture your own pieces. 163 elseif islower alias $moved 164 die You may not move one of your opponent's pieces. 165 endif 166 if != const alias $moved White_Pawn 167 set ep false 168 if != alias space $dest alias $moved 169 die You may not change the type of this piece. 170 elseif capture 171 set nopvc 0 172 else 173 inc nopvc 174 endif 175 endif 176 set codename const alias $moved 177 if sub #codename $origin $dest and issub #codename 178 elseif fn #codename $origin $dest and isfunc #codename and not issub #codename 179 else 180 set name alias #codename 181 set errmsg list "You may not move your" #name "from" $origin "to" join $dest ".
" 182 set desc join #codename "-Desc" 183 set errmsg str_replace "_" " " join #errmsg str_replace "%s" #name var #desc 184 die #errmsg 185 endif 186 if == moved K 187 unsetflag g1 188 set Kpos $dest 189 endif 190 if sub checked var Kpos 191 die You may not move into check. 192 endif 193 unsetflag $origin $dest 194 set posvar join "w" join fencode boardflags 195 inc #posvar 196 set cap unique keys capturedpieces 197 endsub 198 sub postauto2 199 if not isconst alias $moved 200 die The piece alias $moved is undefined. 201 elseif islower $old 202 die You may not capture your own pieces. 203 elseif isupper alias $moved 204 die You may not move one of your opponent's pieces. 205 endif 206 if != const alias $moved Black_Pawn 207 set ep false 208 if != alias space $dest alias $moved 209 die You may not change the typpe of this piece. 210 elseif capture 211 set nopvc 0 212 else 213 inc nopvc 214 endif 215 endif 216 set codename const alias $moved 217 if sub #codename $origin $dest and issub #codename 218 elseif fn #codename $origin $dest and isfunc #codename and not issub #codename 219 else 220 set name alias #codename 221 set errmsg list "You may not move your" #name "from" $origin "to" join $dest ".
" 222 set desc join #codename "-Desc" 223 set errmsg str_replace "_" " " join #errmsg str_replace "%s" #name var #desc 224 die #errmsg 225 endif 226 if == moved k 227 unsetflag g12 228 set kpos $dest 229 endif 230 if sub checked var kpos 231 die You may not move into check. 232 endif 233 unsetflag $origin $dest 234 set posvar join "b" join fencode boardflags 235 inc #posvar 236 set cap unique keys capturedpieces 237 endsub 238 moveindex 0 239 MOVE: P i4-i6 240 postauto1 241 moveindex 1 242 MOVE: p f9-f7 243 postauto2 244 moveindex 2 245 MOVE: P c4-c6 246 postauto1 247 moveindex 3 248 MOVE: p g9-g8 249 postauto2 250 moveindex 4 251 MOVE: P f4-f6 252 postauto1 253 moveindex 5 254 MOVE: b e12-g10 255 postauto2 256 moveindex 6 257 MOVE: P b4-b5 258 postauto1 259 moveindex 7 260 MOVE: b h12-f10 261 postauto2 262 moveindex 8 263 MOVE: R l1-l3 264 postauto1 265 moveindex 9 266 MOVE: g j12-k10 267 postauto2 268 moveindex 10 269 MOVE: T d1-i7 270 postauto1 271 moveindex 11 272 MOVE: b f10-i7 273 postauto2 274 moveindex 12 275 MOVE: G c1-b4 276 postauto1 277 moveindex 13 278 MOVE: t i12-b4 279 postauto2 280 moveindex 14 281 MOVE: B e1-b4 282 postauto1 283 moveindex 15 284 MOVE: t d12-f9 285 postauto2 286 moveindex 16 287 MOVE: B b4-e1 288 postauto1 289 moveindex 17 290 MOVE: t f9-j4 291 postauto2 292 moveindex 18 293 MOVE: Q f1-h3 294 postauto1 295 moveindex 19 296 MOVE: a b12-h8 297 postauto2 298 moveindex 20 299 MOVE: T i1-f3 300 postauto1 301 moveindex 21 302 MOVE: p j9-j8 303 postauto2 304 moveindex 22 305 MOVE: P k4-k5 306 postauto1 307 moveindex 23 308 MOVE: b i7-e3 309 postauto2 310 moveindex 24 311 MOVE: K g1-h2 312 postauto1 313 moveindex 25 314 MOVE: a k12-e4 315 postauto2 316 moveindex 26 317 MOVE: Q h3-i3 318 postauto1 319 moveindex 27 320 MOVE: t j4-h1 321 postauto2 322 moveindex 28 323 MOVE: K h2-h1 324 postauto1 325 moveindex 29 326 MOVE: a e4-j1 327 postauto2 328 moveindex 30 329 MOVE: resign 330 postauto1 331 set posvar join "w" join fencode boardflags 332 if >= var #posvar 3 333 say Three Times Repetition! Drawn Game! 334 drawn 335 elseif sub stalemated var kpos 336 if sub checked var kpos 337 say Checkmate! White has won! 338 won 339 else 340 say Stalemate! The game is drawn. 341 drawn 342 endif 343 elseif >= #nopvc 100 344 say One Hundred Moves Without Moving a Pawn or Capturing! Game Drawn! 345 drawn 346 elseif sub checked var kpos 347 say Check! 348 endif 349 end 350 end 351 352 lib fairychess 353 if flag use-chess-defaults 354 setconst k King 355 setconst K King 356 setconst q Queen 357 setconst Q Queen 358 setconst r Rook 359 setconst R Rook 360 setconst b Bishop 361 setconst B Bishop 362 setconst n Knight 363 setconst N Knight 364 setconst p Black_Pawn 365 setconst P White_Pawn 366 endif 367 if flag use-chess-defaults 368 set wpr 2 369 set bpr 7 370 set fps 2 371 set pzs 1 372 set wcastle c1 g1 373 set bcastle c8 g8 374 set wprom Q R B N 375 set bprom q r b n 376 set promotable p P 377 elseif not isset wpr 378 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 379 elseif not isset bpr 380 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 381 elseif not isset fps 382 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 383 elseif not isset pzs 384 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 385 elseif not isset wcastle 386 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 387 elseif not isset bcastle 388 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 389 elseif not isset wprom 390 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 391 elseif not isset bprom 392 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 393 endif 394 set ep false 395 setsystem maxmove 2 396 ban commands allmoves 397 allow moves 1 captures 1 promotions 2 398 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." 399 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 400 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 401 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." 402 def Amazon fn Bishop #0 #1 or fn Rook #0 #1 or fn Knight #0 #1 403 def Amazon-Range merge leaps # 1 2 merge rays #0 1 0 rays #0 1 1 404 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." 405 def Bede checkride #0 #1 1 1 or checkleap #0 #1 0 2 406 def Bede-Range merge rays #0 1 1 leaps #0 0 2 407 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 408 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 409 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 410 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 411 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." 412 set Black_Berolina_Pawn-Desc var White_Berolina_Pawn-Desc 413 sub White_Berolina_Pawn from to 414 verify > rank #to rank #from 415 verify <= distance #to #from #fps 416 if capture 417 verify checkleap #from #to 1 0 418 set epp false 419 set epc false 420 elseif checkleap #from #to 1 0 and == #to #epp 421 capture #epc 422 set epp false 423 set epc false 424 elseif > distance #to #from 1 425 verify == rankname #from #wpr 426 verify checkride #from #to 1 1 427 set epp elem 0 path #from #to 428 set epc #to 429 else 430 verify checkleap #from #to 1 1 431 set epp false 432 set epc false 433 endif 434 if onboard where #to 0 #pzs 435 if != space #to $moved 436 set name alias const alias $moved 437 die "You may not promote a" #name "until it reaches the promotion zone." 438 endif 439 elseif onboard where #to 0 1 440 if == White_Berolina_Pawn const alias space #to and count var wprom 441 if not $answered and == mln $maxmln 442 push wprom space #to 443 askpromote #wprom 444 endif 445 elseif not match space #to var wprom and != White_Pawn const alias space #to 446 set name alias const alias $moved 447 set newname alias const alias space #to 448 set msg list "You may not promote your" #name "to a" join #newname ".
" 449 set msg str_replace "_" " " var msg 450 die #msg 451 endif 452 elseif count var wprom 453 if == White_Berolina_Pawn const alias space #to 454 if == count var wprom 1 455 set newpiece join list var wprom 456 set newmove join #newpiece "-dest" 457 add #newpiece $dest 458 appendmove #newmove 459 else 460 askpromote #wprom 461 endif 462 elseif not match space #to var wprom 463 set name alias const alias $moved 464 set newname alias const alias space #to 465 set msg list "You may not promote your" #name "to a" join #newname ".
" 466 set msg str_replace "_" " " var msg 467 die #msg 468 endif 469 else 470 set name alias const alias $moved 471 set msg list "You may not advance your" #name "to the last rank, because there is nothing you may promote it to." 472 set msg str_replace "_" " " var msg 473 die #msg 474 endif 475 set nopvc 0 476 return true 477 endsub 478 sub Black_Berolina_Pawn from to 479 verify < rank #to rank #from 480 verify <= distance #to #from #fps 481 if capture 482 verify checkleap #from #to 1 0 483 set epp false 484 set epc false 485 elseif checkleap #from #to 1 0 and == #to #epp 486 capture #epc 487 set epp false 488 set epc false 489 elseif > distance #to #from 1 490 verify == rankname #from #bpr 491 verify checkride #from #to 1 1 492 set epp elem 0 path #from #to 493 set epc #to 494 else 495 verify checkleap #from #to 1 1 496 set epp false 497 set epc false 498 endif 499 if onboard where #to 0 neg #pzs 500 if != space #to $moved 501 set name alias const alias $moved 502 die "You may not promote a" #name "until it reaches the promotion zone." 503 endif 504 elseif onboard where #to 0 -1 505 if == Black_Berolina_Pawn const alias space #to and count var bprom 506 if not $answered and == mln $maxmln 507 push bprom space #to 508 askpromote #bprom 509 endif 510 elseif not match space #to var bprom and != Black_Pawn const alias space #to 511 set name alias const alias $moved 512 set newname alias const alias space #to 513 set msg list "You may not promote your" #name "to a" join #newname ".
" 514 set msg str_replace "_" " " var msg 515 die #msg 516 endif 517 elseif count var bprom 518 if == Black_Berolina_Pawn const alias space #to 519 if == count var bprom 1 520 set newpiece join list var bprom 521 set newmove join #newpiece "-dest" 522 add #newpiece $dest 523 appendmove #newmove 524 else 525 askpromote #bprom 526 endif 527 elseif not match space #to var bprom 528 set name alias const alias $moved 529 set newname alias const alias space #to 530 set msg list "You may not promote your" #name "to a" join #newname ".
" 531 set msg str_replace "_" " " var msg 532 die #msg 533 endif 534 else 535 set name alias const alias $moved 536 set msg list "You may not advance your" #name "to the last rank, because there is nothing you may promote it to." 537 set msg str_replace "_" " " var msg 538 die #msg 539 endif 540 set nopvc 0 541 return true 542 endsub 543 def Bishop checkride #0 #1 1 1 544 def Bishop-Range rays #0 1 1 545 set Bishop-Desc "The %s may move diagonally any number of spaces until it reaches an occupied space." 546 def Cannon cond cond empty #0 capture (not empty #1) (checkhop #0 #1 0 1) (checkride #0 #1 0 1) and #1 547 def Cannon-Range rays #0 1 0 548 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." 549 def Camel checkleap #0 #1 1 3 550 def Camel-Range leaps #0 1 3 551 set Camel-Desc "The %s leaps to any space at the opposite corner of a 1x3 rectangle." 552 def Camelrider checkride #0 #1 1 3 553 def Camelrider-Range rays #0 1 3 554 set Camelrider-Desc "The %s may make any number of Camel moves in the same direction until it lands on an occupied space." 555 def Cardinal fn Bishop #0 #1 or fn Knight #0 #1 556 def Cardinal-Range merge leaps #0 1 2 rays #0 1 1 557 set Cardinal-Desc "The %s may move along diagonals as a Bishop or leap as a Knight." 558 def Centaur checkleap #0 #1 1 1 or checkleap #0 #1 1 0 or checkleap #0 #1 1 2 559 def Centaur-Range merge leaps #0 1 2 merge leaps #0 1 0 leaps #0 1 1 560 set Centaur-Desc "The %s may move to any adjacent space as a King or leap like a Knight." 561 def Champion fn Elephant #0 #1 or fn Dabbabah #0 #1 or fn Wazir #0 #1 562 def Champion-Range mergeall leaps #0 2 2 leaps #0 2 0 leaps #0 1 0 563 set Champion-Desc "The %s may leap one or two spaces orthogonally or two spaces diagonally." 564 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) 565 def White_Charging_Knight-Range mergeall leaps #0 1 2 leaps #0 1 1 leaps #0 1 0 566 set White_Charging_Knight-Desc "The %s may leap forward as a Knight or move one space sideways or backwards like a King." 567 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) 568 def Black_Charging_Knight-Range mergeall leaps #0 1 2 leaps #0 1 1 leaps #0 1 0 569 set Black_Charging_Knight-Desc "The %s may leap forward as a Knight or move one space sideways or backwards like a King." 570 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 571 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 572 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." 573 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 574 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 575 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." 576 def Chinese_Elephant checkpath #0 #1 1 1 1 1 577 def Chinese_Elephant-Range leaps #0 2 2 578 set Chinese_Elephant-Desc "The %s may move two spaces diagonally so long as the space in between is empty." 579 def White_Chinese_Elephant checkpath #0 #1 1 1 1 1 and < rank #1 + 1 / lastrank 2 580 def White_Chinese_Elephant-Range leaps #0 2 2 581 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." 582 def Black_Chinese_Elephant checkpath #0 #1 1 1 1 1 and >= rank #1 + 1 / lastrank 2 583 def Black_Chinese_Elephant-Range leaps #0 2 2 584 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." 585 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 586 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 587 def Chinese_General == distance #0 #1 1 or == var movetype CHECK and checkride #0 #1 1 0 and flag #1 588 def Chinese_General-Range leaps #0 1 0 589 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." 590 def Chinese_Guard checkleap #0 #1 1 1 and flag #1 591 def Chinese_Guard-Range leaps #0 1 1 592 set Chinese_Guard-Desc "The %s may move one space diagonally within the confines of the palace." 593 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 594 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 595 def White_Chinese_Pawn-Range leaps #0 1 0 596 def Black_Chinese_Pawn-Range leaps #0 1 0 597 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." 598 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." 599 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 600 def White_Colonel mergeall rays #0 1 0 leaps #0 1 2 leaps #0 1 1 601 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." 602 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 603 def Black_Colonel mergeall rays #0 1 0 leaps #0 1 2 leaps #0 1 1 604 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." 605 def Dabbabah checkleap #0 #1 0 2 606 def Dabbabah-Range leaps #0 0 2 607 set Dabbabah-Desc "The %s may leap two spaces vertically or horizontally." 608 def Dabbabahrider checkride #0 #1 0 2 609 def Dabbabahrider-Range rays #0 0 2 610 set Dabbabahrider-Desc "The %s may make any number of two space orthogonal leaps in the same direction until it reaches an occupied space." 611 def Dragon_Horse checkride #0 #1 1 1 or checkleap #0 #1 1 0 612 def Dragon_Horse-Range merge leaps #0 1 0 rays #0 1 1 613 set Dragon_Horse-Desc "The %s may move along diagonals as a Bishop or move one space orthogonally as a Wazir." 614 def Dragon_King checkride #0 #1 1 0 or checkleap #0 #1 1 1 615 def Dragon_King-Range merge leaps #0 1 1 rays #0 1 0 616 set Dragon_King-Desc "The %s may move along its rank or file as a Rook or one space diagonally as a Ferz." 617 def Elephant checkleap #0 #1 2 2 618 def Elephant-Range leaps #0 2 2 619 set Elephant-Desc "The %s may leap two spaces in any diagonal direction." 620 def Elephantrider checkride #0 #1 2 2 621 def Elephantrider-Range rays #0 2 2 622 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." 623 def Eques_Rex checkleap #0 #1 1 1 or checkleap #0 #1 1 0 or checkleap #0 #1 1 2 624 def Eques_Rex-Range merge leaps #0 1 2 merge leaps #0 1 0 leaps #0 1 1 625 set Eques_Rex-Desc "The %s may move to any adjacent space as a King or leap like a Knight." 626 def Fad checkleap #0 #1 1 1 or checkleap #0 #1 2 2 or checkleap #0 #1 2 0 627 def Fad-Range mergeall leaps #0 1 1 leaps #0 2 2 leaps #0 2 0 628 set Fad-Desc "The %s may move one space diagonally, or it may leap two spaces diagonally or orthogonally." 629 def Ferz checkleap #0 #1 1 1 630 def Ferz-Range leaps #0 1 1 631 set Ferz-Desc "The %s may move one space diagonally." 632 def Fibnif checkleap #0 #1 1 2 or checkleap #0 #1 1 1 and == 1 abs - file #0 file #1 633 def Fibnif-Range merge leaps #0 1 2 leaps #0 1 1 634 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." 635 def Giraffe checkleap #0 #1 1 4 636 def Giraffe-Range leaps #0 1 4 637 set Giraffe-Desc "The %s may leap to any space that is one file and four ranks or one rank and four files away." 638 def White_Gold_General checkaleap #0 #1 1 1 or checkaleap #0 #1 -1 1 or checkleap #0 #1 0 1 639 def White_Gold_General-Range mergeall leaps #0 1 0 where #0 1 1 where #0 -1 1 640 set White_Gold_General-Desc "The %s may move one space in any orthgonal direction or one space diagonally forward." 641 def Black_Gold_General checkaleap #0 #1 1 -1 or checkaleap #0 #1 -1 -1 or checkleap #0 #1 0 1 642 def Black_Gold_General-Range mergeall leaps #0 1 0 where #0 1 -1 where #0 -1 -1 643 set Black_Gold_General-Desc "The %s may move one space in any orthgonal direction or one space diagonally forward." 644 def Grasshopper checkgrasshop #0 #1 1 1 or checkgrasshop #0 #1 1 0 645 def Grasshopper-Range merge rays #0 1 0 rays #0 1 1 646 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." 647 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 648 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 649 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." 650 def King checkleap #0 #1 1 1 or checkleap #0 #1 1 0 651 def King-Range merge leaps #0 1 0 leaps #0 1 1 652 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." 653 sub King from to 654 if not fn King #from #to 655 verify sub castle #from #to and match #to var cond isupper space #to wcastle bcastle 656 endif 657 if isupper space #to 658 set Kpos #to 659 else 660 set kpos #to 661 endif 662 return true 663 endsub 664 def Knight checkleap #0 #1 1 2 665 def Knight-Range leaps #0 1 2 666 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." 667 def Korean_Elephant checkpath #0 #1 1 0 1 1 1 1 668 def Korean_Elephant-Range leaps #0 2 3 669 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." 670 def White_Lance checkaride #0 #1 0 1 671 def White_Lance-Range ray #0 0 1 672 set "The %s may move forward in its file as a Rook." 673 def Black_Lance checkaride #0 #1 0 -1 674 def Black_Lance-Range ray #0 0 -1 675 set "The %s may move forward in its file as a Rook." 676 def Leo fn Vao #0 #1 or fn Cannon #0 #1 677 def Leo-Range merge rays #0 1 0 rays #0 1 1 678 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." 679 def Mao checktwostep #0 #1 0 1 1 1 680 def Mao-Range leaps #0 1 2 681 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." 682 def Marshall fn Knight #0 #1 or fn Rook #0 #1 683 def Marshall-Range merge rays #0 1 0 leaps #0 1 2 684 set Marshall-Desc "The %s moves orthogonally as a Rook or leaps as a Knight." 685 def Moa checktwostep #0 #1 1 1 0 1 686 def Moa-Range leaps #0 1 2 687 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." 688 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 689 def Murray_Lion-Range merge merge leaps #0 2 0 leaps #0 2 2 merge leaps #0 1 0 leaps #0 1 1 690 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." 691 def Nightrider checkride #0 #1 1 2 692 def Nightrider-Range rays #0 1 2 693 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." 694 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." 695 set Black_Pawn-Desc var White_Pawn-Desc 696 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 697 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 698 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 699 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 700 def White_Pawn-Promote var wprom 701 def Black_Pawn-Promote var bprom 702 sub White_Pawn from to 703 my newpiece 704 my newmove 705 my prom 706 verify > rank #to rank #from 707 verify <= distance #to #from #fps 708 if capture 709 verify checkleap #from #to 1 1 710 set ep false 711 elseif checkleap #from #to 1 1 and #ep 712 verify == filename var ep filename #to 713 verify < rankname var ep rankname #to 714 verify < rankname #to var bpr 715 capture #ep 716 set ep false 717 elseif > distance #to #from 1 718 verify == rankname #from #wpr 719 verify checkride #from #to 0 1 720 set ep #to 721 else 722 verify checkleap #from #to 0 1 723 set ep false 724 endif 725 set prom fn White_Pawn-Promote #to 726 if onboard where #to 0 #pzs 727 if != space #to $moved 728 set name alias const alias $moved 729 die "You may not promote a" #name "until it reaches the promotion zone." 730 endif 731 elseif onboard where #to 0 1 732 if == White_Pawn const alias space #to and count var prom 733 if not $answered and == mln $maxmln and not strstr thismove chr 59 734 if not match alias space #to var prom 735 push prom space #to 736 endif 737 askpromote #prom 738 endif 739 elseif not match space #to var prom and != White_Pawn const alias space #to 740 set name alias const alias $moved 741 set newname alias const alias space #to 742 set msg list "You may not promote your" #name "to a" join #newname ".
" 743 set msg str_replace "_" " " var msg 744 die #msg 745 endif 746 elseif count var prom 747 if == White_Pawn const alias space #to 748 if == count var prom 1 749 set newpiece alias list var prom 750 set pieceid realname #newpiece 751 set newmove join #newpiece "-dest" 752 add #pieceid $dest 753 appendmove #newmove 754 else 755 askpromote #prom 756 endif 757 elseif not match alias space #to var prom 758 set name alias const alias $moved 759 set newname alias const alias space #to 760 set msg list "You may not promote your" #name "to a" join #newname ".
" 761 set msg str_replace "_" " " var msg 762 die #msg 763 endif 764 else 765 set name alias const alias $moved 766 set msg list "You may not advance your" #name "to the last rank, because there is nothing you may promote it to." 767 set msg str_replace "_" " " var msg 768 die #msg 769 endif 770 set nopvc 0 771 return true 772 endsub 773 sub Black_Pawn from to 774 my newpiece, pieceid 775 my newmove 776 my prom 777 verify < rank #to rank #from 778 verify <= distance #to #from #fps 779 if capture 780 verify checkleap #from #to 1 1 781 set ep false 782 elseif checkleap #from #to 1 1 and #ep 783 verify == filename var ep filename #to 784 verify > rankname var ep rankname #to 785 verify > rankname #to var wpr 786 capture #ep 787 set ep false 788 elseif > distance #to #from 1 789 verify == rankname #from #bpr 790 verify checkride #from #to 0 1 791 set ep #to 792 else 793 verify checkleap #from #to 0 1 794 set ep false 795 endif 796 set prom fn Black_Pawn-Promote #to 797 if onboard where #to 0 neg #pzs 798 if != space #to $moved 799 set name alias const alias $moved 800 die "You may not promote a" #name "until it reaches the promotion zone." 801 endif 802 elseif onboard where #to 0 -1 803 if == Black_Pawn const alias space #to and count var prom 804 if not $answered and == mln $maxmln and not strstr thismove chr 59 805 push prom space #to 806 askpromote #prom 807 endif 808 elseif not match space #to var prom and != Black_Pawn const alias space #to 809 set name alias const alias $moved 810 set newname alias const alias space #to 811 set msg list "You may not promote your" #name "to a" join #newname ".
" 812 set msg str_replace "_" " " var msg 813 die #msg 814 endif 815 elseif count var prom 816 if == Black_Pawn const alias space #to 817 if == count var prom 1 818 set newpiece alias list var prom 819 set newmove join #newpiece "-dest" 820 set pieceid realname var newpiece 821 add #pieceid $dest 822 appendmove #newmove 823 else 824 askpromote #prom 825 endif 826 elseif not match alias space #to var prom 827 set name alias const alias $moved 828 set newname alias const alias space #to 829 set msg list "You may not promote your" #name "to a" join #newname ".
" 830 set msg str_replace "_" " " var msg 831 die #msg 832 endif 833 else 834 set name alias const alias $moved 835 set msg list "You may not advance your" #name "to the last rank, because there is nothing you may promote it to." 836 set msg str_replace "_" " " var msg 837 die #msg 838 endif 839 set nopvc 0 840 return true 841 endsub 842 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." 843 set Black_Quick_Pawn-Desc var White_Quick_Pawn-Desc 844 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 845 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 846 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 847 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 848 def White_Quick_Pawn-Promote var wprom 849 def Black_Quick_Pawn-Promote var bprom 850 sub White_Quick_Pawn from to 851 my newpiece 852 my newmove 853 my prom 854 verify > rank #to rank #from 855 verify <= distance #to #from #fps 856 if capture 857 verify checkleap #from #to 1 1 858 set epf false 859 set ep false 860 elseif checkleap #from #to 1 1 and #ep 861 verify == filename var ep filename #to 862 verify < rankname var ep rankname #to 863 verify < rankname #to rankname var epf 864 capture #ep 865 set epf false 866 set ep false 867 elseif > distance #to #from 1 868 verify checkride #from #to 0 1 869 set epf #from 870 set ep #to 871 else 872 verify checkleap #from #to 0 1 873 set epf false 874 set ep false 875 endif 876 set prom fn White_Quick_Pawn-Promote #to 877 if onboard where #to 0 #pzs 878 if != space #to $moved 879 set name alias const alias $moved 880 die "You may not promote a" #name "from" $moved "to" {space #to} "until it reaches the promotion zone." 881 endif 882 elseif onboard where #to 0 1 883 if == White_Quick_Pawn const alias space #to and count var prom 884 if not $answered and == mln $maxmln and not strstr thismove chr 59 885 if not match alias space #to var prom 886 push prom space #to 887 endif 888 askpromote #prom 889 endif 890 elseif not match space #to var prom and != White_Quick_Pawn const alias space #to 891 set name alias const alias $moved 892 set newname alias const alias space #to 893 set msg list "You may not promote your" #name "to a" join #newname ".
" 894 set msg str_replace "_" " " var msg 895 die #msg 896 endif 897 elseif count var prom 898 if == White_Quick_Pawn const alias space #to 899 if == count var prom 1 900 set newpiece alias list var prom 901 set pieceid realname #newpiece 902 set newmove join #newpiece "-dest" 903 add #pieceid $dest 904 appendmove #newmove 905 else 906 askpromote #prom 907 endif 908 elseif not match alias space #to var prom 909 set name alias const alias $moved 910 set newname alias const alias space #to 911 set msg list "You may not promote your" #name "to a" join #newname ".
" 912 set msg str_replace "_" " " var msg 913 die #msg 914 endif 915 else 916 set name alias const alias $moved 917 set msg list "You may not advance your" #name "to the last rank, because there is nothing you may promote it to." 918 set msg str_replace "_" " " var msg 919 die #msg 920 endif 921 set nopvc 0 922 return true 923 endsub 924 sub Black_Quick_Pawn from to 925 my newpiece, pieceid 926 my newmove 927 my prom 928 verify < rank #to rank #from 929 verify <= distance #to #from #fps 930 if capture 931 verify checkleap #from #to 1 1 932 set ep false 933 set epf false 934 elseif checkleap #from #to 1 1 and #ep 935 verify == filename var ep filename #to 936 verify > rankname var ep rankname #to 937 verify > rankname #to rankname var epf 938 capture #ep 939 set ep false 940 set epf false 941 elseif > distance #to #from 1 942 verify checkride #from #to 0 1 943 set ep #to 944 set epf #from 945 else 946 verify checkleap #from #to 0 1 947 set ep false 948 set epf false 949 endif 950 set prom fn Black_Quick_Pawn-Promote #to 951 if onboard where #to 0 neg #pzs 952 if != space #to $moved 953 set name alias const alias $moved 954 die "You may not promote a" #name "until it reaches the promotion zone." 955 endif 956 elseif onboard where #to 0 -1 957 if == Black_Quick_Pawn const alias space #to and count var prom 958 if not $answered and == mln $maxmln and not strstr thismove chr 59 959 push prom space #to 960 askpromote #prom 961 endif 962 elseif not match space #to var prom and != Black_Quick_Pawn const alias space #to 963 set name alias const alias $moved 964 set newname alias const alias space #to 965 set msg list "You may not promote your" #name "to a" join #newname ".
" 966 set msg str_replace "_" " " var msg 967 die #msg 968 endif 969 elseif count var prom 970 if == Black_Quick_Pawn const alias space #to 971 if == count var prom 1 972 set newpiece alias list var prom 973 set newmove join #newpiece "-dest" 974 set pieceid realname var newpiece 975 add #pieceid $dest 976 appendmove #newmove 977 else 978 askpromote #prom 979 endif 980 elseif not match alias space #to var prom 981 set name alias const alias $moved 982 set newname alias const alias space #to 983 set msg list "You may not promote your" #name "to a" join #newname ".
" 984 set msg str_replace "_" " " var msg 985 die #msg 986 endif 987 else 988 set name alias const alias $moved 989 set msg list "You may not advance your" #name "to the last rank, because there is nothing you may promote it to." 990 set msg str_replace "_" " " var msg 991 die #msg 992 endif 993 set nopvc 0 994 return true 995 endsub 996 def Queen fn Bishop #0 #1 or fn Rook #0 #1 997 def Queen-Range merge rays #0 1 0 rays #0 1 1 998 set Queen-Desc "The %s may move as a Rook or a Bishop." 999 def Rhino windingride #0 #1 1 0 1 1 or windingride #0 #1 0 1 1 1 1000 def Rhino-Range merge eval (windingrays #0 1 0 1 1) windingrays #0 0 1 1 1 1001 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." 1002 def Rook checkride #0 #1 1 0 1003 def Rook-Range rays #0 1 0 1004 set Rook-Desc "The %s may move any number of spaces in any vertical or horizontal direction until it reaches an occupied space." 1005 def Short_Rook checkride #0 #1 1 0 and <= distance #0 #1 4 1006 def Short_Rook-Range merge merge leaps #0 1 0 leaps #0 2 0 merge leaps #0 3 0 leaps #0 4 0 1007 set "The %s may move up to four spaces along its rank or file as a Rook." 1008 def White_Shogi_Knight checkaleap #0 #1 1 2 or checkaleap #0 #1 -1 2 1009 def White_Shogi_Knight-Range array where #0 1 2 where #0 -1 2 1010 set White_Shogi_Knight-Desc "The %s may leap to either space that is two ranks ahead and one file to the side." 1011 def Black_Shogi_Knight checkaleap #0 #1 1 -2 or checkaleap #0 #1 -1 -2 1012 def Black_Shogi_Knight-Range array where #0 1 -2 where #0 -1 -2 1013 set Black_Shogi_Knight-Desc "The %s may leap to either space that is two ranks ahead and one file to the side." 1014 def White_Shogi_Pawn checkaleap #0 #1 0 1 1015 def White_Shogi_Pawn-Range array where #0 0 1 1016 set White_Shogi_Pawn-Desc "The %s map move one space forward in the same file." 1017 def Black_Shogi_Pawn checkaleap #0 #1 0 -1 1018 def Black_Shogi_Pawn-Range array where #0 0 -1 1019 set Black_Shogi_Pawn-Desc "The %s map move one space forward in the same file." 1020 def White_Silver_General checkaleap #0 #1 0 1 or checkleap #0 #1 1 1 1021 def White_Silver_General-Range mergeall leaps #0 1 1 where #0 0 1 1022 set White_Silver_General-Desc "The %s may move one space in any diagonal direction or one space vertically foward." 1023 def Black_Silver_General checkaleap #0 #1 0 -1 or checkleap #0 #1 1 1 1024 def Black_Silver_General-Range mergeall leaps #0 1 1 where #0 0 -1 1025 set Black_Silver_General-Desc "The %s may move one space in any diagonal direction or one space vertically foward." 1026 def Squirrel fn Elephant #0 #1 or fn Dabbabah #0 #1 or fn Knight #0 #1 1027 def Squirrel-Range mergeall leaps #0 2 2 leaps #0 2 0 leaps #0 1 2 1028 set Squirrel-Desc "The %s may leap any non-adjacent space that is no more than two spaces away." 1029 def Spider fn Dabbabah #0 #1 or fn Elephant #0 #1 1030 def Spider-Range merge leaps #0 2 2 leaps #0 0 2 1031 set Spider-Desc "The %s may leap to any space that is two spaces away orthogonally or diagonally." 1032 def Spider-rider fn Dabbabahrider #0 #1 or fn Elephantrider #0 #1 1033 def Spider-rider-Range merge rays #0 2 2 rays #0 0 2 1034 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." 1035 def Squire checktwostep #0 #1 0 1 1 1 or checktwostep #0 #1 1 1 0 1 1036 def Squire-Range leaps #0 1 2 1037 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." 1038 def Unicorn fn Nightrider #0 #1 or fn Bishop #0 #1 1039 def Unicorn-Range merge rays #0 1 2 rays #0 1 1 1040 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." 1041 def Vao cond cond empty #0 capture (not empty #1) (checkhop #0 #1 1 1) (checkride #0 #1 1 1) and #1 1042 def Vao-Range rays #0 1 1 1043 set Vao-Desc "The %s may move diagonally as a Bishop, but it must hop over exactly one intervening piece when it captures." 1044 def Wazir checkleap #0 #1 1 0 1045 def Wazir-Range leaps #0 1 0 1046 set Wazir-Desc "The %s may move one space horizontally or vertically." 1047 def Wizard fn Ferz #0 #1 or fn Camel #0 #1 1048 def Wizard-Range merge leaps #0 1 1 leaps #0 1 3 1049 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." 1050 def Woody_Rook checkleap #0 #1 0 2 or checkleap #0 #1 0 1 1051 def Woody_Rook-Range merge leaps #0 0 1 leaps #0 0 2 1052 set Woody_Rook-Desc "The %s may leap one or two spaces orthogonally. It may pass over another piece when moving two spaces." 1053 def Zebra checkleap #0 #1 2 3 1054 def Zebra-Range leaps #0 2 3 1055 set Zebra-Desc "The %s may leap to any space that is 2 ranks and 3 files or 2 files and 3 ranks away." 1056 def Elephant_Ferz fn Ferz #0 #1 or fn Elephant #0 #1 1057 def Elephant_Ferz-Range merge leaps #0 2 2 leaps #0 1 1 1058 set Elephant_Ferz-Desc "The %s may leap one or two spaces diagonally. It may pass over another piece when moving two spaces." 1059 def Elephant_Wazir fn Wazir #0 #1 or fn Elephant #0 #1 1060 def Elephant_Wazir-Range merge leaps #0 2 2 leaps #0 1 0 1061 set Elephant_Wazir-Desc "The %s may move one space orthogonally, as a Wazir, or leap two spaces diagonally, as an Elephant." 1062 def Kylin fn Ferz #0 #1 or fn Dabbabah #0 #1 1063 def Kylin-Range mergeall leaps #0 1 1 leaps #0 2 0 1064 set Kylin-Desc "The %s may move one space diagonally, or it may leap 2 spaces orthogonally, passing over any pieces in the way." 1065 def Half_Duck fn Ferz #0 #1 or fn Dabbabah #0 #1 or checkleap #0 #1 3 0 1066 def Half_Duck-Range mergeall leaps #0 1 1 leaps #0 2 0 leaps #0 3 0 1067 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." 1068 def Knight_Wazir fn Knight #0 #1 or fn Wazir #0 #1 1069 def Knight_Wazir-Range merge leaps #0 1 2 leaps #0 1 0 1070 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." 1071 def Frog fn Ferz #0 #1 or checkleap #0 #1 3 0 1072 def Frog-Range merge leaps #0 1 1 leaps #0 3 0 1073 set Frog-Desc "The %s may move one space diagonally or directly leap 3 spaces orthogonally." 1074 def Buffalo fn Knight #0 #1 or fn Camel #0 #1 or fn Zebra #0 #1 1075 def Buffalo-Range mergeall leaps #0 1 2 leaps #0 1 3 leaps #0 2 3 1076 set Buffalo-Desc "The %s Buffalo may leap (1, 2) as a Knight, (1, 3) as a Camel, or (2, 3) as a Zebra." 1077 def @ false 1078 sub attacked start finish 1079 my from piece actual 1080 local movetype 1081 set movetype MOVE 1082 if empty #start 1083 set actual true 1084 move #finish #start 1085 add $old #finish 1086 endif 1087 if isupper space #start 1088 def enemies onlylower 1089 else 1090 def enemies onlyupper 1091 endif 1092 for (from piece) fn enemies 1093 if fn const alias #piece #from #to 1094 if #actual 1095 move #start #finish 1096 endif 1097 return #from 1098 endif 1099 next 1100 if #actual 1101 move #start #finish 1102 endif 1103 return false 1104 endsub 1105 sub fission-attacked start finish 1106 my from piece p1 p2 1107 local movetype 1108 set p1 space #start 1109 set p2 space #finish 1110 set movetype CHECK 1111 if isupper #p1 1112 def enemies onlylower 1113 else 1114 def enemies onlyupper 1115 endif 1116 empty #finish 1117 for (from piece) fn enemies 1118 if fn const alias #piece #from #start 1119 add #p2 #finish 1120 return #from 1121 endif 1122 next 1123 add #p2 #finish 1124 return false 1125 endsub 1126 sub checked king 1127 my from piece 1128 local movetype 1129 set movetype CHECK 1130 if isupper cond empty var king $moved space var king 1131 def enemies onlylower 1132 else 1133 def enemies onlyupper 1134 endif 1135 for (from piece) fn enemies 1136 if fn const alias #piece #from var king and isfunc const alias #piece 1137 return #from 1138 endif 1139 next 1140 return false 1141 endsub 1142 def checked anytrue lambda (fn const alias #0 var key var king) cond isupper space var king (onlylower) (onlyupper) =movetype CHECK =king 1143 def threatened anytrue lambda (fn const alias space #0 #0 var king) elem var king threats =movetype CHECK =king 1144 sub uncheckedpath start finish 1145 my from to piece kingpos 1146 local movetype 1147 set movetype CHECK 1148 if empty #finish 1149 set kingpos #start 1150 else 1151 set kingpos #finish 1152 endif 1153 if isupper space #kingpos 1154 def enemies onlylower 1155 else 1156 def enemies onlyupper 1157 endif 1158 for to path #start #finish 1159 move #kingpos #to 1160 for (from piece) fn enemies 1161 if fn const alias #piece #from #to 1162 move #to #kingpos 1163 return false 1164 endif 1165 next 1166 move #to #kingpos 1167 next 1168 return true 1169 endif 1170 sub uncheckedknightleap start finish 1171 my from to piece kingpos kingpiece checkedpaths 1172 local movetype 1173 set movetype CHECK 1174 if empty #start 1175 set kingpos #finish 1176 else 1177 set kingpos #start 1178 endif 1179 if isupper space #kingpos 1180 def enemies onlylower 1181 else 1182 def enemies onlyupper 1183 endif 1184 set kingpiece space #kingpos 1185 set avenues merge intersection leaps #start 1 0 leaps #finish 1 1 intersection leaps #start 1 1 leaps #finish 1 0 1186 set checkdpaths 0 1187 for to #avenues 1188 if empty #to 1189 move #kingpos #to 1190 else 1191 empty #kingpos 1192 endif 1193 for (from piece) fn enemies 1194 if fn const alias #piece #from #to 1195 inc checkedpaths 1196 break 1197 endif 1198 next 1199 if == space #to #kingpiece 1200 move #to #kingpos 1201 else 1202 add #kingpiece #kingpos 1203 endif 1204 if == checkedpaths 0 1205 break 1206 endif 1207 next 1208 return < var checkedpaths 2 1209 endif 1210 sub castle from to 1211 local coord RPOS RDEST xdir 1212 if not flag #from 1213 die A King may not castle after it moves. 1214 endif 1215 if capture 1216 die A King may not castle to an occupied space. 1217 endif 1218 set xdir sign minus file #to file #from 1219 if not checkaride #from #to #xdir 0 1220 die A King may not castle across any occupied space. 1221 endif 1222 set coord #to 1223 do 1224 set coord where #coord #xdir 0 1225 if flag #coord 1226 break 1227 elseif not onboard #coord 1228 die No piece was found to castle with. 1229 elseif not empty #coord 1230 die The King cannot castle with the piece at #coord 1231 endif 1232 loop 1233 set RPOS #coord 1234 move #to #from 1235 if sub checked #from 1236 die A King may not castle out of check. 1237 endif 1238 store 1239 for coord path #from #to 1240 move #from #coord 1241 if sub checked #coord 1242 die A King may not castle through check. 1243 endif 1244 restore 1245 next 1246 move #from #to 1247 set RDEST where #to neg #xdir 0 1248 move #RPOS #RDEST 1249 return true 1250 endsub 1251 sub castlepos from to 1252 local coord RPOS RDEST xdir safe 1253 verify flag #from 1254 verify empty #to 1255 set xdir sign minus file #to file #from 1256 verify checkaride #from #to #xdir 0 1257 verify not sub checked #from 1258 set coord #to 1259 do 1260 set coord where #coord #xdir 0 1261 if flag #coord 1262 break 1263 endif 1264 verify onboard #coord 1265 verify empty #coord 1266 loop 1267 verify flag #coord 1268 set RPOS #coord 1269 store 1270 for coord path #from #to 1271 move #from #coord 1272 set safe not sub checked #coord 1273 restore 1274 verify #safe 1275 next 1276 move #from #to 1277 set RDEST where #to neg #xdir 0 1278 move #RPOS #RDEST 1279 set safe not sub checked #to 1280 restore 1281 return #safe 1282 endsub 1283 sub castle2 kingfrom kingto rookfrom rookto 1284 local coord xdir king rook 1285 if not flag #kingfrom 1286 die A King may not castle after it moves. 1287 endif 1288 if not flag #rookfrom 1289 die A King may not castle with a piece that has already moved. 1290 endif 1291 if not match @ $lastcaptured $prevcaptured 1292 die Castling to an occupied space is not allowed. 1293 endif 1294 if empty #kingto 1295 die There is nothing on #kingto. Did you move a piece there and then move it away? 1296 endif 1297 if empty #rookto 1298 die There is nothing on #rookto. Did you move a piece there and then move it away? 1299 endif 1300 set king space #kingto 1301 set rook space #rookto 1302 if == #king #rook 1303 die "Castling must be between different pieces. These two are both {#king}. What happened?" 1304 endif 1305 empty #kingto 1306 empty #rookto 1307 add #king #kingfrom 1308 add #rook #rookfrom 1309 set xdir sign minus file #kingto file #kingfrom 1310 if not checkaride #kingfrom #kingto #xdir 0 1311 die A King may not castle across any occupied space. 1312 endif 1313 if not checkaride #rookto #rookfrom #xdir 0 1314 die A Rook may not castle across an occupied space. 1315 endif 1316 if sub checked #kingfrom 1317 die A King may not castle out of check. 1318 endif 1319 store 1320 for coord path #kingfrom #kingto 1321 move #kingfrom #coord 1322 if sub checked #coord 1323 die A King may not castle through check. 1324 endif 1325 restore 1326 next 1327 empty #kingfrom 1328 empty #rookfrom 1329 add #king #kingto 1330 add #rook #rookto 1331 unsetflag #kingfrom #rookfrom 1332 if isupper space #kingto 1333 set Kpos #kingto 1334 else 1335 set kpos #kingto 1336 endif 1337 return true 1338 endsub 1339 sub castlepos2 kingfrom kingto rookfrom rookto 1340 echo "Calling castlepos2" #kingfrom #kingto #rookfrom #rookto 1341 local coord xdir safe 1342 verify flag #kingfrom and flag #rookfrom 1343 echo "Verified flags" 1344 verify empty #kingto or == #kingto #rookfrom 1345 verify empty #rookto or == #rookto #kingfrom 1346 echo "Verified empty destinations" 1347 set xdir sign minus file #kingto file #kingfrom 1348 echo "xdir is {#xdir}" 1349 verify checkride #kingfrom #kingto #xdir 0 1350 echo "Verified checkride {#kingfrom} {#kingto} {#xdir} 0" 1351 verify checkride #rookto #rookfrom #xdir 0 1352 echo "Verified checkride {#kingto} {#kingfrom} {#xdir} 0" 1353 verify not sub checked #kingfrom 1354 echo "Verified not checked" 1355 store 1356 for coord path #kingfrom #kingto 1357 move #kingfrom #coord 1358 set safe not sub checked #coord 1359 restore 1360 verify #safe 1361 next 1362 move #kingfrom #kingto 1363 move #rookfrom #rookto 1364 set safe not sub checked #kingto 1365 restore 1366 return #safe 1367 endsub 1368 sub stalemated kingpos 1369 store 1370 local cspaces friend friends from king piece to movetype np prom promfn 1371 set movetype MOVE 1372 set king alias space #kingpos 1373 if hasupper #king 1374 set friends lambda (onlyupper) 1375 set free lambda (haslower #0 or not hasupper #0) 1376 set pzone lambda (not onboard where #0 0 var pzs) 1377 set cspaces var wcastle 1378 set prom var wprom 1379 else 1380 set friends lambda (onlylower) 1381 set free lambda (hasupper #0 or not haslower #0) 1382 set pzone lambda (not onboard where #0 0 neg var pzs) 1383 set cspaces var bcastle 1384 set prom var bprom 1385 endif 1386 store 1387 for (from piece) fn #friends 1388 set af alias #from 1389 for to fn join const alias #piece "-Range" #from 1390 set at alias #to 1391 if fn const alias #piece #from #to and fn #free alias space #to and onboard #to 1392 set ap alias #piece 1393 move #from #to 1394 if not sub checked cond == #from #kingpos #to #kingpos 1395 set promfn join const alias #piece "-Promote" 1396 if fn #pzone #to and match #piece #promotable 1397 if > count var prom 0 1398 for np var prom 1399 setlegal "{#ap} {#af}-{#at}; {#np}-{#at}" 1400 next 1401 endif 1402 elseif fn #pzone #to and isfunc var promfn 1403 set prom fn var promfn #to 1404 if > count var prom 0 1405 for np var prom 1406 setlegal "{#ap} {#af}-{#at}; {#np}-{#at}" 1407 next 1408 endif 1409 elseif fn #pzone #to and match #piece #promotable 1410 if > count var prom 0 1411 for np var prom 1412 setlegal "{#ap} {#af}-{#at}; {#np}-{#at}" 1413 next 1414 endif 1415 else 1416 setlegal "{#ap} {#af}-{#at}" 1417 endif 1418 endif 1419 endif 1420 restore 1421 next 1422 next 1423 if > count var cspaces 0 1424 for to var cspaces 1425 if sub castlepos #kingpos #to 1426 setlegal "{#king} {#kingpos}-{#to}" 1427 endif 1428 next 1429 endif 1430 setsystem autorules sub describe_rules 1431 return cond count system legalmoves false true 1432 endsub 1433 sub stalemated-quick kingpos 1434 store 1435 local checked checkpos cspaces enemies friend friends from in king piece threats to movetype np prom promfn 1436 set movetype MOVE 1437 set king alias space #kingpos 1438 if hasupper #king 1439 set friends lambda (onlyupper) 1440 set enemies lambda (onlylower) 1441 set free lambda (haslower #0 or not hasupper #0) 1442 set pzone lambda (not onboard where #0 0 var pzs) 1443 set cspaces var wcastle 1444 set prom var wprom 1445 else 1446 set friends lambda (onlylower) 1447 set enemies lambda (onlyupper) 1448 set free lambda (hasupper #0 or not haslower #0) 1449 set pzone lambda (not onboard where #0 0 neg var pzs) 1450 set cspaces var bcastle 1451 set prom var bprom 1452 endif 1453 set krange merge fn join const alias space #kingpos "-Range" #kingpos #kingpos 1454 set threats () 1455 for to #krange 1456 set threats.{#to} () 1457 next 1458 for (from piece) fn #enemies 1459 set in intersection var krange fn join const alias var piece "-Range" var from 1460 for to #in 1461 push threats.{#to} #from 1462 next 1463 next 1464 store 1465 for (from piece) fn #friends 1466 set af alias #from 1467 for to fn join const alias #piece "-Range" #from 1468 set at alias #to 1469 if fn const alias #piece #from #to and fn #free alias space #to and onboard #to 1470 set ap alias #piece 1471 set checkpos cond == #from #kingpos #to #kingpos 1472 set checked false 1473 if count elem var checkpos threats 1474 move #from #to 1475 set checked fn threatened #checkpos 1476 restore 1477 endif 1478 if not #checked 1479 set promfn join const alias #piece "-Promote" 1480 if fn #pzone #to and match #piece #promotable 1481 if > count var prom 0 1482 for np var prom 1483 setlegal "{#ap} {#af}-{#at}; {#np}-{#at}" 1484 next 1485 endif 1486 elseif fn #pzone #to and isfunc var promfn 1487 set prom fn var promfn #to 1488 if > count var prom 0 1489 for np var prom 1490 setlegal "{#ap} {#af}-{#at}; {#np}-{#at}" 1491 next 1492 endif 1493 elseif fn #pzone #to and match #piece #promotable 1494 if > count var prom 0 1495 for np var prom 1496 setlegal "{#ap} {#af}-{#at}; {#np}-{#at}" 1497 next 1498 endif 1499 else 1500 setlegal "{#ap} {#af}-{#at}" 1501 endif 1502 endif 1503 endif 1504 restore 1505 next 1506 next 1507 if > count var cspaces 0 1508 for to var cspaces 1509 if sub castlepos #kingpos #to 1510 setlegal "{#king} {#kingpos}-{#to}" 1511 endif 1512 next 1513 endif 1514 setsystem autorules sub describe_rules 1515 return cond count system legalmoves false true 1516 endsub 1517 sub stalemated2 kingpos 1518 store 1519 local cspaces friend friends from piece to movetype 1520 set movetype MOVE 1521 if isupper space #kingpos 1522 set friends (onlyupper) 1523 set friend (isupper #0) 1524 set cspaces var wcastle 1525 else 1526 set friends (onlylower) 1527 set friend (islower #0) 1528 set cspaces var bcastle 1529 endif 1530 set royal space var kingpos 1531 store 1532 for (from piece) fn #friends 1533 for to fn join const alias #piece "-Range" #from 1534 if fn const alias #piece #from #to and not fn #friend space #to and onboard #to 1535 move #from #to 1536 if not sub checked cond == #from #kingpos #to #kingpos 1537 set ap alias #piece 1538 setlegal "{#ap} {#from}-{#to}" 1539 endif 1540 endif 1541 restore 1542 next 1543 next 1544 if > count var cspaces 0 and flag #kingpos 1545 for mvs var cspaces 1546 if sub castlepos2 #mvs.0 #mvs.1 #mvs.2 #mvs.3 and == #kingpos #mvs.0 1547 set pk alias space #mvs.0 1548 set pr alias space #mvs.2 1549 setlegal "{#pk} {#mvs.0}-{#mvs.1}; {#pr} {#mvs.2}-{#mvs.3}" 1550 endif 1551 next 1552 endif 1553 setsystem autorules sub describe_rules 1554 return cond count system legalmoves false true 1555 endsub 1556 sub fusion-stalemated kingpos 1557 store 1558 local cspaces friend friends from piece to movetype mv ss 1559 set movetype MOVE 1560 set ss join chr 47 chr 47 1561 if isupper space #kingpos 1562 set friends (onlyupper) 1563 set friend (isupper #0) 1564 set cspaces var wcastle 1565 else 1566 set friends (onlylower) 1567 set friend (islower #0) 1568 set cspaces var bcastle 1569 endif 1570 set royal space var kingpos 1571 store 1572 set kp #kingpos 1573 for (from piece) fn #friends 1574 set ap alias #piece 1575 for to fn join const #ap "-Range" #from 1576 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 1577 move #from #to 1578 if match #ap K KR KB KN k kr kb kn 1579 set kp #to 1580 endif 1581 if not sub checked #kp 1582 setlegal "{#ap} {#from}-{#to}" 1583 endif 1584 restore 1585 set kp #kingpos 1586 endif 1587 if not sub checked #from and empty #to and == strlen alias #piece 2 1588 set compound alias #piece 1589 set simple1 leftstr #compound 1 1590 set simple2 rightstr #compound 1 1591 if != not fn #friend space #to and fn const alias #simple1 #from #to 1592 add #simple1 #to 1593 add #simple2 #from 1594 if match #simple1 K k 1595 set kp #to 1596 endif 1597 if not sub checked #kp 1598 setlegal "{#simple1} {#from}-{#to}; {#ss} {#simple2}-{#from}" 1599 endif 1600 restore 1601 set kp #kingpos 1602 endif 1603 if != not fn #friend space #to and fn const alias #simple2 #from #to 1604 add #simple2 #to 1605 add #simple1 #from 1606 if match #simple1 K k 1607 set kp #from 1608 endif 1609 if not sub checked #kp 1610 setlegal "{#simple2} {#from}-{#to}; {#ss} {#simple1}-{#from}" 1611 endif 1612 restore 1613 set kp #kingpos 1614 endif 1615 endif 1616 next 1617 next 1618 if > count var cspaces 0 1619 for to var cspaces 1620 if sub castlepos #kingpos #to 1621 setlegal (#kingpos #to) 1622 endif 1623 next 1624 endif 1625 setsystem autorules sub describe_rules 1626 return cond count system legalmoves false true 1627 endsub 1628 sub describe_rules 1629 my c piecenames notation values val id ref rules desc name codename rangefn 1630 set c.0 join filename 0 rankname 0 1631 set c.1 join filename >> lastfile 1 rankname 1 1632 set c.2 join filename inc >> lastfile 1 rankname 1 1633 set c.3 join filename >> lastfile 1 rankname inc >> lastrank 1 1634 set c.4 join filename inc >> lastfile 1 rankname >> lastrank 1 1635 set c.5 join filename >> lastfile 1 rankname dec lastrank 1636 set c.6 join filename inc >> lastfile 1 rankname dec lastrank 1637 set c.7 join filename lastfile rankname lastrank 1638 foreach p keys $pieces 1639 if isconst alias #p 1640 set codename const alias #p 1641 set name alias #codename 1642 set notation.{#name} alias #p 1643 if match #codename const alias space #kpos const alias space #Kpos 1644 set values.{#name} * 8 count spaces 1645 else 1646 set rangefn join #codename "-Range" 1647 set values.{#name} sum lambda (count fn #rangefn #0) #c 1648 endif 1649 endif 1650 next 1651 set values reverse asort #values 1652 set rules "" 1653 foreach (name val) #values 1654 set codename realname #name 1655 if == null var #codename 1656 set codename #name 1657 endif 1658 set ref join #codename "-Desc" 1659 set desc str_replace "%s" #name var #ref 1660 set desc str_replace "_" " " #desc 1661 set id realname #notation.{#name} 1662 set rules join #rules "" 1665 return #rules 1666 endsub 1667 sub findmates side 1668 local enemyking king mates moves mv 1669 if match #side 1 white White first 1670 set king #Kpos 1671 set enemyking #kpos 1672 else 1673 set king #kpos 1674 set enemyking #Kpos 1675 endif 1676 set mates () 1677 ban none 1678 setsystem maxmove 0 1679 store main 1680 setsystem legalmoves () 1681 if not sub stalemated #king 1682 set lglmvs $legalmoves 1683 foreach move #lglmvs 1684 set moves explode chr 59 #move 1685 foreach mv #moves 1686 set mv trim #mv 1687 eval "MOVE: {#mv}" 1688 next 1689 if sub checked #enemyking 1690 setsystem legalmoves () 1691 if sub stalemated #enemyking 1692 push mates #move 1693 endif 1694 endif 1695 restore main 1696 next 1697 endif 1698 setsystem legalmoves #mates 1699 endsub 1700 endlib[pc {#id} {#name}]{#desc}[/pc]" 1663 next 1664 set rules join #rules "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] => 0 [4] => 2 [5] => or [6] => checkleap [7] => #0 [8] => #1 [9] => 1 [10] => 2 [11] => or [12] => checkleap [13] => #0 [14] => #1 [15] => 2 [16] => 2 [17] => or [18] => checkleap [19] => #0 [20] => #1 [21] => 0 [22] => 3 [23] => or [24] => checkleap [25] => #0 [26] => #1 [27] => 1 [28] => 3 [29] => or [30] => checkleap [31] => #0 [32] => #1 [33] => 2 [34] => 3 [35] => or [36] => checkleap [37] => #0 [38] => #1 [39] => 3 [40] => 3 [41] => and [42] => not [43] => sub [44] => checked [45] => #0 [46] => and [47] => empty [48] => #1 [49] => and [50] => not [51] => match [52] => #1 [53] => g1 [54] => g12 [55] => and [56] => flag [57] => #0 [58] => or [59] => checkleap [60] => #0 [61] => #1 [62] => 1 [63] => 0 [64] => or [65] => checkleap [66] => #0 [67] => #1 [68] => 1 [69] => 1 ) [King-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 1 [4] => 0 [5] => leaps [6] => #0 [7] => 1 [8] => 1 [9] => leaps [10] => #0 [11] => 0 [12] => 2 [13] => leaps [14] => #0 [15] => 1 [16] => 2 [17] => leaps [18] => #0 [19] => 2 [20] => 2 [21] => leaps [22] => #0 [23] => 0 [24] => 3 [25] => leaps [26] => #0 [27] => 1 [28] => 3 [29] => leaps [30] => #0 [31] => 2 [32] => 3 [33] => leaps [34] => #0 [35] => 3 [36] => 3 ) [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 ) [Tiger] => Array ( [0] => fn [1] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => and [6] => empty [7] => #0 ) [2] => where [3] => #0 [4] => 2 [5] => 3 [6] => #1 [7] => or [8] => fn [9] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => 1 [4] => -1 [5] => and [6] => empty [7] => #0 ) [10] => where [11] => #0 [12] => 2 [13] => -3 [14] => #1 [15] => or [16] => fn [17] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => -1 [4] => 1 [5] => and [6] => empty [7] => #0 ) [18] => where [19] => #0 [20] => -2 [21] => 3 [22] => #1 [23] => or [24] => fn [25] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => -1 [4] => -1 [5] => and [6] => empty [7] => #0 ) [26] => where [27] => #0 [28] => -2 [29] => -3 [30] => #1 [31] => or [32] => fn [33] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => and [6] => empty [7] => #0 ) [34] => where [35] => #0 [36] => 3 [37] => 2 [38] => #1 [39] => or [40] => fn [41] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => 1 [4] => -1 [5] => and [6] => empty [7] => #0 ) [42] => where [43] => #0 [44] => 3 [45] => -2 [46] => #1 [47] => or [48] => fn [49] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => -1 [4] => 1 [5] => and [6] => empty [7] => #0 ) [50] => where [51] => #0 [52] => -3 [53] => 2 [54] => #1 [55] => or [56] => fn [57] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => -1 [4] => -1 [5] => and [6] => empty [7] => #0 ) [58] => where [59] => #0 [60] => -3 [61] => -2 [62] => #1 [63] => or [64] => checkleap [65] => #0 [66] => #1 [67] => 3 [68] => 2 ) [Tiger-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 3 [4] => 2 [5] => ray [6] => where [7] => #0 [8] => 2 [9] => 3 [10] => 1 [11] => 1 [12] => ray [13] => where [14] => #0 [15] => 2 [16] => -3 [17] => 1 [18] => -1 [19] => ray [20] => where [21] => #0 [22] => -2 [23] => 3 [24] => -1 [25] => 1 [26] => ray [27] => where [28] => #0 [29] => -2 [30] => -3 [31] => -1 [32] => -1 [33] => ray [34] => where [35] => #0 [36] => 3 [37] => 2 [38] => 1 [39] => 1 [40] => ray [41] => where [42] => #0 [43] => 3 [44] => -2 [45] => 1 [46] => -1 [47] => ray [48] => where [49] => #0 [50] => -3 [51] => 2 [52] => -1 [53] => 1 [54] => ray [55] => where [56] => #0 [57] => -3 [58] => -2 [59] => -1 [60] => -1 ) [Astrologer] => Array ( [0] => fn [1] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => and [6] => empty [7] => #0 ) [2] => where [3] => #0 [4] => 1 [5] => 3 [6] => #1 [7] => or [8] => fn [9] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => 1 [4] => -1 [5] => and [6] => empty [7] => #0 ) [10] => where [11] => #0 [12] => 1 [13] => -3 [14] => #1 [15] => or [16] => fn [17] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => -1 [4] => 1 [5] => and [6] => empty [7] => #0 ) [18] => where [19] => #0 [20] => -1 [21] => 3 [22] => #1 [23] => or [24] => fn [25] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => -1 [4] => -1 [5] => and [6] => empty [7] => #0 ) [26] => where [27] => #0 [28] => -1 [29] => -3 [30] => #1 [31] => or [32] => fn [33] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => 1 [4] => 1 [5] => and [6] => empty [7] => #0 ) [34] => where [35] => #0 [36] => 3 [37] => 1 [38] => #1 [39] => or [40] => fn [41] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => 1 [4] => -1 [5] => and [6] => empty [7] => #0 ) [42] => where [43] => #0 [44] => 3 [45] => -1 [46] => #1 [47] => or [48] => fn [49] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => -1 [4] => 1 [5] => and [6] => empty [7] => #0 ) [50] => where [51] => #0 [52] => -3 [53] => 1 [54] => #1 [55] => or [56] => fn [57] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => -1 [4] => -1 [5] => and [6] => empty [7] => #0 ) [58] => where [59] => #0 [60] => -3 [61] => -1 [62] => #1 [63] => or [64] => checkleap [65] => #0 [66] => #1 [67] => 3 [68] => 1 ) [Astrologer-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 3 [4] => 1 [5] => ray [6] => where [7] => #0 [8] => 1 [9] => 3 [10] => 1 [11] => 1 [12] => ray [13] => where [14] => #0 [15] => 1 [16] => -3 [17] => 1 [18] => -1 [19] => ray [20] => where [21] => #0 [22] => -1 [23] => 3 [24] => -1 [25] => 1 [26] => ray [27] => where [28] => #0 [29] => -1 [30] => -3 [31] => -1 [32] => -1 [33] => ray [34] => where [35] => #0 [36] => 3 [37] => 1 [38] => 1 [39] => 1 [40] => ray [41] => where [42] => #0 [43] => 3 [44] => -1 [45] => 1 [46] => -1 [47] => ray [48] => where [49] => #0 [50] => -3 [51] => 1 [52] => -1 [53] => 1 [54] => ray [55] => where [56] => #0 [57] => -3 [58] => -1 [59] => -1 [60] => -1 ) [Pegasus] => Array ( [0] => fn [1] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => 0 [4] => 1 [5] => and [6] => empty [7] => #0 ) [2] => where [3] => #0 [4] => 1 [5] => 2 [6] => #1 [7] => or [8] => fn [9] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => 0 [4] => -1 [5] => and [6] => empty [7] => #0 ) [10] => where [11] => #0 [12] => 1 [13] => -2 [14] => #1 [15] => or [16] => fn [17] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => 0 [4] => 1 [5] => and [6] => empty [7] => #0 ) [18] => where [19] => #0 [20] => -1 [21] => 2 [22] => #1 [23] => or [24] => fn [25] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => 0 [4] => -1 [5] => and [6] => empty [7] => #0 ) [26] => where [27] => #0 [28] => -1 [29] => -2 [30] => #1 [31] => or [32] => fn [33] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => 1 [4] => 0 [5] => and [6] => empty [7] => #0 ) [34] => where [35] => #0 [36] => 2 [37] => 1 [38] => #1 [39] => or [40] => fn [41] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => 1 [4] => 0 [5] => and [6] => empty [7] => #0 ) [42] => where [43] => #0 [44] => 2 [45] => -1 [46] => #1 [47] => or [48] => fn [49] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => -1 [4] => 0 [5] => and [6] => empty [7] => #0 ) [50] => where [51] => #0 [52] => -2 [53] => 1 [54] => #1 [55] => or [56] => fn [57] => Array ( [0] => checkaride [1] => #0 [2] => #1 [3] => -1 [4] => 0 [5] => and [6] => empty [7] => #0 ) [58] => where [59] => #0 [60] => -2 [61] => -1 [62] => #1 [63] => or [64] => checkleap [65] => #0 [66] => #1 [67] => 2 [68] => 1 ) [Pegasus-Range] => Array ( [0] => mergeall [1] => leaps [2] => #0 [3] => 2 [4] => 1 [5] => ray [6] => where [7] => #0 [8] => 1 [9] => 2 [10] => 0 [11] => 1 [12] => ray [13] => where [14] => #0 [15] => 1 [16] => -2 [17] => 0 [18] => -1 [19] => ray [20] => where [21] => #0 [22] => -1 [23] => 2 [24] => 0 [25] => 1 [26] => ray [27] => where [28] => #0 [29] => -1 [30] => -2 [31] => 0 [32] => -1 [33] => ray [34] => where [35] => #0 [36] => 2 [37] => 1 [38] => 1 [39] => 0 [40] => ray [41] => where [42] => #0 [43] => 2 [44] => -1 [45] => 1 [46] => 0 [47] => ray [48] => where [49] => #0 [50] => -2 [51] => 1 [52] => -1 [53] => 0 [54] => ray [55] => where [56] => #0 [57] => -2 [58] => -1 [59] => -1 [60] => 0 ) [enemies] => Array ( [0] => onlyupper ) )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 King moves 1 square as a regular king but as his first move of the game may jump anywhere 2 or 3 spaces away, unless he is in check. [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. [mypieces] => Array ( [k] => Array ( ) [K] => Array ( ) [q] => Array ( ) [Q] => Array ( ) [r] => Array ( ) [R] => Array ( ) [b] => Array ( ) [B] => Array ( ) [n] => Array ( ) [N] => Array ( ) [p] => Array ( ) [P] => Array ( ) [A] => wmage.png [a] => bmage.png [G] => wpegasus.png [g] => bpegasus.png [T] => Array ( ) [t] => Array ( ) ) [kpos] => g12 [Kpos] => h1 [wpr] => 4 [bpr] => 9 [fps] => 2 [pzs] => 1 [wprom] => [bprom] => [Tiger-Desc] => The %s makes a 3-2 leap, and may then continue its move by sliding away from its starting square as a bishop. [Astrologer-Desc] => The %s makes a 3-1 leap, and may then continue its move by sliding away from its starting square as a bishop. [Pegasus-Desc] => The %s makes a 2-1 leap, and may then continue its move by sliding away from its starting square as a rook. [cap] => Array ( [0] => B [1] => G [2] => P [3] => T [4] => t ) [codename] => Astrologer [nopvc] => 0 [posvar] => br1g2qk4r18b3g1ppppp2pp1pp6pa1p7p8P2P2P4P8P1P2P2PP3P4bT2Q2R12RA2B2K1aA1,g12 [wragtbqkbtgar24pppppppppppp32P15PPPPPPPP1PPP24RAGTBQKBTGAR,g1,g12] => 1 [RESULT] => [bragtbqkbtgar24ppppp1pppppp17p14P15PPPPPPPP1PPP24RAGTBQKBTGAR,g1,g12] => 1 [wragtbqkbtgar24ppppp1pppppp17p8P5P15PP1PPPPP1PPP24RAGTBQKBTGAR,g1,g12] => 1 [bragtbqkbtgar24ppppp2ppppp6p10p8P5P15PP1PPPPP1PPP24RAGTBQKBTGAR,g1,g12] => 1 [wragtbqkbtgar24ppppp2ppppp6p10p8P2P2P15PP1PP1PP1PPP24RAGTBQKBTGAR,g1,g12] => 1 [bragt1qkbtgar18b5ppppp2ppppp6p10p8P2P2P15PP1PP1PP1PPP24RAGTBQKBTGAR,g1,g12] => 1 [wragt1qkbtgar18b5ppppp2ppppp6p10p8P2P2P4P10P2PP1PP1PPP24RAGTBQKBTGAR,g1,g12] => 1 [bragt1qk1tgar17bb5ppppp2ppppp6p10p8P2P2P4P10P2PP1PP1PPP24RAGTBQKBTGAR,g1,g12] => 1 [wragt1qk1tgar17bb5ppppp2ppppp6p10p8P2P2P4P10P2PP1PP1PPP11R12RAGTBQKBTGA1,g1,g12] => 1 [bragt1qk1t1ar17bb3g1ppppp2ppppp6p10p8P2P2P4P10P2PP1PP1PPP11R12RAGTBQKBTGA1,g1,g12] => 1 [wragt1qk1t1ar17bb3g1ppppp2ppppp6p10p2T5P2P2P4P10P2PP1PP1PPP11R12RAG1BQKBTGA1,g1,g12] => 1 [bragt1qk1t1ar18b3g1ppppp2ppppp6p10p2b5P2P2P4P10P2PP1PP1PPP11R12RAG1BQKBTGA1,g1,g12] => 1 [wragt1qk1t1ar18b3g1ppppp2ppppp6p10p2b5P2P2P4P10PG1PP1PP1PPP11R12RA2BQKBTGA1,g1,g12] => 1 [bragt1qk3ar18b3g1ppppp2ppppp6p10p2b5P2P2P4P10Pt1PP1PP1PPP11R12RA2BQKBTGA1,g1,g12] => 1 [wragt1qk3ar18b3g1ppppp2ppppp6p10p2b5P2P2P4P10PB1PP1PP1PPP11R12RA3QKBTGA1,g1,g12] => 1 [brag2qk3ar18b3g1pppppt1ppppp6p10p2b5P2P2P4P10PB1PP1PP1PPP11R12RA3QKBTGA1,g1,g12] => 1 [wrag2qk3ar18b3g1pppppt1ppppp6p10p2b5P2P2P4P10P2PP1PP1PPP11R12RA2BQKBTGA1,g1,g12] => 1 [brag2qk3ar18b3g1ppppp2ppppp6p10p2b5P2P2P4P10P2PP1PP1tPP11R12RA2BQKBTGA1,g1,g12] => 1 [wrag2qk3ar18b3g1ppppp2ppppp6p10p2b5P2P2P4P10P2PP1PP1tPP7Q3R12RA2B1KBTGA1,g1,g12] => 1 [br1g2qk3ar18b3g1ppppp2ppppp6pa9p2b5P2P2P4P10P2PP1PP1tPP7Q3R12RA2B1KBTGA1,g1,g12] => 1 [wr1g2qk3ar18b3g1ppppp2ppppp6pa9p2b5P2P2P4P10P2PP1PP1tPP5T1Q3R12RA2B1KB1GA1,g1,g12] => 1 [br1g2qk3ar18b3g1ppppp2pp1pp6pa1p7p2b5P2P2P4P10P2PP1PP1tPP5T1Q3R12RA2B1KB1GA1,g1,g12] => 1 [wr1g2qk3ar18b3g1ppppp2pp1pp6pa1p7p2b5P2P2P4P8P1P2PP1PP1t1P5T1Q3R12RA2B1KB1GA1,g1,g12] => 1 [br1g2qk3ar18b3g1ppppp2pp1pp6pa1p7p8P2P2P4P8P1P2PP1PP1t1P4bT1Q3R12RA2B1KB1GA1,g1,g12] => 1 [wr1g2qk3ar18b3g1ppppp2pp1pp6pa1p7p8P2P2P4P8P1P2PP1PP1t1P4bT1Q3R7K4RA2B2B1GA1,g12] => 1 [br1g2qk4r18b3g1ppppp2pp1pp6pa1p7p8P2P2P4P8P1P2Pa1PP1t1P4bT1Q3R7K4RA2B2B1GA1,g12] => 1 [wr1g2qk4r18b3g1ppppp2pp1pp6pa1p7p8P2P2P4P8P1P2Pa1PP1t1P4bT2Q2R7K4RA2B2B1GA1,g12] => 1 [br1g2qk4r18b3g1ppppp2pp1pp6pa1p7p8P2P2P4P8P1P2Pa1PP3P4bT2Q2R7K4RA2B2t1GA1,g12] => 1 [wr1g2qk4r18b3g1ppppp2pp1pp6pa1p7p8P2P2P4P8P1P2Pa1PP3P4bT2Q2R12RA2B2K1GA1,g12] => 1 [br1g2qk4r18b3g1ppppp2pp1pp6pa1p7p8P2P2P4P8P1P2P2PP3P4bT2Q2R12RA2B2K1aA1,g12] => 1 ) ) )mline
Array ( [0] => MoveLine Object ( [movenum] => 1 [move] => P i4-i6 [level] => 0 [comment] => [length] => 10 [newturn] => 1 [turn] => 1 ) [1] => MoveLine Object ( [movenum] => 2 [move] => p f9-f7 [level] => 0 [comment] => [length] => 12 [newturn] => [turn] => 1 ) [2] => MoveLine Object ( [movenum] => 3 [move] => P c4-c6 [level] => 0 [comment] => [length] => 10 [newturn] => 1 [turn] => 2 ) [3] => MoveLine Object ( [movenum] => 4 [move] => p g9-g8 [level] => 0 [comment] => [length] => 12 [newturn] => [turn] => 2 ) [4] => MoveLine Object ( [movenum] => 5 [move] => P f4-f6 [level] => 0 [comment] => [length] => 10 [newturn] => 1 [turn] => 3 ) [5] => MoveLine Object ( [movenum] => 6 [move] => b e12-g10 [level] => 0 [comment] => [length] => 14 [newturn] => [turn] => 3 ) [6] => MoveLine Object ( [movenum] => 7 [move] => P b4-b5 [level] => 0 [comment] => [length] => 10 [newturn] => 1 [turn] => 4 ) [7] => MoveLine Object ( [movenum] => 8 [move] => b h12-f10 [level] => 0 [comment] => [length] => 14 [newturn] => [turn] => 4 ) [8] => MoveLine Object ( [movenum] => 9 [move] => R l1-l3 [level] => 0 [comment] => [length] => 10 [newturn] => 1 [turn] => 5 ) [9] => MoveLine Object ( [movenum] => 10 [move] => g j12-k10 [level] => 0 [comment] => [length] => 14 [newturn] => [turn] => 5 ) [10] => MoveLine Object ( [movenum] => 11 [move] => T d1-i7 [level] => 0 [comment] => [length] => 10 [newturn] => 1 [turn] => 6 ) [11] => MoveLine Object ( [movenum] => 12 [move] => b f10-i7 [level] => 0 [comment] => [length] => 13 [newturn] => [turn] => 6 ) [12] => MoveLine Object ( [movenum] => 13 [move] => G c1-b4 [level] => 0 [comment] => [length] => 10 [newturn] => 1 [turn] => 7 ) [13] => MoveLine Object ( [movenum] => 14 [move] => t i12-b4 [level] => 0 [comment] => [length] => 13 [newturn] => [turn] => 7 ) [14] => MoveLine Object ( [movenum] => 15 [move] => B e1-b4 [level] => 0 [comment] => [length] => 10 [newturn] => 1 [turn] => 8 ) [15] => MoveLine Object ( [movenum] => 16 [move] => t d12-f9 [level] => 0 [comment] => [length] => 13 [newturn] => [turn] => 8 ) [16] => MoveLine Object ( [movenum] => 17 [move] => B b4-e1 [level] => 0 [comment] => [length] => 10 [newturn] => 1 [turn] => 9 ) [17] => MoveLine Object ( [movenum] => 18 [move] => t f9-j4 [level] => 0 [comment] => [length] => 12 [newturn] => [turn] => 9 ) [18] => MoveLine Object ( [movenum] => 19 [move] => Q f1-h3 [level] => 0 [comment] => [length] => 11 [newturn] => 1 [turn] => 10 ) [19] => MoveLine Object ( [movenum] => 20 [move] => a b12-h8 [level] => 0 [comment] => [length] => 14 [newturn] => [turn] => 10 ) [20] => MoveLine Object ( [movenum] => 21 [move] => T i1-f3 [level] => 0 [comment] => [length] => 11 [newturn] => 1 [turn] => 11 ) [21] => MoveLine Object ( [movenum] => 22 [move] => p j9-j8 [level] => 0 [comment] => [length] => 13 [newturn] => [turn] => 11 ) [22] => MoveLine Object ( [movenum] => 23 [move] => P k4-k5 [level] => 0 [comment] => [length] => 11 [newturn] => 1 [turn] => 12 ) [23] => MoveLine Object ( [movenum] => 24 [move] => b i7-e3 [level] => 0 [comment] => // - Check! - [length] => 27 [newturn] => [turn] => 12 ) [24] => MoveLine Object ( [movenum] => 25 [move] => K g1-h2 [level] => 0 [comment] => [length] => 11 [newturn] => 1 [turn] => 13 ) [25] => MoveLine Object ( [movenum] => 26 [move] => a k12-e4 [level] => 0 [comment] => [length] => 14 [newturn] => [turn] => 13 ) [26] => MoveLine Object ( [movenum] => 27 [move] => Q h3-i3 [level] => 0 [comment] => [length] => 11 [newturn] => 1 [turn] => 14 ) [27] => MoveLine Object ( [movenum] => 28 [move] => t j4-h1 [level] => 0 [comment] => [length] => 13 [newturn] => [turn] => 14 ) [28] => MoveLine Object ( [movenum] => 29 [move] => K h2-h1 [level] => 0 [comment] => [length] => 11 [newturn] => 1 [turn] => 15 ) [29] => MoveLine Object ( [movenum] => 30 [move] => a e4-j1 [level] => 0 [comment] => [length] => 13 [newturn] => [turn] => 15 ) [30] => MoveLine Object ( [movenum] => 31 [move] => resign [level] => 0 [comment] => // - Richard milner has resigned. - [length] => 46 [newturn] => 1 [turn] => 16 ) )allmoves
Array ( [0] => moveindex 30;MOVE: resign;postauto1 [1] => moveindex 29;MOVE: a e4-j1;postauto2 [2] => moveindex 28;MOVE: K h2-h1;postauto1 [3] => moveindex 27;MOVE: t j4-h1;postauto2 [4] => moveindex 26;MOVE: Q h3-i3;postauto1 [5] => moveindex 25;MOVE: a k12-e4;postauto2 [6] => moveindex 24;MOVE: K g1-h2;postauto1 [7] => moveindex 23;MOVE: b i7-e3;postauto2 [8] => moveindex 22;MOVE: P k4-k5;postauto1 [9] => moveindex 21;MOVE: p j9-j8;postauto2 [10] => moveindex 20;MOVE: T i1-f3;postauto1 [11] => moveindex 19;MOVE: a b12-h8;postauto2 [12] => moveindex 18;MOVE: Q f1-h3;postauto1 [13] => moveindex 17;MOVE: t f9-j4;postauto2 [14] => moveindex 16;MOVE: B b4-e1;postauto1 [15] => moveindex 15;MOVE: t d12-f9;postauto2 [16] => moveindex 14;MOVE: B e1-b4;postauto1 [17] => moveindex 13;MOVE: t i12-b4;postauto2 [18] => moveindex 12;MOVE: G c1-b4;postauto1 [19] => moveindex 11;MOVE: b f10-i7;postauto2 [20] => moveindex 10;MOVE: T d1-i7;postauto1 [21] => moveindex 9;MOVE: g j12-k10;postauto2 [22] => moveindex 8;MOVE: R l1-l3;postauto1 [23] => moveindex 7;MOVE: b h12-f10;postauto2 [24] => moveindex 6;MOVE: P b4-b5;postauto1 [25] => moveindex 5;MOVE: b e12-g10;postauto2 [26] => moveindex 4;MOVE: P f4-f6;postauto1 [27] => moveindex 3;MOVE: p g9-g8;postauto2 [28] => moveindex 2;MOVE: P c4-c6;postauto1 [29] => moveindex 1;MOVE: p f9-f7;postauto2 [30] => moveindex 0;MOVE: P i4-i6;postauto1 )movelist
1. P i4-i6 1... p f9-f7 2. P c4-c6 2... p g9-g8 3. P f4-f6 3... b e12-g10 4. P b4-b5 4... b h12-f10 5. R l1-l3 5... g j12-k10 6. T d1-i7 6... b f10-i7 7. G c1-b4 7... t i12-b4 8. B e1-b4 8... t d12-f9 9. B b4-e1 9... t f9-j4 10. Q f1-h3 10... a b12-h8 11. T i1-f3 11... p j9-j8 12. P k4-k5 12... b i7-e3 // - Check! - 13. K g1-h2 13... a k12-e4 14. Q h3-i3 14... t j4-h1 15. K h2-h1 15... a e4-j1 16. resign // - Richard milner has resigned. -constants
Array ( [p] => Black_Pawn [P] => White_Pawn [q] => Queen [Q] => Queen [r] => Rook [R] => Rook [b] => Bishop [B] => Bishop [G] => Pegasus [g] => Pegasus [A] => Astrologer [a] => Astrologer [T] => Tiger [t] => Tiger [K] => King [k] => King )