Skip to content

Commit

Permalink
Added show/hide
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhw committed Mar 12, 2024
1 parent 89139d2 commit 59b1483
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion button_game/button_game.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ <h1> Binary game </h1>

<hr>

<div class="score">
<button class="button" @click="toggleScore"> Show/hide score </button>
<div class="score" v-if="showScore">
<p> <b> Score </b> </p>
<p>Accuracy: {{ accuracyScore.toFixed(2) }}
Cross-entropy: {{ crossEntropyScore.toFixed(2) }} </p>
Expand Down Expand Up @@ -266,6 +267,7 @@ <h1> Binary game </h1>
stateText: ' ',
setpointText: ' ',
sliderValue: 0,
showScore: false,
confidenceProb: 0.5,
targetState: 'X',
state: '',
Expand Down Expand Up @@ -333,6 +335,9 @@ <h1> Binary game </h1>
this.crossEntropyScore = crossEntropy / setpointHistory.length;


},
toggleScore() {
this.showScore = !this.showScore;
},
setModel(modelName)
{
Expand Down

0 comments on commit 59b1483

Please sign in to comment.