home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
games
/
volume1
/
yahtzee
/
screen.c
< prev
next >
Wrap
C/C++ Source or Header
|
1987-05-08
|
2KB
|
54 lines
#include "types.h"
extern Game player[];
char *scrn[] = {
/* 0 */ " Player | | | | |",
/* 1 */ " Aces | | | | |",
/* 2 */ " Twos | | | | |",
/* 3 */ " Threes | | | | |",
/* 4 */ " Fours | | | | |",
/* 5 */ " Fives | | | | |",
/* 6 */ " Sixes | | | | |",
/* 7 */ " Total | | | | |",
/* 8 */ " Bonus for 63 | | | | |",
/* 9 */ " ---------------|-------|-------|--------|-------|",
/* 10 */ " 3 of a kind | | | | |",
/* 11 */ " 4 of a kind | | | | |",
/* 12 */ " Full house | | | | |",
/* 13 */ " Small straight | | | | |",
/* 14 */ " Large straight | | | | |",
/* 15 */ " Yahtzee | | | | |",
/* 16 */ " Chance | | | | |",
/* 17 */ " Yahtzee Bonus | | | | |",
/* 18 */ " ---------------|-------|-------|--------|-------|",
/* 19 */ " Total top | | | | |",
/* 20 */ " Total bottom | | | | |",
/* 21 */ " ---------------|-------|-------|--------|-------|",
/* 22 */ " Grand Total | | | | |",
NULL
};
drawscreen(n)
int n;
{
int i;
clear();
for(i=0; i<10; i++) mvaddstr(i,0,scrn[i]);
refresh();
for(i=10; scrn[i]; i++) mvaddstr(i,0,scrn[i]);
refresh();
for(i=0; i<n; i++) mvaddstr(0, FC+(i*COLW), player[i].name);
refresh();
}
setname(old,new)
int old,new;
{
mvaddch(0, FC-1+(old*COLW), ' ');
mvaddch(0, FC-1+(new*COLW), '*');
refresh();
}