public static ChartPanel getKillsPerEachDeathByBotType(BotStatistic stats) {
    XYSeriesCollection ds = new XYSeriesCollection();

    LinkedList<BotSeries> series = new LinkedList<BotSeries>();

    for (String botName : stats.getAllBotFamilies()) {
      series.add(new BotSeries(new XYSeries(botName), 0, 0, botName));
    }

    for (BotSeries s : series) {
      s.series.add(0, 0);
      s.d1 = StatsTools.countBotsOfGivenFamilly(s.botName, stats);
    }

    for (Kill k : stats.kills) {
      for (BotSeries s : series) {
        if (k.killer.startsWith(s.botName) || k.victim.startsWith(s.botName)) {
          if (k.killer.startsWith(s.botName)) {
            s.int1++;
          }
          if (k.victim.startsWith(s.botName)) {
            s.int2++;
          }
          float val = 0;
          if (s.int2 != 0) {
            val = (float) s.int1 / (float) s.int2;
          }
          s.series.add(k.time / 10, val / s.d1);
        }
      }
    }

    for (BotSeries s : series) {
      ds.addSeries(s.series);
    }

    JFreeChart c =
        ChartFactory.createXYLineChart(
            "Kills per each death by bot type in time",
            "time [s]",
            "kills / deaths",
            ds,
            PlotOrientation.VERTICAL,
            true,
            true,
            true);

    ChartPanel cp = new ChartPanel(c);
    return cp;
  }
  public static ChartPanel getDeathsInTimeByBotType(BotStatistic stats) {
    XYSeriesCollection ds = new XYSeriesCollection();

    LinkedList<BotSeries> series = new LinkedList<BotSeries>();

    for (String botName : stats.getAllBotFamilies()) {
      series.add(new BotSeries(new XYSeries(botName), 0, 0, botName));
    }

    for (BotSeries s : series) {
      s.series.add(0, 0);
      s.int2 = StatsTools.countBotsOfGivenFamilly(s.botName, stats);
    }

    for (Kill k : stats.kills) {
      for (BotSeries s : series) {
        if (k.victim.startsWith(s.botName)) {
          s.int1++;
          s.series.add(k.time / 10, (double) s.int1 / s.int2);
        }
      }
    }

    for (BotSeries s : series) {
      ds.addSeries(s.series);
    }

    JFreeChart c =
        ChartFactory.createXYLineChart(
            "Deaths by bot type in time",
            "time [s]",
            "deaths",
            ds,
            PlotOrientation.VERTICAL,
            true,
            true,
            true);

    ChartPanel cp = new ChartPanel(c);
    return cp;
  }