This commit is contained in:
pbg2h23akl 2024-06-27 11:01:20 +02:00
parent 33e48cb2c3
commit a3d1d1bc5b

View File

@ -5,3 +5,23 @@ function fillArray(name, number, playerAnim)
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;
}