示例#1
0
 def test_windowed(self):
     """Run the windowed environment and schedule test actions."""
     environment = NoiseTV()
     self.app = moire.GUI(runnable=environment, size=(640, 480))
     Clock.schedule_once(self.check_run, 1)
     Clock.schedule_once(self.increase_speed, 1.2)
     Clock.schedule_once(self.decrease_speed, 2.5)
     Clock.schedule_once(self.toggle_sysinfo, 1)
     Clock.schedule_once(self.toggle_sysinfo, 2)
     Clock.schedule_once(self.stop_app, 3)
     self.app.run()
示例#2
0
 def test_illegal(self):
     """Run the environment without runnable."""
     with self.assertRaises(ValueError):
         self.app = moire.GUI()
         Clock.schedule_once(self.stop_app, 1)
         self.app.run()
示例#3
0
 def test_fullscreen(self):
     """Run the environment fullscreen."""
     environment = NoiseTV()
     self.app = moire.GUI(runnable=environment)
     Clock.schedule_once(self.stop_app, 1)
     self.app.run()
示例#4
0
def main():
    """Run model/experiment interactively."""
    import moire
    model = GameOfLifeColor(GOLExperimentColor)
    gui = moire.GUI(runnable=model)
    gui.run()
示例#5
0
def main():
    """Run the whole environment with Moire."""
    environment = NoiseTV()
    gui = moire.GUI(runnable=environment)
    gui.run()
示例#6
0
def run_simulation(model, experiment):
    """Run model/experiment interactively."""
    import moire
    mod = model(experiment)
    gui = moire.GUI(runnable=mod)
    gui.run()