mirror of
https://github.com/2006-Scape/Parabot-317-API-Minified.git
synced 2026-07-07 16:49:11 +00:00
Improved code from the Area class
This commit is contained in:
@@ -19,8 +19,8 @@ public class Area {
|
|||||||
*/
|
*/
|
||||||
public Area(Tile... tiles) {
|
public Area(Tile... tiles) {
|
||||||
this.p = new Polygon();
|
this.p = new Polygon();
|
||||||
for (int i = 0; i < tiles.length; i++) {
|
for (Tile tile : tiles) {
|
||||||
p.addPoint(tiles[i].getX(), tiles[i].getY());
|
p.addPoint(tile.getX(), tile.getY());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ public class Area {
|
|||||||
int lowestY = -1;
|
int lowestY = -1;
|
||||||
int highestX = -1;
|
int highestX = -1;
|
||||||
int highestY = -1;
|
int highestY = -1;
|
||||||
ArrayList<Tile> t = new ArrayList<Tile>();
|
ArrayList<Tile> t = new ArrayList<>();
|
||||||
for (int i : p.xpoints) {
|
for (int i : p.xpoints) {
|
||||||
if (i < lowestX || lowestX == -1) {
|
if (i < lowestX || lowestX == -1) {
|
||||||
lowestX = i;
|
lowestX = i;
|
||||||
|
|||||||
Reference in New Issue
Block a user