diff --git a/connect4.c b/connect4.c index e447a2d..a72942a 100644 --- a/connect4.c +++ b/connect4.c @@ -64,6 +64,10 @@ typedef struct { directions_t same; } wins_t; +static inline int top( const int a, const int b ){ + return a < b ? b : a; +} + static inline int bottom( const int a, const int b ){ return a < b ? a : b; } @@ -85,7 +89,9 @@ static inline int bottomHeigthMask( const int a, const int b ){ #define SCOREBOARD_WIDTH 27 #define SCOREBOARD_HEIGTH 9 static void initBoard( void ){ - printf( "\n\n " ); + for(int i = SCOREBOARD_HEIGTH - ( BOARD_HEIGTH + 2 ); i > 0; i-- ) + putchar( '\n' ); + printf( "\n " ); for( int column = 0; column < BOARD_WIDTH; column++ ) printf( "%2d ", column + FIRST_NUMBER ); putchar( '\n' );