From a3d1d1bc5b68e921827722a5ce5795195b0b414c Mon Sep 17 00:00:00 2001 From: pbg2h23akl Date: Thu, 27 Jun 2024 11:01:20 +0200 Subject: [PATCH] asda --- js/funktionen.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/js/funktionen.js b/js/funktionen.js index 69254ba..c9bbd6c 100644 --- a/js/funktionen.js +++ b/js/funktionen.js @@ -4,4 +4,24 @@ function fillArray(name, number, playerAnim) for (let i = 1 ; i <= number ; i++) { playerAnim[i-1] = "pics/" + name + i + ".png"; } +} +function addToScore(currentScore,zahl,rechenOperator){ + let ergebnis; + if(rechenOperator == "Plus"){ + ergebnis = currentScore + zahl; + } + if(rechenOperator == "Minus"){ + ergebnis = currentScore - zahl; + } + if(rechenOperator == "Mal"){ + ergebnis = currentScore * zahl; + } + if(rechenOperator == "geteilt"){ + ergebnis = currentScore / zahl; + } + return ergebnis; +} +function addOneToStreak(win){ + win++; + return win; } \ No newline at end of file