public int getStack(BufferedImage image, int seat) throws IOException {
        Stack stack = stackList.get(seat - 1);

        checkComma = false;
        stackValue = "";
        String value = "";
        stackX = stack.getX();
        int count = 0;

        while (value != null) {
            value = getValue(image, stack.getY());
            if (value != null) {
                stackValue = stackValue + value;
            }
            count++;
            if (count == 1) checkComma = true;
        }

        if (stackValue == "") return 0;

        return Integer.parseInt(stackValue);
    }