/Users/petercappello/NetBeansProjects/56-2014/56-2014-3-Zapem/src/View.java
import java.awt.Graphics;
import java.awt.Image;
import javax.swing.JPanel;

/**
 * View is a JPanel that displays the current positions of the Game Critters.
 * @author Peter Cappello
 */
public class View extends JPanel
{
    private final Game game;
    private final Image image;
    
    /**
     * Constructs a View for a game & its Image.
     * @param game to be viewed
     * @param image of the game to be viewed
     */
    public View( Game game, Image image ) 
    { 
        this.game = game; 
        this.image = image;
    }
    
    /**
     * Paints the Image of the Game being displayed.
     * @param graphics where the Image of the Game is displayed.
     */
    @Override
    public void paintComponent( Graphics graphics )
    {
        super.paintComponent( graphics );
        graphics.drawImage( image, 0, 0, Game.IMAGE_SIZE, Game.IMAGE_SIZE, this );
    }
}