Commit df865d4e authored by sam.pople's avatar sam.pople

changes

parent 3be7f81e
...@@ -180,7 +180,7 @@ void DisplayPlayerDetails(Pokedex* pokedex, char name[20]) ...@@ -180,7 +180,7 @@ void DisplayPlayerDetails(Pokedex* pokedex, char name[20])
} }
//testing //testing
int main() int main()
{ // this creates the Pokedex and inserts pokemon into it { // this creates the Pokedex and gives it a head pokemon and player
Pokedex pokedexvalues; Pokedex pokedexvalues;
PokemonNode* pokemonhead = NewPokemonNode("Charizard", "Fire", "Blaze"); PokemonNode* pokemonhead = NewPokemonNode("Charizard", "Fire", "Blaze");
PlayerNode* playerhead = NewPlayerNode("Alan"); PlayerNode* playerhead = NewPlayerNode("Alan");
...@@ -205,7 +205,6 @@ int main() ...@@ -205,7 +205,6 @@ int main()
//This tests a Pokemon that already exists //This tests a Pokemon that already exists
AddPokemonToList(pokedexvaluespointer, "Pikachu", "Electric", "Static"); AddPokemonToList(pokedexvaluespointer, "Pikachu", "Electric", "Static");
//This function adds players to the pokedex //This function adds players to the pokedex
AddPlayerToList(pokedexvaluespointer, "Alan");
AddPlayerToList(pokedexvaluespointer, "Stephen"); AddPlayerToList(pokedexvaluespointer, "Stephen");
AddPlayerToList(pokedexvaluespointer, "Sandra"); AddPlayerToList(pokedexvaluespointer, "Sandra");
AddPlayerToList(pokedexvaluespointer, "Jack"); AddPlayerToList(pokedexvaluespointer, "Jack");
......
No preview for this file type
...@@ -14,7 +14,7 @@ typedef struct PlayerNode { ...@@ -14,7 +14,7 @@ typedef struct PlayerNode {
PokemonNode *PokemonArray[30]; PokemonNode *PokemonArray[30];
struct PlayerNode *nextplayer; struct PlayerNode *nextplayer;
} PlayerNode; } PlayerNode;
//This sets the structure for the pokedex and gives it two headers
typedef struct Pokedex { typedef struct Pokedex {
PokemonNode *pokemonhead; PokemonNode *pokemonhead;
PlayerNode *playerhead; PlayerNode *playerhead;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment