ANSWER TO EXERCISE 4 | |
Put any validation rules desired into the GamePreRoutine. For example, the following will filter out any stray Drop actions for unheld objects: [ GamePreRoutine; if (action==Drop && noun notin player) "You aren't holding ", (the) noun, "."; rfalse; ]; |