; *** ChessNim, version 2 ; invented by Alfred Pfeiffer 1997/98 ; ZRF coded by Doug Chatham, May 2003 ; d.chatham@moreheadstate.edu ; You need to purchase Zillions of Games to load this rules file ; Visit the Zillions web site at http://www.zillions-of-games.com ; This file uses Zillions of Games version 2 (define Board-Definitions (image "images\Chess\SHaag\Chess8x8.bmp" "images\Chess\Chess8x8.bmp" "images\Chess\SHaag\Chess8x8.bmp" "images\Chess\Chess8x8.bmp") (grid (start-rectangle 5 5 53 53) (dimensions ("a/b/c/d/e/f/g/h" (49 0)) ; files ("8/7/6/5/4/3/2/1" (0 49)) ; ranks ) (directions (n 0 -1) (n2 0 -2) (n3 0 -3) (n4 0 -4) (n5 0 -5) (n6 0 -6) (n7 0 -7) (e 1 0) (ea2 2 0) (ea3 3 0) (ea4 4 0) (ea5 5 0) (ea6 6 0) (ea7 7 0) (s 0 1) (s2 0 2) (s3 0 3) (s4 0 4) (s5 0 5) (s6 0 6) (s7 0 7) (w -1 0) (w2 -2 0) (w3 -3 0) (w4 -4 0) (w5 -5 0) (w6 -6 0)(w7 -7 0) (ne 1 -1) (nw -1 -1) (se 1 1) (sw -1 1) (ne2 2 -2) (nw2 -2 -2) (se2 2 2) (sw2 -2 2) (ne3 3 -3) (nw3 -3 -3) (se3 3 3) (sw3 -3 3) (ne4 4 -4) (nw4 -4 -4) (se4 4 4) (sw4 -4 4) (ne5 5 -5) (nw5 -5 -5) (se5 5 5) (sw5 -5 5) (ne6 6 -6) (nw6 -6 -6) (se6 6 6) (sw6 -6 6) (ne7 7 -7) (nw7 -7 -7) (se7 7 7) (sw7 -7 7) (nnw -1 -2) (nne 1 -2) (ene 2 -1) (ese 2 1) (sse 1 2) (ssw -1 2) (wsw -2 1) (wnw -2 -1) ) ) (symmetry Black (nw sw)(sw nw) (ne se)(se ne)) ) (define Queen-Definition (piece (name Queen) (help "Queen: attacks in a straight line in all directions") (image White "images\Chess\SHaag\wqueen.bmp" "images\Chess\wqueen.bmp" Black "images\Chess\SHaag\bqueen.bmp" "images\Chess\bqueen.bmp") (drops ( (verify (or empty? (piece? Block))) (verify (or empty?(empty? n)(empty? s)(empty? w)(empty? e)(empty? nw)(empty? ne)(empty? sw)(empty? se)(empty? n2)(empty? s2)(empty? w2)(empty? ea2)(empty? nw2)(empty? ne2)(empty? sw2)(empty? se2)(empty? n3)(empty? s3)(empty? w3)(empty? ea3)(empty? nw3)(empty? ne3)(empty? sw3)(empty? se3)(empty? n4)(empty? s4)(empty? w4)(empty? ea4)(empty? nw4)(empty? ne4)(empty? sw4)(empty? se4)(empty? n5)(empty? s5)(empty? w5)(empty? nw5)(empty? ne5)(empty? sw5)(empty? se5)(empty? ea5)(empty? n6)(empty? s6)(empty? w6)(empty? ea6)(empty? nw6)(empty? ne6)(empty? sw6)(empty? se6)(empty? n7)(empty? s7)(empty? w7)(empty? ea7)(empty? nw7)(empty? ne7)(empty? sw7)(empty? se7))) (spot n)(spot s)(spot w)(spot e)(spot nw)(spot ne)(spot sw)(spot se)(spot n2)(spot s2)(spot w2)(spot ea2)(spot nw2)(spot ne2)(spot sw2)(spot se2)(spot n3)(spot s3)(spot w3)(spot ea3)(spot nw3)(spot ne3)(spot sw3)(spot se3)(spot n4)(spot s4)(spot w4)(spot ea4)(spot nw4)(spot ne4)(spot sw4)(spot se4)(spot n5)(spot s5)(spot w5)(spot ea5)(spot nw5)(spot ne5)(spot sw5)(spot se5)(spot n6)(spot s6)(spot w6)(spot ea6)(spot nw6)(spot ne6)(spot sw6)(spot se6)(spot n7)(spot s7)(spot w7)(spot ea7)(spot nw7)(spot ne7)(spot sw7)(spot se7) add )) ) ) (define King-Definition (piece (name King) (help "King: attacks adjacent squares in all directions") (image White "images\Chess\SHaag\wking.bmp" "images\Chess\wking.bmp" Black "images\Chess\SHaag\bking.bmp" "images\Chess\bking.bmp") (drops ( (verify (or empty? (piece? Block))) (verify (or empty?(empty? n)(empty? s)(empty? w)(empty? e)(empty? nw)(empty? ne)(empty? sw)(empty? se))) (spot n)(spot s)(spot w)(spot e)(spot nw)(spot ne)(spot sw)(spot se) add )) ) ) (define Bishop-Definition (piece (name Bishop) (help "Bishop: attacks in a diagonal straight line") (image White "images\Chess\SHaag\wbishop.bmp" "images\Chess\wbishop.bmp" Black "images\Chess\SHaag\bbishop.bmp" "images\Chess\bbishop.bmp") (drops ( (verify (or empty? (piece? Block))) (verify (or empty?(empty? nw)(empty? ne)(empty? sw)(empty? se)(empty? nw2)(empty? ne2)(empty? sw2)(empty? se2)(empty? nw3)(empty? ne3)(empty? sw3)(empty? se3)(empty? nw4)(empty? ne4)(empty? sw4)(empty? se4)(empty? nw5)(empty? ne5)(empty? sw5)(empty? se5)(empty? nw6)(empty? ne6)(empty? sw6)(empty? se6)(empty? nw7)(empty? ne7)(empty? sw7)(empty? se7))) (spot nw)(spot ne)(spot sw)(spot se)(spot nw2)(spot ne2)(spot sw2)(spot se2)(spot nw3)(spot ne3)(spot sw3)(spot se3)(spot nw4)(spot ne4)(spot sw4)(spot se4)(spot nw5)(spot ne5)(spot sw5)(spot se5)(spot nw6)(spot ne6)(spot sw6)(spot se6)(spot nw7)(spot ne7)(spot sw7)(spot se7) add )) ) ) (define Rook-Definition (piece (name Rook) (help "Rook: attacks in a vertical or horizontal straight line") (image White "images\Chess\SHaag\wrook.bmp" "images\Chess\wrook.bmp" Black "images\Chess\SHaag\brook.bmp" "images\Chess\brook.bmp") (drops ( (verify (or empty? (piece? Block))) (verify (or empty?(empty? n)(empty? s)(empty? w)(empty? e)(empty? n2)(empty? s2)(empty? w2)(empty? ea2)(empty? n3)(empty? s3)(empty? w3)(empty? ea3)(empty? n4)(empty? s4)(empty? w4)(empty? ea4)(empty? n5)(empty? s5)(empty? w5)(empty? ea5)(empty? n6)(empty? s6)(empty? w6)(empty? ea6)(empty? n7)(empty? s7)(empty? w7)(empty? ea7))) (spot n)(spot s)(spot w)(spot e)(spot n2)(spot s2)(spot w2)(spot ea2)(spot n3)(spot s3)(spot w3)(spot ea3)(spot n4)(spot s4)(spot w4)(spot ea4)(spot n5)(spot s5)(spot w5)(spot ea5)(spot n6)(spot s6)(spot w6)(spot ea6)(spot n7)(spot s7)(spot w7)(spot ea7) add )) ) ) (define Knight-Definition (piece (name Knight) (help "Knight: attacks in an L-shape") (image White "images\Chess\SHaag\wknight.bmp" "images\Chess\wknight.bmp" Black "images\Chess\SHaag\bknight.bmp" "images\Chess\bknight.bmp") (drops ( (verify (or empty? (piece? Block))) (verify (or empty?(empty? nnw)(empty? nne)(empty? ene)(empty? ese)(empty? sse)(empty? ssw)(empty? wsw)(empty? wnw))) (spot nnw)(spot nne)(spot ene)(spot ese)(spot sse)(spot ssw)(spot wsw)(spot wnw) add )) ) ) (define Pawn-Definition (piece (name Pawn) (help "Pawn: attacks diagonally forward") (image White "images\Chess\SHaag\wpawn.bmp" "images\Chess\wpawn.bmp" Black "images\Chess\SHaag\bpawn.bmp" "images\Chess\bpawn.bmp") (drops ( (verify (or empty? (piece? Block))) (verify (or empty? (empty? ne)(empty? nw))) (spot ne)(spot nw) add )) ) ) (define spot (if (empty? $1) (create single Block $1)) ) (game (title "ChessNim: Queens Only") (history "ChessNim was invented by Alfred Pfeiffer in 1997/1998. See http://www.chessvariants.com/crossover.dir/chessnim.html for more details.") (description "In this version, the two players take turns placing Queens on the chessboard. Each new Queen must decrease the number of empty, unattacked squares. The last player to place a Queen on the board wins.") (strategy "Sorry, I don't know any strategies yet. If you find one, email me at d.chatham@moreheadstate.edu.") (players White Black single ) (turn-order White Black) (board (Board-Definitions)) (board-setup (White (Queen off 32)) (Black (Queen off 32))) (Queen-Definition) (piece (name Block) (dummy) (help "Block: indicates attacked square") (description "This indicates a square that is attacked by one of the pieces on the board. If you don't want to see these black balls, then Switch Piece Set (in the View menu) 2 or 3 times to make them disappear.") (image single "images\Reversi\Bdisk.bmp" "images\Reversi\Bdisk.bmp" "" "")) (loss-condition (White Black) stalemated) ) (variant (title "ChessNim: Kings Only") (description "In this version, the two players take turns placing Kings on the chessboard. Each new King must decrease the number of empty, unattacked squares. The last player to place a King on the board wins.") (board-setup (White (King off 32))(Black (King off 32))) (King-Definition) ) (variant (title "ChessNim: Rooks Only") (description "In this version, the two players take turns placing Rooks on the chessboard. Each new Rook must decrease the number of empty, unattacked squares. The last player to place a Rook on the board wins.") (strategy "According to Alfred Pfeiffer, the second player can win if he keeps both the number of columns with free squares and the number of rows with free squares even.") (board-setup (White (Rook off 32))(Black (Rook off 32))) (Rook-Definition) ) (variant (title "ChessNim: Bishops Only") (description "In this version, the two players take turns placing Bishops on the chessboard. Each new Bishop must decrease the number of empty, unattacked squares. The last player to place a Bishop on the board wins.") (strategy "According to Alfred Pfeiffer, the second player can always win by mirroring (e.g. vertically) the moves of the first player.") (board-setup (White (Bishop off 32)) (Black (Bishop off 32))) (Bishop-Definition) ) (variant (title "ChessNim: Knights Only") (description "In this version, the two players take turns placing Knights on the chessboard. Each new Knight must decrease the number of empty, unattacked squares. The last player to place a Knight on the board wins.") (board-setup (White (Knight off 32))(Black (Knight off 32))) (strategy "According to Alfred Pfeiffer, the second player can always win by mirroring (e.g. vertically) the moves of the first player.") (Knight-Definition) ) (variant (title "ChessNim: Pawns Only") (description "In this version, the two players take turns placing Pawns on the chessboard. Each new Pawn must decrease the number of empty, unattacked squares. The last player to place a Pawn on the board wins.") (board-setup (White (Pawn off 32))(Black (Pawn off 32))) (Pawn-Definition) ) (variant (title "-")) (variant (title "Losing ChessNim: Queens Only") (description "In this version, the two players take turns placing Queens on the chessboard. Each new Queen must decrease the number of empty, unattacked squares. The last player to place a Queen on the board loses.") (win-condition (White Black) stalemated) ) (variant (title "Losing ChessNim: Kings Only") (description "In this version, the two players take turns placing Kings on the chessboard. Each new King must decrease the number of empty, unattacked squares. The last player to place a King on the board loses.") (board-setup (White (King off 32))(Black (King off 32))) (win-condition (White Black) stalemated) (King-Definition) ) (variant (title "Losing ChessNim: Rooks Only") (description "In this version, the two players take turns placing Rooks on the chessboard. Each new Rook must decrease the number of empty, unattacked squares. The last player to place a Rook on the board loses.") (strategy "According to Alfred Pfeiffer, the first player can win if he keeps the number of columns with free squares and the number of rows with free squares both odd.") (board-setup (White (Rook off 32))(Black (Rook off 32))) (win-condition (White Black) stalemated) (Rook-Definition) ) (variant (title "Losing ChessNim: Bishops Only") (description "In this version, the two players take turns placing Bishops on the chessboard. Each new Bishop must decrease the number of empty, unattacked squares. The last player to place a Bishop on the board loses.") (board-setup (White (Bishop off 32))(Black (Bishop off 32))) (win-condition (White Black) stalemated) (Bishop-Definition) ) (variant (title "Losing ChessNim: Knights Only") (description "In this version, the two players take turns placing Knights on the chessboard. Each new Knight must decrease the number of empty, unattacked squares. The last player to place a Knight on the board loses.") (board-setup (White (Knight off 32)) (Black (Knight off 32))) (win-condition (White Black) stalemated) (Knight-Definition) ) (variant (title "Losing ChessNim: Pawns Only") (description "In this version, the two players take turns placing Pawns on the chessboard. Each new Pawn must decrease the number of empty, unattacked squares. The last player to place a Pawn on the board loses.") (board-setup (White (Pawn off 32)) (Black (Pawn off 32))) (win-condition (White Black) stalemated) (Pawn-Definition) )