(define "EdgeInCommon" (intersection (sites Incident Edge of:Cell at:#1) (sites Incident Edge of:Cell at:#2) ) ) (define "NoEdgeBetweenCells" ("NoSites" (intersection (sites Occupied by:Shared on:Edge) ("EdgeInCommon" #1 #2))) ) //------------------------------------------------------------------------------ (game "Maze" (players 1) (equipment { (board (remove (square 20) cells:{ 0 20 40 60 80 100 120 140 1 21 41 61 81 2 22 42 62 3 23 4 5 6 19 39 59 79 99 119 139 159 18 38 58 78 98 17 37 57 77 16 36 15 14 13 } ) ) (piece "Marker" Shared) (piece "Cross" Neutral) (piece "Human" P1 (move Step Orthogonal (to if:(and (is Empty (to)) ("NoEdgeBetweenCells" (from) (to))) ) (then (add (piece (id "Cross" Neutral)) (to (last From)) ) ) ) ) (regions "Exit" {}) }) (rules (start { (set Shared Edge (union (sites Outer Edge) (sites {}) ) ) (place "Human" 336) }) (play (forEach Piece)) (end { (if (no Moves Mover) (result Mover Loss)) (if (is In (where (id "Human")) (sites "Exit")) (result Mover Win)) }) ) ) //------------------------------------------------------------------------------ (option "Board" args:{ } { (item "Wikipedia" <692 693 694 696 672 651 630 589 568 673 653 676 656 657 658 678 719 699 701 702 682 724 684 705 706 727 686 728 709 689 648 607 566 668 611 612 613 614 615 677 634 595 574 575 596 637 553 533 532 552 572 551 530 550 509 489 528 508 467 447 427 386 365 366 364 363 385 405 425 466 387 408 409 410 411 429 449 470 431 472 492 430 432 473 514 453 389 368 348 327 390 474 515 556 597 618 598 639 660 661 662 641 620 621 601 581 561 627 626 625 624 623 646 586 585 565 544 543 542 505 504 463 462 461 460 459 458 457 456 443 402 361 341 279 422 421 420 419 418 417 416 401 400 379 398 183 201 238 319 298 318 277 256 276 317 255 275 316 336 356 376 295 294 314 334 354 313 374 292 291 312 311 271 250 230 212 211 210 228 229 193 174 175 157 138 121 89 74 88 75 61 33 11 34 36 64 49 63 77 91 106 123 159 196 214 122 158 80 94 109 108 124 160 127 163 200 144 143 162 199 161 198 216 234 253 252 522 502 521 582 583 563 479 478 519 498 539 579 558 517 476 435 414 434 475 516 413 351 392 372 371 330 309 289 288 287 286 308 267 227 190 246 245 244 172 171 189 207 153 135 118 102 119 101 85 71 70 69 84 99 116 10 19 32 45 44 58 8 17 29 42 26 27 67 82 114 150 132 131 149 186 148 185 222 242 169 224 264 305 325 284 283 282 303 323 590 > <5> "The board in Cross+A." )* } ) //------------------------------------------------------------------------------ (metadata (info { (description "Maze is a structure that consists of convoluted paths. ") (rules "The human piece can move to any orthogonal empty cells if the edge belonging to these two cells is empty. After moving a cross is added to the previous cell. The goal is to find the path between the starting point and the door. A lost is encountered in case of no legal moves.") (id "1146") (source "cross-plus-a.com") (version "1.3.14") (classification "puzzle/planning") (credit "Eric Piette") } ) (graphics { (player Colour P1 (colour Blue)) (player Colour Neutral (colour Dark)) (player Colour Shared (colour Dark)) (piece Scale "Human" 0.6) (piece Scale "Cross" 0.5) (show Symbol "door" "Exit" fillColour:(colour 110 52 52) scale:0.5) (board Style PenAndPaper replaceComponentsWithFilledCells:False) (board Colour InnerVertices (colour Hidden)) (board Colour OuterVertices (colour Hidden)) }) (ai "Maze_ai" ) )