Ajout TPS + Entrainements
This commit is contained in:
12
DEV1.1/Entrainements/controle_machine_2_B/hue.c
Normal file
12
DEV1.1/Entrainements/controle_machine_2_B/hue.c
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "carre.c"
|
||||
|
||||
int hue(void) {
|
||||
int choice = rand()%3;
|
||||
if (choice == 0) {
|
||||
return RED;
|
||||
} else if (choice == 1) {
|
||||
return GREEN;
|
||||
} else /* if (choice == 2) */ {
|
||||
return BLUE;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user