Export Map instanciation in parent script
More readable and easier for adding multiplayer feature in the Map object
This commit is contained in:
parent
99ed30197c
commit
c7096ee757
|
@ -91,10 +91,8 @@ def choose_maps_menu():
|
||||||
de choisir et effectue quelques tests sur la carte jouee avant de
|
de choisir et effectue quelques tests sur la carte jouee avant de
|
||||||
creer
|
creer
|
||||||
|
|
||||||
:return: Map object
|
:return str: nom de fichier de la carte choisi
|
||||||
"""
|
"""
|
||||||
from map import Map
|
|
||||||
|
|
||||||
# VARIABLES
|
# VARIABLES
|
||||||
user_select_map_id = -1 # choix utilisateur: une carte
|
user_select_map_id = -1 # choix utilisateur: une carte
|
||||||
|
|
||||||
|
@ -129,8 +127,7 @@ def choose_maps_menu():
|
||||||
MAPS_NAME_LIST[user_select_map_id] + \
|
MAPS_NAME_LIST[user_select_map_id] + \
|
||||||
MAP_EXTENTION
|
MAP_EXTENTION
|
||||||
|
|
||||||
# instenciation de la carte choisie
|
return map_file
|
||||||
return Map(map_file)
|
|
||||||
|
|
||||||
|
|
||||||
def get_msg_list(command, label):
|
def get_msg_list(command, label):
|
||||||
|
|
5
roboc/robocserver.py
Normal file → Executable file
5
roboc/robocserver.py
Normal file → Executable file
|
@ -45,7 +45,10 @@ cls() # vide l'ecran de la console
|
||||||
print(MSG_DISCLAMER)
|
print(MSG_DISCLAMER)
|
||||||
|
|
||||||
# Affiche le menu de selection de la carte
|
# Affiche le menu de selection de la carte
|
||||||
CURRENT_MAP = choose_maps_menu()
|
MAP_FILENAME = choose_maps_menu()
|
||||||
|
|
||||||
|
# Genere la carte
|
||||||
|
CURRENT_MAP = (MAP_FILENAME)
|
||||||
|
|
||||||
# Démarre le réseau
|
# Démarre le réseau
|
||||||
GAME_NETWORK = ConnectSocket()
|
GAME_NETWORK = ConnectSocket()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user