package cz.vutbr.feec.transportObjects;

import cz.vutbr.feec.gui.ReckInCanvas;

public class ReckCrate {
	public ReckInCanvas reck;
	public int posX;
	public int posY;
	public int sizeX;
	public int sizeY;
	

	public ReckCrate(ReckInCanvas reck) {
		this.reck = reck;
		posX = reck.getPositionX();
		posY = reck.getPositionY();
		sizeX = reck.getSizeX();
		sizeY = reck.getSizeY();

	}

	public boolean isThisReck(int x, int y) {
		int size = reck.getReckCanvas().getReckDelimiterSize();
		if ((x > posX && x < posX + (sizeX * size))
				&& (y > posY && y < posY + (sizeY * size))) {
			return true;
		}
		return false;
	}
}
