-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathindex.html
More file actions
121 lines (102 loc) · 5.42 KB
/
Copy pathindex.html
File metadata and controls
121 lines (102 loc) · 5.42 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DevOps Hangman Challenge</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<div class="header">
<h1>🎮 DevOps Hangman Challenge</h1>
<p>Test your DevOps knowledge in this classic word guessing game!</p>
<button class="theme-toggle" onclick="toggleTheme()" title="Toggle Dark/Light Mode">
<span class="theme-icon">🌙</span>
</button>
</div>
<div class="tabs">
<button class="tab active" onclick="switchTab('game')">Play Game</button>
<button class="tab" onclick="switchTab('wordbank')">Word Bank</button>
</div>
<!-- Game Tab -->
<div id="game" class="tab-content active">
<div class="player-setup">
<h2>Player Setup</h2>
<div class="player-input">
<input type="text" id="player1Name" placeholder="Player 1 Name">
<input type="text" id="player2Name" placeholder="Player 2 Name">
<button class="btn btn-success" onclick="startGame()">Start Game</button>
</div>
</div>
<div id="gameArea" style="display: none;">
<div class="score-board">
<div class="player-score" id="player1Score">
<h3 id="player1Display">Player 1</h3>
<div class="score" id="score1">0</div>
</div>
<div class="player-score" id="player2Score">
<h3 id="player2Display">Player 2</h3>
<div class="score" id="score2">0</div>
</div>
</div>
<div class="lives-counter">
❤️ Lives Remaining: <span id="livesLeft">6</span> / 6
</div>
<div class="game-board">
<div class="hangman-display">
<svg class="hangman-svg" id="hangmanSvg">
<!-- Gallows -->
<line x1="50" y1="320" x2="250" y2="320" stroke="#333" stroke-width="4"/>
<line x1="100" y1="320" x2="100" y2="20" stroke="#333" stroke-width="4"/>
<line x1="100" y1="20" x2="200" y2="20" stroke="#333" stroke-width="4"/>
<line x1="200" y1="20" x2="200" y2="50" stroke="#333" stroke-width="4"/>
<!-- Head -->
<circle id="head" cx="200" cy="80" r="30" stroke="#dc3545" stroke-width="4" fill="none" style="display: none;"/>
<!-- Body -->
<line id="body" x1="200" y1="110" x2="200" y2="200" stroke="#dc3545" stroke-width="4" style="display: none;"/>
<!-- Left Arm -->
<line id="leftArm" x1="200" y1="140" x2="160" y2="170" stroke="#dc3545" stroke-width="4" style="display: none;"/>
<!-- Right Arm -->
<line id="rightArm" x1="200" y1="140" x2="240" y2="170" stroke="#dc3545" stroke-width="4" style="display: none;"/>
<!-- Left Leg -->
<line id="leftLeg" x1="200" y1="200" x2="170" y2="260" stroke="#dc3545" stroke-width="4" style="display: none;"/>
<!-- Right Leg -->
<line id="rightLeg" x1="200" y1="200" x2="230" y2="260" stroke="#dc3545" stroke-width="4" style="display: none;"/>
</svg>
</div>
<div class="game-info">
<div class="word-display" id="wordDisplay">_ _ _ _ _</div>
<div class="wrong-letters">
<h4>Wrong Guesses:</h4>
<div class="letters" id="wrongLetters">None yet</div>
</div>
</div>
</div>
<div class="keyboard" id="keyboard">
<!-- Letters will be generated by JavaScript -->
</div>
<div class="game-status" id="gameStatus">
<h3 id="statusMessage"></h3>
<button class="btn btn-success" onclick="nextRound()" style="margin-top: 20px;">Next Round</button>
</div>
</div>
</div>
<!-- Word Bank Tab -->
<div id="wordbank" class="tab-content">
<div class="word-bank-header">
<h2>Word Bank Management</h2>
<div>Total Words: <strong id="wordCount">0</strong></div>
</div>
<div class="add-word-form">
<input type="text" id="newWord" placeholder="Enter new DevOps term...">
<button class="btn btn-success" onclick="addWord()">Add Word</button>
</div>
<div class="word-list" id="wordList">
<!-- Words will be displayed here -->
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>