Exemplo n.º 1
0
  /** Initialize mocks. */
  @Before
  public void start() {
    MockitoAnnotations.initMocks(this);
    action = new Skip(bwapi);

    params = new LinkedList<>();
    params.add(new Identifier("Working"));

    when(act.getParameters()).thenReturn(params);
    when(unit.getType()).thenReturn(unitType);
  }
Exemplo n.º 2
0
  /** Initialize mocks. */
  @Before
  public void start() {
    MockitoAnnotations.initMocks(this);
    action = new Morph(bwapi);

    params = new LinkedList<>();
    params.add(new Identifier("Zerg Hydralisk"));
    params.add(new Numeral(2));

    when(act.getParameters()).thenReturn(params);
    when(unit.getType()).thenReturn(unitType);
    when(bwapi.getSelf()).thenReturn(player);
  }
Exemplo n.º 3
0
 @Override
 public boolean canExecute(Unit unit, Action action) {
   return unit.getType().isBuilding();
 }
Exemplo n.º 4
0
 @Override
 public boolean canExecute(Unit unit, Action action) {
   UnitType unitType = unit.getType();
   return unitType.isCanMove();
 }