Loading src/app/dao/TabuMiddlewareService.ts +0 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ export class TabuMiddlewareService { } getS2C(req: any): Promise<any> { console.log("getS2C Request: ", req); return this.request('POST', `${environment.tabuMiddlewareURL}getS2C`, req); } Loading src/app/game/game.component.ts +18 −7 Original line number Diff line number Diff line Loading @@ -53,7 +53,8 @@ export class GameComponent implements OnInit, OnDestroy { private router: Router, private activatedRoute: ActivatedRoute, private isAllowedToPlay: IsAllowedToPlay, private socketDataService: SocketDataService) {} private socketDataService: SocketDataService) { } ngOnInit(): void { this.activatedRoute.paramMap.subscribe(params => { Loading Loading @@ -124,6 +125,7 @@ export class GameComponent implements OnInit, OnDestroy { } }, 593); } startCountdown(): void { setInterval(() => { this.timeRemaining = this.timeRemaining -= 1; Loading @@ -131,10 +133,11 @@ export class GameComponent implements OnInit, OnDestroy { } rightAnswer(): void { this.newCard(); this.service.addPoint ({ 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, cardID: this.gameStatus.activeCard }).then(value => { this.newCard(); this.gameStatus.red = JSON.parse(value.red); this.gameStatus.blue = JSON.parse(value.blue); }); Loading @@ -145,7 +148,11 @@ export class GameComponent implements OnInit, OnDestroy { if (this.isExplainer) { this.service.removePoint ({ spielname: this.sessionName, team: this.team, red: this.gameStatus.red, blue: this.gameStatus.blue spielname: this.sessionName, team: this.team, red: this.gameStatus.red, blue: this.gameStatus.blue, cardID: this.gameStatus.activeCard }).then(value => { this.gameStatus.red = JSON.parse(value.red); this.gameStatus.blue = JSON.parse(value.blue); Loading @@ -159,7 +166,11 @@ export class GameComponent implements OnInit, OnDestroy { } this.service.removePoint ({ spielname: this.sessionName, team: opennentTeam, red: this.gameStatus.red, blue: this.gameStatus.blue spielname: this.sessionName, team: opennentTeam, red: this.gameStatus.red, blue: this.gameStatus.blue, cardID: this.gameStatus.activeCard }).then(value => { this.gameStatus.red = JSON.parse(value.red); this.gameStatus.blue = JSON.parse(value.blue); Loading Loading @@ -197,11 +208,11 @@ export class GameComponent implements OnInit, OnDestroy { this.gameStatus.redTurn = JSON.parse(value.redTurn); this.gameStatus.activeExplainer = JSON.parse(value.activeExplainer); this.gameStatus.activeCard = JSON.parse(value.activeCard); console.log("SOLUTION: ", this.cardInfo.cardID); console.log('SOLUTION: ', this.cardInfo.cardID); if (this.cardInfo.cardID === -1) { console.log('I am in'); this.service.getCard({cardID: value.activeCard}).then(value1 => { console.log("FIRST CARDS: ", value1); console.log('FIRST CARDS: ', value1); this.fillNewCard(value1); }); } Loading Loading
src/app/dao/TabuMiddlewareService.ts +0 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ export class TabuMiddlewareService { } getS2C(req: any): Promise<any> { console.log("getS2C Request: ", req); return this.request('POST', `${environment.tabuMiddlewareURL}getS2C`, req); } Loading
src/app/game/game.component.ts +18 −7 Original line number Diff line number Diff line Loading @@ -53,7 +53,8 @@ export class GameComponent implements OnInit, OnDestroy { private router: Router, private activatedRoute: ActivatedRoute, private isAllowedToPlay: IsAllowedToPlay, private socketDataService: SocketDataService) {} private socketDataService: SocketDataService) { } ngOnInit(): void { this.activatedRoute.paramMap.subscribe(params => { Loading Loading @@ -124,6 +125,7 @@ export class GameComponent implements OnInit, OnDestroy { } }, 593); } startCountdown(): void { setInterval(() => { this.timeRemaining = this.timeRemaining -= 1; Loading @@ -131,10 +133,11 @@ export class GameComponent implements OnInit, OnDestroy { } rightAnswer(): void { this.newCard(); this.service.addPoint ({ 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, cardID: this.gameStatus.activeCard }).then(value => { this.newCard(); this.gameStatus.red = JSON.parse(value.red); this.gameStatus.blue = JSON.parse(value.blue); }); Loading @@ -145,7 +148,11 @@ export class GameComponent implements OnInit, OnDestroy { if (this.isExplainer) { this.service.removePoint ({ spielname: this.sessionName, team: this.team, red: this.gameStatus.red, blue: this.gameStatus.blue spielname: this.sessionName, team: this.team, red: this.gameStatus.red, blue: this.gameStatus.blue, cardID: this.gameStatus.activeCard }).then(value => { this.gameStatus.red = JSON.parse(value.red); this.gameStatus.blue = JSON.parse(value.blue); Loading @@ -159,7 +166,11 @@ export class GameComponent implements OnInit, OnDestroy { } this.service.removePoint ({ spielname: this.sessionName, team: opennentTeam, red: this.gameStatus.red, blue: this.gameStatus.blue spielname: this.sessionName, team: opennentTeam, red: this.gameStatus.red, blue: this.gameStatus.blue, cardID: this.gameStatus.activeCard }).then(value => { this.gameStatus.red = JSON.parse(value.red); this.gameStatus.blue = JSON.parse(value.blue); Loading Loading @@ -197,11 +208,11 @@ export class GameComponent implements OnInit, OnDestroy { this.gameStatus.redTurn = JSON.parse(value.redTurn); this.gameStatus.activeExplainer = JSON.parse(value.activeExplainer); this.gameStatus.activeCard = JSON.parse(value.activeCard); console.log("SOLUTION: ", this.cardInfo.cardID); console.log('SOLUTION: ', this.cardInfo.cardID); if (this.cardInfo.cardID === -1) { console.log('I am in'); this.service.getCard({cardID: value.activeCard}).then(value1 => { console.log("FIRST CARDS: ", value1); console.log('FIRST CARDS: ', value1); this.fillNewCard(value1); }); } Loading