Browse Source

Funktion zur Erstellung eines Spielbretts erstellt

main
Richard Halsall 2 years ago
parent
commit
73827910cc
  1. 33
      schlangen_und_leitern/js/makeBoard.js

33
schlangen_und_leitern/js/makeBoard.js

@ -0,0 +1,33 @@
function drawBoard(){
let tbl = document.getElementById("board");
for (let y = 0; y < 10; y++){
let myRow = document.createElement("tr");
myRow.id = "row" + y;
tbl.appendChild(myRow);
let row = document.getElementById("row" + y);
for(let x = 0; x < 10; x++){
let cell = document.createElement("td");
row.appendChild(cell);
}
}
}
Loading…
Cancel
Save