+ }
+
+ /* Force (0,0) not to have a bomb for those that don't want to have
+ to guess on the first move. Better would be to for the MS rule that
+ whatever is picked first isn't a bomb.
+ */
+ if(easyCorner)
+ {
+ m_field[0] = BG_HIDDEN;
+ }
+
+ m_numBombCells = 0;
+ for(x=0; x<m_width; x++)
+ for(y=0; y<m_height; y++)
+ if (m_field[x+y*m_width] & BG_BOMB)
+ {
+ m_numBombCells++;
+
+ for(xx=x-1; xx<=x+1; xx++)
+ if (xx>=0 && xx<m_width)
+ for(yy=y-1; yy<=y+1; yy++)
+ if (yy>=0 && yy<m_height && (yy!=y || xx!=x))
+ m_field[xx+yy*m_width]++;
+ }
+
+ m_numRemainingCells = m_height*m_width-m_numBombCells;
+ m_numMarkedCells = 0;
+
+ return true;
+}