Archived
1
0

+ added properties instead of class variables

x removed Typliste (integrated in Einwohner)
This commit is contained in:
2009-01-30 21:57:37 +01:00
parent 422210793e
commit 497fd500d9
9 changed files with 153 additions and 72 deletions
+11 -3
View File
@@ -15,18 +15,26 @@ namespace vampi {
public static Random random = new Random();
public static Spielflaeche sflaeche = new Spielflaeche(Settings.size, Settings.coveragePercent, Settings.vampireRatio);
public static double lastCalcTime = 0;
public static double lastStatsTime = 0;
public static double lastStatsTime = 0;
public static double lastOverallTime = 0;
static void Main(string[] args) {
Output output = new Output_GUI();
Stopwatch sw = new Stopwatch();
Stopwatch sw2 = new Stopwatch();
for (anz_sim_done=0; anz_sim_done < anz_sim; anz_sim_done++) {
for (anz_sim_done=0; anz_sim_done < anz_sim; anz_sim_done++) {
if (anz_sim_done % Settings.drawEveryNthStep == 0) {
sw2.Stop();
Program.lastOverallTime = sw2.Elapsed.TotalMilliseconds/Settings.drawEveryNthStep;
sw2.Reset();
sw2.Start();
sw.Reset();
sw.Start();
Program.lastCalcTime /= Settings.drawEveryNthStep;
output.doOutput();
sw.Stop();
Program.lastCalcTime = 0;
Program.lastStatsTime = sw.Elapsed.TotalMilliseconds;
}
if (output.requestAbort) break;
@@ -34,7 +42,7 @@ namespace vampi {
sw.Start();
sflaeche.simulateStep();
sw.Stop();
Program.lastCalcTime = sw.Elapsed.TotalMilliseconds;
Program.lastCalcTime += sw.Elapsed.TotalMilliseconds;
}
}//Main
}//class