- bombs=0;
- for(x=0; x<width; x++)
- for(y=0; y<height; y++)
- if (field[x+y*width] & BG_BOMB)
- { bombs++;
- for(xx=x-1; xx<=x+1; xx++)
- if (xx>=0 && xx<width)
- for(yy=y-1; yy<=y+1; yy++)
- if (yy>=0 && yy<height && (yy!=y || xx!=x))
- field[xx+yy*width]++;
- }
- normal_cells=height*width-bombs;
- return 1;
- }
-
-/*---------------------- BombsGame::Mark(x,y) -------------------------*/
-/* Marks/unmarks a cell */
-/*-----------------------------------------------------------------------*/