Loading page…
A grid table has a state for each cell, and the cells a cell reads decide the order of filling, the rows to keep and the direction. Above and left needs one row, three cells above need two rows, and the diagonal needs one saved variable. A missing neighbour is skipped and never read as zero, and a table is filled backwards when the answer depends on what is still ahead.
You work on a game app with a treasure map.