(define "GetCandidate" (set Var (mapEntry "PlayerPhase" (phase of:(last To))))) (define "Candidate" (var)) (define "Bunny" (if (= (mover) 1) (if (= ("Candidate") 2) 3 2 ) (if (= (mover) 2) (if (= ("Candidate") 1) 3 1 ) (if (= ("Candidate") 1) 2 1 ) ) ) ) //------------------------------------------------------------------------------ (game "Triad" (players 3) (equipment { (board (hex 5)) (piece "Marker" Each (move Slide Orthogonal (to (apply if:(!= (mover) (mapEntry "PlayerPhase" (phase of:(to))) ) ) ) (then (and { (forEach Site (sites Around (last To) Orthogonal) (if (is Enemy (what at:(site))) (remove (site)) ) ) "GetCandidate" (moveAgain) }) ) ) ) (map "PlayerPhase" {(pair 1 1) (pair 0 2) (pair 2 3)}) }) (rules (start { (place "Marker1" (expand origin:(coord "A5") steps:2)) (place "Marker2" (expand origin:(coord "I9") steps:2)) (place "Marker3" (expand origin:(coord "E1") steps:2)) }) (play (if "SameTurn" (move Add (piece ("Bunny")) (to (sites Empty)) (then (set NextPlayer (player "Candidate"))) ) (max Captures (forEach Piece)) ) ) (end (if (or { (no Pieces P1) (no Pieces P2) (no Pieces P3) }) (byScore { (score P1 (count Pieces P1)) (score P2 (count Pieces P2)) (score P3 (count Pieces P3)) }) ) ) ) ) //------------------------------------------------------------------------------ (metadata (info { (description "Triad is an abstract board game for three players which features an interesting move mechanic; the players dictate move order as the game progresses. It arose out of discussions with Joao Neto and Bill Taylor in November 2002.The game is played on a tricoloured hexagonal grid with five cells per side. The three players are called Red, Green and Blue, and each player owns the cells and the pieces that bear their colour.") (rules "Each turn the current player must move, capture and drop. The current player must move one of their pieces in a straight line in any of the six hexagonal directions to land on a vacant foreign cell; any intervening cells must also be empty. The opponent who owns the landing cell becomes the candidate and the other opponent becomes the bunny. All opponents' pieces immediately adjacent to the landing cell are captured and removed from the board. The current player must make the move that captures the most pieces each turn, but may choose amongst equals. This is called the max capture rule. The moving player must then drop a bunny piece on any empty cell, unless a player has just been eliminated. The candidate becomes the next player to move. Goal: Play stops the moment any player is eliminated. The game is won by the player with the most pieces left, else is a tie between the two remaining players if they are both left with the same number of pieces.") (source "cambolbro.com") (id "553") (version "1.3.12") (classification "board/war/replacement/eliminate/all") (author "Cameron Browne") (publisher "nestorgames, Pancerola (used with permission)") (credit "Eric Piette") (date "2002") } ) (graphics { (player Colour P1 (colour Blue)) (player Colour P2 (colour Green)) (player Colour P3 (colour Red)) (board Checkered) (board Colour Phase0 (colour 52 255 130)) (board Colour Phase1 (colour 29 203 255)) (board Colour Phase2 (colour 255 166 166)) }) (ai "Triad_ai" ) )