Commit 2b6fcd26 authored by a-j.towse's avatar a-j.towse

Create structs

parent 1485bc92
...@@ -8,7 +8,31 @@ Pokedex Assignment ...@@ -8,7 +8,31 @@ Pokedex Assignment
A-J Towse A-J Towse
*/ */
//Create struct Pokedex with a pointer to head of Pokemon and head of Player
//Create variable of type Pokedex called pokedex.
typedef struct Pokedex { typedef struct Pokedex {
struct node PokemonListHead = NULL; struct Pokemon *head;
struct node PlayerListHead = NULL; struct Player *head;
} struct Pokedex *pokedex;
\ No newline at end of file };
//Create struct PokemonNode with name,type,ability variables
//Create variables of type PokemonNode to store next and previous node in DLL
typedef struct PokemonNode {
char name[20];
char type[10];
char ability[30];
struct PokemonNode *next;
struct PokemonNode *prev;
};
typedef struct Player {
char name[20];
int pokemonCount;
struct Player *next;
struct Player *prev;
};
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