(define "Custodial" (custodial (from (last To)) All (between if:(is Next (who at:(between))) (apply (remove (between))) ) (to if:(and (= 3 (count Steps Vertex All (last To) (to))) (is Mover (who at:(to))))) (then (addScore Mover 1)) ) ) //------------------------------------------------------------------------------ (game "Pente" (players 2) (equipment { (board use:Vertex) (piece "Ball" Each) }) (rules (start (set Score Each 0)) (end { (if (is Line 5 All) (result Mover Win)) (if (> (score Mover) 9) (result Mover Win)) //(if (is Full) (result Draw)) } ) ) ) //------------------------------------------------------------------------------ (option "Board Size" args:{ } { (item "19x19" <(square 19)> "Played on a 19x19 board.") } ) (option "Opening" args:{ } { (item "Standard Pente" < phases:{ (phase "Opening" (play (move Add (to (sites "J10")))) (nextPhase "General") ) (phase "General" (play (move Add (to (sites Empty)) (then "Custodial") ) ) ) } > "Open at the centre point." )* (item "Freestyle" < (play (move Add (to (sites Empty)))) > "Open anywhere." ) (item "Pro Pente" < phases:{ (phase "First Move" (play (move Add (to (sites "J10")))) (nextPhase "Second Move") ) (phase "Second Move" (play (move Add (to (sites Empty)))) (nextPhase "Third Move") ) (phase "Third Move" (play (move Add (to (intersection (sites Empty) (sites Distance All from:(coord "J10") (range 3 15)))))) (nextPhase "General") ) (phase "General" (play (move Add (to (sites Empty)))) ) } > "White's second move must be 3 points away from the centre." ) } ) //------------------------------------------------------------------------- (metadata (info { (description "Pente was invented by Gary Gabriel in 1983, and was inspired by Ninuki-Renju. In Pente, players compete to be the first to form an orthogonal or diagonal line of five stones, or to capture ten opposing stones. Pente does not have the complex opening protocol or specific positional restrictions of Ninuki-Renju. The first player has a strong advantage, but the Pro Pente opening variation gives Black more even winning chances.") (rules "Pente is played on a 19x19 Go board. White goes first, and plays their first move on the centre point (unless playing Freestyle). In the Pro Pente variation, White's second move must be at least 3 points away from the centre. After the opening, players alternate playing one stone of their colour onto any empty point. If their placement results in a pair of enemy stones being sandwiched between two of their own stones, those enemy stones are captured. The first player to form an orthogonal or diagonal line of five (or more) of their stones, or to capture 10 enemy stones, wins the game.") (id "1412") (source "Pente.org") (version "1.3.14") (classification "board/space/line") (author "Gary Gabriel") (credit "Eric Silverman") (date "1977") } ) (graphics { (board Style Go) (player Colour P1 (colour White)) (player Colour P2 (colour Black)) }) (ai "Pente_ai" ) )