+ * The world is the root object of the game. It consists of a series of lands

+ * that are in their turn split up into a number of tiles.

private int hoverWorldX = -1;

private int hoverWorldY = -1;

+ * Constructs a new World with the specified number of lands and tiles per

+ * @param numberTilesPerLand

public World(int numberLands, int numberTilesPerLand) {

this.numberLands = numberLands;

this.numberTilesPerLand = numberTilesPerLand;

this.numberTilesPerLandSqrt = (int) Math.sqrt(numberTilesPerLand);

+ * Returns a list of Lands that are part of this World.

+ * @return a list of lands that are part of the world

public List<Land> getLands() {

+ * Returns the total number of lands in this world.

+ * @return the number of lands of this world

public int getNumberLands() {

this.numberLands = numberLands;

+ * Returns the number of tiles that exist in each land.

+ * @return the number of tiles per land

public int getNumberTilesPerLand() {

return numberTilesPerLand;

this.numberTilesPerLand = numberTilesPerLand;

+ * Returns the square root of the total number of tiles that will be

+ * available in the entire world.

+ * @return the square root of the total number of tiles of all lands in this

public int getSizeSqrt() {

+ * Returns the square root of the number of lands in this world.

+ * @return the square root of the number of lands

public int getNumberLandsSqrt() {

+ * Returns the square root of the number of tiles per land.

+ * @return the square root of the number of tiles per land

public int getNumberTilesPerLandSqrt() {

return numberTilesPerLandSqrt;

+ * Returns the x-coordinate of the tile where the mouse is currently

+ * hovering over in world coordinates.

+ * @return the x-coordinate in the world of the tile that is being hovered

public int getHoverWorldX() {

+ * Returns the y-coordinate of the tile where the mouse is currently

+ * hovering over in world coordinates.

+ * @return the y-coordinate in the world of the tile that is being hovered

public int getHoverWorldY() {

+ * Sets the current x- and y-coordinates of the tile where the mouse is

+ * currently hovering over. The coordinates are world coordinates.

+ * @param worldX the x world coordinate of the hovered tile

+ * @param worldY the y world coordinate of the hovered tile

+ * @return true when the x- or y-coordinate were different than before this

public boolean setHoverCoords(int worldX, int worldY) {

if (isPointWithinBounds(worldX, worldY)) {

+ * Retrieves the tile that is located at the specified x- and y-coordinate.

+ * These coordinates are world coordinates.

+ * @param worldX the x world coordinate

+ * @param worldY the y world coordinate

+ * @return the tile located at these coordinates

public Tile getTile(int worldX, int worldY) {

int landX = worldX / numberTilesPerLandSqrt;

int landY = worldY / numberTilesPerLandSqrt;