|
Are we required to use all three ADT given in the static library (set, list and map)? |
No, it is not necessary that you use them all, but make sure that the data structure you choose to use in every place is the most suitable one. That doesn't mean that an implementation that uses only some of the ADTs is incorrect. You can ask yourself questions like the one asked in the first question in the dry part to find the best match.
|
When testing the submission folder, will you add test_utilities.h anywhere? |
Yes, we will add it to the tests folder. It's your responsibility to have it anywhere else in your submission folder.
|
Where should the execution files generated by the makefile (all *_test files) be? |
In the main submission directory.
|
Do we have to implement the functions declared in print_utils.h? |
No, they are implemented in libmtm.a. All you need to do is link the library at compilation.
|
When a Pokemon with ID=2 for example dies, then a fourth Pokemon is caught by the trainer,
does he get ID=2 or ID=4? In other words, are "free ID slots" occupied by newly caught Pokemons? |
In the example, the new caught Pokemon would get ID=4. The ID assignment mechanism is very simple: The i^th Pokemon caught by the trainer gets ID=i, no matter how many Pokemons died. Also, Pokemon IDs dont change once assigned.
|
In case a Pokemon evolves after fighting a battle, do we print the old or the new specifications of the Pokemon? |
In the battle result report, you print the specifications of the old Pokemon, before the evolution occur.
|
When a Pokemon dies, does it evlove? |
Whether a dead Pokemon evolve or not is not relevant since it should be removed out of the game.
|
When printing the locations report, what do we print besides every location? |
You should print the first Pokemon on the list of that location, i.e., the Pokemon that is in that location at the moment (if any).
|
When adding a new trainer to the game, with a start point with no Pokemons,
what happens, and is it an error? |
The trainer will just start the game with no Pokemons. This is not considered an error.
|
Can two trainers in different locations fight a battle? |
Yes.
|
What do you mean by lexicographic order (of locations printed)? |
By lexicographic order of strings we mean the order defined by strcmp.
|
In unit tests for the various ADTs, how should we test the print functions? |
It should be enough to just print the output to stdout and check by yourself whether it is correct.
|
Is it possible that a Pokemon evolves more than once due to a single battle? |
Yes. Consider the following example of possible evolutions: A -> B 5 B -> C 6 Suppose a Pokemon A with level 4 fights a battle that raises its level to 7. Pokemon A will evolve then to C.
|
Are we obliged to store the types of a Pokemon inside the Pokemon's struct? |
No it is not necessary. Notice that types matter only when the Pokemon is captured. Therefore, an implementation that consider the types of a Pokemon when it's captured, but do not store them in the Pokemon struct is totally fine since the types are not used again.
|
Do we have to test the print functions in unit tests? If so, how? |
Print functions are the only functions that you do not need to test in unit tests of the various ADTs.
|
Can we assume that Pokemon types are always given in capital letters? |
Yes.
|
Can we assume that there is a single space between every two words in the three input files?
And that there are none before the first word? |
Yes.
|
Which channel/ file should the errors be printed to? |
All errors should be sent to the standard error channel stderr.
|
|