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
99d556d8
Commit
99d556d8
authored
Jan 17, 2023
by
elijah vasquez
🦍
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changedsomestuff
parent
bd0d4a69
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
15 deletions
+10
-15
functions.h
functions.h
+9
-11
liststructure.c
liststructure.c
+1
-3
main.c
main.c
+0
-1
No files found.
functions.h
View file @
99d556d8
...
@@ -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
liststructure.c
View file @
99d556d8
...
@@ -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
main.c
View file @
99d556d8
...
@@ -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
])
{
...
...
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