public MainWindow()
        {
            InitializeComponent();
            int n = 0;
            int xJ1, yJ1, xJ2, yJ2;

            xJ1 = 0;
            yJ1 = 0;
            xJ2 = 0;
            yJ2 = 0;
            n   = 5;
            int i, j;

            WrapperAlgo wa = new WrapperAlgo(n);

            unsafe
            {
                int **cases;
                cases = wa.remplirCarte();

                wa.positionJoueur(xJ1, yJ1, xJ2, yJ2);
                System.Windows.Rect dc = new Rect();

                for (i = 0; i < n; i++)
                {
                    for (j = 0; j < n; j++)
                    {
                        switch (cases[i][j])
                        {
                        case (int)TypeCase.MONTAGNE:
                            OnRender(dc);
                            break;

                        case (int)TypeCase.PLAINE:
                            break;

                        case (int)TypeCase.DESERT:
                            break;

                        case (int)TypeCase.EAU:
                            break;

                        case (int)TypeCase.FORET:
                            break;

                        default:
                            break;
                        }
                    }
                }
            }
        }
Exemple #2
0
        unsafe public Window3()
        {
            InitializeComponent();
            taille = 10;
            WrapperAlgo wa = new WrapperAlgo(taille);

            int **tabCarte = wa.remplirCarte();
            int   xJ1      = 0;
            int   yJ1      = 0;
            int   xJ2      = 0;
            int   yJ2      = 0;

            wa.positionJoueur(&xJ1, &yJ1, &xJ2, &yJ2);
        }