Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
c_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
elijah vasquez
c_pokedex_assignment
Commits
8ca6dec1
Commit
8ca6dec1
authored
Jan 16, 2023
by
elijah vasquez
🦍
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i forgot lol
parent
3a410e40
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
functions.h
functions.h
+11
-10
main.c
main.c
+1
-1
No files found.
functions.h
View file @
8ca6dec1
typedef
struct
Pokedex
typedef
struct
Pokedex
// Pokedex structure
{
struct
PokemonNode
*
head
;
struct
PokemonNode
*
tail
;
PokemonNode
*
headNode
;
PlayerNode
*
headPlayer
;
}
Pokedex
;
typedef
struct
PokemonNode
typedef
struct
PokemonNode
// Pokemon List
{
char
pokemonName
[
15
];
char
pokemonType
[
15
];
char
pokemonAbility
[
30
];
}
PokemonNode
;
typedef
struct
PlayerNode
typedef
struct
PlayerNode
// Player List
{
char
playerName
[
10
0
];
char
playerName
[
5
0
];
int
totalPokemon
;
PokemonNode
PokemonArray
[
20
];
}
PlayerNode
;
// Pokemon List functions
PokemonNode
*
NewPokemonNode
(
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]);
// Player List functions
PlayerNode
*
NewPlayerNode
(
name
);
void
AddPlayerToList
(
*
pokedex
,
name
);
PlayerNode
*
FindPlayer
(
pokedex
,
name
);
PlayerNode
*
NewPlayerNode
(
char
name
[
50
]
);
void
AddPlayerToList
(
Pokedex
*
pokedex
,
char
name
[
50
]
);
PlayerNode
*
FindPlayer
(
pokedex
,
char
name
[
50
]
);
// Additional functions
void
AddPokemonToPlayer
(
pokedex
,
playerName
,
pokemonName
);
void
AddPokemonToPlayer
(
pokedex
,
playerName
[
50
],
pokemonName
[
15
]
);
void
DisplayPokemonDetails
(
pokedex
,
name
);
void
DisplayPlayerDetails
(
pokedex
,
name
);
void
ListPokemon
(
pokedex
);
...
...
main.c
View file @
8ca6dec1
...
...
@@ -4,6 +4,6 @@
int
main
(
void
)
{
Pokedex
pokedex
;
Pokedex
pokedex
;
// Variable of Pokedex
return
0
;
}
\ No newline at end of file
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