(game "Two-Colour" (players 2) (equipment { (board use:Vertex) (piece "Marker" Each) }) (rules (play (or (move Add (to (sites Empty)) (then (if (= 1 (size Group at:(last To))) (addScore Mover 1) ) ) ) (move Pass) ) ) (end (if (all Passed) (byScore) ) ) ) ) //------------------------------------------------------------------------------ (option "Board" args:{ } { (item "Graph1" < (graph vertices:{ {6 0} {3 1} {5 1} {8 1} {4 4} {7 4} {10 4} {0 6} {5 6} {8 6} {10 6} {12 6} {2 7} {4 7} {7 7} {10 8} {14 8} {3 10} {7 10} {1 11} {4 12} {7 12} {10 11} {10 13} {12 12} {3 5} {6 7}} edges:{ {0 2} {1 4} {2 4} {4 8} {5 8} {8 14} {8 13} {13 17} {12 17} {12 7} {17 19} {17 20} {13 18} {18 21} {18 22} {22 23} {22 24} {22 15} {9 15} {10 15} {15 11} {11 16} {6 11} {3 6} {1 2} {0 3} {4 5} {7 13} {19 20} {13 21} {23 24} {9 10} {15 16} {7 1} {14 9} {5 6} {2 6} {25 3} {5 25} {7 26} {20 25} {24 23} {26 7} {26 9} {26 17} {14 23} {14 24} {14 16} } ) > "" ) (item "Graph2" < (graph vertices:{ {0 0} {0 1} {0 2} {0 3} {0 4} {1 0} {1 1} {1 2} {1 3} {1 4} {2 0} {2 1} {2 2} {2 3} {2 4} {3 0} {3 1} {3 2} {3 3} {3 4} {4 0} {4 1} {4 2} {4 3} {4 4}} edges:{ {0 1} {0 5} {0 6} {1 6} {1 2} {1 5} {2 7} {2 3} {3 8} {3 4} {3 9} {4 8} {4 9} {5 6} {5 10} {6 11} {6 7} {6 12} {7 12} {7 8} {8 13} {8 9} {9 14} {7 11} {7 13} {8 12} {10 11} {11 12} {12 13} {13 14} {10 15} {11 16} {11 17} {12 16} {12 17} {12 18} {13 17} {13 18} {14 19} {15 16} {15 20} {15 21} {16 20} {16 21} {20 21} {16 17} {17 22} {21 22} {17 18} {18 23} {22 23} {18 19} {18 24} {19 23} {19 24} {23 24}} ) > "" )** (item "Graph3" < (graph vertices:{ {4 0} {12 0} {5 3} {8 4} {11 3} {4 6} {6 7} {8 6} {10 7} {12 6} {0 10} {3 9} {7 9} {9 9} {13 9} {16 10} {5 11} {11 11} {8 13} {8 16}} edges:{ {0 1} {0 2} {0 10} {1 4} {1 15} {2 3} {2 5} {3 4} {3 7} {4 9} {5 6} {5 11} {10 11} {11 16} {6 12} {6 7} {7 8} {8 9} {9 14} {14 15} {8 13} {13 12} {12 16} {13 17} {14 17} {16 18} {18 17} {18 19} {10 19} {15 19}} ) > "" ) }) //------------------------------------------------------------------------------ (metadata (info { (description "Two-Colour is a 2-player graph theory game. It can be played on any graph. ") (rules "Every turn, the current player places a piece of their colour on any empty vertex of the graph. If the last coloured vertex has no adjacent vertex with the same colour, the player gets one point. The game is over, when both players passed their turn or there is no empty vertex. Finally, the player with the highest score wins. ") (id "619") (version "1.3.12") (classification "math/graph") (author "Tahmina Begum") (credit "Tahmina Begum") (date "28-04-2020") } ) (graphics { (player Colour P1 (colour Red)) (player Colour P2 (colour Blue)) (show Edges Diagonal Hidden) }) (ai "Two-Colour_ai" ) )