1package com.osroyale.game.world.position.impl;
3import com.osroyale.game.world.position.Area;
4import com.osroyale.game.world.position.Position;
5import com.osroyale.util.Utility;
47 private final String name;
50 private final int swX;
55 private final int swY;
60 private final int neX;
65 private final int neY;
70 private final int height;
85 this(
"Unknown", swX, swY, neX, neY, 0);
103 public SquareArea(String name,
int swX,
int swY,
int neX,
int neY) {
104 this(name, swX, swY, neX, neY, 0);
124 public SquareArea(String name,
int swX,
int swY,
int neX,
int neY,
int height) {
130 this.height = height;
176 public boolean inArea(
Position position) {
177 return position.getX() >= swX && position.getX() <= neX && position.getY() >= swY && position.getY() <= neY;
181 public Position getRandomLocation() {
SquareArea(int swX, int swY, int neX, int neY)
SquareArea(String name, int swX, int swY, int neX, int neY)
SquareArea(String name, int swX, int swY, int neX, int neY, int height)