Skip to content

Update README.md #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions shm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ___

## Zadanie 4

Napisz klasę `Map`, która będzie posiadała `std::vector<Island&>` przechowujący wszystkie wyspy na mapie, oraz zmienną `Island* currentPosition_` określającą aktualną pozycję gracza na mapie.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be pointer or std::unqiue_ptr but I don't remember, need to check :D

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what you ment with the assignment. I ment that reference can't be a type in vector because it is not assignable. https://stackoverflow.com/questions/922360/why-cant-i-make-a-vector-of-references

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a good suggestion. I only wonder if Map should be an owner of all Islands? I don't know now how it's gonna be used, but it seems ok.

Napisz klasę `Map`, która będzie posiadała `std::vector<Island>` przechowujący wszystkie wyspy na mapie, oraz zmienną `Island* currentPosition_` określającą aktualną pozycję gracza na mapie.

___

Expand All @@ -45,7 +45,7 @@ W klasie `Map` napisz funkcję

`Island* getIsland(const Island::Coordinates& coordinate)`

Powinna ona przeszukać `std::vector<Island&>` i zwrócić szukaną wyspę.
Powinna ona przeszukać `std::vector<Island>` i zwrócić szukaną wyspę.

___

Expand Down