diff --git a/Sources/Stim.Model/Game.cs b/Sources/Stim.Model/Game.cs index 5aefca6..b54b1dc 100644 --- a/Sources/Stim.Model/Game.cs +++ b/Sources/Stim.Model/Game.cs @@ -144,7 +144,8 @@ namespace Model { sum += review.Rate; } - return (float)(Math.Round((sum / Reviews.Count) * 2, MidpointRounding.AwayFromZero) / 2); + Average= (float)(Math.Round((sum / Reviews.Count) * 2, MidpointRounding.AwayFromZero) / 2); + return Average; } public void AddReview(Review review) diff --git a/Sources/Stim/DetailledPage.xaml.cs b/Sources/Stim/DetailledPage.xaml.cs index 54896e6..cc3b869 100644 --- a/Sources/Stim/DetailledPage.xaml.cs +++ b/Sources/Stim/DetailledPage.xaml.cs @@ -11,8 +11,8 @@ public partial class DetailledPage : ContentPage InitializeComponent(); BindingContext = game; CurrGame= game; - avgLabel.Text = game.Average.ToString(); - AddStars(starsContainer, game.Average); + avgLabel.Text = game.GetAvgRate().ToString(); + AddStars(starsContainer, game.GetAvgRate()); } private void AddStars(object sender, EventArgs e)