diff options
author | elioat <hi@eli.li> | 2024-06-12 20:26:32 -0400 |
---|---|---|
committer | elioat <hi@eli.li> | 2024-06-12 20:26:32 -0400 |
commit | 63d2f2b6848c6ffbe9bb545e51604e1bcbe307cd (patch) | |
tree | 023a0f18fbe92d528eb421c2f37d91ee7a6c6e6d | |
parent | a7902df9c703b6074cab8047da1c4889056d4107 (diff) | |
download | tour-63d2f2b6848c6ffbe9bb545e51604e1bcbe307cd.tar.gz |
*
-rw-r--r-- | ts/bun/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ts/bun/index.ts b/ts/bun/index.ts index 2b63565..6eae1c1 100644 --- a/ts/bun/index.ts +++ b/ts/bun/index.ts @@ -33,10 +33,10 @@ export function step(grid: Grid): Grid { export function simulate(initial: Grid, steps: number): void { let grid = initial; - for (let i = 0; i < steps; i++) { + Array.from({ length: steps }).forEach(() => { printGrid(grid); grid = step(grid); - } + }); } const initial: Grid = [ |