Henk@cs.vu.nl (Henk) (03/02/88)
A little while ago, I posted the source of 'puzzle'. This program
uses HI and HE ( Half Intensity ). But unfortunately this possibility isn't
included in every TERMCAP-entry. The best thing to do is to find these codes
in your manual and add them to your TERMCAP - file (or a copy). The following
code works on an ampex ( d80 d125 d150 a230 a210 .... ) :
he=\E(:hi=\E)
Another possibility is to alter the code. You'll have to make the
following replacements :
149: if (!CL || !CM || !SO || !SE || !HI || !HE || !HO) {
---> if (!CL || !CM || !SO || !SE || !HO) {
155: ch = ' ';
---> ch = (HI == (char *) 0) ? ':' : ' ';
321: case 'A' : ch = (ch == ' ') ? ':' : ' ';
---> case 'A' : ch = ((HI != (char *) 0) && (ch == ':')) ? ' ' : ':';
My program allocates 10,000 ints to remember your moves ( in case
you want to take back ). This causes a problem on very old computers. If
you still have one of these you'll have to make the following changes, or
simply alter the number 9999 (line 55) into a smaller digit.
55: } tb [9999];
--> } tb [1000];
422: tb [moves]. ox = x;
---> tb [moves % 1000]. ox = x;
423: tb [moves]. oy = y;
---> tb [moves % 1000]. oy = y;
424: tb [moves]. nx = nx;
---> tb [moves % 1000]. nx = nx;
425: tb [moves]. ny = ny;
---> tb [moves % 1000]. ny = ny;
501: if (moves - count < 0) {
---> if ((moves - count < 0) || (count > 999)) {
508: kind = field [tb [moves]. nx] [tb [moves]. ny]. type;
---> kind = field [tb [moves % 1000]. nx] [tb [moves % 1000]. ny]. type;
510: change (CLEAR, tb [moves]. nx, tb [moves]. ny, kind);
---> change (CLEAR, tb [moves % 1000]. nx, tb [moves % 1000]. ny, kind);
511: change (ACCENT, (x = tb [moves]. ox), (y = tb [moves]. oy), kind);
---> change (ACCENT, (x = tb [moves % 1000]. ox),
|--> (y = tb [moves % 1000]. oy), kind);
Another remark : When I posted the source, my full name was spelled
wrong. Is was 'henk', it had to be 'hjvissc' ( see below ).
-----------------------------------------------------------------------------
--
Henk-Jan Visscher @ Free U A'dam | hjvissc@cs.vu.nl, mcvax!botter!ark!hjvissc