Anonymous user
Conway's Game of Life: Difference between revisions
→{{header|AWK}}: added output
(→{{header|AWK}}: ANSI escape codes) |
(→{{header|AWK}}: added output) |
||
Line 476:
=={{header|AWK}}==
50x20 grid
filled with random cells,
using ANSI escape codes for output to terminal:▼
running for 220 generations,
<lang AWK>
BEGIN {
Line 500 ⟶ 502:
if(!(i%50)) printf("\n");
}
printf("%3d\n",c); # Countdown
x=30000; while(x--) ; # Delay
}
}
</lang>
{{out}} Finally:
<pre>
..................................................
..........................................OO......
..........................................O.O.....
...........................................O......
......................................OOO.......OO
................................................OO
....................................O.....O.......
....................................O.....O.......
....................................O.....O.......
..................................................
......................................OOO.........
..................................................
..................................................
..................................................
..O...............................................
.O.O..............................................
O.O...........OO...........OO.....................
.O............OO.........O..O.....................
.........................OOO......................
..................................................
0
</pre>
=={{header|BASIC256}}==
|