Commit 5bddb764 authored by Dennis Willers's avatar Dennis Willers 🏀

Watch Dog Press Tabu and remove Point from the Explainer Team

parent 50c2d3e9
Pipeline #333 passed with stages
in 5 minutes and 22 seconds
......@@ -120,6 +120,7 @@ export class GameComponent implements OnInit {
wrongAnswer(): void{
this.newCard();
if (this.isExplainer) {
this.service.removePoint
({
spielname: this.sessionName, team: this.team, red: this.gameStatus.red, blue: this.gameStatus.blue
......@@ -127,6 +128,21 @@ export class GameComponent implements OnInit {
this.gameStatus.red = JSON.parse(value.red);
this.gameStatus.blue = JSON.parse(value.blue);
});
} else if (this.isWatchdog) {
let opennentTeam = '';
if (this.team === 'red') {
opennentTeam = 'blue';
} else if (this.team === 'blue') {
opennentTeam = 'red';
}
this.service.removePoint
({
spielname: this.sessionName, team: opennentTeam, red: this.gameStatus.red, blue: this.gameStatus.blue
}).then(value => {
this.gameStatus.red = JSON.parse(value.red);
this.gameStatus.blue = JSON.parse(value.blue);
});
}
}
newCard(): void{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment