Cita de: ~ Yoya ~ en 15 Diciembre 2010, 23:55 PM
Debe tener filtro xD
xD seguro, de eso se trata el tema este.. saltarse ese filtro xD
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúCita de: ~ Yoya ~ en 15 Diciembre 2010, 23:55 PM
Debe tener filtro xD
Cita de: [Zero] en 25 Noviembre 2010, 00:58 AM
La versión gratuíta de Comodo sin ninguna duda, personalmente prefiero usar ésta antivirus antes que cualquier otro, ya sea gratuíto o de pago.
Los que dicen no usar antivirus no creo que estéis muy seguros... Lamentablemente no puedes controlar lo que pasa en todo momento en tu ordenador, puedes ser víctima de cualquier tipo de ataque en cualquier momento, y buena parte de estos no son fáciles de detectar, vale que con un AV te puede pasar lo mismo, pero es una herramienta más que te ayuda en tu día a día, yo me sé la tabla de multiplicar y uso calculadora.
Saludos
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
private static int[] Mazo = new int[21];
private static int[] SegundaR = new int[21];
private static int[] TerceraR = new int[21];
private static int[] CuartaR = new int[21];
private static int[] Pozo1 = new int[7];
private static int[] Pozo2 = new int[7];
private static int[] Pozo3 = new int[7];
private static int opc;
private static int j = 0;
private static int g = 0;
private static int h = 0;
private static int f = 20;
public static void Mostrar2(int[] pozon1, int[] pozon2, int[] pozon3, int numpozon)
{
Mostrar(pozon1,pozon2,pozon3,numpozon);
}
public static void Mostrar(int[] pozito1, int[] pozito2, int[] pozito3, int numpozo)
{
int mistake = 0;
do
{
Console.Clear();
Console.WriteLine();
Console.WriteLine(" - Elegiste el pozo numero {0}", numpozo);
Console.WriteLine();
try
{
Console.WriteLine("- POZO 1 -");
Console.WriteLine();
for (int i = 0; i < pozito1.Length; i++)
{
Console.WriteLine("Carta Nº: {0}", pozito1[i]);
}
Console.WriteLine(); Console.WriteLine();
Console.WriteLine("- POZO 2 -");
Console.WriteLine();
for (int i = 0; i < pozito2.Length; i++)
{
Console.WriteLine("Carta Nº: {0}", pozito2[i]);
}
Console.WriteLine(); Console.WriteLine();
Console.WriteLine("- POZO 3 -");
Console.WriteLine();
for (int i = 0; i < pozito3.Length; i++)
{
Console.WriteLine("Carta Nº: {0}", pozito3[i]);
}
Console.WriteLine(); Console.WriteLine();
Console.Write(" - Vuelve a escribir el pozo donde se encuentra tu numero: ");
opc = int.Parse(Console.ReadLine());
if ((opc != 1) && (opc != 2) && (opc != 3))
{
Console.Clear();
Console.WriteLine();
Console.WriteLine(" - NUMERO INCORRECTO, SON 3 POZOS SOLAMENTE xD");
mistake = 0;
Console.WriteLine();
Console.WriteLine(" Presione una tecla para volver..");
Console.ReadKey();
}
else mistake = 1;
}
catch
{ }
} while (mistake == 0);
int k = 0;
switch (opc)
{
case 1:
f = 20;
h = 0;
g = 0;
for (int i = 7; i < 14; i++)
{
TerceraR[k] = SegundaR[i];
k++;
}
for (int i = 0; i < 7; i++)
{
TerceraR[k] = SegundaR[i];
k++;
}
for (int i = 14; i < 21; i++)
{
TerceraR[k] = SegundaR[i];
k++;
}
for (int i = 0; i < 7; i++)
{
Pozo1[i] = SegundaR[f];
f--;
Pozo2[g] = SegundaR[f];
f--;
Pozo3[h] = SegundaR[f];
g++;
h++;
f--;
}
Mostrar2(Pozo1, Pozo2, Pozo3, 1);
break;
case 2:
f = 20;
h = 0;
g = 0;
for (int i = 14; i < 21; i++)
{
TerceraR[k] = SegundaR[i];
k++;
}
for (int i = 7; i < 14; i++)
{
TerceraR[k] = SegundaR[i];
k++;
}
for (int i = 0; i < 7; i++)
{
TerceraR[k] = SegundaR[i];
k++;
}
for (int i = 0; i < 7; i++)
{
Pozo1[i] = SegundaR[f];
f--;
Pozo2[g] = SegundaR[f];
f--;
Pozo3[h] = SegundaR[f];
g++;
h++;
f--;
}
Mostrar2(Pozo1, Pozo2, Pozo3, 2);
break;
case 3:
f = 20;
h = 0;
g = 0;
for (int i = 0; i < 7; i++)
{
TerceraR[k] = SegundaR[i];
k++;
}
for (int i = 14; i < 21; i++)
{
TerceraR[k] = SegundaR[i];
k++;
}
for (int i = 7; i < 14; i++)
{
TerceraR[k] = SegundaR[i];
k++;
}
for (int i = 0; i < 7; i++)
{
Pozo1[i] = SegundaR[f];
f--;
Pozo2[g] = SegundaR[f];
f--;
Pozo3[h] = SegundaR[f];
g++;
h++;
f--;
}
Mostrar2(Pozo1, Pozo2, Pozo3, 3);
break;
}
Console.ReadKey();
}
public static bool NumExists(int Num, int MaxPos)
{
bool resultado = false;
for (int i = 0; i < MaxPos; i++)
if (Mazo[i] == Num)
{
resultado = true;
break;
}
return resultado;
}
public static void RandomNumbers()
{
Random Rnd = new Random(unchecked((int)DateTime.Now.Ticks));
for (int i = 0; i < Mazo.Length; i++)
do
{
Mazo[i] = Rnd.Next(1,22);
} while (NumExists(Mazo[i], i) == true);
Rnd = null;
}
static void Main(string[] args)
{
Console.BackgroundColor = ConsoleColor.Black;
Console.ForegroundColor = ConsoleColor.Green;
Console.Title = "Adivinador";
Console.WindowHeight = 40;
Console.WindowWidth = 90;
int error = 0;
do
{
RandomNumbers();
Console.Clear();
Console.WriteLine();
Console.WriteLine(" - Se han repartido las cartas, piensa en una y recuerdala que tratare de adivinarla");
Console.WriteLine(); Console.WriteLine();
Console.WriteLine("- POZO 1 -");
Console.WriteLine();
try
{
for (int i = 0; i < 7; i++)
Console.WriteLine("Carta Nº: {0}", Mazo[i]);
Console.WriteLine(); Console.WriteLine();
Console.WriteLine("- POZO 2 -");
Console.WriteLine();
for (int i = 7; i < 14; i++)
Console.WriteLine("Carta Nº: {0}", Mazo[i]);
Console.WriteLine(); Console.WriteLine();
Console.WriteLine("- POZO 3 -");
Console.WriteLine();
for (int i = 14; i < 21; i++)
Console.WriteLine("Carta Nº: {0}", Mazo[i]);
Console.WriteLine(); Console.WriteLine();
Console.Write(" - Tu carta elegida esta en el pozo numero: ");
int opc = int.Parse(Console.ReadLine());
error = 1;
switch (opc)
{
case 1:
f = 20;
h = 0;
g = 0;
for (int i = 7; i < 14; i++)
{
SegundaR[j] = Mazo[i];
j++;
}
for (int i = 0; i < 7; i++)
{
SegundaR[j] = Mazo[i];
j++;
}
for (int i = 14; i < 21; i++)
{
SegundaR[j] = Mazo[i];
j++;
}
for (int i = 0; i < 7; i++)
{
Pozo1[i] = SegundaR[f];
f--;
Pozo2[g] = SegundaR[f];
f--;
Pozo3[h] = SegundaR[f];
g++;
h++;
f--;
}
Mostrar(Pozo1, Pozo2, Pozo3, 1);
break;
case 2:
f = 20;
h = 0;
g = 0;
for (int i = 14; i < 21; i++)
{
SegundaR[j] = Mazo[i];
j++;
}
for (int i = 7; i < 14; i++)
{
SegundaR[j] = Mazo[i];
j++;
}
for (int i = 0; i < 7; i++)
{
SegundaR[j] = Mazo[i];
j++;
}
for (int i = 0; i < SegundaR.Length; i++)
{
Pozo1[i] = SegundaR[f];
f--;
Pozo2[g] = SegundaR[f];
f--;
Pozo3[h] = SegundaR[f];
g++;
h++;
f--;
}
Mostrar(Pozo1, Pozo2, Pozo3, 2);
break;
case 3:
f = 20;
h = 0;
g = 0;
for (int i = 0; i < 7; i++)
{
SegundaR[j] = Mazo[i];
j++;
}
for (int i = 14; i < 21; i++)
{
SegundaR[j] = Mazo[i];
j++;
}
for (int i = 7; i < 14; i++)
{
SegundaR[j] = Mazo[i];
j++;
}
for (int i = 0; i < SegundaR.Length; i++)
{
Pozo1[i] = SegundaR[f];
f--;
Pozo2[g] = SegundaR[f];
f--;
Pozo3[h] = SegundaR[f];
g++;
h++;
f--;
}
Mostrar(Pozo1, Pozo2, Pozo3, 3);
break;
default:
Console.Clear();
Console.WriteLine();
Console.WriteLine(" - NUMERO INCORRECTO, SON 3 POZOS SOLAMENTE xD");
error = 0;
Console.WriteLine();
Console.WriteLine(" Presione una tecla para volver..");
break;
}
Console.ReadKey();
}
catch
{ }
} while (error == 0);
}
}
}