Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Viernes
- {
- class Program
- {
- static void Main(string[] args)
- {
- //VERIFICAR
- Console.WriteLine("Digite a coordenada x.");
- int xDig = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Digite a coordenada y.");
- int yDig = Convert.ToInt32(Console.ReadLine());
- //POG
- Console.WriteLine("Digite alguns comandos, 'E'squerda, 'D'ireita, 'A'vançar.");
- String str = Console.ReadLine();
- str = str.ToUpper();
- char[] Comands = str.ToCharArray();
- Console.WriteLine(" Olá {0}", Comands);
- //
- SpaceCar sp = new SpaceCar(xDig, yDig);
- foreach (var separaLetras in Comands)
- {
- switch (separaLetras)
- {
- case 'E':
- sp.girarEsquerda();
- break;
- case 'D':
- sp.girarDireita();
- break;
- case 'A':
- sp.avancarBloco(xDig, yDig);
- break;
- }
- }
- //MATRIZ
- int[,] marte = new int[6, 6];
- //preenchendo a matriz
- /* for (int i = 5; i >= 0; i--)
- {
- for (int j = 5; j >= 0; j--)
- {
- marte[i, j] = i + j;
- }
- }
- //mostrar matriz
- for (int i = 5; i >= 0; i--)
- {
- for (int j = 5; j >= 0; j--)
- {
- Console.Write(" "+ marte[i,j]);
- }
- Console.WriteLine("\n");
- }*/
- Console.WriteLine("Press Any Key to Exit");
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment