com.codingame.gameengine.module.entities.World Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of module-entities Show documentation
Show all versions of module-entities Show documentation
Entity Manager module for the CodinGame engine toolkit. Simplify the management of shapes and drawings.
package com.codingame.gameengine.module.entities;
/**
* The World represents a coordinate mapping from the positions of entities to the pixels on screen. The viewer's canvas has 1920x1080 pixels and so
* the default World's width and height are also 1920 and 1080.
*
*/
public class World {
private int width, height;
/**
* The default World's width.
*/
public static final int DEFAULT_WIDTH = 1920;
/**
* The default World's height.
*/
public static final int DEFAULT_HEIGHT = 1080;
/**
* Returns the width of this world.
*
* @return the width of this world.
*/
public int getWidth() {
return width;
}
/**
* Returns the height of this world.
*
* @return the height of this world.
*/
public int getHeight() {
return height;
}
World(int width, int height) {
this.width = width;
this.height = height;
}
World() {
this(DEFAULT_WIDTH, DEFAULT_HEIGHT);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy