The framework will automatically play all mazes that are stored inside the directory data/maze. It will keep cycling through the various mazes, unless eternalGame has been disabled in Globals.java. See [Configuration] on instructions how to setup Globals.java to play each maze only once. The data format for mazes is the following:
[maze]
5,7
Now comes the actual content of the maze. Use the following numbers to denote an object, agent or point. In this example, the framework will expect 7 lines containing 5 comma-separated numbers.
| Value | Object, Agent or Point |
|---|---|
| 0 | Empty space |
| 1 | Wall |
| 2 | Pill |
| 3 | Power Pill |
| 4 | Pac-Man Spawn Point |
| 7 | Ghost First Stop (ghosts will start each maze by traveling to this point) |
| 8 | Ghost Spawn Area (Ms. Pac-Man will not be allowed to enter this area) |
| 9 | Ghost Spawn Point |
For example:
1,1,1,1,1
1,8,9,8,1
1,1,8,1,1
1,2,7,2,1
0,2,1,2,0
1,0,4,0,1
1,1,1,1,1
Note how positions 0,4 and 4,4 are on the outer edge of the maze and still contain an empty space. As these points share the same vertical position (y=4), the framework will convert them to warp tunnels. Agents can use these to teleport themselves from one side of the maze to the other.
[Ghost]
4
0.85
0.80
0.80
0.70
[Scatter]
1,3
3,3
1,5
3,5