资 源 简 介
(Some spelling errors may be present, pasted from PDF)
For this assignment, you must implement a simulation of ants foraging for food. This simulation should represent the ants as characters in a two-dimensional grid, and it
should represent the amount of food in an area with a number (0-9) which represents the tens digit of the amount of food in a location. If the amount of food is 0, then an empty space should be displayed instead of a number. The ants should be represented by two different characters - one that is displayed when the ant is carrying food and the other when the ant has its hands empty.
The key to this simulation is that ants communicate with one another using a chemical signal called a pheromone. They essentially leave little chemical breadcrumbs on the ground when they find food in order to allow others (and themselves) a way to find the food"s location. They carry this chemical with them and drop a part of their supply on the ground at each ste