Pattern generator for the numdot problem by hyuki (CodeIQ q468)