Изменена проверка карт для запуска
This commit is contained in:
		
							
								
								
									
										22
									
								
								dodo.py
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								dodo.py
									
									
									
									
									
								
							| @@ -25,9 +25,9 @@ if x>0: | |||||||
|  |  | ||||||
| def print_line(text): | def print_line(text): | ||||||
|     "Добавление тире вокруг текста, покраска" |     "Добавление тире вокруг текста, покраска" | ||||||
|     print(colorama.Fore.YELLOW + "-"*25) |     print(colorama.Fore.YELLOW + "-"*30) | ||||||
|     print(colorama.Fore.GREEN + text) |     print(colorama.Fore.GREEN + text) | ||||||
|     print(colorama.Fore.YELLOW + "-"*25 + colorama.Style.RESET_ALL) |     print(colorama.Fore.YELLOW + "-"*30 + colorama.Style.RESET_ALL) | ||||||
|  |  | ||||||
|  |  | ||||||
| def create_dir(directory): | def create_dir(directory): | ||||||
| @@ -221,14 +221,22 @@ def start(map_server=list_config): | |||||||
|     map_choise = [] |     map_choise = [] | ||||||
|     while True: |     while True: | ||||||
|         "Проверка на выбор имеющихся карт" |         "Проверка на выбор имеющихся карт" | ||||||
|  |         check = True | ||||||
|         for i in range(len(map_server)): |         for i in range(len(map_server)): | ||||||
|             print(f"{i+1}) {map_server[i]}") |             print(f"{i+1}) {map_server[i]}") | ||||||
|         map_list = check_int("\n") |  | ||||||
|         #for k in range(map_list): |         map_list = input("Выбери карты для запуска в формате 1 2 3 или 1,2,3") | ||||||
|         #    if 0>int(map_list[k])>map_list and len(str(map_list))>len(str(map_server)): |         map_list = map_list.replace(',', ' ') | ||||||
|         #        print("Укажите карты для установки в формате 1,3,5 или 145 или 1 2 3") |         map_list = list(set(map_list.split())) | ||||||
|         #    else: |         try: | ||||||
|  |             for s in map_list: | ||||||
|  |                     if int(s) > len(map_server): | ||||||
|  |                         check = False | ||||||
|  |             if len(map_list) <= len(map_server) and check == True: | ||||||
|                 break |                 break | ||||||
|  |         except: | ||||||
|  |             print("Неправильный ввод") | ||||||
|  |  | ||||||
|  |  | ||||||
|     for j in str(map_list): |     for j in str(map_list): | ||||||
|         map_choise.append(map_server[int(j) - 1]) |         map_choise.append(map_server[int(j) - 1]) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user