Exemplo n.º 1
0
 public void ThrowAwayArtifact(AbstractArtifact artifact)
 {
     if (Bag.Contains(artifact))
     {
         Bag.Remove(artifact);
     }
     else
     {
         Console.WriteLine("There is no such artifact in inventory!");
     }
 }
Exemplo n.º 2
0
 public void RemoveArtifactFromInventory(AbstractArtifact artifact)
 {
     if (IsInventoryContainsArtifact(artifact))
     {
         artifactList.Remove(artifact);
     }
     else
     {
         throw new RpgException("Персонаж не имеет этого артефакта!");
     }
 }
Exemplo n.º 3
0
 public bool ContainsArtifact(AbstractArtifact artifact)
 {
     return(Bag.Contains(artifact));
 }
Exemplo n.º 4
0
 public void TransferArtifactToAnotherPlayer(AbstractArtifact artifact, Player playerReceiver)
 {
     ThrowAwayArtifact(artifact);
     playerReceiver.Inventory.PickUpArtifact(artifact);
 }
Exemplo n.º 5
0
 public void PickUpArtifact(AbstractArtifact artifact)
 {
     Bag.Add(artifact);
 }
Exemplo n.º 6
0
 public void GiveArtifactTo(AbstractArtifact artifact, Character character)
 {
     RemoveArtifactFromInventory(artifact);
     character.AddArtifactToInventory(artifact);
 }
Exemplo n.º 7
0
 public void AddArtifactToInventory(AbstractArtifact artifact)
 {
     artifactList.Add(artifact);
 }
Exemplo n.º 8
0
 public bool IsInventoryContainsArtifact(AbstractArtifact artifact)
 {
     return(artifactList.Contains(artifact));
 }