private static boolean[][] fillWithStack(final boolean[][] fillArray,
            final Node node) {
        Stack<Node> stack = new Stack<Node>();
        stack.push(node);

        while (!stack.isEmpty()) {
            Node top = stack.pop();

            if (top.mX < 0 || top.mX >= X || top.mY < 0 || top.mY >= Y) {
                continue;

            } else if (fillArray[top.mX][top.mY]) {
                continue;

            } else {
                fillArray[top.mX][top.mY] = true;
                stack.add(new Node(top.mX + 1, top.mY));
                stack.add(new Node(top.mX - 1, top.mY));
                stack.add(new Node(top.mX, top.mY + 1));
                stack.add(new Node(top.mX, top.mY - 1));
            }
        }

        return fillArray;
    }