예제 #1
0
파일: main.py 프로젝트: csimak1/SpaceRun
def main():
    '''
    this function runs the game
    :param = None
    :returns = None
    '''
    pygame.init()
    main_window = controller.Controller()
    main_window.mainLoop()
예제 #2
0
 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()
예제 #3
0
파일: main.py 프로젝트: thoa1/Frogs
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()
예제 #4
0
    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()
예제 #6
0
    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)
예제 #7
0
    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)
예제 #8
0
from src import controller

controller.Controller()
예제 #9
0
 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())
예제 #10
0
def main():
    main_window = controller.Controller()
    main_window.mainLoop()
예제 #11
0
def main():
    controller.Controller()
예제 #12
0
def main(state):
    window = controller.Controller()
    window.mainloop(state)
예제 #13
0
def main():
    pygame.init()
    main_window = controller.Controller()
    main_window.mainLoop()
예제 #14
0
def main():
    game = controller.Controller()
    game.mainloop()