|
|
@ -261,9 +261,9 @@ function checkPosition(player, objectArr){ |
|
|
|
//win condition
|
|
|
|
if(player.newPosition == 100){ |
|
|
|
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
|
|
|
@ -279,26 +279,28 @@ function checkPosition(player, objectArr){ |
|
|
|
|
|
|
|
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(){ |
|
|
|
//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.
|
|
|
|
document.getElementById("würfelBereich").style.display = "grid"; |
|
|
|
changeElement("würfelBereich", "grid") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function changeElement(id, style){ |
|
|
|
|
|
|
|
document.getElementById(id).style.display = style; |
|
|
|
} |