How can I revise the following code to loop through the tile by its columns (top to bottom from left to right) instead of by its rows (left to right from top to bottom)?
const frame = new Tile(new Rectangle(125,55, [white], black), 10, 10, 50).center(firstHundred).mov(165,74).sca(.8);
const listOne = ["1) the","2) of","3) and","4) a","5) to","6) in","7) is", "8) you", "9) that", "10) it", "11) he", "12) was", ]
let index = 0;
loop(frame, rectangle=>{
let word = new Label (listOne[index++], 30, "verdana", black).addTo(rectangle).mov(0,15);
S.update();
let currentTile = rectangle.tileNum+1;
rectangle.tap(()=>{
zog(currentTile);
S.update();
});
});
Thanks!