Search in sources :

Example 21 with TilePosition

use of bwapi.TilePosition in project BWJSAL by RobinsonMann.

the class ReservedMapTest method freeTiles_tilePosition_freeRectangle.

@Test
public void freeTiles_tilePosition_freeRectangle() {
    final TilePosition tilePosition = new TilePosition(1, 2);
    final int width = 2, height = 2;
    this.target.reserveTiles(tilePosition, width, height);
    assertThatRectangleReserved(tilePosition, width, height);
    this.target.freeTiles(tilePosition, width, height);
    assertThatRectangleNotReserved(tilePosition, width, height);
}
Also used : TilePosition(bwapi.TilePosition) Test(org.junit.Test)

Example 22 with TilePosition

use of bwapi.TilePosition in project BWJSAL by RobinsonMann.

the class ReservedMapTest method reserveTiles_tilePosition_reserveSingleTile.

@Test
public void reserveTiles_tilePosition_reserveSingleTile() {
    final TilePosition position = new TilePosition(0, 0);
    assertThatTileNotReserved(position);
    this.target.reserveTiles(position, UnitType.Terran_Command_Center);
    assertThatOnlyTileReserved(position);
    assertTileReservedType(position, UnitType.Terran_Command_Center);
}
Also used : TilePosition(bwapi.TilePosition) Test(org.junit.Test)

Aggregations

TilePosition (bwapi.TilePosition)22 Test (org.junit.Test)13 Unit (bwapi.Unit)9 UnitType (bwapi.UnitType)6 GameState (ecgberht.GameState)5 BaseLocation (bwta.BaseLocation)4 Pair (bwapi.Pair)3 RaceUtils.createMockRace (BWJSAL.utils.RaceUtils.createMockRace)2 UnitTypeUtils.mockResourceDepotUnitType (BWJSAL.utils.UnitTypeUtils.mockResourceDepotUnitType)2 Position (bwapi.Position)2 Race (bwapi.Race)2 Game (bwapi.Game)1 Player (bwapi.Player)1 EnemyBuilding (ecgberht.EnemyBuilding)1 Squad (ecgberht.Squad)1 Point (java.awt.Point)1 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 PriorityQueue (java.util.PriorityQueue)1