private void ExecuteAttackCommand(string[] input) { IBlob attacker = new Blob(); IBlob target = new Blob(); foreach (var blob in blobsData.Blobs) { if (blob.Name == input[1]) { attacker = blob; } } foreach (var blob in blobsData.Blobs) { if (blob.Name == input[2]) { target = blob; } } attacker.Attack(target); }
public IBlob CreateBlob(string name, int health, int damage, IBehavior behavior, IAttack attack) { Blob blob = new Blob(name,health,damage,behavior,attack); return blob; }