(define "IsUnpromoted" ("IsPieceAt" "Counter" Mover (last To))) //------------------------------------------------------------------------------ (game "American Pool Checkers" (players 2) ("DraughtsEquipment" (square 8)) (rules ("BlackCellsSetup" 3) (play (if "SameTurn" (if "IsUnpromoted" ("HopInternationalDraughtsStyle" (from (last To)) (then ("ReplayIfCanMove" ("HopInternationalDraughtsStyle" (from (last To))) ("PromoteIfReach" (sites Next) "DoubleCounter") ) ) ) (max Moves ("HopDiagonalSequenceCaptureAgain" before:(count Rows) after:(count Rows) at:EndOfTurn)) ) (priority { (or (forEach Piece "Counter" ("HopInternationalDraughtsStyle" (from) (then ("ReplayIfCanMove" ("HopInternationalDraughtsStyle" (from (last To))) ("PromoteIfReach" (sites Next) "DoubleCounter") ) ) ) ) (max Moves (forEach Piece "DoubleCounter" ("HopDiagonalSequenceCapture" before:(count Rows) after:(count Rows) at:EndOfTurn)) ) ) (or (forEach Piece "Counter" ("StepToEmpty" (directions {FR FL})) (then ("PromoteIfReach" (sites Next) "DoubleCounter")) ) (forEach Piece "DoubleCounter" (move Slide Diagonal)) ) }) ) ) (end ("BlockWin")) ) ) //------------------------------------------------------------------------------ (metadata (info { (description "American Pool Checkers is a game with leaping captured played primarily in Black communities in the United States.") (aliases {"Spanish Pool Checkers" "Polish Minor Draughts"}) (rules "8x8 board. Twelve pieces per player. Pieces move forward diagonally to an empty space on the board. A piece may capture an opponent's adjacent piece by hopping over it to an empty space immediately on the opposite side of the opponent's piece. Multiple captures are allowed. Captures can be made in a forward or backward direction. Captures are compulsory, but it is not required to choose a capture sequence that captures the most pieces. A piece which reaches the opposite edge of the board from where it started is promoted to a king. Kings move any number of spaces forward or backward. They also may capture a single piece if there is at least one empty space beyond it, and can change direction after a capture. Kings must also make all possible captures in a sequence. The player who captures all of the opponent's pieces wins.") (source "Wikipedia") (id "1399") (version "1.3.14") (classification "board/war/leaping/diagonal") (credit "Eric Piette") (origin "This game was played in United States of America, around 1947.") } ) (graphics { (piece Families {"Defined" "Isometric"}) (player Colour P2 (colour Red)) (board Checkered) (board Colour Phase0 (colour Green)) (board Colour Phase1 (colour Yellow)) }) (ai "American Pool Checkers_ai" ) )