open projects


PHP Flood Fill

PHP Flood Fill

Flood Filler is a small program in PHP demonstrating the Flood Fill algorithm in a simple way.
Here’s the code:

/*

 * @title:  Flood Fill Class

 * See below class for example input.

 */

class FloodFiller {

 

    private $x, $y, $fill, $searchNext, $map;

 

    public function Scan( $map, $point ) {

        // We create the list of [...]