-
Notifications
You must be signed in to change notification settings - Fork 0
/
Viewer.java
38 lines (33 loc) · 1.11 KB
/
Viewer.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
public class Viewer
{
public static void view(int[][] grid)
{
for(int i = 0; i < grid.length; i++)
{
for(int j = 0; j < grid[i].length; j++)
{
switch(grid[i][j])
{
case Maze.EMPTY:
System.out.print(" ");
break;
case Maze.WALL:
System.out.print("**");
break;
case Maze.START:
System.out.print("^^");
break;
case Maze.END:
System.out.print("$$");
break;
case Maze.VISITED:
System.out.print("..");
break;
default:
throw new AssertionError();
}
}
System.out.println();
}
}
}