Give the bulk tester a category for early exit

This commit is contained in:
Eevee (Evelyn Woods) 2020-12-16 01:38:45 -07:00
parent a91d7f24a1
commit af7d2c741b
2 changed files with 16 additions and 4 deletions

View File

@ -2175,10 +2175,19 @@ class PackTestDialog extends DialogOverlay {
level.advance_tic(input); level.advance_tic(input);
if (level.state === 'success') { if (level.state === 'success') {
// TODO warn if exit early? if (level.tic_counter < replay.duration - 10) {
// Early exit is dubious (e.g. this happened sometimes before multiple
// players were implemented correctly)
record_result(
'early', "Won early",
`Exited early after ${util.format_duration(level.tic_counter / TICS_PER_SECOND)} with ${util.format_duration((replay.duration - level.tic_counter) / TICS_PER_SECOND)} left in the replay`,
true);
}
else {
record_result( record_result(
'success', "Won", 'success', "Won",
`Exited successfully after ${util.format_duration(level.tic_counter / TICS_PER_SECOND)} (delta ${level.tic_counter - replay.duration})`); `Exited successfully after ${util.format_duration(level.tic_counter / TICS_PER_SECOND)} (delta ${level.tic_counter - replay.duration})`);
}
num_passed += 1; num_passed += 1;
break; break;
} }

View File

@ -605,6 +605,9 @@ ol.packtest-colorcoded > li[data-status=running] {
ol.packtest-colorcoded > li[data-status=success] { ol.packtest-colorcoded > li[data-status=success] {
background: hsl(120, 60%, 75%); background: hsl(120, 60%, 75%);
} }
ol.packtest-colorcoded > li[data-status=early] {
background: hsl(75, 60%, 75%);
}
ol.packtest-colorcoded > li[data-status=failure] { ol.packtest-colorcoded > li[data-status=failure] {
background: hsl(0, 60%, 60%); background: hsl(0, 60%, 60%);
} }