* Copyright (c) 1982 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
static char sccsid
[] = "@(#)print.c 5.1 (Berkeley) %G%";
* @(#)print.c 1.1 (Berkeley) 4/1/82
for (k
= 0; k
< 2; k
++) {
temp
= k
* COMP_STRT
+ CARD_STRT
;
for (i
= 0; i
< NUM_SAFE
; i
++)
if (pp
->safety
[i
] == S_PLAYED
&& !pp
->sh_safety
[i
]) {
mvaddstr(i
, temp
, C_name
[i
+ S_CONV
]);
mvaddch(i
, temp
- CARD_STRT
, '*');
show_card(14, temp
, pp
->battle
, &pp
->sh_battle
);
show_card(16, temp
, pp
->speed
, &pp
->sh_speed
);
for (i
= C_25
; i
<= C_200
; i
++) {
if (pp
->nummiles
[i
] == pp
->sh_nummiles
[i
])
for (j
= pp
->sh_nummiles
[i
]; j
< end
; j
++)
mvwaddstr(Miles
, i
+ 1, (j
<< 2) + temp
, name
);
pp
->sh_nummiles
[i
] = end
;
for (i
= 0; i
< HAND_SZ
; i
++)
show_card(i
+ 6, temp
, pp
->hand
[i
], &pp
->sh_hand
[i
]);
mvprintw(6, COMP_STRT
+ CARD_STRT
, "%2d", Topcard
- Deck
);
show_card(8, COMP_STRT
+ CARD_STRT
, Discard
, &Sh_discard
);
* Show the given card if it is different from the last one shown
mvprintw(y
, x
, C_fmt
, C_name
[c
]);
static char Score_fmt
[] = "%4d";
for (pp
= Player
; pp
< &Player
[2]; pp
++) {
x
= (pp
- Player
) * 6 + 21;
show_score(1, x
, pp
->mileage
, &pp
->sh_mileage
);
if (pp
->safescore
!= pp
->sh_safescore
) {
mvprintw(2, x
, Score_fmt
, pp
->safescore
);
if (pp
->safescore
== 400)
mvaddstr(3, x
+ 1, "300");
mvaddstr(3, x
+ 1, " 0");
mvprintw(4, x
, Score_fmt
, pp
->coupscore
);
pp
->sh_safescore
= pp
->safescore
;
if (Window
== W_FULL
|| Finished
) {
show_score(11, x
, pp
->hand_tot
, &pp
->sh_hand_tot
);
show_score(13, x
, pp
->total
, &pp
->sh_total
);
show_score(14, x
, pp
->games
, &pp
->sh_games
);
show_score(6, x
, pp
->hand_tot
, &pp
->sh_hand_tot
);
show_score(8, x
, pp
->total
, &pp
->sh_total
);
show_score(9, x
, pp
->games
, &pp
->sh_games
);
* Show a score value if it is different from the last time we
mvprintw(y
, x
, Score_fmt
, s
);