ANSWER TO EXERCISE 3 | |
Briefly: provide a GamePreRoutine which tests to see if second is an object, rather than nothing or a number. If it is, check whether the object has a second_before rule (i.e. test the condition (object provides second_before)). If it has, send the second_before message to it, and return the reply as the return value from GamePreRoutine. |