Advanced Hands-on Rust: Mars elements mismatch in text and code (B3 p264)

@herbert

In the part about spawning miners, fuel and batteries, the text says to spawn 20 of each:

You already spawn the tiles that make up the world in the spawn function.
This is an ideal place to add the other game elements as well. Let’s consider
the logic you can use:

  1. Take the first 20 elements from the shuffled list of spawn locations.
  2. At each location, spawn a miner.
  3. Take the next 20 elements (from index 20 to 40) from the shuffled list of
    spawn locations.
  4. At each location, spawn a battery.
  5. Take the next 20 elements (from index 40 to 60) from the shuffled list of
    spawn locations.
  6. At each location, spawn a fuel tank.

However, the code only spawns 10 batteries:

// Spawn batteries
for (x, y) in self.spawn_positions.iter().skip(40).take(10) {
    ...

The order things are spawned in the code as also different from the text: miner, fuel, batteries; vs miner, batteries, fuel.