commit f160b0ae12bc790d314fdec321a21b03135efad4 Author: zevav Date: Tue Sep 25 11:31:47 2018 -0400 first diff --git a/index.html b/index.html new file mode 100644 index 0000000..cd8fa14 --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + Title + + +
+ + + + + \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..292030c --- /dev/null +++ b/index.js @@ -0,0 +1,24 @@ +// draw a 15 x 15 grid +// if there's exactly three neighbors that are alive -> ALIVE +// if there's four or more -> DEAD +// one or less -> DEADo + +container = document.querySelector('#container'); +for (let i = 0; i < 15; i++) { + + let row = document.createElement('tr'); + container.appendChild(row); + + for (let j = 0; j < 15; j++) { + + let cell = document.createElement('td'); + cell.classList.add('dead'); + cell.style.height = '50px'; + cell.style.width = '50px'; + cell.style.border = '1px solid #999'; + row.appendChild(cell); + + } + + +} \ No newline at end of file