def toggle_wrap(window, event): from topologies._topology import topology if window.world.topology.type == 'torus': window.world.topology = topology('rectangle') elif window.world.topology.type == 'rectangle': window.world.topology = topology('torus')
def _create_topology(wrap): if wrap: return topology('torus') else: return topology('rectangle')