diff options
| author | lempamo <[email protected]> | 2017-08-06 13:14:41 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-08-06 13:14:41 -0400 |
| commit | 39283c570ea4a4dd1f87f2de18075f4f705fc08d (patch) | |
| tree | b273ecad971c9c7f4bff69a92aac642b84242706 /TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/Game.cs | |
| parent | 4fd3293e2f68ea7f4d5b8d958746c21be620ad16 (diff) | |
| download | histacom2-39283c570ea4a4dd1f87f2de18075f4f705fc08d.tar.gz histacom2-39283c570ea4a4dd1f87f2de18075f4f705fc08d.tar.bz2 histacom2-39283c570ea4a4dd1f87f2de18075f4f705fc08d.zip | |
middle click added to minesweeper
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); } |
