So I'm trying to add in a scoring system with an external module in a really basic game as I just started Python two days ago.
score_history = [0]
a=cur_score()
def var1():
scoremodule.cur_score()
def initial_score():
return score[0]
def cur_score():
return score_history[-1]
def affect_score(delta):
score_history.append(cur_score() + delta)
return cur_score()
def reset_score(var1):
sub=a-a
print(sub)
Here's what I have so far. I just need a way to reset the score with the reset_score
argument. I can't figure out how to assign cur_score
a letter or subtract it from its self. Help would be much appreciated.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…