SecretOfGaia.Terrain.poserSur C# (CSharp) Method

poserSur() public method

public poserSur ( int position, SecretOfGaia.Carte curCarte ) : bool
position int
curCarte SecretOfGaia.Carte
return bool
        public bool poserSur(int position, Carte curCarte)
        {
            if (_cartes.ContainsKey(position))
            {
                if (!_cartesSupreposées.ContainsKey(position))
                {
                    _cartesSupreposées[position] = new List<Carte>();
                }
                _cartesSupreposées[position].Add(curCarte);
                return true;
            }
            else
            {
                return false;
            }
        }

Usage Example

 public void TestElenverCarteduDessousAvecSuperposition()
 {
     Terrain curPose = new Terrain(2);
     Carte maCarte1 = new Carte("Carte1", TypeCarte.Instantanee, 1, 1, 12);
     bool AjoutOK = curPose.ajouterCarte(maCarte1);
     Carte maCarte2 = new Carte("Carte2", TypeCarte.Instantanee, 1, 1, 7);
     AjoutOK = curPose.poserSur(1, maCarte2);
     curPose.enleverCarte(1,true);
     Assert.AreEqual(0, curPose.Count, "Enlever Carte dessous Count NOK");
 }
All Usage Examples Of SecretOfGaia.Terrain::poserSur