every note missed at the end diminish score and test
This commit is contained in:
@@ -178,6 +178,9 @@ class Scorometer():
|
||||
self.handleMessage(line.rstrip())
|
||||
else:
|
||||
pass
|
||||
for i in self.partition.notes:
|
||||
if i.done == False:
|
||||
self.score -= 50
|
||||
return self.score, {}
|
||||
|
||||
def handleStartMessage(start_message):
|
||||
|
||||
19
scorometer/tests/end_miss/input
Normal file
19
scorometer/tests/end_miss/input
Normal file
@@ -0,0 +1,19 @@
|
||||
{"type":"start", "id": 1, "mode": "normal", "user_id": 1}
|
||||
{"type": "note_on", "id": 1, "time": 3500, "note": 68}
|
||||
{"type": "note_off", "id": 1, "time": 3740, "note": 68}
|
||||
{"type": "note_on", "id": 2, "time": 3750, "note": 67}
|
||||
{"type": "note_off", "id": 2, "time": 3980, "note": 67}
|
||||
{"type": "note_on", "id": 3, "time": 4000, "note": 62}
|
||||
{"type": "note_off", "id": 3, "time": 4240, "note": 62}
|
||||
{"type": "note_on", "id": 4, "time": 4000, "note": 64}
|
||||
{"type": "note_off", "id": 4, "time": 4240, "note": 64}
|
||||
{"type": "note_on", "id": 5, "time": 4000, "note": 60}
|
||||
{"type": "note_off", "id": 5, "time": 4240, "note": 60}
|
||||
{"type": "note_on", "id": 6, "time": 4500, "note": 63}
|
||||
{"type": "note_off", "id": 6, "time": 4740, "note": 63}
|
||||
{"type": "note_on", "id": 7, "time": 4750, "note": 63}
|
||||
{"type": "note_off", "id": 7, "time": 4980, "note": 63}
|
||||
{"type": "note_on", "id": 8, "time": 5000, "note": 63}
|
||||
{"type": "note_off", "id": 8, "time": 5990, "note": 63}
|
||||
{}
|
||||
|
||||
9
scorometer/tests/end_miss/output
Normal file
9
scorometer/tests/end_miss/output
Normal file
@@ -0,0 +1,9 @@
|
||||
{"id": 1, "timingScore": "perfect", "timingInformation": "perfect"}
|
||||
{"id": 2, "timingScore": "perfect", "timingInformation": "perfect"}
|
||||
{"id": 3, "timingScore": "perfect", "timingInformation": "perfect"}
|
||||
{"id": 4, "timingScore": "perfect", "timingInformation": "perfect"}
|
||||
{"id": 5, "timingScore": "perfect", "timingInformation": "perfect"}
|
||||
{"id": 6, "timingScore": "perfect", "timingInformation": "perfect"}
|
||||
{"id": 7, "timingScore": "perfect", "timingInformation": "perfect"}
|
||||
{"id": 8, "timingScore": "perfect", "timingInformation": "perfect"}
|
||||
{"overallScore": 700, "score": {}}
|
||||
Reference in New Issue
Block a user