I am making a simple game with multiple players, which each player can insert their first name, last name and each player is assigned 100 poins at the begging. In my code once I am done with coding the "essential" information, but when it comes to user input it does not work.
The "base" for the player class: (this part works)
class Players():
def __init__ (self, firstname, lastname, coins): #initialising attributes
self.firstname = firstname
self.lastname = lastname
self.coins= coins
def full_info(self):
return self.firstname + self.lastname + self.coins
This is the second part where the problem is, the input is not stored in the attributes
def get_user_input(self):
firstname= input("Please enter your first name:")
lastname= input ("Please enter your second name: ")
coins= 100 #they are assigned automatically
return self(firstname, lastname, coins)
I would appriciate any suggesting regarding the user input.