Skip to content

Instantly share code, notes, and snippets.

@GarethOates
Last active January 27, 2020 18:21
Show Gist options
  • Save GarethOates/636e6230f1765aeba0ccdfd2c85d7bdf to your computer and use it in GitHub Desktop.
Save GarethOates/636e6230f1765aeba0ccdfd2c85d7bdf to your computer and use it in GitHub Desktop.
Magic the Programming: Decorator Pattern
using System;
namespace MagicTheProgramming
{
public class Creature : ICreature
{
public int Power {get;}
public int Toughness {get;}
public string Name {get;}
public Creature(string _name, int _power, int _toughness)
{
this.Power = _power;
this.Toughness = _toughness;
this.Name = _name;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment