public override DDDEvent ToDDDEvent(int currentTime, DDDAdapter ddd) { MoveEvent ev = new MoveEvent(); if (this.Location.Item is T_AbsolutePosition) { ev.DestinationLocation = ((T_AbsolutePosition)this.Location.Item).ToLocationValue(); } else if (this.Location.Item is T_RelativePosition) { //get the relative object location, distance constraint, and/or absolute position Console.WriteLine("TODO Implement this!"); return(null); } else if (this.Location.Item is LocationValue) { ev.DestinationLocation = (LocationValue)this.Location.Item; } else { Console.WriteLine("TODO Fix this!"); return(null); } ev.ObjectID = this.ID; ev.Time = this.TimeAfter + currentTime; ev.Throttle = Throttle; return(ev); }
public Generator(DDDAdapter ddd) { this.ddd = ddd; this.random = new Random(); this.entryRegions = ddd.GetAllEntryRegions(); this.revealedSeaVessels = ddd.GetAllRevealedSeaVessels(); /* * IFF Speed Course location Ambiguity */ this.ambiguityTable = new bool[][] { new bool[] { false, true, false, false, true }, new bool[] { true, true, false, false, true }, new bool[] { true, false, false, false, true }, new bool[] { false, false, true, false, true }, new bool[] { false, false, false, true, true }, new bool[] { false, false, false, false, true }, new bool[] { false, true, true, false, true }, new bool[] { false, true, false, true, true }, new bool[] { true, true, true, true, false }, new bool[] { true, false, true, true, false }, new bool[] { true, false, false, true, false }, new bool[] { true, true, false, true, false }, new bool[] { true, true, true, false, false }, new bool[] { true, false, true, false, false }, new bool[] { false, false, true, true, false }, new bool[] { false, true, true, true, false } }; }
public MainWindow() { _items = new Dictionary <string, T_Item>(); _timelineEvents = new ScheduledItemsList(); _ddd = new DDDAdapter(); _ddd.SetTickCallback(new DDDAdapter.TimeTickDelegate(TimeTick)); InitializeComponent(); }
public override DDDEvent ToDDDEvent(int currentTime, DDDAdapter ddd) { ChangeStateEvent ev = new ChangeStateEvent(); ev.ObjectID = this.ID; ev.StateName = this.State; ev.Time = this.TimeAfter + currentTime; //not sure why it parses an int to a string in the first place... return(ev); }
public override DDDEvent ToDDDEvent(int currentTime, DDDAdapter ddd) { InteractionEvent ev = new InteractionEvent(); ev.CapabilityName = this.Capability; ev.ObjectID = this.Instigator; ev.TargetID = this.Target; ev.Time = this.TimeAfter + currentTime; return(ev); }
public override DDDEvent ToDDDEvent(int currentTime, DDDAdapter ddd) { RevealEvent ev = new RevealEvent(); if (this.Location.Item is T_AbsolutePosition) { ev.Location = ((T_AbsolutePosition)this.Location.Item).ToLocationValue(); } else if (this.Location.Item is T_RelativePosition) { //get the relative object location, distance constraint, and/or absolute position Console.WriteLine("TODO Implement this!"); return(null); } else if (this.Location.Item is LocationValue) { ev.Location = (LocationValue)this.Location.Item; } else { Console.WriteLine("TODO Fix this!"); return(null); } ev.ObjectID = this.ID; ev.State = this.State; ev.Time = this.TimeAfter + currentTime; //optional params if (this.Owner != string.Empty && this.Owner != null) { ev.OwnerID = this.Owner; } if (this.Type != String.Empty && this.Type != null) { ev.ObjectType = this.Type; } if (this.StartupParameters.Items.Count() > 0) { for (int x = 0; x < this.StartupParameters.Items.Count() - 1; x += 2) { try { ev.StartupParameters.Add(StartupParameters.Items[x], ddd.GetCorrectDataValue(StartupParameters.Items[x], StartupParameters.Items[x + 1])); //this should work } catch (Exception ex) { Console.WriteLine("Exception while parsing a startup parameter. " + ex.Message); } } } return(ev); }
private Boolean _readyToSendItems = true;//default to true so we always send the first scheduled item public MainWindow() { _items = new Dictionary <string, T_Item>(); _ptItems = new Dictionary <string, T_Item>(); _timelineEvents = new ScheduledItemsList(); _dmCPEs = new Dictionary <string, CPEPair>(); _ddd = new DDDAdapter(); _ddd.SetTickCallback(new DDDAdapter.TimeTickDelegate(TimeTick)); InitializeComponent(); LoadCommandLineArgs(); tbHostname.Text = _dddHostname; tbPort.Text = _dddPort.ToString(); tbShareName.Text = _dddShare; _itemSelector = new AdaptiveSelector.AdaptiveSelector(new ChallengeMethod(), ""); }
public ThreatTypeGenerator(DDDAdapter ddd) : base(ddd) { }
public CrossingGenerator(DDDAdapter ddd) : base(ddd) { }
public PirateGenerator(DDDAdapter ddd) : base(ddd) { }
public CourseGenerator(DDDAdapter ddd) : base(ddd) { }
public GroupingGenerator(DDDAdapter ddd) : base(ddd) { }
public InterceptGenerator(DDDAdapter ddd) : base(ddd) { }
public override DDDEvent ToDDDEvent(int currentTime, DDDAdapter ddd) { //this currently does not send out an actual DDD event, it correlates to once which is already scripted. return(null); }
public AmbiguityGenerator(DDDAdapter ddd) : base(ddd) { }
public MerchantGenerator(DDDAdapter ddd) : base(ddd) { }
public virtual DDDEvent ToDDDEvent(int currentTime, DDDAdapter ddd) { return(null); }