for (y = tempY; contains(chess, x + 1, y + 1, color); y++) {
            count++;
            x++;
        }