public Tuple <bool, string> GetGameReplayForUserSearch(int gameRoomID, int userId) { IGame game = proxy.GetGameRoombyId(gameRoomID); string toRet = proxy.GetGameRoomReplyById(gameRoomID); bool flag = false; foreach (var user in game.GetPlayersInRoom()) { if (user.user.Id() == userId) { flag = true; } } foreach (var user in game.GetSpectetorInRoom()) { if (user.user.Id() == userId) { flag = true; } } if (toRet == null) { toRet = ""; } return(new Tuple <bool, string>(flag, toRet)); }