using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace TileGame { public partial class FormMain : Form { public FormMain() { InitializeComponent(); } private void buttonSolve_Click(object sender, EventArgs e) { Game g = new Game(); g.Solve(); if (g.Solved) { MessageBox.Show("Solved"); labelSolution.Text = ""; for(int i=0; i < 9; i++) labelSolution.Text += g.Board[i%3,i/3].ToString() + "\r\n"; } else MessageBox.Show("NOT Solved"); } } }