FloodIt game implementation with js