Beispiel #1
0
 def simulation_informations(self):
     """
     """
     information = '<br/><b>Simulation</b><br/>'        
     
     hours, minutes, seconds = lib.get_simulation_time()
     
     information += 'Time elapsed : ' + str(hours) + '<sup>h</sup>&nbsp;' + str(minutes) + '<sup>m</sup>&nbsp;' + str(seconds) + '<sup>s</sup><br/>'
     information += 'Speed : &times;' + str(lib.round(lib.get_speed(), 2))   + '<br/>'
     
     if lib.delta_t != 0:
         information += 'FPS : ' + str(lib.round(lib.get_speed()/lib.delta_t, 2)) + '<br/>'
         information += '&Delta;t (s) : ' + str(lib.round(lib.delta_t, 2)) + '<br/>'
         
     return information
Beispiel #2
0
    def simulation_informations(self):
        """
        """
        information = '<br/><b>Simulation</b><br/>'

        hours, minutes, seconds = lib.get_simulation_time()

        information += 'Time elapsed : ' + str(
            hours) + '<sup>h</sup>&nbsp;' + str(
                minutes) + '<sup>m</sup>&nbsp;' + str(
                    seconds) + '<sup>s</sup><br/>'
        information += 'Speed : &times;' + str(lib.round(lib.get_speed(),
                                                         2)) + '<br/>'

        if lib.delta_t != 0:
            information += 'FPS : ' + str(
                lib.round(lib.get_speed() / lib.delta_t, 2)) + '<br/>'
            information += '&Delta;t (s) : ' + str(lib.round(lib.delta_t,
                                                             2)) + '<br/>'

        return information
Beispiel #3
0
    def fastforward_simulation(self):
        """
        Plays the simulation at 2, 4 or 8×
        """
        sim_speed = lib.get_speed()

        if sim_speed == 2:
            lib.set_speed(4)
        elif sim_speed == 4:
            lib.set_speed(8)
        elif sim_speed == 8:
            lib.set_speed(1)
        else:
            lib.set_speed(2)
Beispiel #4
0
 def fastforward_simulation(self):
     """
     Plays the simulation at 2, 4 or 8×
     """
     sim_speed = lib.get_speed()
     
     if sim_speed == 2:
         lib.set_speed(4)
     elif sim_speed == 4:
         lib.set_speed(8)
     elif sim_speed == 8:
         lib.set_speed(1)
     else:
         lib.set_speed(2)