Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function renderTable(world) {
- world.forEach(function(row, x, arr) {
- var td = $('table').append('<tr>');
- row.forEach(function(point, y, arr) {
- if (point == 1) {
- $('table tr').append('<td><input class="alive" name="++$i" value="$x|$y" type="hidden"></td>');
- }
- else {
- $('table tr').append('<td></td>')
- }
- });
- $('table').append('</tr>');
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement