public dynamic AcceptPlay(dynamic play) { string playerName = play.player; List <int> cardIndexes = play.cards; var player = m_Game.FindPlayer(m_Game.GetCurrentTurnPlayerName()); var okay = m_Game.AcceptPlay(playerName, cardIndexes); return(new { okay = okay, turns = okay ? m_Game.GetCurrentTurns() : 0, player = okay && player != null?m_Game.GetCurrentTurnPlayerName() : "", cards = okay && player != null?player.CurrentHand.ToString() : "" }); }