Rogue: Savage Rats, a retro-themed dungeon crawler
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rogue-savage-rats/src/mightypork/rogue/display/constraints/Constraint.java

41 lines
571 B

package mightypork.rogue.display.constraints;
import mightypork.utils.math.coord.Coord;
public abstract class Constraint implements ConstraintContext {
protected ConstraintContext context;
public Constraint(ConstraintContext context) {
this.context = context;
}
public void setContext(ConstraintContext context)
{
this.context = context;
}
public ConstraintContext getContext()
{
return context;
}
protected Coord origin()
{
return context.getRect().getOrigin();
}
protected Coord size()
{
return context.getRect().getSize();
}
}