(define "CaptureSurroundedPiece" (enclose (from (last To)) Orthogonal (between if:("IsEnemyAt" (between)) (apply (and (addScore Mover 1) (remove (between)) ) ) ) ) ) (define "IllegalMove" (and { (note player:Mover "made an illegal move") (note player:Mover "to play") (moveAgain) }) ) (define "NotEmpty" (not (is In (last To) (sites Empty)))) (define "MadeALegalMove" (do (add (to (last To)) (then (and { "CaptureSurroundedPiece" (set Hidden at:(last To) to:Next) (note player:Mover "has moved") (note player:Next "to play") }) ) ) ifAfterwards:("HasFreedom" Orthogonal) ) ) //------------------------------------------------------------------------------ (game "Phantom Go" (players 2) (equipment { (board use:Vertex) (piece "Marker" Each) }) (rules (play (or (move Select (from (union (sites Empty) (sites Hidden to:Mover) ) ) (then (priority { (if ("NotEmpty") ("IllegalMove") ) ("MadeALegalMove") ("IllegalMove") }) ) ) (move Pass) ) ) (end (if (all Passed) (byScore { (score P1 (+ (score P1) (size Territory P1))) (score P2 (+ (score P2) (size Territory P2))) }) ) ) ) ) //------------------------------------------------------------------------------ (option "Board Size" args:{ } { (item "9x9" <(square 9)> "The game is played on a 9x9 board")** (item "13x13" <(square 13)> "The game is played on a 13x13 board") (item "15x15" <(square 15)> "The game is played on a 15x15 board") (item "19x19" <(square 19)> "The game is played on a 19x19 board") }) //------------------------------------------------------------------------------ (metadata (info { (description "Phantom Go is a variant of Go for two players and a referee. The players only see their own stones, but they don't know where the opponent plays. The referee sees the moves of both players and takes care that they only play legal moves.") (rules "Each player has his own board, set up so that the opponent cannot see it. The referee has a board of his own on which he plays the moves of both players. He can see both player's boards. To make a move, a player plays a stone on his own board. The referee then checks on his board whether the move is legal and informs both players about the tried move. How exactly the referee comments on the move depends on the rule variant. As long as a player tries to play an illegal move, it's still his turn and he may try another move. After the player has made a legal move, the referee copies the move to his own board. Then, it's the other player's turn.") (id "630") (source "senseis.xmp.net") (version "1.3.14") (classification "board/space/territory") (credit "Eric Piette") } ) (graphics { (board Style Go) (player Colour P1 (colour Black)) (player Colour P2 (colour White)) (show Score AtEnd) }) (ai "Phantom Go_ai" ) )