Refactor FillWalkableTiles to share more code.
Refactor FillWalkableTiles to share more code.

After wiggi's recent patch, FillWalkableTiles contained three times the
same code block with just a different predicate.  Factor that out into a
utility routine and call it three times with a lambda predicate.

domob1812/huntercore,wiggi/huntercore,domob1812/huntercore,domob1812/huntercore,wiggi/huntercore,wiggi/huntercore,domob1812/huntercore,domob1812/huntercore,domob1812/huntercore,wiggi/huntercore,wiggi/huntercore,wiggi/huntercore