public Box getAdjacentBox(Direction d, Box b) {
		Pair<Integer> position = getBoxPosition(b);
		
		int w = position.getFirst();
		int h = position.getSecond();
		
		switch (d) {
		case North:
			if (h + 1 < height) {
				return chart[w][h+1];
			} else {
				return null;
			}
		case South:
			if (h - 1 >= 0) {
				return chart[w][h-1];
			} else {
				return null;
			}
		case East:
			if (w + 1 < width) {
				return chart[w+1][h];
			} else {
				return null;
			}
		case West:
			if (w - 1 >= 0) {
				return chart[w-1][h];
			} else {
				return null;
			}
		default:
			return null;
		}
	}