Commit 8ca6dec1 authored by elijah vasquez's avatar elijah vasquez 🦍

i forgot lol

parent 3a410e40
typedef struct Pokedex typedef struct Pokedex // Pokedex structure
{ {
struct PokemonNode *head; PokemonNode *headNode;
struct PokemonNode *tail; PlayerNode *headPlayer;
}Pokedex; }Pokedex;
typedef struct PokemonNode typedef struct PokemonNode // Pokemon List
{ {
char pokemonName[15]; char pokemonName[15];
char pokemonType[15]; char pokemonType[15];
char pokemonAbility[30]; char pokemonAbility[30];
}PokemonNode; }PokemonNode;
typedef struct PlayerNode typedef struct PlayerNode // Player List
{ {
char playerName[100]; char playerName[50];
int totalPokemon; int totalPokemon;
PokemonNode PokemonArray[20]; PokemonNode PokemonArray[20];
}PlayerNode; }PlayerNode;
// Pokemon List functions // Pokemon List functions
PokemonNode* NewPokemonNode(char name[15], char type[20], char ability[30]); PokemonNode* NewPokemonNode(char name[15], char type[20], char ability[30]);
void AddPokemonToList(Pokedex *pokedex, char name[15], char type[20], char ability[30]); void AddPokemonToList(Pokedex *pokedex, char name[15], char type[20], char ability[30]);
...@@ -25,13 +26,13 @@ PokemonNode* FindPokemon(Pokedex pokedex, char name[15]); ...@@ -25,13 +26,13 @@ PokemonNode* FindPokemon(Pokedex pokedex, char name[15]);
// Player List functions // Player List functions
PlayerNode* NewPlayerNode(name); PlayerNode* NewPlayerNode(char name[50]);
void AddPlayerToList(*pokedex, name); void AddPlayerToList(Pokedex *pokedex, char name[50]);
PlayerNode* FindPlayer(pokedex, name); PlayerNode* FindPlayer(pokedex, char name[50]);
// Additional functions // Additional functions
void AddPokemonToPlayer(pokedex, playerName, pokemonName); void AddPokemonToPlayer(pokedex, playerName[50], pokemonName[15]);
void DisplayPokemonDetails(pokedex, name); void DisplayPokemonDetails(pokedex, name);
void DisplayPlayerDetails(pokedex, name); void DisplayPlayerDetails(pokedex, name);
void ListPokemon(pokedex); void ListPokemon(pokedex);
......
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
int main(void) int main(void)
{ {
Pokedex pokedex; Pokedex pokedex; // Variable of Pokedex
return 0; return 0;
} }
\ No newline at end of file
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