architv / soccer-cli

:soccer: Football scores for hackers. :computer: A command line interface for all the football scores.
MIT License
1.09k stars 222 forks source link

Goal difference column alignment fix #26

Closed Saturn closed 8 years ago

Saturn commented 8 years ago

This fixes the alignment of the goal difference column. Since negative numbers kind of make it look crooked when printed on the console.

It simply adds a space before numbers >= 0. This makes all the numbers line up.

I think it looks better from a visual point of view.

Before

POS     CLUB                              PLAYED        GOAL DIFF     POINTS    
1       Borussia Dortmund                 3             10            9         
2       FC Bayern München                 3             9             9         
3       VfL Wolfsburg                     3             4             7         
4       1. FC Köln                        3             3             7         
5       1. FSV Mainz 05                   3             3             6         
6       Bayer Leverkusen                  3             -1            6         
7       FC Ingolstadt 04                  3             -2            6         
8       Eintracht Frankfurt               3             2             4         
9       FC Schalke 04                     3             0             4         
10      Hertha BSC                        3             -1            4         
11      Werder Bremen                     3             -2            4         
12      SV Darmstadt 98                   3             0             3         
13      Hamburger SV                      3             -5            3         
14      TSG 1899 Hoffenheim               3             -2            1         
15      FC Augsburg                       3             -2            1         
16      Hannover 96                       3             -4            1         
17      VfB Stuttgart                     3             -6            0         
18      Bor. Mönchengladbach              3             -6            0 

After

POS     CLUB                              PLAYED        GOAL DIFF     POINTS    
1       Borussia Dortmund                 3             10            9         
2       FC Bayern München                 3             9             9         
3       VfL Wolfsburg                     3             4             7         
4       1. FC Köln                        3             3             7         
5       1. FSV Mainz 05                   3             3             6         
6       Bayer Leverkusen                  3            -1             6         
7       FC Ingolstadt 04                  3            -2             6         
8       Eintracht Frankfurt               3             2             4         
9       FC Schalke 04                     3             0             4         
10      Hertha BSC                        3            -1             4         
11      Werder Bremen                     3            -2             4         
12      SV Darmstadt 98                   3             0             3         
13      Hamburger SV                      3            -5             3         
14      TSG 1899 Hoffenheim               3            -2             1         
15      FC Augsburg                       3            -2             1         
16      Hannover 96                       3            -4             1         
17      VfB Stuttgart                     3            -6             0         
18      Bor. Mönchengladbach              3            -6             0