fix normal scoro mode
This commit is contained in:
committed by
Clément Le Bihan
parent
c1d714e02a
commit
9fd70d3110
@@ -4,6 +4,7 @@ class Key:
|
||||
self.start = start
|
||||
self.duration = duration
|
||||
self.done = False
|
||||
self.half_done = False
|
||||
|
||||
def __repr__(self):
|
||||
return f"{self.key} ({self.start} - {self.duration})"
|
||||
|
||||
@@ -107,7 +107,10 @@ class Scorometer:
|
||||
}
|
||||
|
||||
# Practice variables
|
||||
if self.mode == PRACTICE:
|
||||
self.to_play = set([x.key for x in self.practice_partition.pop(0)])
|
||||
else:
|
||||
self.to_play = set()
|
||||
self.keys_down_practice: set = set()
|
||||
|
||||
|
||||
@@ -159,6 +162,7 @@ class Scorometer:
|
||||
else 50
|
||||
)
|
||||
self.incrementStreak()
|
||||
to_play.half_done = True
|
||||
logging.debug({"note_on": f"{perf} on {message.note}"})
|
||||
self.send({"type": "timing", "id": message.id, "timing": perf})
|
||||
else:
|
||||
@@ -280,7 +284,7 @@ class Scorometer:
|
||||
|
||||
def endGame(self):
|
||||
for i in self.partition.notes:
|
||||
if i.done is False:
|
||||
if i.done is False and not i.half_done:
|
||||
self.info["score"] -= 25
|
||||
self.info["missed"] += 1
|
||||
send(
|
||||
|
||||
Reference in New Issue
Block a user