Why are there so many variables passed into createPkmn?
These variables should have values read into them while still in main.c, and then when createPkmn is called, they should have values in them. This is so that createPkmn can be tested without the use of standard input.
What’s the format for entering Pokemon details?
Id: 007
Name: Squirtle
Height: 0.51
Weight: 9
Type: 17
Type: -1
Note: The name of Pokemon is a single word.
What’s the format for entering which Pokemon to jump to? (For function jumpToPkmn)
Prompt for the id to be entered.
For example:
Id: 007
What’s the format for entering the seed, factor and number of Pokemon? (For function findPkmn)
Prompt for each value to be entered independently as shown below.
For example:
Seed: 5
Factor: 192
Number to find: 7
Is there a maximum length for the Pokemon’s name?
Yes (though you don’t need to use it). It is 50 characters.
What input validation do we need to do?
None. This includes capital letters being entered as a command – it won’t happen.
How do we format the display for the Pokemon details, if the Pokemon has more than one type?
Id: 041
Name: Zubat
Height: 0.79m
Weight: 7.50kg
Type: Flying/Poison
The types should be listed like this in alphabetical order, regardless of the order in which they were entered when creating the Pokemon.
Are we allowed to use other libraries, such as string.h?
You may include string.h and use any functions it provides, unless the specification for a specific function says you may not use string.h functions.
Do we print the Pokemon List in a specific order?
Yes. Print the Pokemon List in the order in which the Pokemon are stored in the list.
If an unfound Pokemon has 2 types, how should it be displayed?
Type: —
More output formatting details:
· How to print the number of Pokemon found: 3 Pokemon found.
· How to print list/details if the list is empty: No Pokemon in list.
· Evolution printing: #007 Squirtle –> #008 Wartortle –> #009 Blastoise
· Evolution printing when a Pokemon has not yet been found:
· #007 Squirtle –> #008 ********* –> #009 Blastoise
· Evolution printing for a Pokemon not yet currently in the list:
· #007 Squirtle –> #008 Wartortle –> #009 ?????
· There should always be 5 question marks indicating a Pokemon which is not in the list.
· When adding an evolution to a Pokemon, if the original Pokemon is not already in the Pokedex, then addEvolution should do nothing. This means, that the only time that ????? should be printed is at the end of an evolution chain.
· In this scenario, if the current Pokemon is #008, when we showEvolutions, it should only print #008 Wartortle –> #009 ?????
· Evolution printing for a Pokemon which doesn’t have any evolutions:
· #007 Squirtle
Input format for Evolutions?
Id of original Pokemon: 007
Id of evolution: 008
What do we do if asked to add a Pokemon which is already in the list? (Or one with the same id.)
When adding a Pokemon to the list, if there is already a Pokemon in the list with that id, the new Pokemon should not be added to the list. (No error message or output is needed.)
Can we use ctype.h library for Stage 5?
Yes.
How will Stage 5 be marked?
We will be calling these functions in isolation, along with your printList function. You can add extra commands to main.c if you’d like and use that to test it. We don’t mind (you won’t lose marks for having extra commands in main.c).
Can a Pokemon sometimes evolve into more than one new Pokemon?
No.
How many decimal places should height and weight be printed in? How do we do this?
Height and weight should be printed to 2 decimal places. You can do this either by storing the number of cm, and then printing height/100, the decimal point, then height%100. Or you can store the number of metres and use printf(“%.2f”, height).
If a Pokemon has only one type, how should the type be displayed?
If a Pokemon has only one type:
Type: Bug
If a Pokemon has two types:
Type: Bug/Poison
What order should the names be displayed in the produced list in searchByName function?
Same order as the appear in the original list
Should searchByName/getPkmnOfType functions only extract found Pokemon or any Pokemon that matches the criteria?
Any pokemon that matches criteria should be extracted and placed into the new list. The fact that it hasn’t been found should be preserved in the new list as well.
Stage 5 – Search by Name. What order should the returned list be?
Same as original list.
Sample solution uses srand/rand to generate random numbers. If you have a mismatch in output, try using the same function.