public void Print_MultipleUnitsOnSpace_AllRepresented() { var state = new WorldState(); state.Geography = new Geography(10, 10); GenerateObjects(state, 80); var print = StatePrinter.PrintState(state); Output.WriteLine(print); Assert.NotEqual(0, print.Length); }
public void Run() { var state = World.Reset(); var actions = DecideNextActions(state); var fullWatch = Stopwatch.StartNew(); while (!World.IsDone()) { state = World.Step(actions); actions = DecideNextActions(state); if (World.StepsTaken % 100 == 0) { Log.Debug(StatePrinter.PrintState(state)); } } fullWatch.Stop(); Log.Information("Took {steps} steps in {time} milliseconds with an average step of {average} ms", World.StepsTaken, fullWatch.ElapsedMilliseconds, (double)fullWatch.ElapsedMilliseconds / World.StepsTaken); }