/*TrisPackage.Tris/check_horizon();*/
int check_horizon()
{
int ii,kk,ff;
for(ii=0; ii<MAPY-1; ii++)
{
ff=0;
for(kk=1; kk<MAPX-2; kk++)
{
if(tris[ii, kk] != 0)
{
if(tris[ii, kk] == tris[ii, kk + 1]) ff++;
else break;
}
}
if(ff == MAPX-3)
{
for(kk=1; kk<MAPX-1; kk++) delete_column(ii,kk);
score++;
return(SUCC);
}
}
//NOT FOUND,Then FAIL!!
//NOT FOUND,Then FAIL!!
return(FAIL);
'c# 언어' 카테고리의 다른 글
TrisPackage.Tris/draw();____draw(); (0) | 2021.11.19 |
---|---|
TrisPackage.Tris/running(); (0) | 2021.11.19 |
TrisPackage.Tris/delete_column(); (0) | 2021.11.19 |
TrisPackage.Tris/definition/variables/controls (0) | 2021.11.17 |
TrisPackage.Tris/common_check(); (0) | 2021.11.17 |