+ ClientSize adaption
+ more statistics and timing * improved FastPixel with working code for odd row images
This commit is contained in:
+18
-6
@@ -2,7 +2,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Timers;
|
||||
using System.Timers;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace vampi {
|
||||
class Program {
|
||||
@@ -12,17 +13,28 @@ namespace vampi {
|
||||
get { return Program.anz_sim_done; }
|
||||
}
|
||||
public static Random random = new Random();
|
||||
public static Spielflaeche sflaeche = new Spielflaeche(Settings.size, Settings.coveragePercent, Settings.vampireRatio);
|
||||
public static Spielflaeche sflaeche = new Spielflaeche(Settings.size, Settings.coveragePercent, Settings.vampireRatio);
|
||||
public static double lastCalcTime = 0;
|
||||
public static double lastStatsTime = 0;
|
||||
|
||||
static void Main(string[] args) {
|
||||
Output output = new Output_GUI();
|
||||
Output output = new Output_GUI();
|
||||
Stopwatch sw = new Stopwatch();
|
||||
|
||||
for (anz_sim_done=0; anz_sim_done < anz_sim; anz_sim_done++) {
|
||||
if (anz_sim_done % Settings.drawEveryNthStep == 0) {
|
||||
output.doOutput();
|
||||
sw.Reset();
|
||||
sw.Start();
|
||||
output.doOutput();
|
||||
sw.Stop();
|
||||
Program.lastStatsTime = sw.Elapsed.TotalMilliseconds;
|
||||
}
|
||||
if (output.requestAbort) break;
|
||||
sflaeche.simulateStep();
|
||||
if (output.requestAbort) break;
|
||||
sw.Reset();
|
||||
sw.Start();
|
||||
sflaeche.simulateStep();
|
||||
sw.Stop();
|
||||
Program.lastCalcTime = sw.Elapsed.TotalMilliseconds;
|
||||
}
|
||||
}//Main
|
||||
}//class
|
||||
|
||||
Reference in New Issue
Block a user