Hands-on Rust: Missing code change to render the map with camera (page 113 in P1.0)

When introducing the camera, compilation errs as the change to the map’s render method is not reflected in src/main.rs, if just following the flow of the text.

Perhaps the next can just add the change on p113, from:

self.map.render(ctx);

To:

self.map.render(ctx, &self.camera);

In the state’s impl of the GameState trait.

1 Like