public static void Executar() { Cafe cafezinho = ColocarCafe(); Console.WriteLine("cafézinho tá pronto"); Ovo ovos = FritarOvos(2); Console.WriteLine("os ovos estão prontos"); Bacon baconzera = FritarBacon(3); Console.WriteLine("aquele bacon maravilhoso está pronto!"); Pao paozinho = ColocarPaoNaChapa(2); PassarManteiga(paozinho); PassarNutella(paozinho); Console.WriteLine("o pão está pronto"); Suco oj = ColocarSuco(); Console.WriteLine("Suquinho de laranja está ok"); Console.WriteLine("O café da manhã está pronto!!! :D"); }
public void Init() { var factory = new ChessFactory(); var bing = "bing"; var pao = "pao"; var ju = "ju"; var ma = "ma"; var xiang = "xiang"; var shi = "shi"; var jiang = "shuai"; //red var red = "red"; redBing1 = factory.GetChess <Bing>(bing, red, new[] { 0, 4 }); redBing2 = factory.GetChess <Bing>(bing, red, new[] { 2, 4 }); redBing3 = factory.GetChess <Bing>(bing, red, new[] { 4, 4 }); redBing4 = factory.GetChess <Bing>(bing, red, new[] { 6, 4 }); redBing5 = factory.GetChess <Bing>(bing, red, new[] { 8, 4 }); redPao1 = factory.GetChess <Pao>(pao, red, new[] { 1, 2 }); redPao2 = factory.GetChess <Pao>(pao, red, new[] { 7, 2 }); redJu1 = factory.GetChess <Ju>(ju, red, new[] { 0, 0 }); redJu2 = factory.GetChess <Ju>(ju, red, new[] { 8, 0 }); redMa1 = factory.GetChess <Ma>(ma, red, new[] { 1, 0 }); redMa2 = factory.GetChess <Ma>(ma, red, new[] { 8, 0 }); redXiang1 = factory.GetChess <Xiang>(xiang, red, new[] { 2, 0 }); redXiang2 = factory.GetChess <Xiang>(xiang, red, new[] { 6, 0 }); redShi1 = factory.GetChess <Shi>(shi, red, new[] { 3, 0 }); redShi2 = factory.GetChess <Shi>(shi, red, new[] { 5, 0 }); redShuai = factory.GetChess <Shuai>(jiang, red, new[] { 4, 0 }); //black var black = "black"; blackBing1 = factory.GetChess <Bing>(bing, black, new[] { 8, 6 }); blackBing2 = factory.GetChess <Bing>(bing, black, new[] { 6, 6 }); blackBing3 = factory.GetChess <Bing>(bing, black, new[] { 4, 6 }); blackBing4 = factory.GetChess <Bing>(bing, black, new[] { 2, 6 }); blackBing5 = factory.GetChess <Bing>(bing, black, new[] { 0, 6 }); blackPao1 = factory.GetChess <Pao>(pao, black, new[] { 7, 7 }); blackPao2 = factory.GetChess <Pao>(pao, black, new[] { 1, 7 }); blackJu1 = factory.GetChess <Ju>(ju, black, new[] { 8, 9 }); blackJu2 = factory.GetChess <Ju>(ju, black, new[] { 0, 9 }); blackMa1 = factory.GetChess <Ma>(ma, black, new[] { 7, 9 }); blackMa2 = factory.GetChess <Ma>(ma, black, new[] { 1, 9 }); blackXiang1 = factory.GetChess <Xiang>(xiang, black, new[] { 6, 9 }); blackXiang2 = factory.GetChess <Xiang>(xiang, black, new[] { 2, 9 }); blackShi1 = factory.GetChess <Shi>(shi, black, new[] { 5, 9 }); blackShi2 = factory.GetChess <Shi>(shi, black, new[] { 3, 9 }); blackShuai = factory.GetChess <Shuai>(jiang, black, new[] { 4, 9 }); }
private static void PassarManteiga(Pao pao) => Console.WriteLine("Passando manteiga no pão");
private static void PassarNutella(Pao toast) => Console.WriteLine("Passando aquela nutellinha no pão");