From cc5a8d36ceac1567eebe946c3c6cbd0813a854c1 Mon Sep 17 00:00:00 2001 From: jtsshieh Date: Wed, 26 Jul 2017 20:53:04 -0400 Subject: VERY VERY VERY BASIC Minsweeper Took me a ton of time to get the game and square files working. Now all thats left is the sad face, about box, difficulties, acheivements, and pixel perfect (tradmarked) --- .../Win95Apps/MineSweeper/WinClassicMinesweeper.cs | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs') diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs b/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs new file mode 100644 index 0000000..a7e043f --- /dev/null +++ b/TimeHACK.Main/OS/Win95/Win95Apps/MineSweeper/WinClassicMinesweeper.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using TimeHACK.OS.Win95.Win95Apps.MineSweeper; + +namespace TimeHACK.OS.Win95.Win95Apps +{ + public partial class WinClassicMinesweeper : UserControl + { + private Game _game; + public int currentface = 1; + public WinClassicMinesweeper() + { + InitializeComponent(); + } + private void GameTick(object sender, EventArgs e) + { + labelTime.Text = _game.Time.ToString(); + } + + private void GameDismantledMinesChanged(object sender, EventArgs e) + { + labelBombs.Text = (_game.Mines - _game.DismantledMines).ToString(); + } + + private void pictureBox1_Click(object sender, EventArgs e) + { + Cursor.Current = Cursors.WaitCursor; + _game = new Game(this.panel1, 8, 8, 10); + _game.Tick += new EventHandler(GameTick); + _game.DismantledMinesChanged += new EventHandler(GameDismantledMinesChanged); + _game.Start(); + } + } +} -- cgit v1.2.3