diff options
author | marcinzelent <marcin@zelent.net> | 2021-02-21 14:13:49 +0100 |
---|---|---|
committer | marcinzelent <marcin@zelent.net> | 2019-12-20 14:21:37 +0100 |
commit | b1eb36d3fbc5012b07489454a7452e8488507f6a (patch) | |
tree | f6a9e6e561eabde5b06366a6aeac78df123ca917 /Builders/PizzaBuilder.cs |
Diffstat (limited to 'Builders/PizzaBuilder.cs')
-rw-r--r-- | Builders/PizzaBuilder.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Builders/PizzaBuilder.cs b/Builders/PizzaBuilder.cs new file mode 100644 index 0000000..e86cdaf --- /dev/null +++ b/Builders/PizzaBuilder.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; +using KukaPizza.Models; + +namespace KukaPizza.Builders +{ + public class PizzaBuilder : IPizzaBuilder + { + PizzaOrder _pizzaOrder = new PizzaOrder(); + public void ChooseBase(Pizza pizza) + { + _pizzaOrder.BasePizza = pizza; + } + + public void AddExtraToppings(List<Topping> extraToppings) + { + _pizzaOrder.ExtraToppings = extraToppings; + } + + public void ChooseSize(PizzaSize size) + { + _pizzaOrder.Size = size; + } + + public PizzaOrder GetResult() + { + return _pizzaOrder; + } + } +}
\ No newline at end of file |