* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
static char sccsid
[] = "@(#)twinkle2.c 6.1 (Berkeley) %G%";
srand(getpid()); /* initialize random sequence */
if ((sp
= getenv("TERM")) != NULL
)
printf("Need a terminal on %d\n", _tty_ch
);
tputs(CL
, NLINES
, _putchar
);
makeboard(); /* make the board setup */
puton('*'); /* put on '*'s */
puton(' '); /* cover up with ' 's */
for (lp
= Layout
; lp
< end
; lp
++) {
for (lp
= Layout
; lp
< end
; lp
++)
if (!AM
|| (lp
->y
< NLINES
- 1 || lp
->x
< NCOLS
- 1)) {
mvcur(lasty
, lastx
, lp
->y
, lp
->x
);
if ((lastx
= lp
->x
+ 1) >= NCOLS
)