/** * Generate the canonical Wumpus Maze of 20 rooms, each having 3 exits * * @return the Maze object */ public static Maze DodecahedralMaze() { Maze M = new Maze(20); int[][] pts = { {1, 2}, {1, 5}, {1, 0}, {2, 3}, {2, 18}, {3, 4}, {3, 16}, {4, 5}, {4, 14}, {5, 6}, {6, 7}, {6, 13}, {7, 8}, {7, 0}, {8, 9}, {8, 12}, {9, 10}, {9, 19}, {10, 11}, {10, 17}, {11, 12}, {11, 15}, {12, 13}, {13, 14}, {14, 15}, {15, 16}, {16, 17}, {17, 18}, {18, 19}, {19, 0} }; for (int i = 0; i < pts.length; i++) M.join2(pts[i][0], pts[i][1]); return M; }
/** * Generate a Maze being a complete graph of 5 nodes Each Cave connects to every other Cave. * * @return the Maze object. */ public static Maze K5Maze() { Maze M = new Maze(5); for (int i = 0; i < M.nRooms(); i++) for (int j = i + 1; j < M.nRooms(); j++) M.join2(i, j); return M; }