Merge
This commit is contained in:
@@ -70,11 +70,16 @@ public class Sectors{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**Tries to a sector in a specific direciton, specified by expandX and expandY.
|
/**Tries to a sector in a specific direciton, specified by expandX and expandY.
|
||||||
|
* The player *must* currently be playing in this sector.
|
||||||
* If a sector is in that direction, this method will return false (failure)
|
* If a sector is in that direction, this method will return false (failure)
|
||||||
* @param sector the sector to expand
|
* @param sector the sector to expand
|
||||||
* @param expandX spaces in X coordinate to expand, can be negative
|
* @param expandX spaces in X coordinate to expand, can be negative
|
||||||
* @param expandY spaces in Y coordinate to expand, can be negative*/
|
* @param expandY spaces in Y coordinate to expand, can be negative*/
|
||||||
public boolean expandSector(Sector sector, int expandX, int expandY){
|
public boolean expandSector(Sector sector, int expandX, int expandY){
|
||||||
|
if(world.getSector() != sector){
|
||||||
|
throw new IllegalArgumentException("Sector is not being played in!");
|
||||||
|
}
|
||||||
|
|
||||||
sector.width += expandX;
|
sector.width += expandX;
|
||||||
sector.height += expandY;
|
sector.height += expandY;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user