Skip to content

Commit

Permalink
Mark unsolved challenges red
Browse files Browse the repository at this point in the history
  • Loading branch information
timkurvers committed Dec 16, 2018
1 parent 9178c18 commit 0435eb6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion day-12/index.mjs
Expand Up @@ -54,4 +54,4 @@ day(12).part(1).solution(() => {
return totalScoreFor(current);
});

day(12).part(2).solution(() => '<not yet solved>');
day(12).part(2).solution(() => null);
2 changes: 1 addition & 1 deletion day-14/index.mjs
Expand Up @@ -2,4 +2,4 @@

import { day } from '../utils';

day(14).part(1).solution(() => '<not yet solved>');
day(14).part(1).solution(() => null);
2 changes: 1 addition & 1 deletion day-15/index.mjs
Expand Up @@ -2,4 +2,4 @@

import { day } from '../utils';

day(15).part(1).solution(() => '<not yet solved>');
day(15).part(1).solution(() => null);
3 changes: 2 additions & 1 deletion utils/index.mjs
Expand Up @@ -25,7 +25,8 @@ class Challenge {
const answer = implementation(console.log, this);
const end = performance.now();
const duration = `${Math.ceil(end - start)}ms`;
console.log(` => Answer: ${colors.green(answer)} ${colors.gray(duration)}`);
const text = answer ? colors.green(answer) : colors.red('<not yet solved>');
console.log(` => Answer: ${text} ${colors.gray(duration)}`);
console.log();
return this;
}
Expand Down

0 comments on commit 0435eb6

Please sign in to comment.