package server.match.objects;

import java.awt.geom.Point2D;
import java.awt.image.BufferedImage;

public class DrawObject {

	protected Point2D position;
	protected BufferedImage image;

	// Contains the logic for offline DrawObjects
	public DrawObject(BufferedImage image) {
		this.image = image;

		position = new Point2D.Double(0, 0);
	}

	public void update() {
	};

	/* Helper Functions */

	public void setX(int x) {
		position.setLocation(x, position.getY());
	}

	public void setY(int y) {
		position.setLocation(position.getX(), y);
	}

	public void setPosition(Point2D p) {
		position.setLocation(p);
	}

	public void setPosition(int x, int y) {
		position.setLocation(x, y);
	}

	public int getX() {
		return (int) position.getX();
	}

	public int getY() {
		return (int) position.getY();
	}

	public Point2D getPosition() {
		return position;
	}

	public int getWidth() {
		return image.getWidth();
	}

	public int getHeigth() {
		return image.getHeight();
	}
}
