Dec-12-2021, 11:56 PM
Hello, i've just written my first class ever and it doesn't work...
Here it is:
So what did i do wrong?
Here it is:
class Player: hand = [] playershand = [] playersgrade = [] dealer = False smallblind = False bigblind = False def __init__(self, number, chips): self.number = number self.chips = chips def bet(self): print("Bet") def raise(self): pass def call(self): pass def check(self): pass def fold(self): pass def quit(self): pass def showstats(self): passand here's the error:
Error:Traceback (most recent call last):
File "/usr/lib/python3.8/idlelib/run.py", line 559, in runcode
exec(code, self.locals)
File "/home/fook/Documents/pygame/Poker Practice/Poker.py", line 4, in <module>
from playerclass import Player
File "/home/fook/Documents/pygame/Poker Practice/playerclass.py", line 18
def raise(self):
^
SyntaxError: invalid syntax
So i don't know, my colon is there , paranthesis and my indentation too... And it looks just like the tutorial...So what did i do wrong?