asda
This commit is contained in:
parent
33e48cb2c3
commit
a3d1d1bc5b
@ -5,3 +5,23 @@ function fillArray(name, number, playerAnim)
|
|||||||
playerAnim[i-1] = "pics/" + name + i + ".png";
|
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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user