Skip to content

Commit

Permalink
Remove giveup when adding statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
tspivey committed Mar 30, 2023
1 parent 2918499 commit 62d2b6e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ygo/player.py
Expand Up @@ -104,7 +104,7 @@ def get_account(self, session = None):
session = self.connection.session
return session.query(models.Account).filter_by(name=self.nickname).first()

def __statistics(self, player, win = 0, lose = 0, draw = 0, giveup = 0):
def __statistics(self, player, win = 0, lose = 0, draw = 0):
if self.connection is not None:
session = self.connection.session
elif player.connection is not None:
Expand All @@ -120,12 +120,10 @@ def __statistics(self, player, win = 0, lose = 0, draw = 0, giveup = 0):
stat.win = 0
stat.lose = 0
stat.draw = 0
stat.giveup = 0
session.add(stat)
stat.win += win
stat.lose += lose
stat.draw += draw
stat.giveup += giveup
session.commit()

def win_against(self, player):
Expand Down

0 comments on commit 62d2b6e

Please sign in to comment.