Here i share click #red only, but if you know, it have #yellow,#green,etc.. i can share if needed.
what i encounter issue, When i click #red, the count will add 1, but i would like to sum all #red clicked with red ball background, like pic2
pic1 - my current output, using below JS script
pic2 - my expected output, i would like to change it like this pic.
what i encounter issue, When i click #red, the count will add 1, but i would like to sum all #red clicked with red ball background, like pic2
pic1 - my current output, using below JS script
pic2 - my expected output, i would like to change it like this pic.
JavaScript:
'click #red'(event, template) {
let s = this.status;
if (s.red > 0) {
s.foul = false;
s.miss = false;
s.free_ball = false;
s.score[s.player_at_the_table] += 1;
s.break_points += 1;
let sep = s.messages[s.player_at_the_table] == "" ? "" : "・";
s.messages[s.player_at_the_table] += sep + "1";
s.messages[s.player_at_the_table ^ 1] = "";
s.red -= 1;
s.on_colour = true;
this.status = s;
updateStatus(this);
}
},