(define "SurroundedOf" (surround (from (last To)) Orthogonal (between if:(is #1 (who at:(between))) (apply #2) ) (to if:(is Occupied (to)) ) ) ) (define "ThreeSlideInARow" (= (counter) 5)) (define "SurroundedOver" (is Triggered "Surrounded" #1)) (define "SurroundedMySelf" ("NoSites" (sites Around (last To) if:(is Empty (to))))) //------------------------------------------------------------------------------ (game "Susan" (players 2) (equipment { (board (hex 5)) (piece "Marker" Each "StepOrthogonalToEmpty") }) (rules (play (or (move Add (to (sites Empty)) (then (set Counter)) // To know this move was not a slide. ) (forEach Piece) (then (priority ("SurroundedOf" Friend (trigger "Surrounded" (mover))) ("SurroundedOf" Enemy (trigger "Surrounded" (next))) ) ) ) ) (end { (if "ThreeSlideInARow" (result Mover Draw)) (if "SurroundedMySelf" (result Next Win)) (if ("SurroundedOver" P1) (result P2 Win)) (if ("SurroundedOver" P2) (result P1 Win)) }) ) ) //------------------------------------------------------------------------------ (metadata (info { (description "Susan was invented by Stephem Linhart in 1991. It is played on a hexagonal board.") (rules "Players alternate turns. A player's turn consists on either placing piece on an empty field on board, or sliding one of their pieces into an empty one on the board. Players cannot pass. If each player performs three slides in a row then the game ends immediately as a draw. A player wins when any of the opponent's pieces are surrounded and cannot move. If one of a player's own pieces is surrounded on their turn, they lose even if an opponent's stone is surrounded at the same time.") (source "BGG") (id "451") (version "1.3.13") (classification "board/space/blocking") (author "Stephen Linhart") (credit "Eric Piette") (date "1991") } ) (ai "Susan_ai" ) )