@@ -61,18 +61,23 @@ function showSummary(problems) {
6161}
6262
6363function showGraph ( problems ) {
64+ var ac = chalk . green ( '█' ) ;
65+ var notac = chalk . enabled ? chalk . red ( '█' ) : 'X' ;
66+ var none = '░' ;
67+
6468 var graph = [ ] ;
6569 _ . each ( problems , function ( problem ) {
6670 if ( problem . state === 'ac' ) {
67- graph [ problem . id ] = chalk . green ( '█' ) ;
71+ graph [ problem . id ] = ac ;
6872 } else if ( problem . state === 'notac' ) {
69- graph [ problem . id ] = chalk . red ( '▓' ) ;
73+ graph [ problem . id ] = notac ;
7074 } else {
71- graph [ problem . id ] = '░' ;
75+ graph [ problem . id ] = none ;
7276 }
7377 } ) ;
7478
75- log . info ( sprintf ( '%13d%13d%13d%13d%13d' , 10 , 20 , 30 , 40 , 50 ) ) ;
79+ log . info ( sprintf ( '%8d%9d%5d%8d%5d%8d%5d%8d%5d%8d' ,
80+ 0 , 10 , 11 , 20 , 21 , 30 , 31 , 40 , 41 , 50 ) ) ;
7681
7782 var line = [ sprintf ( ' %03d ' , 1 ) ] ;
7883 for ( var i = 1 , n = graph . length ; i < n ; ++ i ) {
@@ -86,9 +91,9 @@ function showGraph(problems) {
8691
8792 log . info ( ) ;
8893 log . info ( sprintf ( '%7s%s%3s%s%3s%s' ,
89- ' ' , chalk . green ( '█ Accepted' ) ,
90- ' ' , chalk . red ( '▓ Not Accepted' ) ,
91- ' ' , '░ Remaining') ) ;
94+ ' ' , ac + chalk . green ( ' Accepted' ) ,
95+ ' ' , notac + chalk . red ( ' Not Accepted' ) ,
96+ ' ' , none + ' Remaining') ) ;
9297 log . info ( ) ;
9398}
9499
0 commit comments