printf(" - '%s' is their favourite move.\n",Temporary->Move);
}else{
printf("\nUnable to find that pokemon, sorry!\n");
}
}
///////////////////////
// Player Functions //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////
//// ////
//// ////
//// ////
//// ////
///////
voidListPlayers(Pokedex*pokedex){
/*
Prints the whole player list.
*/
PlayerNode*Temporary=pokedex->HeadOfPlayerList;//Creates a reference to the first item in the player list.
printf("\n\nPrinting Player List!:\n");
while(Temporary!=NULL){//While the current item in the list exists...
printf("\t- %s\n",Temporary->Name);//.. Print the Node...
Temporary=Temporary->Next;//... then move onto the next node.
}
};
PlayerNode*NewPlayerNode(charname[15]){
/*
Creates a new player node.
*/
PlayerNode*newNode=malloc(sizeof(PlayerNode));//Allocates the required memory for a new pokemon node.
strcpy(newNode->Name,name);// Sets the passed in values
newNode->PokemonOwned=0;
memset(newNode->PokemonArray,NULL,sizeof(newNode->PokemonArray));// Initialises all values to NULL.
// MAIN ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////
// //
// //
// //
//
intmain(){
//TESTING FUNCTIONS
// Initialising the pokedex \/ ////////////////////////////////////////////////