@Override
	public void draw(Graphics g) {
		if(Constants.getWidth() > viewport.getWidth()){
			System.out.println("Updating viewport.");
			viewport = new Rectangle(0, 
					0, 
					Constants.getWidth(), 
					Constants.getHeight());
		}
		
		g.setColor(Color.WHITE);
		
		/**
		 * Draw the map.
		 */
		
		try{
			
		
		for(short a = 0; a < tileRows; a++){
			for(short b = 0; b < tileCols; b++){
				if(viewport.contains(new Point((tiles[b][a].getX() * tileWidth) + (xOffSet * tileWidth), 
												(tiles[b][a].getY() * tileHeight) + (yOffSet * tileHeight)))){
					g.drawImage(images[tiles[b][a].getImage()], 
							(tiles[b][a].getX() * tileWidth) + (xOffSet * tileWidth), 
							(tiles[b][a].getY() * tileHeight) + (yOffSet * tileHeight), 
							tileWidth, 
							tileHeight, 
							null);
				}
			}
		}
		
		}catch(Exception e){
			e.printStackTrace();
			System.exit(-1);
		}
	}