From: noochie@my-dejanews.com
Newsgroups: comp.sys.hp48
Subject: Re: Chess clock for HP48
Date: Mon, 13 Jul 1998 18:43:39 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 40
Message-ID: <6odkgs$2r4$1@nnrp1.dejanews.com>
References: <6nhekm$jgk$1@nnrp1.dejanews.com> <6o5dqc$es7$1@nnrp1.dejanews.com> <6o6ic1$4su$1@nnrp1.dejanews.com>
NNTP-Posting-Host: 128.135.162.224
X-Article-Creation-Date: Mon Jul 13 18:43:39 1998 GMT
X-Http-User-Agent: Mozilla/3.04Gold (Win95; U)
Xref: republic.btigate.com comp.sys.hp48:13240

Thanks for the encouragement!

You're right that there is an END missing in one of the loops, sorry about
that bug.  I'm glad you fixed it and got it to work correctly!

Here's a modified version that incorporates some of your suggestions.

There's an input form at the beginning if you want to change the player names.
Since it uses the INFORM command, this program will only work on a G/GX.

There's also an option to specify a time for each player, under their names.
Just enter the time in HHMM.SS format, and it will countdown from that time.

If you leave the time as zero, it will count up, just like the last version.

Finally, any key except ON switches turns, and ON will now exit cleanly from
the program.

Have fun!





Chess Clock G/GX

681.5 Bytes, checksum #9736h

%%HP: T(3)A(D)F(.); \<< DEPTH \-> d  \<<  IFERR "Chess clock" {"Player 1"
{"Time 1" "" 0 }"Player 2" {"Time 2" "" 0 } } {} {"White" 0"Black" 0 } DUP IF
INFORM THEN CLLCD OBJ\-> DROP SWAP 5 DISP ROT 1 DISP 1 0 0 TIME \-> T1 T2 TRN
P1 P2 LST \<< DO DO TIME LST HMS- P1 HMS+ 100 * IF T1 THEN T1 SWAP HMS- IF
DUP 0 < THEN "Time's up" TRN NOT 4 * 3 + DISP END END 3 TRNC P2 100 IF T2
THEN T2 SWAP HMS- IF DUP 0 < THEN "Time's up" TRN 4 * 3 + DISP END END 3 TRNC
IF TRN THEN SWAP END 2 DISP 6 DISP UNTIL KEY END UNTIL DROP P2 TIME DUP LST
HMS- P1 HMS+ 'P2' STO 'LST' STO 'P1' STO TRN NOT 'TRN' STO T1 T2 'T1' STO
'T2' STO 0 END \>> END THEN DEPTH d - DROPN END \>> \>>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum