Browse Source

Auswahl der Spieleranzahl programmiert und zur Brückenfunktion hinzugefügt

main
Richard Halsall 2 years ago
parent
commit
fd730bf5f1
  1. 21
      schlangen_und_leitern/HTML.html
  2. 6
      schlangen_und_leitern/css/style.css
  3. 21
      schlangen_und_leitern/js/Bridge.js

21
schlangen_und_leitern/HTML.html

@ -9,6 +9,7 @@
<script type= "text/javascript" src="js/rollResult.js"></script> <script type= "text/javascript" src="js/rollResult.js"></script>
<script type= "text/javascript" src="js/makeBoard.js"></script> <script type= "text/javascript" src="js/makeBoard.js"></script>
<script type= "text/javascript" src="js/Bridge.js"></script> <script type= "text/javascript" src="js/Bridge.js"></script>
<title>Document</title> <title>Document</title>
@ -17,24 +18,22 @@
<h1>Schlangen und Leitern</h1> <h1>Schlangen und Leitern</h1>
</header> </header>
<body> <body>
<div>
<input type="button" class = "playerSelect" id="2Player" onclick="mainGame(2)" value="2 Spieler"></input>
<input type="button" class = "playerSelect" id="3Player" onclick="mainGame(3)" value ="3 Spieler"></input>
<input type="button" class = "playerSelect" id="4Player" onclick="mainGame(4)" value = "4 Spieler"></input>
</div>
<div calss = container id="playArea">
<table id = "board"></table>
<div class = playerSelect>
<input type="button" class = "playerButton" id="2Player" onclick="mainGame(2)" value="2 Spieler"></input>
<input type="button" class = "playerButton" id="3Player" onclick="mainGame(3)" value ="3 Spieler"></input>
<input type="button" class = "playerButton" id="4Player" onclick="mainGame(4)" value = "4 Spieler"></input>
</div> </div>
<div class = container id="würfelBereich">
<div calss = container id="playArea" >
<table id = "board"></table>
<div class = container id="würfelBereich" style="display: none;" >
<img src="/img/wurfle/f(1).png" id="face"> <img src="/img/wurfle/f(1).png" id="face">
<input type = "button" id="rollButton" onclick = "changeFace();drawBoard()" value = "Würfeln">
<input type = "button" id="rollButton" onclick = "changeFace();" value = "Würfeln">
</div> </div>
</div>
</body> </body>

6
schlangen_und_leitern/css/style.css

@ -4,7 +4,13 @@ h1{
font-size: 50px; font-size: 50px;
} }
.playerSelect{
display: flex;
justify-content: center;
}
#würfelBereich{ #würfelBereich{

21
schlangen_und_leitern/js/Bridge.js

@ -1,12 +1,21 @@
function mainGame(playerCount){ function mainGame(playerCount){
//hide player select
//playerselect versctecken
document.getElementById("2Player").style.display = "none";
document.getElementById("3Player").style.display = "none";
document.getElementById("4Player").style.display = "none";
// Wufelbereich zeigen.
document.getElementById("würfelBereich").style.display = "grid";
//nack Spielerzahl fragen
//hide player selection buttons
// reveal dice
// build/show board
// make x player structures
// make x "player" structures and add them to array
//Haupt game loop //Haupt game loop

Loading…
Cancel
Save