Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
atc(6) - display current score when game exits?
I've been a long-time fan of atc(6), but one thing has always bothered
me!
It seems that when you lose a game (and you always eventually will
lose!), the playing field is erased before the high-scores list is
printed. Since the playing field is the only place where your current
game's score is displayed, you end up with a screen that (most often)
says only "You didn't beat your previous score". Your _previous_ score
is displayed as part of the high-score list, but your current score is
NOT displayed. Thus you can't see how close you came to your previous
score.
The following simple patch seems to solve this:
Index: log.c
===================================================================
RCS file: /cvsroot/src/games/atc/log.c,v
retrieving revision 1.23
diff -u -p -r1.23 log.c
--- log.c 10 Jan 2017 20:40:53 -0000 1.23
+++ log.c 16 Mar 2019 22:52:52 -0000
@@ -161,6 +161,9 @@ log_score(int list_em)
struct utsname lname;
long offset;
+ printf("You directed %d planes safely to their destination.\n\n",
+ thisscore.planes);
+
if (score_fp == NULL) {
warnx("no score file available");
return (-1);
Any objections?
+--------------------+--------------------------+-----------------------+
| Paul Goyette | PGP Key fingerprint: | E-mail addresses: |
| (Retired) | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost |
+--------------------+--------------------------+-----------------------+
Home |
Main Index |
Thread Index |
Old Index