Feb-18-2022, 01:20 PM
Hello world,
I need your help for my new game project.
I want to use x(the number of player) time my class Player.
I think do that but it's not optimum.
Can you recommend something better?
Thank you in advance.
I need your help for my new game project.
I want to use x(the number of player) time my class Player.
I think do that but it's not optimum.
from MyClass import Player x = int(input("Number of player: ")) for i in range(1, x+1): exec(f"Player{i} = Player()")Except that I need to do this for each round of the game.
Can you recommend something better?
Thank you in advance.