public int[] getCubie(Point p) {
		int cubieSize = squareSize / 3;
		for (int f = 0; f < 6; f++) {
			for (int x = 0; x < 3; x++) {
				for (int y = 0; y < 3; y++) {
					Point l = getSideLocation(TileColor.get(f));
					if (p.x >= l.x + 1 + cubieSize * x && p.x <= (l.x + 1 + cubieSize * x) + cubieSize && p.y >= l.y + 1 + cubieSize * y && p.y <= (l.y + 1 + cubieSize * y) + cubieSize) {
						return createArray(f, x, y);
					}
				}
			}
		}
		return null;
	}