Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Pokedex_Assignment
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
a-j.towse
Pokedex_Assignment
Commits
2b6fcd26
Commit
2b6fcd26
authored
Dec 31, 2022
by
a-j.towse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create structs
parent
1485bc92
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
3 deletions
+27
-3
main.c
main.c
+27
-3
No files found.
main.c
View file @
2b6fcd26
...
...
@@ -8,7 +8,31 @@ Pokedex Assignment
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
{
struct
node
PokemonListHead
=
NULL
;
struct
node
PlayerListHead
=
NULL
;
}
\ No newline at end of file
struct
Pokemon
*
head
;
struct
Player
*
head
;
struct
Pokedex
*
pokedex
;
};
//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
;
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment