diff options
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Game.cs')
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Game.cs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Game.cs b/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Game.cs index 30e9349..b6e9293 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Game.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Game.cs @@ -37,25 +37,13 @@ namespace TimeHACK.OS.Win95.Win95Apps.MineSweeper Square s = (Square)sender; if (s.Dismantled) { - if (s.Minded) - { - _dismantledMines++; - } - else - { - _incorrectdismantledMines++; - } + if (s.Minded) _dismantledMines++; + else _incorrectdismantledMines++; } else { - if (s.Minded) - { - _dismantledMines--; - } - else - { - _incorrectdismantledMines--; - } + if (s.Minded) _dismantledMines--; + else _incorrectdismantledMines--; } OnDismantledMinesChanged(); @@ -105,6 +93,18 @@ namespace TimeHACK.OS.Win95.Win95Apps.MineSweeper return false; } + public bool IsDismantled(int x, int y) + { + if (x >= 0 && x < Width) + { + if (y >= 0 && y < Height) + { + return _squares[x, y].Dismantled; + } + } + return false; + } + public int Mines { get { return (this._mines); } |
