Skip to content

Commit

Permalink
Fix task code snippets based on code review
Browse files Browse the repository at this point in the history
Co-authored-by: ll-nick <[email protected]>
  • Loading branch information
orzechow and ll-nick authored Nov 26, 2024
1 parent 0bf58d0 commit 29603cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/tasks/5_cost_arbitration.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Finish the implementation of the `CostEstimator` and replace the random arbitrat
Finish the implementation of the `CostEstimator` class in `cost_estimator.cpp`:
```cpp
double CostEstimator::estimateCost(const Command& command, bool /*isActive*/) {
Positions absolutePath = utils::toAbsolutePath(command.path, environmentModel_);
Positions absolutePath = environmentModel_->toAbsolutePath(command.path);

// Compute the number of dots along the path and in the neighborhood of the path end using helper functions
const int nDotsAlongPath = utils::dotsAlongPath(absolutePath, environmentModel_);
Expand Down
2 changes: 1 addition & 1 deletion docs/tasks/6_verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Make sure to also pass the verifier to the arbitrator constructors:
explicit PacmanAgent(const entt::Game& game)
: parameters_{},
environmentModel_{std::make_shared<EnvironmentModel>(game)},
verifier_{environmentModel_} // We can initialize the verifier in the member initializer list {
verifier_{environmentModel_} { // We can initialize the verifier in the member initializer list

avoidGhostBehavior_ = std::make_shared<AvoidGhostBehavior>(environmentModel_, parameters_.avoidGhostBehavior);
changeDotClusterBehavior_ = std::make_shared<ChangeDotClusterBehavior>(environmentModel_);
Expand Down

0 comments on commit 29603cb

Please sign in to comment.