Tentative Proposal
The Change
Current Implementation
When Pacdots and Powerdots are eaten, they simply disappear with no trace.
Proposed Change
When a Pacdot or Powerdot is eaten, it is replaced with a number representing the order (among the Pacdots) in which it was eaten.
The Effects
Benefits
The Ghosts would be given a reliable trail of the Pacman's previous locations with which to create a strategy.
Side Effects
None
Necessary Changes
An integer variable needs to be added to the Pacdot class, which is set when it is eaten and represents the order in which the Pacdot was eaten. The PacdotRepository and/or PacdotRegistry classes should keep track of the number of eaten Pacdots in order to set this number when eating a Pacdot.
Tentative Proposal
The Change
Current Implementation
When Pacdots and Powerdots are eaten, they simply disappear with no trace.
Proposed Change
When a Pacdot or Powerdot is eaten, it is replaced with a number representing the order (among the Pacdots) in which it was eaten.
The Effects
Benefits
The Ghosts would be given a reliable trail of the Pacman's previous locations with which to create a strategy.
Side Effects
None
Necessary Changes
An integer variable needs to be added to the
Pacdotclass, which is set when it is eaten and represents the order in which the Pacdot was eaten. ThePacdotRepositoryand/orPacdotRegistryclasses should keep track of the number of eaten Pacdots in order to set this number when eating a Pacdot.