(define "PromotedHopOrthogonalSequenceCapture" ) (define "HopMan" ("HopCapture" (from #1) (directions {Forward Rightward Leftward}) #2 ) ) (define "IsUnpromoted" ("IsPieceAt" "Counter" Mover (last To))) //------------------------------------------------------------------------------ (game "Tama" (players 2) ("DraughtsEquipment" (square 8)) (rules (start { (place "Counter1" (union (sites Row 1) (sites Row 2))) (place "Counter2" (union (sites Row 5) (sites Row 6))) }) (play (if "SameTurn" (if "IsUnpromoted" (max Moves ("HopMan" (last To) (then ("ReplayIfCanMove" ("HopMan" (last To)) ("PromoteIfReach" (sites Next) "DoubleCounter") ) ) ) ) (max Moves ("PromotedHopOrthogonalSequenceCapture" (from (last To)) (difference Orthogonal OppositeDirection))) ) (priority { (max Moves (or { (forEach Piece "Counter" ("HopMan" (from) (then ("ReplayIfCanMove" ("HopMan" (last To)) ("PromoteIfReach" (sites Next) "DoubleCounter") ) ) ) ) (forEach Piece "DoubleCounter" ("PromotedHopOrthogonalSequenceCapture" (from) Orthogonal)) }) ) (or (forEach Piece "Counter" ("StepToEmpty" (directions {Forwards Rightward Leftward})) (then ("PromoteIfReach" (sites Next) "DoubleCounter")) ) (forEach Piece "DoubleCounter" ) ) }) ) ) ) ) //------------------------------------------------------------------------------ (option "Variant" args:{ } { (item "Schmidt" < ("HopCapture" #1 #2 (then ("ReplayIfCanMove" ("HopCapture" (from (last To)) #2 ) ) ) ) > < ("StepToEmpty") > <(end ("CaptureAll" Next)) > "The rules come from Schmidt.")* (item "Wikipedia" < ("HopCaptureDistance" #1 #2 ~ (then ("ReplayIfCanMove" ("HopCaptureDistanceNotAlreadyHopped" (from (last To)) (difference Orthogonal OppositeDirection) ) ) ) ) > <(move Slide All)> <(end ("BlockWin"))> "The rules come from Wikipedia.") } ) //------------------------------------------------------------------------------ (rulesets { (ruleset "Ruleset/Tama (Observed)" { "Variant/Schmidt" }) (ruleset "Ruleset/Wikipedia (Suggested)" { "Variant/Wikipedia" }) }) //------------------------------------------------------------------------------ (metadata (info { (description "Tama is a game with leaping captures played in Armenia. It allows both orthogonal and diagonal movement, and was played on a checkered board. ") (aliases {"Armenian Draughts"}) (useFor "Ruleset/Wikipedia (Suggested)" (rules "Played on an 8x8 board. 16 pieces per player, lined up in the second and third rows. A piece can move forwards, straight ahead or diagonally, or sideways to an orthogonally adjacent field if that field is empty, and capture opponents' pieces by jumping left, right, or forwards. When they reach the opposite side, they become a king, which may move in all directions (up, down, left, right, or diagonally), as long as the path is clear of pieces, and can jump opponents' pieces from any distance orthogonally. Captures must be taken if possible, and the maximum number of jumps must be made. Multiple captures cannot be made by moving 180 degrees from the previous jump. Pieces can be promoted to king mid-jump. Winning is achieved by capturing all of the other player's pieces or by blocking them so they cannot move.")) (useFor "Ruleset/Wikipedia (Suggested)" (source "Wikipedia")) (useFor "Ruleset/Wikipedia (Suggested)" (id "1198")) (useFor "Ruleset/Tama (Observed)" (rules "8x8 checkered board, with a black space on the bottom left corner. Sixteen pieces per player. Pieces begin on the second and third rows. Pieces move orthogonally or diagonally forwards or sideways. Pieces may capture only in an orthogonal direction, but not backwards, by hopping over an adjacent piece belonging to the opponent to an empty space on the opposite adjacent side of the opponent's piece. Multiple captures are allowed, and the maximum number of possible captures must be taken. When a piece lands on the last row opposite from the one where they began the game, it is promoted and may move in any direction and capture in any orthogonal direction. A piece may be promoted in the middle of its turn if further captures are possible. The player who captures all of the opponent's pieces wins. ")) (useFor "Ruleset/Tama (Observed)" (source "Schmidt 1934.")) (useFor "Ruleset/Tama (Observed)" (id "1517")) (id "1517") (version "1.3.12") (classification "board/war/leaping/orthogonal") (credit "A. Sambruni") (origin "This game was played in Armenia, around 1934.") } ) (graphics { (piece Families {"Defined" "Isometric"}) (useFor "Ruleset/Wikipedia (Suggested)" (board Colour Phase0 (colour 223 178 110))) (useFor "Ruleset/Wikipedia (Suggested)" (board Colour InnerEdges (colour Black))) (useFor "Ruleset/Wikipedia (Suggested)" (board Colour OuterEdges (colour Black))) (useFor "Ruleset/Tama (Observed)" (board Style Chess)) }) (ai "Tama_ai" ) )