|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T c
Length: 1212 (0x4bc)
Types: TextFile
Names: »check_horiz.c«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
└─⟦this⟧ »EUUGD18/General/Tetris/check_horiz.c«
/*
** written by adam margulies vespa@ssyx.ucsc.edu
** {...}!ucbvax!ucscc!ssyx!vespa
**
** permission is granted to freely distribute this code provided that you:
**
** 1) don't charge for it
** 2) leave my name and header on it
** 3) clearly document your changes and place your name on them
**
*/
/* Tetris: check_horiz() */
/* */
/* this function is called after the shape has stopped and before a */
/* new shape begins dropping. it checks to see if a horizontal line */
/* is complete and if so calls erase_horiz() to erase it. */
/* */
#include "tetris.h"
void check_horiz()
{
int i,j,flag; /* i and j are counters, flag is 0 if a row
is complete */
for (i = 2; i < 22; i++) {
flag = 0;
for (j=35; j<45; j++) {
if (window0[i][j] == ' ')
flag=1;
}
if (!flag)
erase_horiz(i);
}
}