public void render(Graphics g) {
		
		//Draw background
		Image im = null;
		try {
			im = new Image("data/image/Pebbles.png");
		} catch (SlickException e1) {
			throw new NullPointerException("Pebbles.png does not exist!");
		}
		for (int x = 0; x < Constants.GAME_WIDTH; x += im.getWidth()){
			for (int y = 0; y < Constants.GAME_HEIGHT; y += im.getHeight()){
				im.draw(x, y);
			}
		}
		
		
		//Sort entities
		sortEntities();
		
		Color color;
		//Draw all entities
		for (Entity e: entities){
		   	g.drawAnimation(images.getAnimation(e), e.getX(), e.getY()); 
		   //	g.drawRect(e.getCollisionBox().getX(), e.getCollisionBox().getY(), e.getCollisionBox().getWidth(), e.getCollisionBox().getHeight());

		}
		
		//Draw mana bars if necessary
		for(Player p: model.getPlayers()){
			Hero h = p.getHero();
			
			
			if (h.getMana() < 100){
				g.setColor(Color.black);
				g.fillRect(h.getX(),h.getY()+Constants.TILE_SIZE,Constants.TILE_SIZE,8);
				g.setColor(h.getTeam().getColor());
				g.fillRect(h.getX(),h.getY()+Constants.TILE_SIZE,(Constants.TILE_SIZE * (h.getMana()/100f)),8);
			}
		}
	
		for (Entity e: entities){
			if (e instanceof Tower){
				Tower t = (Tower)e;
				String s;
				g.setColor(Color.cyan);
				g.drawString(t.getPowerUp().toString(), t.getX(), t.getY() + Constants.TILE_SIZE * 1.5f);
			}
		}
		 
		//Draw statusbar
		statusBar.render(g,model.getPlayers());
		 
		/* //Debug drawing of tiles
		for(int x = 0; x < Constants.GAME_WIDTH; x += 32) {
		    for(int y = 0; y < Constants.GAME_HEIGHT; y += 32) {
		        g.drawRect(x, y, Constants.TILE_SIZE, Constants.TILE_SIZE);
		    }
		}*/ 
	}