Give the bulk tester a category for early exit
This commit is contained in:
parent
a91d7f24a1
commit
af7d2c741b
17
js/main.js
17
js/main.js
@ -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) {
|
||||||
record_result(
|
// Early exit is dubious (e.g. this happened sometimes before multiple
|
||||||
'success', "Won",
|
// players were implemented correctly)
|
||||||
`Exited successfully after ${util.format_duration(level.tic_counter / TICS_PER_SECOND)} (delta ${level.tic_counter - replay.duration})`);
|
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(
|
||||||
|
'success', "Won",
|
||||||
|
`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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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%);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user