public void ecrire() { int i, j; ws.Children.Clear(); for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { etiq e = new etiq(partie.t[i, j]); ws.Children.Add(e); Grid.SetRow(e, i); Grid.SetColumn(e, j); } } if (partie._score < best_score) { score_l.Content = partie._score.ToString(); } else { best_score = partie._score; b_score_l.Content = best_score.ToString(); score_l.Content = partie._score.ToString(); } }
public Window1(int[,] t) { InitializeComponent(); int i, j; ws.Children.Clear(); for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { etiq e = new etiq(t[i, j]); ws.Children.Add(e); Grid.SetRow(e, i); Grid.SetColumn(e, j); } } }