Exemplo n.º 1
0
            print("########################################################")
            print("Unknown state")
            pass
        elif game_state == 'MAIN_MENU':
            print("########################################################")
            print("Main menu state")
            pass
        elif game_state == 'EPISODE_MENU':
            print("########################################################")
            print("Episode menu state")
            pass
        elif game_state == 'LEVEL_SELECTION':
            # loss = None
            print("########################################################")
            print("Level selection state")
            comm.comm_load_level(s, load_level, silent=False)
            print("level is loaded")

        elif game_state == 'LOADING':
            print("########################################################")
            print("Loading state")
            pass
        elif game_state == 'WON':
            print("########################################################")
            print("Won state")
            # resater random level
            if angle_action_idx != len(valid_angles) - 1:
                angle_action_idx += 1
                comm.comm_restart_level(s)
            elif angle_action_idx == len(valid_angles) - 1:
                angle_action_idx = 0
		elif game_state=='MAIN_MENU':
			print ("########################################################")
			print ("Main menu state")
			pass

		elif game_state=='EPISODE_MENU':
			print ("########################################################")
			print ("Episode menu state")
			pass

		elif game_state=='LEVEL_SELECTION':
			print ("########################################################")
			print ("Level selection state")

			current_level = 1 # test 시작
			comm.comm_load_level(s, current_level, silent=False)

			print ("level is loaded")

		elif game_state=='LOADING':
			print ("########################################################")
			print ("Loading state")
			pass

		elif game_state=='WON':
			print ("########################################################")
			print ("Won state")
			current_level += 1
			comm.comm_load_level(s, current_level, silent=False)

		elif game_state=='LOST':
Exemplo n.º 3
0
        elif game_state == 'MAIN_MENU':
            print("########################################################")
            print("Main menu state")
            pass

        elif game_state == 'EPISODE_MENU':
            print("########################################################")
            print("Episode menu state")
            pass

        elif game_state == 'LEVEL_SELECTION':
            print("########################################################")
            print("Level selection state")

            # comm.comm_load_level(s, np.random.randint(1,22), silent=False)
            comm.comm_load_level(s, current_level,
                                 silent=False)  # initial current_level 1

            print("level is loaded")

        elif game_state == 'LOADING':
            print("########################################################")
            print("Loading state")
            pass

        elif game_state == 'WON':
            print("########################################################")
            print("Won state")
            # resater random level
            # comm.comm_load_level(s, np.random.randint(1,22), silent=False)

            # if current_level == 21 :#or lost_flag == 1:
Exemplo n.º 4
0
        elif game_state == 'MAIN_MENU':
            print("########################################################")
            print("Main menu state")
            pass

        elif game_state == 'EPISODE_MENU':
            print("########################################################")
            print("Episode menu state")
            pass

        elif game_state == 'LEVEL_SELECTION':
            print("########################################################")
            print("Level selection state")

            comm.comm_load_level(s, np.random.randint(1, 22), silent=False)

            print("level is loaded")

        elif game_state == 'LOADING':
            print("########################################################")
            print("Loading state")
            pass

        elif game_state == 'WON':
            print("########################################################")
            print("Won state")
            # resater random level
            comm.comm_load_level(s, np.random.randint(1, 22), silent=False)

        elif game_state == 'LOST':