private int getDirectionID(Direction d)
	{
		switch(d)
		{
		case NORTH:
			return 0;
		case SOUTH:
			return 1;
		case EAST:
			return 2;
		case WEST:
			return 3;
		case NORTHEAST:
			return 4;
		case NORTHWEST:
			return 5;
		case SOUTHEAST:
			return 6;
		case SOUTHWEST:
			return 7;
		}
		return 0;
	}