The specification says:
Fish and HungryFish should blow a bubble at their location (after moving) about 10% of the time.
Does this mean the bubble is assigned to the coordinates of the Fish before it moved (so that it doesn’t replace the fish)?
The specification is still unclear after viewing testFishBubbles(). The test checks for an instance of Bubble at entities[5-1], since the fish is going left and started at entities. However, if the fish is going left, its x-coordinate must decrease by 1, so won’t the fish potentially be at entities[5-1]? I don’t understand how the code can create a Bubble at entities[5-1] without potentially replacing the fish (about 80% of the time, when the fish doesn’t move up or down).