Exemple #1
0
        private void WikiWriteByFleet(StreamWriter writer, ArrayList planets)
        {
            writer.WriteLine("!!!Top Rulers by Fleet");

            writer.Write("||{{!^}}*{0}*", "#");
            writer.Write("||{{!^}}*{0}*", "Planet");
            writer.Write("||{{!^}}*{0}*", "Ruler");
            writer.Write("||{{!^}}*{0}*", "L");
            writer.Write("||{{!^}}*{0}*", "M");
            writer.Write("||{{!^}}*{0}*", "H");
            writer.Write("||{{!^}}*{0}*", "A");
            writer.WriteLine("||{{!^}}*{0}*||", CultureModule.getContent("section_fleet"));

            for (int i = 0; i < NumberOfPlanets; ++i)
            {
                Planet planet = (Planet)planets[i];
                writer.Write("||{0}", i + 1);
                writer.Write("||{0}", planet);
                writer.Write("||{0}", ((Ruler)planet.Owner).Name);
                writer.Write("||{0}", OrionGlobals.format(FleetComparer.Count(planet, "light")));
                writer.Write("||{0}", OrionGlobals.format(FleetComparer.Count(planet, "medium")));
                writer.Write("||{0}", OrionGlobals.format(FleetComparer.Count(planet, "heavy")));
                writer.Write("||{0}", OrionGlobals.format(FleetComparer.Count(planet, "animal")));
                writer.WriteLine("||{0}||", OrionGlobals.format((FleetComparer.Count(planet.getDefenseFleet()))));
            }
        }
Exemple #2
0
        private void WikiWriteByFleet(StreamWriter writer, ArrayList rulers)
        {
            writer.WriteLine("!!!Top Rulers by Fleet");

            writer.Write("||{{!^}}*{0}*", "#");
            writer.Write("||{{!^}}*{0}*", "Ruler");
            writer.Write("||{{!^}}*{0}*", "L");
            writer.Write("||{{!^}}*{0}*", "M");
            writer.Write("||{{!^}}*{0}*", "H");
            writer.Write("||{{!^}}*{0}*", "A");
            writer.Write("||{{!^}}*{0}*", "Planets");
            writer.Write("||{{!^}}*{0}*", CultureModule.getContent("section_fleet"));
            writer.WriteLine("||{{!^}}*{0}*||", "Avg");

            for (int i = 0; i < NumberOfRulers; ++i)
            {
                Ruler ruler = (Ruler)rulers[i];

                writer.Write("||{0}", i + 1);
                writer.Write("||{0}", ruler.Name);
                writer.Write("||{0}", OrionGlobals.format(FleetComparer.Count(ruler, "light")));
                writer.Write("||{0}", OrionGlobals.format(FleetComparer.Count(ruler, "medium")));
                writer.Write("||{0}", OrionGlobals.format(FleetComparer.Count(ruler, "heavy")));
                writer.Write("||{0}", OrionGlobals.format(FleetComparer.Count(ruler, "animal")));
                writer.Write("||{0}", ruler.Planets.Length);

                int count = FleetComparer.Count(ruler);
                writer.Write("||{0}", OrionGlobals.format(count));
                writer.WriteLine("||{0}||", OrionGlobals.format(count / ruler.Planets.Length));
            }
        }
Exemple #3
0
        private void WriteByFleet(StreamWriter writer, ArrayList planets)
        {
            writer.WriteLine("<h2>Top {0}</h2>", CultureModule.getContent("section_fleet"));
            writer.WriteLine("<table>");

            writer.WriteLine("<tr>");
            writer.WriteLine("<th>#</td>");
            writer.WriteLine("<th>{0}</td>", CultureModule.getContent("planet"));
            writer.WriteLine("<th>Ruler</td>");
            writer.WriteLine("<th>L</td>");
            writer.WriteLine("<th>M</td>");
            writer.WriteLine("<th>H</td>");
            writer.WriteLine("<th>A</td>");
            writer.WriteLine("<th>{0}</td>", CultureModule.getContent("section_fleet"));
            writer.WriteLine("</tr>");

            for (int i = 0; i < NumberOfPlanets; ++i)
            {
                Planet planet = (Planet)planets[i];
                writer.WriteLine("<tr>");
                writer.WriteLine("<td>{0}</td>", i + 1);
                writer.WriteLine("<td>{0}</td>", planet);
                writer.WriteLine("<td>{0}</td>", OrionGlobals.getLink((Ruler)planet.Owner));
                writer.WriteLine("<td>{0}</td>", OrionGlobals.format(FleetComparer.Count(planet, "light")));
                writer.WriteLine("<td>{0}</td>", OrionGlobals.format(FleetComparer.Count(planet, "medium")));
                writer.WriteLine("<td>{0}</td>", OrionGlobals.format(FleetComparer.Count(planet, "heavy")));
                writer.WriteLine("<td>{0}</td>", OrionGlobals.format(FleetComparer.Count(planet, "animal")));
                writer.WriteLine("<td>{0}</td>", OrionGlobals.format((FleetComparer.Count(planet.getDefenseFleet()))));
                writer.WriteLine("</tr>");
            }

            writer.WriteLine("</table>");
        }
Exemple #4
0
        private void WriteByFleet(StreamWriter writer, ArrayList rulers)
        {
            writer.WriteLine("<h2>Top Rulers by {0}</h2>", CultureModule.getContent("section_fleet"));
            writer.WriteLine("<table>");

            writer.WriteLine("<tr>");
            writer.WriteLine("<th>#</td>");
            writer.WriteLine("<th>Ruler</td>");
            writer.WriteLine("<th>L</td>");
            writer.WriteLine("<th>M</td>");
            writer.WriteLine("<th>H</td>");
            writer.WriteLine("<th>A</td>");
            writer.WriteLine("<th>Planets</td>");
            writer.WriteLine("<th>{0}</td>", CultureModule.getContent("section_fleet"));
            writer.WriteLine("<th>Average</td>");
            writer.WriteLine("</tr>");

            for (int i = 0; i < NumberOfRulers; ++i)
            {
                Ruler ruler = (Ruler)rulers[i];
                writer.WriteLine("<tr>");
                writer.WriteLine("<td>{0}</td>", i + 1);
                writer.WriteLine("<td>{0}</td>", OrionGlobals.getLink(ruler));
                writer.WriteLine("<td>{0}</td>", OrionGlobals.format(FleetComparer.Count(ruler, "light")));
                writer.WriteLine("<td>{0}</td>", OrionGlobals.format(FleetComparer.Count(ruler, "medium")));
                writer.WriteLine("<td>{0}</td>", OrionGlobals.format(FleetComparer.Count(ruler, "heavy")));
                writer.WriteLine("<td>{0}</td>", OrionGlobals.format(FleetComparer.Count(ruler, "animal")));
                writer.WriteLine("<td>{0}</td>", ruler.Planets.Length);

                int count = FleetComparer.Count(ruler);
                writer.WriteLine("<td>{0}</td>", OrionGlobals.format(count));
                writer.WriteLine("<td>{0}</td>", OrionGlobals.format(count / ruler.Planets.Length));
                writer.WriteLine("</tr>");
            }

            writer.WriteLine("</table>");
        }