|
@ -261,9 +261,9 @@ function checkPosition(player, objectArr){ |
|
|
//win condition
|
|
|
//win condition
|
|
|
if(player.newPosition == 100){ |
|
|
if(player.newPosition == 100){ |
|
|
player.won = true; |
|
|
player.won = true; |
|
|
document.getElementById("continue").style.display = "block" |
|
|
|
|
|
document.getElementById("replay").style.display = "block" |
|
|
|
|
|
document.getElementById("würfelBereich").style.display = "none" |
|
|
|
|
|
|
|
|
changeElement("continue", "block") |
|
|
|
|
|
changeElement("replay", "block") |
|
|
|
|
|
changeElement("würfelBereich", "none") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//snake condition
|
|
|
//snake condition
|
|
@ -279,26 +279,28 @@ function checkPosition(player, objectArr){ |
|
|
|
|
|
|
|
|
function continueGame (){ |
|
|
function continueGame (){ |
|
|
|
|
|
|
|
|
document.getElementById("continue").style.display = "none" |
|
|
|
|
|
document.getElementById("replay").style.display = "none" |
|
|
|
|
|
document.getElementById("würfelBereich").style.display = "grid" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
changeElement("continue", "none") |
|
|
|
|
|
changeElement("replay", "none") |
|
|
|
|
|
changeElement("würfelBereich", "grid") |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function hideStartMenu(){ |
|
|
function hideStartMenu(){ |
|
|
//playerselect versctecken
|
|
|
//playerselect versctecken
|
|
|
document.getElementById("2Player").style.display = "none"; |
|
|
|
|
|
document.getElementById("3Player").style.display = "none"; |
|
|
|
|
|
document.getElementById("4Player").style.display = "none"; |
|
|
|
|
|
document.getElementById("isUp").style.display = "block"; |
|
|
|
|
|
|
|
|
changeElement("2Player", "none") |
|
|
|
|
|
changeElement("3Player", "none") |
|
|
|
|
|
changeElement("4Player", "none") |
|
|
|
|
|
changeElement("isUp", "block") |
|
|
|
|
|
|
|
|
// Wufelbereich zeigen.
|
|
|
// Wufelbereich zeigen.
|
|
|
document.getElementById("würfelBereich").style.display = "grid"; |
|
|
|
|
|
|
|
|
changeElement("würfelBereich", "grid") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function changeElement(id, style){ |
|
|
|
|
|
|
|
|
|
|
|
document.getElementById(id).style.display = style; |
|
|
|
|
|
} |