Beispiel #1
0
        private static void Estacionar_O_Carro()
        {
            var comandos = new List <Action>
            {
                () => RotacaoCommand.VirarParaDireita(70),
                () => MoverCommand.MoverParaFrente(5),
                () => RotacaoCommand.NivelarDirecao(),
                () => MoverCommand.MoverParaTras(2),
                () => EletricaCommand.DesligarCarro(),
                () => EletricaCommand.Status()
            };

            Executar.ExecutarComandos(comandos);
        }
Beispiel #2
0
        private static void Sair_Com_O_Carro()
        {
            var comandos = new List <Action>
            {
                () => EletricaCommand.Status(),
                () => EletricaCommand.LigarCarro(),
                () => RotacaoCommand.VirarParaEsquerda(60),
                () => MoverCommand.MoverParaFrente(4),
                () => RotacaoCommand.NivelarDirecao(),
                () => MoverCommand.MoverParaFrente(100)
            };

            Executar.ExecutarComandos(comandos);
        }