using System; using System.Linq; using System.Windows; using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; namespace MathColoringGame { /// /// Interaction logic for MainWindow.xaml /// public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); NewGame(); } int cellCounter; int roundCounter; private MarkTyp[] mResults; private bool mPlayer1Turn; //Starts a new game an clear all values back to the start public void NewGame() { cellCounter = 0; roundCounter = 1; // Create a new blanck aray of free cells mResults = new MarkTyp[180]; for (var i = 0; i < mResults.Length; i++) mResults[i] = MarkTyp.Free; // make sure Player1 is starts The game mPlayer1Turn = true; // interate every Cell on the grid Container.Children.Cast