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,13 +120,29 @@ export class GameComponent implements OnInit { ...@@ -120,13 +120,29 @@ export class GameComponent implements OnInit {
wrongAnswer(): void{ wrongAnswer(): void{
this.newCard(); this.newCard();
this.service.removePoint if (this.isExplainer) {
({ this.service.removePoint
spielname: this.sessionName, team: this.team, red: this.gameStatus.red, blue: this.gameStatus.blue ({
}).then(value => { spielname: this.sessionName, team: this.team, red: this.gameStatus.red, blue: this.gameStatus.blue
this.gameStatus.red = JSON.parse(value.red); }).then(value => {
this.gameStatus.blue = JSON.parse(value.blue); 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{ 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