我想通过特定的门来限制一些东西。所以椅子太大/太重,无法携带,但在大多数情况下可以通过房间推到房间。除了门很窄。我可以成功地编写特定的代码来处理特定的情况,但我想要处理这个问题,所以我可以拥有一些笨重的东西和狭窄的门。
以下代码在功能上有效,但第二个名词最终“无”。我想在旅行方向上使用门的名称来回应“推椅子”,并传达“椅子太大而不能穿过裂缝”的信息。任何想法我做错了或其他方式这样做?
A thing can be bulky. A thing is usually not bulky.
A bulky thing is usually pushable between rooms.
A door can be narrow. A door is usually not narrow.
A bulky, enterable supporter called the chair is in room1.
There is a narrow door called the crack. It is south of room1.
Before going with a bulky thing through a narrow door:
say "[The noun] is way too bulky to fit through [the second noun]." instead;
答案 0 :(得分:0)
您可以在规则前言中命名,并使用这些名称在规则中打印它们。
Before going with a bulky thing (called the cargo) through a narrow door (called the obstacle):
say "[The cargo] is way too bulky to fit through [the obstacle]." instead.