Sergidev commited on
Commit
657fca1
·
verified ·
1 Parent(s): 9d9cc63

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +32 -1
templates/index.html CHANGED
@@ -9,14 +9,45 @@
9
  <body>
10
  <div class="container">
11
  <h1>1v1 Hangman</h1>
12
- <button id="playButton">Play</button>
 
 
 
 
 
 
13
  <div id="waitingMessage" style="display: none;">
14
  <p>Session ID: <span id="sessionId"></span></p>
15
  <p>Waiting for Player 2...</p>
16
  </div>
 
 
17
  <div id="gameStarting" style="display: none;">
18
  <p>Starting game...</p>
19
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  </div>
21
  <script src="{{ url_for('static', filename='js/game.js') }}"></script>
22
  </body>
 
9
  <body>
10
  <div class="container">
11
  <h1>1v1 Hangman</h1>
12
+
13
+ <!-- Initial Screen -->
14
+ <div id="initialScreen">
15
+ <button id="playButton">Play</button>
16
+ </div>
17
+
18
+ <!-- Waiting for Player 2 -->
19
  <div id="waitingMessage" style="display: none;">
20
  <p>Session ID: <span id="sessionId"></span></p>
21
  <p>Waiting for Player 2...</p>
22
  </div>
23
+
24
+ <!-- Game Starting -->
25
  <div id="gameStarting" style="display: none;">
26
  <p>Starting game...</p>
27
  </div>
28
+
29
+ <!-- Word Input -->
30
+ <div id="wordInput" style="display: none;">
31
+ <input type="text" id="wordInputField" maxlength="7" placeholder="Enter a 7-letter word">
32
+ <button id="submitWordButton">Submit Word</button>
33
+ </div>
34
+
35
+ <!-- Waiting for Opponent's Word -->
36
+ <div id="waitingForWord" style="display: none;">
37
+ <p>Waiting for opponent to submit their word...</p>
38
+ </div>
39
+
40
+ <!-- Game Area -->
41
+ <div id="gameArea" style="display: none;">
42
+ <div id="hangmanSvg"></div>
43
+ <div class="word-display" id="playerWord"></div>
44
+ <div class="word-display" id="opponentWord"></div>
45
+ <div class="guesses" id="guesses">Guessed letters: </div>
46
+ <div class="player-turn" id="playerTurn"></div>
47
+ <input type="text" id="guessInput" maxlength="1">
48
+ <button id="guessButton">Guess</button>
49
+ <div id="message"></div>
50
+ </div>
51
  </div>
52
  <script src="{{ url_for('static', filename='js/game.js') }}"></script>
53
  </body>