コード例 #1
0
        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();
            }
        }
コード例 #2
0
        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);
                }
            }
        }