Added config team functionality, receive them from backend to update frontend, Added scoreswitch

This commit is contained in:
2024-05-28 22:59:36 +02:00
parent faaa47a792
commit 835248a9dc
6 changed files with 106 additions and 19 deletions
+2 -12
View File
@@ -17,8 +17,7 @@ let sideswitch = false;
// Function prototypes
function setEnabled(status) {};
function setName(team, name) {};
function configTeam() {};
function configTeam(team, name, name2, isSpielgemeinschaft) {};
function setScore(team, score) {};
function alterScore(team, dir) {};
function clearScore() {};
@@ -43,15 +42,6 @@ function configTeam(team, name, name2, isSpielgemeinschaft) {
}
}
// Set team name
function setName(team, name) {
if(team == "teamA") {
teamA.name = name;
} else if(team == "teamB") {
teamB.name = name;
}
}
// Set score of team to passed value
function setScore(team, score) {
if(team == "teamA") {
@@ -121,5 +111,5 @@ function getValues() {
}
module.exports = {
setEnabled, setScore, alterScore, clearScore, getEnabled, getValues
setEnabled, configTeam, setScore, alterScore, clearScore, toggleSideswitch, getEnabled, getValues
}