1

我有很多东西我想限制通过特定的门安装。所以椅子太大/太重而无法携带,但在大多数情况下可以推着穿过一个房间到另一个房间。除非门很窄。我可能可以成功编写特定代码来处理特定情况,但我想通用地处理这个问题,这样我就可以拥有许多笨重的东西和狭窄的门。

以下代码在功能上有效,但是第二个名词以“无”结尾。我想使用行进方向的门名称来响应“push chair s”,并显示“椅子太笨重,无法穿过裂缝”。有什么想法我做错了什么或其他方式吗?

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;
4

1 回答 1

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.
于 2015-10-26T19:47:51.293 回答