// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-# pragma implementation
-#endif
-
#include "wx/wxprec.h"
#ifdef __BORLANDC__
}
m_numRemainingCells = m_height*m_width-m_numBombCells;
+ m_numMarkedCells = 0;
return true;
}
void BombsGame::Mark(int x, int y)
{
m_field[x+y*m_width] ^= BG_MARKED;
+ if (IsMarked(x, y))
+ m_numMarkedCells++;
+ else
+ m_numMarkedCells--;
}
-void BombsGame::Unhide(int x, int y)
+void BombsGame::Unhide(int x, int y, bool b_selected)
{
if (!IsHidden(x,y))
{
return;
}
+ if (b_selected)
+ m_field[x+y*m_width] |= BG_SELECTED;
+
m_field[x+y*m_width] &= ~BG_HIDDEN;
if (!IsBomb(x,y))