games/boggle/boggle/mach.c
/*
 * Display the player's word list, the list of words not found, and the running
 * stats
 */
Display the player's word list, the list of words not found, and the running
stats
Display the player ' s word list the list of words not found and the running stats
void
results()
{
	int col, row;
	int denom1, denom2;
	move(LIST_LINE, LIST_COL);
	clrtobot();
	printw("Words you found (%d):", npwords);
	refresh();
	move(LIST_LINE + 1, LIST_COL);
	prtable(pword, npwords, 0, ncols, prword, prwidth);
	getyx(stdscr, row, col);
	move(row + 1, col);
	printw("Words you missed (%d):", nmwords);
	refresh();
	move(row + 2, col);
	prtable(mword, nmwords, 0, ncols, prword, prwidth);
	denom1 = npwords + nmwords;
	denom2 = tnpwords + tnmwords;
	move(SCORE_LINE, SCORE_COL);
	printw("Percentage: %0.2f%% (%0.2f%% over %d game%s)\n",
        denom1 ? (100.0 * npwords) / (double) (npwords + nmwords) : 0.0,
        denom2 ? (100.0 * tnpwords) / (double) (tnpwords + tnmwords) : 0.0,
        ngames, ngames > 1 ? "s" : "");
}
void results ( ) { int col , row ; int denom1 , denom2 ; move ( LIST_LINE , LIST_COL ) ; clrtobot ( ) ; printw ( " " , npwords ) ; refresh ( ) ; move ( LIST_LINE + 1 , LIST_COL ) ; prtable ( pword , npwords , 0 , ncols , prword , prwidth ) ; getyx ( stdscr , row , col ) ; move ( row + 1 , col ) ; printw ( " " , nmwords ) ; refresh ( ) ; move ( row + 2 , col ) ; prtable ( mword , nmwords , 0 , ncols , prword , prwidth ) ; denom1 = npwords + nmwords ; denom2 = tnpwords + tnmwords ; move ( SCORE_LINE , SCORE_COL ) ; printw ( " \n " , denom1 ? ( 100.0 * npwords ) / ( double ) ( npwords + nmwords ) : 0.0 , denom2 ? ( 100.0 * tnpwords ) / ( double ) ( tnpwords + tnmwords ) : 0.0 , ngames , ngames > 1 ? " " : " " ) ; }
Display the player's word list, the list of words not found, and the running
 stats
Display the player ' s word list the list of words not found and the running stats