bugfixes
This commit is contained in:
parent
1f12ef292e
commit
a70aa80d67
1 changed files with 2 additions and 2 deletions
|
|
@ -151,7 +151,7 @@ export class QuizService {
|
|||
const winner = sortedAnswers.find((answer) => answer.valid);
|
||||
let targetUser = 0;
|
||||
if(winner) {
|
||||
const totalWinningScore = 50;
|
||||
const totalWinningScore = getRandomInt(40,60);
|
||||
sortedAnswers.filter(x => x.valid).forEach((answer) => {
|
||||
this.logger.debug(`Giving 1 point to all who answered right`);
|
||||
this.commandBus.execute(new IncreasePlayerWinningRateCommand(answer.user,
|
||||
|
|
@ -168,7 +168,7 @@ export class QuizService {
|
|||
));
|
||||
}
|
||||
}
|
||||
await this.commandBus.execute(new IncreasePlayerWinningRateCommand(sortedAnswers[0].user, 5));
|
||||
await this.commandBus.execute(new IncreasePlayerWinningRateCommand(sortedAnswers[0].user, getRandomInt(4,9)));
|
||||
this.logger.debug(`Giving 1 point to first`);
|
||||
await this.commandBus.execute(new IncreasePlayerScoreCommand(winner.user,1));
|
||||
targetUser = winner.user;
|
||||
|
|
|
|||
Loading…
Reference in a new issue