Fiasko/src/main/java/inf112/fiasko/roborally/objects/BoardElementContainer.java

39 lines
750 B
Java
Raw Normal View History

2020-03-10 16:04:27 +01:00
package inf112.fiasko.roborally.objects;
import inf112.fiasko.roborally.element_properties.Position;
/**
* This class represents a type of object and its position
* @param <K> The type of object
*/
2020-03-10 16:04:27 +01:00
public class BoardElementContainer <K>{
K obj;
private Position pos;
2020-03-10 16:04:27 +01:00
/**
* Initializes the BoardElementContainer
* @param obj The object
* @param pos The position
*/
2020-03-10 16:04:27 +01:00
BoardElementContainer(K obj, Position pos) {
this.obj = obj;
this.pos = pos;
}
/**
* Gets the object
* @return object
*/
2020-03-10 16:04:27 +01:00
public K getObject() {
return obj;
}
/**
* Gets the position
* @return position
*/
2020-03-10 16:04:27 +01:00
public Position getPosition() {
return pos;
}
}