Blank = same as 'Every tick'. For me, that way the events read better. And they are 'collapsable' to 1 line. Less mess.
They pre-calculate the situation for those 3 blocks that are set in the layout, the set up does not start with no blocks selected, there are 3 blocks pre-selected.
Now, there are 2 rows. I could have done it with 1 event using sprite.row = 0. And then duplicate those evens and change sprite.row = 1 for the other row. But that are 'Duplicates' for a minor change. Duplicated events (and if one does that a lot) makes up for more events. While it should be efficient: as less events as possible.
You can do this by calling a function to the same code, using row as a parameter. That is the main reason for using a function: eliminate duplicated events.
I opted for a repeat loop. Loopindex is the current iteration of the loop. The repeat performs those evens twice. That first time loopindex = 0. The second time loopindex = 1. So the first time it picks the first row, the second time the second row. It looks for selected blocks only in that row, and calculates the sums.