For a very simple dice game I intend to create a class with attributes of name and score. It is straight forward to create this and also to create objects of player1, player2 and so on. However if I don't know how many player objects I need as the number of players is dynamic, can I make a function which will create and name these player objects?
How to create a varying qty of instances of a Class and name them?
Users browsing this thread: 2 Guest(s)