/**
 * SnapGames
 * 
 * Game Development Java
 * 
 * GDJ105
 * 
 * @year 2017
 */
package com.snapgames.gdj.core.ui;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.image.BufferedImage;

import com.snapgames.gdj.core.Game;
import com.snapgames.gdj.core.entity.AbstractGameObject;

/**
 * The Background image is a simple image to be displayed in background.
 * 
 * @author Frédéric Delorme
 *
 */
public class ImageObject extends AbstractGameObject {

	public BufferedImage image;

	/**
	 * 
	 * @param name
	 * @param x
	 * @param y
	 * @param width
	 * @param height
	 * @param layer
	 * @param priority
	 * @param color
	 */
	public ImageObject(String name, BufferedImage image, int x, int y, int layer, int priority) {
		super(name, x, y, image.getWidth(), image.getHeight(), layer, priority, null);
		this.image = image;
		this.width = image.getWidth();
		this.height = image.getHeight();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.snapgames.gdj.core.entity.AbstractGameObject#draw(com.snapgames.gdj.core.
	 * Game, java.awt.Graphics2D)
	 */
	@Override
	public void draw(Game game, Graphics2D g) {
		g.drawImage(image, (int) (x), (int) (y),null);
		g.drawImage(image, (int) (x)+width, (int) (y),null);
	}
}

@@ -142,66 +142,18 @@
 awt.
-Color;%0D%0Aimport java.awt.Graphics2D;%0D%0Aimport java.awt.Image
+Graphics2D
 ;%0D%0Ai
@@ -1186,32 +1186,33 @@
  (x), (int) (y),
+ 
 null);%0D%0A%09%09g.draw
@@ -1237,9 +1237,11 @@
  (x)
-+
+ + 
 widt
@@ -1253,16 +1253,17 @@
 nt) (y),
+ 
 null);%0D%0A

fix some typo in ImageObject class.