Push version 0.3.0
This commit is contained in:
parent
f660377768
commit
bb344cb956
7 changed files with 311 additions and 108 deletions
21
ui_ncurses.c
21
ui_ncurses.c
|
|
@ -137,7 +137,6 @@ void initBoard( const board_t board ){
|
|||
}
|
||||
|
||||
void updateBoard(
|
||||
const wins_t wins,
|
||||
const board_t board,
|
||||
const columnsint_t column
|
||||
){
|
||||
|
|
@ -148,61 +147,61 @@ void updateBoard(
|
|||
board.column[ column ] & 1 << ( height - 1 ) ? "1" : "0"
|
||||
);
|
||||
char num[4];
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, wins.count0.vertical );
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, board.count0.vertical );
|
||||
mvaddstr(
|
||||
SCOREBOARD_Y + 3,
|
||||
SCOREBOARD_X + 17,
|
||||
num
|
||||
);
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, wins.count1.vertical );
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, board.count1.vertical );
|
||||
mvaddstr(
|
||||
SCOREBOARD_Y + 3,
|
||||
SCOREBOARD_X + 22,
|
||||
num
|
||||
);
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, wins.count0.horizontal );
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, board.count0.horizontal );
|
||||
mvaddstr(
|
||||
SCOREBOARD_Y + 4,
|
||||
SCOREBOARD_X + 17,
|
||||
num
|
||||
);
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, wins.count1.horizontal );
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, board.count1.horizontal );
|
||||
mvaddstr(
|
||||
SCOREBOARD_Y + 4,
|
||||
SCOREBOARD_X + 22,
|
||||
num
|
||||
);
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, wins.count0.diagonalUp );
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, board.count0.diagonalUp );
|
||||
mvaddstr(
|
||||
SCOREBOARD_Y + 5,
|
||||
SCOREBOARD_X + 17,
|
||||
num
|
||||
);
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, wins.count1.diagonalUp );
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, board.count1.diagonalUp );
|
||||
mvaddstr(
|
||||
SCOREBOARD_Y + 5,
|
||||
SCOREBOARD_X + 22,
|
||||
num
|
||||
);
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, wins.count0.diagonalDown );
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, board.count0.diagonalDown );
|
||||
mvaddstr(
|
||||
SCOREBOARD_Y + 6,
|
||||
SCOREBOARD_X + 17,
|
||||
num
|
||||
);
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, wins.count1.diagonalDown );
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, board.count1.diagonalDown );
|
||||
mvaddstr(
|
||||
SCOREBOARD_Y + 6,
|
||||
SCOREBOARD_X + 22,
|
||||
num
|
||||
);
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, wins.count0.total );
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, board.count0.total );
|
||||
mvaddstr(
|
||||
SCOREBOARD_Y + 8,
|
||||
SCOREBOARD_X + 17,
|
||||
num
|
||||
);
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, wins.count1.total );
|
||||
snprintf( num, sizeof(num), WININT_FORMAT, board.count1.total );
|
||||
mvaddstr(
|
||||
SCOREBOARD_Y + 8,
|
||||
SCOREBOARD_X + 22,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue