|
|
Pick All Flowers ActivitySolving a problem systematicallyStatement of the ProblemDownload the source filesTom and Tammy are in love, and today�s the day that Tom is going to propose. According to custom, Tom must present Tammy with a flower as an official sign of his intentions. Tom lives in the extreme northwest corner of the island, and Tammy lives in the extreme northeast corner. The dividing river runs north and south, dividing the island roughly in the middle; the river is at least 5 cells away from the western and eastern edges of the island. The river, itself, is exactly two cells wide. Fortunately, for the lovers, there is a bridge somewhere to the south of their homes. Tom has asked Tammy to meet him at the middle of the bridge. While she suspects his motives, she doesn�t want to appear too anxious. The purpose of this program is to have Tom and Tammy find the bridge and meet in the middle where Tom will give an engagement flower to Tammy. After he has given her the flower, each returns to its home and faces the home of its betrothed. Each Jeroo starts at its home, Tom at (0,0) and Tammy at (0,23). Each can start facing any direction. Tom starts with one special flower in his pouch. A representative starting layout is shown in figure 1. |