-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathGameWindow.xaml.cs
More file actions
37 lines (31 loc) · 883 Bytes
/
GameWindow.xaml.cs
File metadata and controls
37 lines (31 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System.Windows;
using System.Windows.Input;
using PokemonSweeper.Game;
namespace PokemonSweeper
{
public partial class GameWindow : Window
{
public GameWindow()
{
InitializeComponent();
Game = new PokeSweepGame();
}
public PokeSweepGame Game { get; set; }
private void Window_Loaded(object sender, RoutedEventArgs e)
{
Game.NewField(this);
}
public void MineSquare_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
((Square) sender).RightButton(this);
}
public void MineSquare_Click(object sender, RoutedEventArgs e)
{
((Square) sender).LeftButton(this);
}
public void MinesLeftLabel(int count)
{
MinesLeft.Content = "Pokebals: " + count;
}
}
}