def main(): ''' this function runs the game :param = None :returns = None ''' pygame.init() main_window = controller.Controller() main_window.mainLoop()
def __init__(self): Cmd.__init__(self) # Command line argument variables self.statistics = None self.extracted_modules = None self.args = register_arguments() self.prompt = '> ' self.controller = controller.Controller() self.parse_arguments()
def main(): """ runs the controller :param: none :return: None """ #Create an instance on your controller object pygame.init() main_window = controller.Controller() main_window.mainloop()
def test_controller_setting_output_files(self): """ Issue One - Large Class - Test Four Tests if can call controller to change output to different directory Author: Braeden """ ctrl = controller.Controller() output = ctrl.set_output_name_by_arguments(os.getcwd()) self.assertTrue(output)
def test_model_free(): state = np.array([0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0]) desired_state = { 'pos': np.array([0, 0, 0]), 'vel': np.array([0, 0, 0]), 'acc': np.array([0, 0, 0]), 'yaw': np.array([0]), 'yawdot': np.array([0]) } ctrl = controller.Controller(None, desired_state) assert (ctrl.run_ctrl(state) == np.array([1.7658, 0, 0, 0])).all()
def test_controller_setting_uploaded_files(self): """ Issue One - Large Class - Test One Tests is can call command to set files Author: Braeden """ ctrl = controller.Controller() files_set = ctrl.set_files_by_arguments( self.array_multiple_file_upload) self.assertTrue(files_set and ctrl.files == self.array_multiple_file_upload)
def test_run_parser_single(self): """ Issue Two - Long Method - Test One Tests if can run parser using new re-structured method Uses run_parser to call new structure in code_processor class using single file Author: Braeden """ ctrl = controller.Controller() ctrl.set_files_by_arguments([os.getcwd() + "\\tmp\\plants.py"]) parsed = ctrl.run_parser(False, False) self.assertTrue(parsed)
from src import controller controller.Controller()
888 888 888oooo888' 888 888 888 `88b 888 d88' 888 .88P o888bood8P' o888bood8P' ''' if __name__ == "__main__": print(ascii) # Initialize database and create cursors and connection my_db = database.Database() my_db.create_connection() my_db.create_cursors() # Initialize controller my_ctrl = controller.Controller(my_db) # Print options list option_list = '''What would you like to do? 1. Create database 2. Empty database 3. Load database 4. Reset database 5. Print ascii art 0. Exit ''' # Main loop while True: print(option_list) cmd = int(input())
def main(): main_window = controller.Controller() main_window.mainLoop()
def main(): controller.Controller()
def main(state): window = controller.Controller() window.mainloop(state)
def main(): pygame.init() main_window = controller.Controller() main_window.mainLoop()
def main(): game = controller.Controller() game.mainloop()