First commit

This commit is contained in:
José Carlos Cuevas 2012-11-30 14:04:31 +01:00
commit 283e7b301d
2 changed files with 76 additions and 0 deletions

4
README.md Normal file
View file

@ -0,0 +1,4 @@
Leo Phantastic IA Simulator
===========================
So here we have a superb simulation of our friend Leo in action. Just go an ask him anything through the command line and he will give you his special reply.

72
leo.c Normal file
View file

@ -0,0 +1,72 @@
/*
* Programa Leo: Variación del programa de la bola ocho, versión de Leo.
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(int argc, char **argv[])
{
int aleatorio;
if (argc < 2)
{
printf("Preguntame algo, gilipipas...\n");
return 1;
}
srandom(time(NULL));
aleatorio = random() % 11;
switch (aleatorio)
{
case 0:
printf("No te fologüeo...\n");
break;
case 1:
printf("Guat ar llu cauntin mi?\n");
break;
case 2:
printf("Hijo de puta!\n");
break;
case 3:
printf("Hablemos del mineralismo...\n");
break;
case 4:
printf("ig2 = ig[\"g2\"][g2] = {\"cs\":og2[\"cs\"], \"l\":0, \"sg\":{}}\n");
break;
case 5:
printf("Don't be a palurd!\n");
break;
case 6:
printf("Qué gilipipas!\n");
break;
case 7:
printf("Ai geit llu!\n");
break;
case 8:
printf("Lo haces fatal!\n");
break;
case 9:
printf("A-tot-cha!\n");
break;
case 10:
printf("No.\n");
break;
}
return 0;
}