Browse Source

Implementation der zufälligen Computerauswahl

remotes/origin/tim
fdai7727 11 months ago
parent
commit
edaeb98d0a
  1. 6
      src/main/c/Tim/SchereSteinPapier.c

6
src/main/c/Tim/SchereSteinPapier.c

@ -1,5 +1,7 @@
#include "SchereSteinPapier.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void schereSteinPapier()
@ -19,7 +21,9 @@ void schereSteinPapier()
}
else if(user == 1 || user == 2 || user == 3)
{
//do something
srand(time(NULL));
com = rand() % 3 + 1;
printf("%d\n",com);
}
else
{

Loading…
Cancel
Save