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
1c4a429f
Commit
1c4a429f
authored
Jan 16, 2023
by
elijah vasquez
🦍
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reorganised
parent
8ca6dec1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
23 deletions
+28
-23
functions.exe
functions.exe
+0
-0
functions.h
functions.h
+23
-20
main.c
main.c
+5
-3
No files found.
functions.exe
deleted
100644 → 0
View file @
8ca6dec1
File deleted
functions.h
View file @
1c4a429f
typedef
struct
Pokedex
// Pokedex structure
// Pokemon List
typedef
struct
PokemonNode
{
{
PokemonNode
*
headNode
;
char
pokemonName
[
20
];
PlayerNode
*
headPlayer
;
char
pokemonType
[
20
];
}
Pokedex
;
typedef
struct
PokemonNode
// Pokemon List
{
char
pokemonName
[
15
];
char
pokemonType
[
15
];
char
pokemonAbility
[
30
];
char
pokemonAbility
[
30
];
}
PokemonNode
;
typedef
struct
PlayerNode
// Player List
struct
PokemonNode
*
next
;
}
PokemonNode
;
// Player List
typedef
struct
PlayerNode
{
{
char
playerName
[
50
];
char
playerName
[
50
];
int
totalPokemon
;
int
totalPokemon
;
PokemonNode
PokemonArray
[
20
];
PokemonNode
*
PokemonArray
[
20
];
}
PlayerNode
;
struct
PlayerNode
*
next
;
}
PlayerNode
;
// Pokedex structure
typedef
struct
Pokedex
{
PokemonNode
*
pokemonNodehead
;
PlayerNode
*
PlayerNodehead
;
}
Pokedex
;
// 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
]);
PokemonNode
*
FindPokemon
(
Pokedex
pokedex
,
char
name
[
15
]);
PokemonNode
*
FindPokemon
(
Pokedex
pokedex
,
char
name
[
15
]);
// Player List functions
// Player List functions
PlayerNode
*
NewPlayerNode
(
char
name
[
50
]);
PlayerNode
*
NewPlayerNode
(
char
name
[
50
]);
void
AddPlayerToList
(
Pokedex
*
pokedex
,
char
name
[
50
]);
void
AddPlayerToList
(
Pokedex
*
pokedex
,
char
name
[
50
]);
PlayerNode
*
FindPlayer
(
pokedex
,
char
name
[
50
]);
PlayerNode
*
FindPlayer
(
Pokedex
pokedex
,
char
name
[
50
]);
// Additional functions
// Additional functions
void
AddPokemonToPlayer
(
pokedex
,
playerName
[
50
],
pokemonName
[
15
]);
void
AddPokemonToPlayer
(
Pokedex
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
*
pokedex
);
void
ListPlayers
(
pokedex
);
void
ListPlayers
(
Pokedex
*
pokedex
);
main.c
View file @
1c4a429f
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include "functions.h"
#include "functions.h"
int
main
(
void
)
int
main
(
void
)
{
{
Pokedex
pokedex
;
// Variable of Pokedex
return
0
;
}
}
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