public int getCount(Point position, int direction) {
		int d = DIRECTION[direction];
		int index = getIndex(position, d);
		int result = 0;
		for (int colori = 0; colori < COLORS.length; colori++) {
			int color = COLORS[colori];
			if (color != Checker.EMPTYCELL) {
				result += gridCount[d][color][index];
			}
		}
		return result;
	}