You are not supposed to call a class method directly, instead create an instance of that class:
p1 = players(your, values, here)
skierDirection, playerImage = p1.turn(skierDirection, playerImages)
To elaborate on the error you’re getting:
TypeError: turn() missing 1 required positional argument: ‘playerImages’
It’s because turn
needs an instance of players
as first argument (self
). A class method always gets passed the instance as the first argument, thus p1.turn(skierDirection, playerImages)
will acutually pass 3 parameters to players.turn
.