Professional Documents
Culture Documents
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dos.h>
/* You may include other standard header file you will need in your MP, for example
time.h */
/*
*
* Insert your own function definitions before main().
* Alternatively, you may create a new file containing your own function
definitions.
*
*/
int
main()
{
int action, life = 3, points, Rand, Pnt;
char *Dictionary[NWORDS]; // a 1D array of character pointers (addresses)
char key[29];
int i, level;
char Words[50];
InitializeDictionary(Dictionary);
/*
*
* Insert between InitializeDictionary() and FreeDictionary() your own codes for
* your main() function to work correctly.
*
*/
printf("\n\n\t [");
scanf("%d", &action);
if (action == 1){
system("cls");
printf("\n\n\t Try to remeber as much as you can! \n\n\t ");
system("pause");
// PrintDictionary(Dictionary);
while(life > 0)
{
system("cls"); //clear screen
level=+3;
if (search(Word[i], key) == 1)
{
Pnt++;
points = score(Pnt);
}
else
life--;
if (life == 0)
{
system("cls");
printf("\n\n\t GAME OVER \n\n\t ");
printf("\n\n\t SCORE: %d \n\n\t ", points);
}
system("pause");
}
PrintDictionary(Dictionary);
#endif
// search(Dictionary);
FreeDictionary(Dictionary);
return 0;
}