; *** Dabbabante ; *** Game of V.R. Parton, ZRF by Peter Aronson, based on Zillions Chess ZRF 1.2 ; v.1.0 Initial Coding ; v.1.1 Add variant with Alibabante ; You need to purchase Zillions of Games to load this rules file ; Visit the Zillions web site at http://www.zillions-of-games.com (define leap1 ($1 (verify not-friend?) add) ) (define leap2 ($1 $2 (verify not-friend?) add) ) (define king-shift ($1 (verify not-friend?) (set-attribute never-moved? false) add) ) (define slide ($1 (while empty? add $1) (verify not-friend?) add)) (define rook-slide ( $1 (while empty? (set-attribute never-moved? false) add $1) (verify not-friend?) (set-attribute never-moved? false) add )) (define dabbabante-slide ( $1 $1 (while true (if not-friend? add) $1 $1) )) (define O-O ( (verify never-moved?) e ; KB1 (verify empty?) e ; KD1 cascade e ; KN1 (verify empty?) e ; KR1 (verify (and friend? (piece? Rook) never-moved?) ) from back ; K1 ; Save expensive not-attacked?s for last (verify not-attacked?) e ; KD1 (verify not-attacked?) to (set-attribute never-moved? false) ; We could check if KN1 is attacked too, but this isn't ; really necessary since Zillions doesn't allow any moves ; into check e ; KN1 (set-attribute never-moved? false) add ) ) (define O-O-O ( (verify never-moved?) w ; Q1 (verify empty?) w ; QB1 (verify empty?) w ; QD1 (verify empty?) cascade w ; QN1 (verify empty?) w ; QR1 (verify (and friend? (piece? Rook) never-moved?) ) from back ; K1 ; Save expensive not-attacked?s for last (verify not-attacked?) w ; Q1 (verify not-attacked?) w ; QB1 (verify not-attacked?) to (set-attribute never-moved? false) ; We could check if KN1 is attacked too, but this isn't ; really necessary since Zillions doesn't allow any moves ; into check w ; QB1 (set-attribute never-moved? false) add ) ) (define Pawn-add (if (in-zone? promotion-zone) (add Knight Bishop Rook Queen Dabbabante) else add) ) (define Pawn-move ( n (verify empty?) (Pawn-add) (verify (in-zone? third-rank)) n (verify empty?) add ) ) (define Pawn-capture ( $1 (verify enemy?) (Pawn-add) ) ) (define En-Passant ( $1 (verify enemy?) (verify last-to?) (verify (piece? Pawn)) capture n to n (verify last-from?) add ) ) (define Board-Definitions (image "images\Chess\Chess10x10.bmp") (grid (start-rectangle 5 5 53 53) (dimensions ("a/b/c/d/e/f/g/h/i/j" (49 0)) ; files ("10/9/8/7/6/5/4/3/2/1" (0 49)) ; ranks ) (directions (n 0 -1) (e 1 0) (s 0 1) (w -1 0) (ne 1 -1) (nw -1 -1) (se 1 1) (sw -1 1) ) ) (symmetry Black (n s)(s n) (nw sw)(sw nw) (ne se)(se ne)) (zone (name promotion-zone) (players White) (positions a9 b9 c9 d9 e9 f9 g9 h9 i9 j9) ) (zone (name promotion-zone) (players Black) (positions a2 b2 c2 d2 e2 f2 g2 h2 i2 j2) ) (zone (name third-rank) (players White) (positions a4 b4 c4 d4 e4 f4 g4 h4 i4 j4) ) (zone (name third-rank) (players Black) (positions a7 b7 c7 d7 e7 f7 g7 h7 i7 j7) ) ) (game (title "Dabbabante Chess") (description "Object: Checkmate the opponent's King by attacking it so it cannot escape. Dabbabante Chess differs from the usual Western Chess in that it is played on a 10 by 10 board, and two Dabbabantes are added. Dabbabante's move on Rook-lines, but only to every second space. They may leap over occupied squares of either color. \\ Pawns promote on the 9th and 2nd rank, and may promote to Dabbabantes as well as to the more usual pieces. \\ To see a description of how a piece moves right-click on it to bring up its properties dialog.") (history "Game of V.R. Parton (1971), ZRF by Peter Aronson. Implementation based on description in D.B. Pritchard's `Encyclopedia of Chess Variants`. Pritchard does not describe Pawn promotion -- the rules in ZRF are a reasonable guess by the implementor. \\ ZRF Revision 1.1, December 22nd, 2001.") (strategy "In the opening, try to develop your pieces more than your pawns. Always protect your King. Look for ways to exchange lower valued pieces for larger valued ones. Generally, if a Pawn is worth 1 point, then a Bishop or a Knight is worth 3 (the 10x10 board makes the Bishop maybe 1/2 a Pawn more valuable than the Knight), a Rook is worth 5 and a Queen worth 9 points. On this scale a Dabbabante is worth perhaps 4, but is so different that the comparison is hard to make. Dabbabante's can not be blocked, but they are very color-bound, seeing only 1/4 of the squares of the board each. The four Dabbabantes that start the game each travel a different 1/4th of the board.") (win-sound "Audio\Orchestra_CF.wav") (loss-sound "Audio\Orchestra_FC.wav") (click-sound "Audio\Pickup.wav") (release-sound "Audio\WoodThunk.wav") (players White Black) (turn-order White Black) (pass-turn false) (board (Board-Definitions)) (board-setup (White (Pawn a3 b3 c3 d3 e3 f3 g3 h3 i3 j3) (Knight b2 i2) (Bishop d2 g2) (Rook a2 j2) (Dabbabante c2 h2) (Queen e2) (King f2) ) (Black (Pawn a8 b8 c8 d8 e8 f8 g8 h8 j8 i8) (Knight b9 i9) (Bishop d9 g9) (Rook a9 j9) (Dabbabante c9 h9) (Queen e9) (King f9) ) ) (piece (name Pawn) (help "Pawn: moves forward, captures diagonally, can promote on 9th row") (description "Pawn\A Pawn can move straight ahead one square, or two squares from its starting position. A Pawn captures by moving one square diagonally forward. If a Pawn reaches the 2nd to last rank it promotes, changing into a Knight, Bishop, Rook, Dabbabante or Queen. // On rare occasions Pawns can also execute a move called `En Passant`, or `in passing`. This allows a Pawn to take an enemy Pawn that has just moved two squares.") (image White "images\Chess\wpawn.bmp" Black "images\Chess\bpawn.bmp") (moves (Pawn-capture nw) (Pawn-capture ne) (Pawn-move) (En-Passant e) (En-Passant w) ) ) (piece (name Knight) (help "Knight: moves like an `L`, 2 squares one way and one the other") (description "Knight\A Knight moves like an `L`, two squares vertically plus one horizontally, or two squares horizontally plus one vertically. It hops over any pieces on the way.") (image White "images\Chess\wknight.bmp" Black "images\Chess\bknight.bmp") (moves (leap2 n ne) (leap2 n nw) (leap2 s se) (leap2 s sw) (leap2 e ne) (leap2 e se) (leap2 w nw) (leap2 w sw) ) ) (piece (name Bishop) (help "Bishop: slides diagonally any number of squares") (description "Bishop\A Bishop moves any number of squares on a diagonal. It may not leap over other pieces.") (image White "images\Chess\wbishop.bmp" Black "images\Chess\bbishop.bmp") (moves (slide ne) (slide nw) (slide se) (slide sw) ) ) (piece (name Rook) (help "Rook: slides any number of squares along the row or column.") (description "Rook\A Rook moves any number of squares orthogonally on a rank or a file. It may not leap over other pieces.") (image White "images\Chess\wrook.bmp" Black "images\Chess\brook.bmp") (attribute never-moved? true) (moves (rook-slide n) (rook-slide e) (rook-slide s) (rook-slide w) ) ) (piece (name Dabbabante) (help "Dabbabante: slides every other square along the row or column.") (description "Dabbabante\A Dabbabante moves along every other square orthogonally on a rank or a file. It may skip over any pieces in the way.") (image White "images\Chess\wdownrook.bmp" Black "images\Chess\bdownrook.bmp") (moves (dabbabante-slide n) (dabbabante-slide e) (dabbabante-slide s) (dabbabante-slide w) ) ) (piece (name Alibabante) (help "Alibabante: slides every other square along the row or column or diagonal.") (description "Alibabante\An Alibabante moves along every other square orthogonally on a rank or a file, or diagonally. It may skip over any pieces in the way. \\ Parton called this the `Composite Dabbabante`, as it combined the Dabbabante with its diagonal counterpart, the Alfilante.") (image White "images\Chess\wdownqueen.bmp" Black "images\Chess\bdownqueen.bmp") (moves (dabbabante-slide n) (dabbabante-slide e) (dabbabante-slide s) (dabbabante-slide w) (dabbabante-slide nw) (dabbabante-slide ne) (dabbabante-slide se) (dabbabante-slide sw) ) ) (piece (name Queen) (help "Queen: can slide any number of squares in any direction") (description "Queen\A Queen moves any number of squares in a straight line. It may not leap over other pieces.") (image White "images\Chess\wqueen.bmp" Black "images\Chess\bqueen.bmp") (moves (slide n) (slide e) (slide s) (slide w) (slide ne) (slide nw) (slide se) (slide sw) ) ) (piece (name King) (help "King: steps 1 square in any direction to a safe square") (description "King\A King can move to any adjacent square, but never to a square where it can be captured. \\ It may also `castle` with the Rook if neither the Rook nor King has moved yet and there is nothing in between them. In castling the King moves two (King's side) or three (Queen's side) squares nearer the Rook and the Rook leaps to the far side of the King. You may not castle out of or through check, or if the King or Rook involved has previously moved.") (image White "images\Chess\wking.bmp" Black "images\Chess\bking.bmp") (attribute never-moved? true) (moves (king-shift n) (king-shift e) (king-shift s) (king-shift w) (king-shift ne) (king-shift nw) (king-shift se) (king-shift sw) (O-O) (O-O-O) ) ) (loss-condition (White Black) (checkmated King)) ) (variant (title "Alibabante Chess") (description "Parton suggested that the Dabbabante could be increased by combining it with its diagonal equivalent, the Alfilante, which would produce a composite Dabbabante. Since a Dabbabah combined with an Alfil is an Alibaba, the composite Dabbabante can be called an Alibabante. Alibabante Chess replaces the Dabbabantes with Alibabantes.") (board-setup (White (Pawn a3 b3 c3 d3 e3 f3 g3 h3 i3 j3) (Knight b2 i2) (Bishop d2 g2) (Rook a2 j2) (Alibabante c2 h2) (Queen e2) (King f2) ) (Black (Pawn a8 b8 c8 d8 e8 f8 g8 h8 j8 i8) (Knight b9 i9) (Bishop d9 g9) (Rook a9 j9) (Alibabante c9 h9) (Queen e9) (King f9) ) ) )