Ludii Forum
Mark Steere's Crossway (2007) - Printable Version

+- Ludii Forum (
+-- Forum: Suggestions (
+--- Forum: Submit Your Games (
+--- Thread: Mark Steere's Crossway (2007) (/showthread.php?tid=214)

Mark Steere's Crossway (2007) - AlekErickson - 10-19-2020

I implemented the quintessential square connection game, Crossway, in Ludii tonight thanks to Eric's help with the (is pattern) ludeme. 

I have attached the code and I copy-paste it below. Enjoy!

(define "IsNotCut" (not (is Pattern {F R F R F} whats:{(mover) (next)})))


(game "Crossway" 
    (players 2)
    (equipment {
        (board <Board> use:Vertex)
        (piece "Ball" Each)
        (regions P1 { (sites Side N) (sites Side S) } )
        (regions P2 { (sites Side W) (sites Side E) } )
        (meta (swap))
                    (to (sites Empty))
        (end {
            (if (is Connected All Mover) (result Mover Win))


(option "Board Size" <Board> args:{ <size> }
    (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")* 


        (description "The most elegant drawless square connection game. Stones possess orthodiagonal connectivity, and crosscuts are disallowed.")
        (rules "Crossway is played with a Go set. The board starts out empty. Each player takes possession of all of the stones of one color. Players take turns adding their stones to the board, one stone per turn. A player must never create a crosscut formation. Black makes the first placement of the game. If you have no more available placements, you forfeit your turn and your opponent can continue making placements until completing his goal connection. For White to win, White must form a contiguous sequence of white stones connecting the West edge to the East edge of the board. Each stone in the sequence must be connected to neighboring stones in the sequence by horizontal, vertical, or diagonal adjacencies. Likewise for Black and the North and South edges. A corner is considered to be part of both adjoining edges. Crossway makes use of the pie rule. This means Black makes the first placement, and White has the option of switching colors with Black, and claiming Black's first move as his own. If White chooses to exercise the pie rule, Black then becomes White and now makes the second placement of the game. The pie rule can only be used once and on the second move of the game.")
        (source "Mark Steere Games")
        (version "1.0.8")
        (classification "board/space/connection")
        (author "Mark Steere")
        (credit "Implemented by Alek Erickson")
        (date "2007")
    (graphics {
        (board Style Go)
        (player Colour P1 (colour Black))
        (player Colour P2 (colour White))

RE: Mark Steere's Crossway (2007) - Eric Piette - 10-21-2020

Hi Alek,

I tried it and it works perfectly :)
I am adding it right now and it will be published in the next release.

Thanks again for that new submission.