Features/game update#3
Open
matthijsvanvliet wants to merge 5 commits into
Open
Conversation
Collaborator
matthijsvanvliet
commented
Mar 17, 2021
- Added unfinished GameUpdate class
- Added unfinished and incomplete unit tests
added 3 commits
March 10, 2021 11:09
…ss so the GetNode() method doesn't return a const Node* but just Node*.
Deruago
requested changes
Mar 17, 2021
|
|
||
| public: | ||
| Move(Node* startLocation_, Node* endLocation_, int price_); | ||
| ~Move(); |
| void UpdateBudgetCompetitor(const int id, int newBudget); | ||
| void UpdateBudgetOur(int newBudget); | ||
| void UpdateOccupiedLocations(std::vector<Node*> nodes); | ||
| void UpdateOurLocation(const int location); |
Owner
There was a problem hiding this comment.
const int location -> const Move move
Comment on lines
+70
to
+71
| #include <iostream> | ||
| using namespace std; |
|
|
||
| for (auto vec : graph->GetLocations()) | ||
| { | ||
| if (sptSet[vec->GetId() - 1] == false && dist[vec->GetId() - 1] <= min) |
Owner
There was a problem hiding this comment.
const auto vectorId = vec->GetId() - 1;
| { | ||
| if (con.GetNode()->GetId() == endNode->GetId()) | ||
| { | ||
| return new Connection(con.GetNode(), con.GetPrice()); |
| { | ||
| for (auto ocNode : occupiedNodes) | ||
| { | ||
| if (ocNode->IsCritical() && ocNode->GetId() == node->GetId()) |
Owner
There was a problem hiding this comment.
NodeId instead of ocNode->GetId()
|
|
||
| void PekingExpress::GameUpdate::ApplyOurMove(const int location) | ||
| { | ||
| UpdateOurLocation(location); |
| } | ||
|
|
||
| void PekingExpress::GameUpdate::UpdateCompetitorLocation(int location) | ||
| const int PekingExpress::GameUpdate::NextMove() |
added 2 commits
March 24, 2021 12:54
…he Algorithm class and GameUpdate class.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.