예제 #1
0
        public Juego1(int posibles,int reales,Paleta p,int largo)
        {
            if(posibles<6) posibles=6;
            else if(posibles>12) posibles=12;
            if(reales<4) reales=4;
            else if(reales>8)reales=8;

            colpos=new Colores[posibles];
            colres=new Colores[largo][];
            puntos=new Colores[largo][];
            for(int i=0;i<largo;i++){
            colres[i]=new Colores[reales];
            puntos[i]=new Colores[reales];
            }
            answer=new Colores[reales];
            p.Llena(colpos);
            p.LlenaAleatoriamenteSinRep(answer,colpos.Length-1);
            altura=largo-1;
        }
예제 #2
0
 public Juego1(int posibles,int reales,Paleta p)
     : this(posibles,reales,p,12)
 {
     ;
 }
예제 #3
0
 private void Form1_Load(object sender, System.EventArgs e)
 {
     p=new Paleta();
     game=new Juego1(colpos,colreal,p);
     aux=new Colores[game.Preguntas[0].Length];
     flagpreg=new Point(-100,-100);
     flagpos=flagpreg;
     marca=0;
     poslock=true;
     pregunta.Width=30*game.Ancho;
     respuesta.Width=30*game.Ancho;
     this.posibles.Width=pregunta.Left+pregunta.Width-respuesta.Left;
     this.posibles.Height=posibles.Width/game.PosiblesColores.Length-10;
     h=posibles.Width/game.PosiblesColores.Length;
     string s="";
     for(int i=0;i<game.answer.Length;i++)
     s=s+game.answer[i].Nombre+"  ";
     this.label1.Text="";
     this.label1.Text=s;
     this.posibles.Refresh();
     this.Refresh();
 }