The Mainframe Engine - 96x54 Minesweeper Grid Empty Square Detection Algorithm Slow-Mo
The engine is running at 60fps, and the algorithm is updating one square roughly once per frame.
The reason it appears to work up in incremental horizontal lines and left similarly in diagonal lines is to do with the way squares are detected. After finding a blank square which hasn't been updated, the algorithm scans in a 3x3 area around that square. Numbered or blank tiles are revealed, and blank tiles are also set to update.
After this process takes place, the algorithm moves onto the next square to it's right. If this square is also a blank tile, it will just have been set to update by the previous, and as such the 3x3 grid is looped again. This gives us horizontal lines.
Diagonal lines occur when working left as the loop does not go backwards for new blank tiles until the whole cycle repeats. However, it will encounter a blank square to the bottom left in the same cycle when it goes onto a new line.
The whole process ends when all blank square have been updated, and it would usually only update the screen then. By instead putting in a delay after each update and also updating the screen, we get the wonderful display shown here.