You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
602 B

  1. function errechneEndergebnisse(){
  2. for (let i = 1; i <= 4; i++) {
  3. summeObererTeil(i)
  4. if(Number(document.getElementById('oben_Spieler'+ i).innerHTML) >= 65){
  5. document.getElementById('bonus_Spieler'+ i).innerHTML = 65;
  6. } else {
  7. document.getElementById('bonus_Spieler'+ i).innerHTML = 0;
  8. }
  9. let sum = Number(document.getElementById('bonus_Spieler'+ i).innerHTML);
  10. sum += Number(document.getElementById('oben_Spieler'+ i).innerHTML);
  11. document.getElementById('obenMitBonus_Spieler'+ i).innerHTML = sum;
  12. }
  13. }