shit works mostly, able to proceed to picture taking now

This commit is contained in:
Yorick Rommers
2016-01-19 20:28:35 +01:00
parent b8a1261600
commit 2c9bb142a6
3 changed files with 10 additions and 4 deletions
+9 -2
View File
@@ -32,10 +32,10 @@ namespace YJMPD_UWP.Model
public void HandleMessage(JObject o)
{
Debug.WriteLine("Reached HandleMessage in API");
Debug.WriteLine(o.ToString());
Command c = (Command)Enum.Parse(typeof(Command), o["command"].ToString());
switch(c)
switch (c)
{
case Command.GameFound:
GameFound();
@@ -44,6 +44,13 @@ namespace YJMPD_UWP.Model
Debug.WriteLine("Played joined");
PlayerJoined(o[Command.PlayerJoined.ToString()].ToString());
break;
case Command.Picture:
if (o["selected"].ToObject<bool>() == true)
{
Debug.WriteLine("Selected player taking picture");
App.Game.Selected = true;
}
break;
default:
//Do nothing
break;
+1 -1
View File
@@ -24,7 +24,7 @@ namespace YJMPD_UWP.Model
public List<Player> Players { get; private set; }
public bool Selected { get; private set; }
public bool Selected { get; set; }
private void UpdateGameStatus(GameStatus status)
{
-1
View File
@@ -112,7 +112,6 @@ namespace YJMPD_UWP.Model
public void HandleMessage(string data)
{
Debug.WriteLine(data);
JObject o = JObject.Parse(data);
App.Api.HandleMessage(o);