private int draw_stats(Graphics g, int i, int w, int offset) {
    	g.setColor(COLORS[(i+1)%COLORS.length]);
    	offset += 10;
    	g.drawString("Player "+i+": "+game.getAgent(i).getLabel(), w, offset);
    	int team = 0;
    	for (int j = 0; j < game.pgs.teams.size(); j++) {
    		if (game.pgs.teams.get(j).contains(i)) {
    			team = j;
    			break;
    		}
    	}
    	offset += 20;
    	g.setColor(COLORS[(1+team)%COLORS.length]);
    	g.drawString("Team: "+team, w, offset);

    	g.setColor(Color.white);
    	offset += 20;
    	g.drawString("Score: "+game.pgs.scores.get(i), w, offset);
    	offset += 20;
    	g.drawString("Resources: "+game.pgs.resources.get(i), w, offset);
    	offset += 20;
    	g.drawString("Kills: "+game.pgs.kills.get(i), w, offset);
    	offset += 20;
    	g.drawString("Deaths: "+game.pgs.deaths.get(i), w, offset);
    	offset += 20;
    	g.drawString("Units:", w, offset);
    	ArrayList<Integer> units = new ArrayList<Integer>();
    	ArrayList<Integer> buildings = new ArrayList<Integer>();
    	for (int j = 0; j < game.pgs.unitDefinitions.building_defs.get(i).size(); j++) {
    		buildings.add(0);
    	}
    	for (int j = 0; j < game.pgs.unitDefinitions.unit_defs.get(i).size(); j++) {
    		units.add(0);
    	}
    	for (int j = 0; j < game.pgs.armies.get(i).size(); j++) {
    		if (game.pgs.armies.get(i).get(j).isBuilding()) {
    			buildings.set(game.pgs.armies.get(i).get(j).getType(), buildings.get(game.pgs.armies.get(i).get(j).getType())+1);
    		} else {
    			units.set(game.pgs.armies.get(i).get(j).getType(), units.get(game.pgs.armies.get(i).get(j).getType())+1);
    		}
    	}
    	for (int j = 0; j < units.size(); j++) {
    		offset += 20;
    		g.drawString("       "+game.pgs.unitDefinitions.unit_defs.get(i).get(j).label+": "+units.get(j), w, offset);
    	}
    	offset += 20;
    	g.drawString("Buildings:", w, offset);
    	for (int j = 0; j < buildings.size(); j++) {
    		offset += 20;
    		g.drawString("       "+game.pgs.unitDefinitions.building_defs.get(i).get(j).label+": "+buildings.get(j), w, offset);
    	}
    	
    	return offset+10;
    }