示例#1
0
int winmine() {
    int x,y;
    win_showrec();
    clear();
    refresh();
    while(1) {
		totallei=0;//add by stiger
		stiger=0;//add by stiger
		steps=0;//add by stiger
        opened=0;
        clear();
        for (x=0;x<=31;x++)
        for (y=0;y<=17;y++) {
             a[x][y]= 0;
             m[x][y]= 0;
             f[x][y]= 0;//add by stiger
//             o[x][y]= 0;
//
             if(x==0||x==31||y==0||y==17) o[x][y]= 1;
             	else o[x][y]=0;
        }
        winrefresh();
        if(winloop()==0) break;
        pressanykey();
    }
    return 0;
}
示例#2
0
文件: winmine.c 项目: caidongyun/fbbs
int winmine() {
    int x,y;
    win_showrec();
    screen_clear();
    refresh();
    while(1) {
        screen_clear();
        for (x=0;x<=31;x++)
        for (y=0;y<=17;y++) {
             a[x][y]= 0;
             m[x][y]= 0;
             o[x][y]= 0;
        }
        winrefresh();
        winloop();
        pressanykey();
    }
}
示例#3
0
文件: winmine.c 项目: lytsing/ytht
void
winmine()
{
	int x, y;
	win_showrec();
	clear();
	prints("Enable ANSI color?[Y/N]");
	refresh();
	if (strchr("Nn", egetch()))
		colorful = 0;
	while (1) {
		clear();
		for (x = 0; x <= 31; x++)
			for (y = 0; y <= 17; y++) {
				a[x][y] = 0;
				m[x][y] = 0;
				o[x][y] = 0;
			}
		winrefresh();
		winloop();
		pressanykey();
	}
}