How to implement flood fill to detect enclose space?

@Erex_147 when you call the function twice it runs the first func and ditches the rest for some reason