Advertisement
Guest User

Untitled

a guest
May 27th, 2015
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function renderTable(world) {
  2.     world.forEach(function(row, x, arr) {
  3.         var td = $('table').append('<tr>');
  4.         row.forEach(function(point, y, arr) {
  5.             if (point == 1) {
  6.                 $('table tr').append('<td><input class="alive" name="++$i" value="$x|$y" type="hidden"></td>');
  7.             }
  8.             else {
  9.                 $('table tr').append('<td></td>')
  10.             }
  11.         });
  12.         $('table').append('</tr>');
  13.     });
  14. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement