public UIContentInfoModel GetUpdates() { try { var data = JnugEngine.GetJnug().Data; var model = new UIContentInfoModel(); model.Engine = JnugEngine.GetJnug()?.GetEngineType(); model.ShipX = data?.ShipStatus?.XPos; model.ShipY = data?.ShipStatus?.YPos; model.ShipDx = data?.ShipStatus?.XVelocity; model.ShipDy = data?.ShipStatus?.YVelocity; model.TargetX = data?.TargetDirection?.X; model.TargetY = data?.TargetDirection?.Y; model.MinesFound = data?.Mines?.Count; model.MinesCount = data?.LastVisionResults?.GoldMines?.Count; model.PlayersCount = data?.LastVisionResults?.OtherShips?.Count; model.BombsCount = data?.LastVisionResults?.Bombs?.Count; model.ScoreboardEntries = data?.Scoreboard?.Entries; model.Mines = data?.Mines?.Values.ToList(); return(model); } catch (Exception ex) { return(new UIContentInfoModel()); } }
public void Start() { ThrowIfNotLoggedIn(); BloomBergActionClient.CreateClient(BloomBergLoginClient.Client.GetAgent()); var client = BloomBergActionClient.Client; JnugEngine.Start(client, BloomBergLoginClient.Client.GetAgent().GetLoginName()); }