Skip to content
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

Refactor Stock::save() load() into operator>> and fix bug #122

Merged
merged 14 commits into from
Jun 5, 2024

Conversation

eric15342335
Copy link
Owner

@eric15342335 eric15342335 commented Jun 5, 2024

printvector() bug was introduced in this commit, specifically:

void printvector(vector<string> avector) {
cout << avector[0];
for (const auto & item : avector) {
cout << ", " << item;
}
cout << endl;
}

@eric15342335 eric15342335 added bug Something isn't working Comp: file I/O Saving and loading of the game state. Comp: stock stock.cpp, stock.h implementation labels Jun 5, 2024
@eric15342335 eric15342335 requested a review from comet13579 June 5, 2024 08:10
@eric15342335 eric15342335 self-assigned this Jun 5, 2024
Add one assertion and removed one magic number
From Makefile: make fix
…ever appear

The event duration was reduced by durationDecreaseMultipler right after the stock split event was added.

Fix: Rearrange the order
From Makefile: make fix
@eric15342335 eric15342335 changed the title Extract Stock operator>> operator<< and Fix hsi.save printvector() bug Refactor Stock::save() load(), fix hsi.save printvector() and stock split event bug Jun 5, 2024
From Makefile: make fix
From Makefile: make fix
@eric15342335 eric15342335 removed the bug Something isn't working label Jun 5, 2024
@eric15342335
Copy link
Owner Author

didn't mean this PR has bug tho

@eric15342335
Copy link
Owner Author

eric15342335 commented Jun 5, 2024

The get_hsi() bug might not present in v1?

@eric15342335 eric15342335 added the DO NOT MERGE Do not merge since it is not finished label Jun 5, 2024
@eric15342335 eric15342335 changed the title Refactor Stock::save() load(), fix hsi.save printvector() and stock split event bug Refactor Stock::save() load(), fix hsi.save printvector() and stock split event bug Jun 5, 2024
@eric15342335 eric15342335 changed the title Refactor Stock::save() load(), fix hsi.save printvector() and stock split event bug Refactor Stock::save() load() into operator>> and fix bug Jun 5, 2024
@eric15342335 eric15342335 merged commit 97a0ff9 into main Jun 5, 2024
9 checks passed
@eric15342335 eric15342335 deleted the stock-io-operator branch June 5, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Comp: file I/O Saving and loading of the game state. Comp: stock stock.cpp, stock.h implementation DO NOT MERGE Do not merge since it is not finished
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant