-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkniffel.html
132 lines (103 loc) · 3.75 KB
/
kniffel.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE html>
<html lang="de">
<head>
<!-- Titel im Browser -->
<title>Kniffel - Praktikantenaufgabe</title>
<!-- Zeichenkodierung bestimmen -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- Stylesheet und Javascript einbinden -->
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="container">
<button class="dice disabled" onclick="toggleDice(this)"></button>
<!-- this ist der Zeiger auf das HTML Element, welches das Ereignis, hier onclick, auslöst -->
<button class="dice disabled" onclick="toggleDice(this)"></button>
<button class="dice disabled" onclick="toggleDice(this)"></button>
<button class="dice disabled" onclick="toggleDice(this)"></button>
<button class="dice disabled" onclick="toggleDice(this)"></button>
<!-- Button zum Würfeln -->
<button id="roll" onclick="rollDices()">Würfeln</button>
<p class="wurfenUbrig">Noch: 3</p>
<!-- Wertetabelle -->
<table class="punktefelder">
<tbody>
<!-- Alle Einser zählen -->
<tr class="einser">
<th>Einser</th>
<td class="combi disabled" onclick="assignDices(this, 1)"></td>
<td class="savedDices"></td>
</tr>
<!-- Alle Zweier zählen -->
<tr class="zweier">
<th>Zweier</th>
<td class="combi disabled" onclick="assignDices(this, 2)"></td>
<td class="savedDices"></td>
</tr>
<!-- @TODO Erweitern Sie die Wertetabelle um Dreier, Vierer, Fuenfer, Sechser, Dreierpasch und Viererpasch -->
<tr class="dreier">
<th>Dreier</th>
<td class="combi disabled" onclick="assignDices(this, 3)"></td>
<td class="savedDices"></td>
</tr>
<tr class="vierer">
<th>Vierer</th>
<td class="combi disabled" onclick="assignDices(this, 4)"></td>
<td class="savedDices"></td>
</tr>
<tr class="funfer">
<th>Funfer</th>
<td class="combi disabled" onclick="assignDices(this, 5)"></td>
<td class="savedDices"></td>
</tr>
<tr class="sechser">
<th>Sechser</th>
<td class="combi disabled" onclick="assignDices(this, 6)"></td>
<td class="savedDices"></td>
</tr>
<tr class="dreierpasch">
<th>Dreierpasch</th>
<td class="combi disabled" onclick="assignDices(this, 'dreierpasch')"></td>
<td class="savedDices"></td>
</tr>
<tr class="viererpasch">
<th>Viererpasch</th>
<td class="combi disabled" onclick="assignDices(this, 'viererpasch')"></td>
<td class="savedDices"></td>
</tr>
<tr class="fullhouse">
<th>Fullhouse</th>
<td class="combi disabled" onclick="assignDices(this, 'fullhouse')"></td>
<td class="savedDices"></td>
</tr>
<tr class="kleineStrasse">
<th>Kleine Strasse</th>
<td class="combi disabled" onclick="assignDices(this, 'kleineStrasse')"></td>
<td class="savedDices"></td>
</tr>
<tr class="grosseStrasse">
<th>Grosse Strasse</th>
<td class="combi disabled" onclick="assignDices(this, 'grosseStrasse')"></td>
<td class="savedDices"></td>
</tr>
<tr class="kniffel">
<th>Kniffel</th>
<td class="combi disabled" onclick="assignDices(this, 'kniffel')"></td>
<td class="savedDices"></td>
</tr>
<tr class="chance">
<th>Chance</th>
<td class="combi disabled" onclick="assignDices(this, 'chance')"></td>
<td class="savedDices"></td>
</tr>
<!-- Gesamtpunktzahl -->
<tr>
<th>Gesamt</th>
<td id="score">0</td>
</tr>
</tbody>
</table>
</div>
<script type="text/javascript" src="script.js"></script>
</body>
</html>