Tetris

Check-in [2d84188e40]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Abstract out random number gen
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:2d84188e404fd6004dbfd271bceb4f2f863565be7ace90f0426dd15f69277497
User & Date: ajv-899-334-8894@vsta.org 2008-10-26 18:02:15
Context
2008-10-26
18:02
Tidy up comment check-in: 1bb2ec9c77 user: ajv-899-334-8894@vsta.org tags: trunk
18:02
Abstract out random number gen check-in: 2d84188e40 user: ajv-899-334-8894@vsta.org tags: trunk
17:42
Factor out random number generator check-in: 12ab685ed3 user: ajv-899-334-8894@vsta.org tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tetris.c.

193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
"%s - left   %s - rotate   %s - right   %s - drop   %s - pause   %s - quit",
		key_write[0], key_write[1], key_write[2], key_write[3],
		key_write[4], key_write[5]);

	(void)signal(SIGINT, onintr);
	scr_init();
	setup_board();

	srandom(getpid());
	scr_set();

	pos = A_FIRST*B_COLS + (B_COLS/2)-1;
	nextshape = randshape();
	curshape = randshape();

	scr_msg(key_msg, 1);







<
|







193
194
195
196
197
198
199

200
201
202
203
204
205
206
207
"%s - left   %s - rotate   %s - right   %s - drop   %s - pause   %s - quit",
		key_write[0], key_write[1], key_write[2], key_write[3],
		key_write[4], key_write[5]);

	(void)signal(SIGINT, onintr);
	scr_init();
	setup_board();

	init_random();
	scr_set();

	pos = A_FIRST*B_COLS + (B_COLS/2)-1;
	nextshape = randshape();
	curshape = randshape();

	scr_msg(key_msg, 1);