Ejemplo n.º 1
0
void event_start(event_t * firstEv, event_t * secondEv, event_t * thirdEv, machine_t * myMachine) {
	puts("\n====================Game Starting====================\n");
	machine_fillWithRandom(myMachine);
    machine_print(myMachine);
	int check;

	check = event_firstEvent(firstEv, myMachine);
	check = event_secondEvent(secondEv, myMachine);
	check = event_thirdEvent(thirdEv, myMachine);
	if(check==1)
        Sleep(5000);
	puts("\n\n");
}
Ejemplo n.º 2
0
void event_start(event_t * firstEv, event_t * secondEv, event_t * thirdEv, queue_t * queuePtr) {
	puts("\nNew measurement:::");
	queue_enqueueRand(queuePtr);
	int check;
	Sleep(500);
	check = event_firstEvent(firstEv, queuePtr);
	if (check == DATA || check == NOT_OK) {
		puts("First event:");
		if (check == DATA) {
			puts("Nothing for first event");
		}
		else if (check == NOT_OK) {
			puts("Nothing special in first event");
		}
	}

	Sleep(500);
	check = event_secondEvent(secondEv, queuePtr);
	if (check == DATA || check == NOT_OK) {
		puts("Second event:");

		if (check == DATA) {
			puts("Nothing for second event");
		}
		else if (check == NOT_OK) {
			puts("Nothing special in second event...");
		}
	}

	Sleep(500);
	check = event_thirdEvent(thirdEv, queuePtr);
	if (check == DATA || check == NOT_OK) {
		puts("Third event:");

		if (check == DATA) {
			puts("Nothing for third event");
		}
		else if (check == NOT_OK) {
			puts("Nothing special in third event...");
		}
	}

	Sleep(500);
	puts("\n");
}