Tetris

Check-in [e8cf031a4a]
Login

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

Overview
Comment:Add a shape cheat
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:e8cf031a4ad402d1ea8844373a573840b02906aab8aca16dbb9a42661e600251
User & Date: ajv-899-334-8894@vsta.org 2017-12-16 04:40:32
Context
2018-03-23
02:23
Enable cheat check-in: 644a991729 user: ajv-899-334-8894@vsta.org tags: master, trunk
2017-12-16
04:40
Add a shape cheat check-in: e8cf031a4a user: ajv-899-334-8894@vsta.org tags: master, trunk
2017-05-23
20:31
Remove old debug code check-in: 55ffe4a176 user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tetris.c.

310
311
312
313
314
315
316

317

















318
319
320
321
322
323
324
	    continue;
	}

	/* Repaint */
	if (c == '\f') {
	    scr_clear();
	    scr_msg(key_msg, 1);

	}

















    }
}

int
main(int argc, char **argv)
{
    int level = 2;







>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
	    continue;
	}

	/* Repaint */
	if (c == '\f') {
	    scr_clear();
	    scr_msg(key_msg, 1);
	    continue;
	}

#ifdef CHEAT
	/* Cycles shapes */
	if (c == '*') {
	    const struct shape *s = randshape();

	    /* Un-draw our current, then see if this one fits */
	    place(curshape, pos, 0);
	    if (fits_in(s, pos)) {
		curshape = s;
	    }

	    /* Paint back either the original, or our new one */
	    place(curshape, pos, 2);
	    continue;
	}
#endif /* CHEAT */
    }
}

int
main(int argc, char **argv)
{
    int level = 2;