changed code

This commit is contained in:
Yorick Rommers
2016-01-21 19:55:47 +01:00
parent 75c05ab6ee
commit 882a63466d
+6 -7
View File
@@ -78,14 +78,13 @@ namespace YJMPD_UWP.Model
Util.ShowToastNotification(winner + " won!", "Press Ready or Leave");
JArray players = (JArray)o["players"];
foreach(JToken pl in players)
foreach(var i in (JObject) o["players"])
{
string username = pl["username"].ToString();
double points = (double)pl["points"];
double pointstotal = (double)pl["pointstotal"];
Debug.WriteLine(i.Key);
Debug.WriteLine(i.Value["points"]);
string username = i.Key;
double points = i.Value["points"].ToObject<Double>();
double pointstotal = i.Value["pointstotal"].ToObject<Double>();
App.Game.UpdatePlayer(username, pointstotal, points);
}