Skip to content

Commit

Permalink
feat: scoreboard eq
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickChoDev committed Mar 31, 2024
1 parent c364993 commit df820a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/server/src/models/history.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class GameHistoryRepository {
if (k !== `game::${game_id}::${key}`) {
const kTotal = parseInt((await this.redis.get(k)) || '0')
if (kTotal < total - vote) {
this.redis.incrBy(k, Math.round(vote / (total + vote) * 0.01 * vote))
this.redis.incrBy(k, Math.round(0.5 - (kTotal / (total + kTotal)) * vote))
}
}
})
Expand Down

0 comments on commit df820a7

Please sign in to comment.