public static void GeneralFiimDbUpdate(FiimPlayerEntry player, IFiimRating currentPlayer, bool redWin, bool blackWin) { currentPlayer.Games += 1; currentPlayer.ScoreMain += player.ScoreMain; currentPlayer.ScoreAdditional += player.ScoreAdditional; currentPlayer.Rating = (currentPlayer.ScoreMain + currentPlayer.ScoreAdditional) / currentPlayer.Games * 100; if (player.IsRedTeam() && redWin) { currentPlayer.RedWin += 1; } if (player.IsBlackTeam() && blackWin) { currentPlayer.BlackWin += 1; } }
public WeekRatingFiim(FiimPlayerEntry player, bool redWin, bool blackWin) : base(player, redWin, blackWin) { }
public static bool IsBlackTeam(this FiimPlayerEntry player) { return(player.Role == GetLocalized("Black") || player.Role == GetLocalized("Don")); }
public static bool IsRedTeam(this FiimPlayerEntry player) { return(player.Role == GetLocalized("Red") || player.Role == GetLocalized("Sheriff")); }