Ejemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();
            poblacion = new List <Robot>();

            diccionario = new Dictionary <Robot, int>();

            int[] recorrido = new int[10] {
                1, 1, 2, 3, 4, 5, 6, 1, 1, 7
            };
            esc = new Escenario(recorrido);
        }
Ejemplo n.º 2
0
        private void GenerarRecorrido()
        {
            int[]  recorrido = new int[10];
            Random rand      = new Random();

            for (int i = 0; i < recorrido.Length; i++)
            {
                recorrido[i] = rand.Next(1, 8);
                System.Threading.Thread.Sleep(2);
            }

            esc = new Escenario(recorrido);

            RE1.Text  = esc.recorrido[0].ToString();
            RE2.Text  = esc.recorrido[1].ToString();
            RE3.Text  = esc.recorrido[2].ToString();
            RE4.Text  = esc.recorrido[3].ToString();
            RE5.Text  = esc.recorrido[4].ToString();
            RE6.Text  = esc.recorrido[5].ToString();
            RE7.Text  = esc.recorrido[6].ToString();
            RE8.Text  = esc.recorrido[7].ToString();
            RE9.Text  = esc.recorrido[8].ToString();
            RE10.Text = esc.recorrido[9].ToString();
        }
Ejemplo n.º 3
0
 public Partida(Robot robot, Escenario escenario)
 {
     this.robot     = robot;
     this.escenario = escenario;
     this.puntos    = CalcularPuntos();
 }