|
53 | 53 | groupNameElement.innerHTML = groupName; |
54 | 54 | createUserListElements(userIds); |
55 | 55 | if (userIds.length >= 2) { |
56 | | - btnStartGame.setAttribute("style", "display:block;"); |
| 56 | + btnStartGame.classList.remove("hide-game-element"); |
57 | 57 | } |
58 | 58 | }); |
59 | 59 |
|
|
62 | 62 | groupNameElement.innerHTML = groupName; |
63 | 63 | createUserListElements(userIds); |
64 | 64 | if (userIds.length >= 2) { |
65 | | - btnStartGame.setAttribute("style", "display:block;"); |
| 65 | + btnStartGame.classList.remove("hide-game-element"); |
66 | 66 | } |
67 | 67 | }); |
68 | 68 |
|
69 | 69 | await connection.on("ShowUserList", (userIds) => { |
70 | 70 | createUserListElements(userIds); |
71 | 71 | if (userIds.length >= 2) { |
72 | | - btnStartGame.setAttribute("style", "display:block;"); |
| 72 | + btnStartGame.classList.remove("hide-game-element"); |
73 | 73 | } |
74 | 74 | }); |
75 | 75 |
|
|
132 | 132 |
|
133 | 133 | async function createGameBoard(groupName,playerSymbol) { |
134 | 134 | const board = document.querySelector("#GameBoard"); |
135 | | - board.setAttribute("style", "display:grid;width: 150px;grid-template-columns: auto auto auto;gap: 5px 5px;"); |
| 135 | + //board.setAttribute("style", "display:grid;width: 150px;grid-template-columns: auto auto auto;gap: 5px 5px;"); |
136 | 136 | for (let i = 0; i < 9; i++) { |
137 | 137 | let span = document.createElement("div"); |
138 | 138 | span.innerHTML = " "; |
139 | | - span.style = "border:solid;#333333;1px;width:50px;height:50px;"; |
| 139 | + //span.style = "border:solid;#333333;1px;width:50px;height:50px;"; |
140 | 140 | span.id = "cell" + i; |
141 | 141 | span.onclick = async () => { |
142 | 142 | let cell = document.getElementById("cell" + i); |
|
171 | 171 | const popup = document.createElement("div"); |
172 | 172 | popup.id = "GameEndPopUp"; |
173 | 173 | popup.innerHTML = message; |
174 | | - popup.style = "z-index: 10;width: 50%;position: absolute;top: 20%;left: 25%;background: #333333;opacity: 0.7;color: white;text-align: center;padding: 1rem;" |
175 | 174 |
|
176 | 175 | const button = document.createElement("button"); |
177 | 176 | button.onclick = () => { |
|
0 commit comments