i'm trying to make a simple class. At first it worked but at one point he gave me this error
File "", line 1, in Player1 = Player(0, 500) TypeError: __init__() takes exactly 2 arguments (3 given)
I know it's one of the most common mistake but I can not solve it. Thank you for your help
class Player.py
class Player(object):
def __init__(self, Pos, Stack):
self.Pos = Pos
self.Stack = Stack
def cstack(self, change):
self.Stack += change
Main code Go.py
from Player import Player
Table=list()
Player1 = Player(0, 500)
Player2 = Player(1, 500)
Player3 = Player(2, 500)
Player1.cstack(30)
print Player3.Stack