Commit 99d556d8 authored by elijah vasquez's avatar elijah vasquez 🦍

changedsomestuff

parent bd0d4a69
...@@ -28,22 +28,20 @@ typedef struct Pokedex ...@@ -28,22 +28,20 @@ typedef struct Pokedex
// Pokemon List functions // Pokemon List functions
PokemonNode* NewPokemonNode(char name[20], char type[20], char ability[30]); PokemonNode* NewPokemonNode(char name[20], char type[20], char ability[30]);
void AddPokemonToList(Pokedex* funct, char name[20], char type[20], char ability[30]); void AddPokemonToList(Pokedex* pokedex, char name[20], char type[20], char ability[30]);
PokemonNode* FindPokemon(Pokedex* funct, char name[20]); PokemonNode* FindPokemon(Pokedex* pokedex, char name[20]);
// Player List functions // Player List functions
PlayerNode* NewPlayerNode(char name[50]); // Create new node, return pointer to node PlayerNode* NewPlayerNode(char name[50]); // Create new node, return pointer to node
void AddPlayerToList(Pokedex* funct, char name[50]); // Check if name already exists in Player list. void AddPlayerToList(Pokedex* pokedex, char name[50]); // Check if name already exists in Player list.
PlayerNode* FindPlayer(Pokedex* funct, char name[50]); // Searches Player list for name. PlayerNode* FindPlayer(Pokedex* pokedex, char name[50]); // Searches Player list for name.
void AddPokemonToPlayer(Pokedex* funct, Pokedex* funct2, char playerName[50], char pokemonName[20]); // Adds Pokemon to player's Pokemon list void AddPokemonToPlayer(Pokedex* player, Pokedex* pokemon, char playerName[50], char pokemonName[20]); // Adds Pokemon to player's Pokemon list
// Additional functions for the pokedex // Additional functions for the pokedex
// Pokemon details functs // Pokemon details functs
void DisplayPokemonDetails(Pokedex* funct, char name[20]); // Output details of pokemon void DisplayPokemonDetails(Pokedex* pokedex, char name[20]); // Output details of pokemon
PokemonNode* ListPokemon(Pokedex* funct); //output list of names of all POKEMON in pokedex PokemonNode* ListPokemon(Pokedex* pokedex); //output list of names of all POKEMON in pokedex
// Pokemon players functs // Pokemon players functs
void DisplayPlayerDetails(Pokedex* funct, char name[50]); // output details of players, incl. list of names of pokemon owned void DisplayPlayerDetails(Pokedex* pokedex, char name[50]); // output details of players, incl. list of names of pokemon owned
PlayerNode * ListPlayers(Pokedex* funct); //output list of names of all PLAYERS in pokedex PlayerNode * ListPlayers(Pokedex* pokedex); //output list of names of all PLAYERS in pokedex
...@@ -34,6 +34,4 @@ int main(void) ...@@ -34,6 +34,4 @@ int main(void)
DisplayPokemonDetails(pokeHead, "dragapult"); DisplayPokemonDetails(pokeHead, "dragapult");
DisplayPokemonDetails(pokeHead, "volcarona"); DisplayPokemonDetails(pokeHead, "volcarona");
DisplayPokemonDetails(pokeHead, "regieleki"); DisplayPokemonDetails(pokeHead, "regieleki");
return 0;
} }
\ No newline at end of file
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "liststructure.c" #include "liststructure.c"
#include"functions.h"
// Details of Pokemon // Details of Pokemon
void DisplayPokemonDetails(Pokedex* pokedex, char name[50]) { void DisplayPokemonDetails(Pokedex* pokedex, char name[50]) {
......
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