I've got the following code:
if(promovePeao(board,player) or (not getMovesPecas(board)['W'])):
print("HELLO")
My intention is to check if there are any players in the last row of the boards
def promovePeao(self, board, player):
if(player == 'B'):
for a in (1,9):
if(board[(1,a)] == player):
return True
return False
else:
for b in (1,9):
if(board[(8,b)] == player):
return True
return False
But when I execute the code, I receive the error:
TypeError: promovePeao() missing 1 required positional argument: 'player'
Any ideias why?