コード例 #1
0
        // ******************** MOUVEMENT **********************

        // ******************** MOUVEMENT RETOUR **********************

        public void RetourDpl(int retourNbr)
        {
            if (rtClic < cpClic)
            {
                monBouton btmp;

                //effacement
                for (int i = cpClic - 1; i >= (cpClic - retourNbr); --i)
                {
                    btmp = dpl[i];
                    btmp.Reinitialiser();
                    CibleSup(btmp, piece);

                    DD.OuvrirDispo(btmp.getNumLigne(), btmp.getNumCol());
                    dpl[i] = null;
                }

                //ajouter detail initiaux
                cpClic -= retourNbr;
                btmp    = dpl[cpClic - 1];
                btmp.Colorer();

                btmp.ImageAj(piece.GetImg());
                CibleAj(btmp, this.piece);

                piece.DeplacerF(btmp.getNumLigne(), btmp.getNumCol());
                jouLig = btmp.getNumLigne();
                jouCol = btmp.getNumCol();

                DD.FermerDispo(btmp.getNumLigne(), btmp.getNumCol());
            }
        }