Package com.fray.evo

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


   */
  @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

   */
  @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

TOP

Related Classes of com.fray.evo.EcState

Copyright © 2018 www.massapicom. 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.