Implementing A Flood Fill Algorithm From Scratch