add WWTRA mode #4

Merged
Schmidii99 merged 15 commits from Developer into main 2023-04-28 22:11:34 +02:00
2 changed files with 7 additions and 1 deletions
Showing only changes of commit 41c3ac5652 - Show all commits

View File

@ -48,7 +48,7 @@
<span class="h2" style="margin-left: 10px;">Highscore: </span> <span class="h3" id="highScore" style="color: crimson;">0</span>
<br>
<br>
<input type="checkbox" data-toggle="switchbutton" checked data-onlabel="Normal" data-offlabel="Hard Mode" data-onstyle="primary" data-offstyle="danger">
<input id="modeSwitch" type="checkbox" data-toggle="switchbutton" checked data-onlabel="Normal" data-offlabel="Hard Mode" data-onstyle="primary" data-offstyle="danger">
</div>
</div>
<div class="row align-items-center">

View File

@ -21,6 +21,8 @@ class UI {
this.score = document.getElementById("score");
this.highScore = document.getElementById("highScore");
document.getElementById("modeSwitch").addEventListener("change", (e:Event) => {this.switchMode(); this.nextRound()});
}
async init() {
@ -37,6 +39,10 @@ class UI {
)
}
switchMode() {
this.model.switchMode();
}
async buttonClick(btn: HTMLElement) {
btn.setAttribute("disabled", "");
let result = this.model.processClick(btn.innerText);