I think for each grid size it is possible to generate perimeter sequence of indices and timer()
function could pick 4 of those indices to update.
For example, in this grid 5x4:
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…