Add support for adding score

This commit is contained in:
2020-11-27 19:13:27 +00:00
parent 623b53d542
commit bcda8f8a4f
5 changed files with 65 additions and 2 deletions

View File

@@ -14,7 +14,7 @@
</header>
<main>
<h2>{{name}} <img src="{{character}}"/></h2>
<h2>{{name}} <img src="{{character}}"/> <div class="score">0</div></h2>
<button id="buzzer">
BUZZ
@@ -47,6 +47,8 @@
reset();
} else if (msg.type === "close") {
roomClosed();
} else if (msg.type === "score") {
document.querySelector('.score').innerText = msg.score;
}
};