Fixed overlapping text with some board sizes
This commit is contained in:
parent
b7c834efe6
commit
64c1fd96f6
1 changed files with 7 additions and 1 deletions
|
|
@ -64,6 +64,10 @@ typedef struct {
|
||||||
directions_t same;
|
directions_t same;
|
||||||
} wins_t;
|
} 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 ){
|
static inline int bottom( const int a, const int b ){
|
||||||
return a < b ? a : 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_WIDTH 27
|
||||||
#define SCOREBOARD_HEIGTH 9
|
#define SCOREBOARD_HEIGTH 9
|
||||||
static void initBoard( void ){
|
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++ )
|
for( int column = 0; column < BOARD_WIDTH; column++ )
|
||||||
printf( "%2d ", column + FIRST_NUMBER );
|
printf( "%2d ", column + FIRST_NUMBER );
|
||||||
putchar( '\n' );
|
putchar( '\n' );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue