public static Direction getDirection(int dx, int dy) {
		if (dx > 0) {
			return RIGHT;
		} else if (dx < 0) {
			return LEFT;
		} else {
			if (dy > 0) {
				return DOWN;
			} else if (dy < 0) {
				return UP;
			}
		}
		throw new IllegalArgumentException("Invalid arguments: dx=" + dx
				+ ", dy=" + dy);
	}