Foreach over every (coord,tile) pair in the grid. Supports ref.
foreach with coords
1 auto myGrid = rectGrid([ 2 [ 00, 01, 02, 03, 04 ], 3 [ 10, 11, 12, 13, 14 ], 4 [ 20, 21, 22, 23, 24 ], 5 ]); 6 7 foreach(coord, tile ; myGrid) { 8 assert(tile == coord.row * 10 + coord.col); 9 }
See Implementation
Foreach over every (coord,tile) pair in the grid. Supports ref.