Examples of EcState


Examples of com.fray.evo.EcState

   */
  @Test
  public void testScoutTiming() throws Exception {
    StringReader sr = new StringReader("scout-timing 2:12");
    InputFile file = new InputFile(sr);
    EcState destination = file.getDestination();
    Assert.assertEquals(132, destination.scoutDrone);
  }
View Full Code Here

Examples of com.fray.evo.EcState

   */
  @Test
  public void testDefaultUnitCount() throws Exception {
    StringReader sr = new StringReader("waypoint 3:00\nzergling\nspine-crawler\nmelee");
    InputFile file = new InputFile(sr);
    EcState destination = file.getDestination();
    Assert.assertEquals(1, destination.getZerglings());
    Assert.assertEquals(1, destination.getSpineCrawlers());
    Assert.assertTrue(destination.getUpgrades().contains(ZergLibrary.Melee1));
  }
View Full Code Here

Examples of com.fray.evo.EcState

   */
  @Test
  public void testWaypoints() throws Exception {
    StringReader sr = new StringReader("waypoint 3:00\nzergling 6\nwaypoint 6:54\nmelee 2\nspine-crawler\nwaypoint 2:00:00\nmutalisk 6\nflyer-attacks 1");
    InputFile file = new InputFile(sr);
    EcState destination = file.getDestination();

    Assert.assertEquals(2, destination.waypoints.size());

    Assert.assertEquals(180, destination.waypoints.get(0).targetSeconds);
    Assert.assertEquals(6, destination.waypoints.get(0).getZerglings());

    Assert.assertEquals(414, destination.waypoints.get(1).targetSeconds);
    Assert.assertTrue(destination.waypoints.get(1).getUpgrades().contains(ZergLibrary.Melee2));
    Assert.assertEquals(1, destination.waypoints.get(1).getSpineCrawlers());

    Assert.assertEquals(7200, destination.targetSeconds);
    Assert.assertEquals(6, destination.getMutalisks());
    Assert.assertTrue(destination.getUpgrades().contains(ZergLibrary.FlyerAttacks1));
  }
View Full Code Here

Examples of fbench.graph.ECState

      allStates = new Vector<ECState>();
        NodeList states = element.getElementsByTagName("ECState");
        NodeList trans = element.getElementsByTagName("ECTransition");
        Vector ans = new Vector(states.getLength() + trans.getLength());
        for (int i = 0; i < states.getLength(); i++)
            ans.add(new ECState((Element) states.item(i), (i == 0)));
        for (int i = 0; i < trans.getLength(); i++) {
            GraphElement ge = GraphElement.forElement((Element) trans.item(i));
            if (ge != null)
                ans.add(ge);
        }
View Full Code Here

Examples of org.hxzon.asn1.mms.common.ECState

        case Tag.CONTEXT | 0:
            return new ObjectName().init("eventConditionName", "eventConditionName", tag, stream, true);
        case Tag.CONTEXT | 1:
            return Asn1Utils.createBerUnsigned8("severity", "severity", tag, stream);
        case Tag.CONTEXT | 2:
            return new ECState().init("currentState", "currentState", tag, stream);
        case Tag.CONTEXT | 3:
            return new UnacknowledgedState().init("unacknowledgedState", "unacknowledgedState", tag, stream);
        case Tag.CONTEXT | 5:
            return new EventTime().init("timeOfLastTransitionToActive", "timeOfLastTransitionToActive", tag, stream);
        case Tag.CONTEXT | 6:
View Full Code Here

Examples of org.hxzon.asn1.mms.common.ECState

//  timeOfLastTransitionToIdle  [4] EventTime OPTIONAL
//  }
    public BerNode create(int tag, BerInputStream stream) {
        switch (tag) {
        case Tag.CONTEXT | 0:
            return new ECState().init("currentState", "currentState", tag, stream);
        case Tag.CONTEXT | 1:
            return Asn1Utils.createBerUnsigned32("numberOfEventEnrollments", "numberOfEventEnrollments", tag, stream);
        case Tag.CONTEXT | 2:
            return Asn1Utils.createBerBoolean("enabled", "enabled", tag, stream);
        case Tag.CONTEXT | 3:
View Full Code Here

Examples of org.hxzon.asn1.mms.common.ECState

                    public BerNode create(int tag, BerInputStream stream) {
                        switch (tag) {
                        case Tag.CONTEXT | 0:
                            return new ObjectName().init("eventConditionName", "eventConditionName", tag, stream);
                        case Tag.CONTEXT | 1:
                            return new ECState().init("currentState", "currentState", tag, stream);
                        default:
                            return Asn1Utils.createUnknown(tag, stream);
                        }
                    }
                }.init("event", "event", tag, stream);
View Full Code Here

Examples of org.hxzon.asn1.mms.common.ECState

        case Tag.CONTEXT | 2:
            return new ApplicationReference().init("clientApplication", "clientApplication", tag, stream);
        case Tag.CONTEXT | 3:
            return Asn1Utils.createBerUnsigned8("severity", "severity", tag, stream);
        case Tag.CONTEXT | 4:
            return new ECState().init("currentState", "currentState", tag, stream);
        case Tag.CONTEXT | 6:
            return Asn1Utils.createBerBoolean("notificationLost", "notificationLost", tag, stream);
        case Tag.CONTEXT | 7:
            return new AlarmAckRule().init("alarmAcknowledgmentRule", "alarmAcknowledgmentRule", tag, stream);
        case Tag.CONTEXT | 8:
View Full Code Here

Examples of org.hxzon.asn1.mms.common.ECState

        case Tag.CONTEXT | 1:
            return new EventConditionName().init("eventConditionName", "eventConditionName", tag, stream, true);
        case Tag.CONTEXT | 2:
            return Asn1Utils.createBerUnsigned8("severity", "severity", tag, stream);
        case Tag.CONTEXT | 3:
            return new ECState().init("currentState", "currentState", tag, stream);
        case Tag.CONTEXT | 4:
            return new EventTime().init("transitionTime", "transitionTime", tag, stream);
        case Tag.CONTEXT | 6:
            return Asn1Utils.createBerBoolean("notificationLost", "notificationLost", tag, stream);
        case Tag.CONTEXT | 7:
View Full Code Here

Examples of org.hxzon.asn1.mms.common.ECState

    public BerNode create(int tag, BerInputStream stream) {
        switch (tag) {
        case Tag.CONTEXT | 0:
            return new ObjectName().init("eventEnrollmentName", "eventEnrollmentName", tag, stream);
        case Tag.CONTEXT | 2:
            return new ECState().init("acknowledgedState", "acknowledgedState", tag, stream);
        case Tag.CONTEXT | 3:
            return new EventTime().init("timeOfAcknowledgedTransition", "timeOfAcknowledgedTransition", tag, stream, true);
        default:
            return Asn1Utils.createUnknown(tag, stream);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.