(define "Reach" (then (if (is In (last To) (if (= (mover) P1) (sites Top) (sites Bottom))) (if (> 2 (count Sites in:(sites Occupied by:Mover component:(id "King" Mover)) ) ) (and (remove (last To)) (add (piece (id "King" Mover)) (to (last To))) ) (and (remove (last To)) (moveAgain) ) ) ) ) ) //------------------------------------------------------------------------- (game "Apocalypse" ("TwoPlayersNorthSouth") (equipment { (board (square 5)) (regions P1 (sites Top)) (regions P2 (sites Bottom)) (piece "King" Each ("LeapCapture" "KnightWalk") ) (piece "Pawn" Each (or { (move Step Forward (to if:(is Empty (to))) ("Reach") ) (move Step (directions {FR FL}) (to if:("IsEnemyAt" (to)) (apply (remove (to))) ) ("Reach") ) }) ) }) (rules (start { (place "Pawn1" (sites {"A2" "B1" "C1" "D1" "E2"})) (place "King1" (sites {"A1" "E1"})) (place "Pawn2" (sites {"A4" "B5" "C5" "D5" "E4"})) (place "King2" (sites {"A5" "E5"})) }) (play (if ("SameTurn") (move Add (piece (id "Pawn" Mover)) (to (sites Empty))) (forEach Piece) ) ) (end { (if (and (= 0 (count Sites in:(sites Occupied by:Next component:(id "Pawn" Next)) ) ) (not (is Mover Next)) ) (result Mover Win) ) }) ) ) //------------------------------------------------------------------------- (metadata (info { (description "Played on a 5×5 grid using chess pieces: 2 knights and 5 pawns for each player. ") (rules "Soldiers move and capture like chess pawns, while kings move and capture like chess knights. If a soldier reaches the last rank, it is promoted to a king if the player has fewer than two kings. If the player has two kings, the promoted soldier is removed and placed on any empty cell. A player loses if they have no soldiers left on the board.") (id "4261") (source "A World of Abstract Games") (version "1.3.14") (classification "board/war/replacement/eliminate/all") (author "C. S. Elliott") (credit "Achille Morenville") (date "1976") } ) )