@ -10,8 +10,17 @@ function mainGame(playerCount){
// Wufelbereich zeigen.
document.getElementById("würfelBereich").style.display = "grid";
// build/show board + get board array
boarArr = buildBoard();
drawBoard(boarArr);
let playerArray = buildPlayerArray(playerCount);
let rollresult = rollDice();
console.log("roll result =" + rollresult);
@ -0,0 +1,27 @@
function PlayerBuilder(id, boardArr){
this.id = id;
this.location = boardArr;
console.log("player" + id + "built");
}
function buildPlayerArray(playerCount, boardArr){
let playerArray = [];
for(let i = 1; i <= playerCount; i++){
let player = new PlayerBuilder(i);
playerArray.push(player)
console.log("player added to array!")
return playerArray;