?> Put a on c and c on b. --------- | | | a | | | --------- --------- | | | b | | | --------- --------- | | | c | | | --------- ================================= Fig. 8.3
The reader is advised to load the Prolog code for this section, and to try typing in various inputs, using the idioms of Section 7.3.
The graphics animator is quite similar to that in the Section 8.2, and will not be discussed in detail. See the Prolog code for the specifications.
The exercises ask the reader to add various command or question idioms to the animator.
Exercise 8.3.1 Incorporate the question idiom of Exercise 7.3.1.
Exercise 8.3.2 Incorporate the question idiom of Exercise 7.3.2.
Exercise 8.3.3 Incorporate the question idiom of Exercise 7.3.3.
Exercise 8.3.4 Devise a way to add explanations to the blocks mover of this section so that when the user ask for a rearrangement that is invalid, and is told that the task cannot be completed, then if asked "Why?", the system gives an explanation of why the user's request cannot be carried out.