示例#1
0
int dig(int x, int y) {
    if (!o[x][y]) 
           windig(x, y);
    else 
           dblclick(x, y);
    return 0;
}
示例#2
0
文件: winmine.c 项目: lytsing/ytht
void
dig(int x, int y)
{
	if (!o[x][y])
		windig(x, y);
	else
		dblclick(x, y);
}
示例#3
0
文件: winmine.c 项目: caidongyun/fbbs
/* 双键 */
int dblclick(int x, int y) {
    int dx, dy;
    if(x<1|| x>30|| y<1|| y>16) return;
    if(!o[x][y]) return;
    if(num_mine_beside(x, y)!=num_mark_beside(x, y)) return; 
    for(dx=x-1;dx<=x+1;dx++)
    for(dy=y-1;dy<=y+1;dy++)
        windig(dx, dy);
}
示例#4
0
文件: winmine.c 项目: caidongyun/fbbs
/* 左键 */
int windig(int x, int y) {
    int dx, dy;
    if(x< 1|| x> 30|| y< 1|| y> 16) return;
    if(o[x][y]||m[x][y]) return;
    o[x][y]=1;
    winsh(x, y);
    if(a[x][y]) {
	show_mines();
         gameover=1;
         return;
    }
    if(num_mine_beside(x, y)==0) {
        for(dx=x-1;dx<=x+1;dx++)
        for(dy=y-1;dy<=y+1;dy++)
            windig(dx, dy);
    }
}