def suiji():
user = int(input("猜电脑输入的数为多少:"))
computer = random.randint(1, 100)
# 猜测次数
i = 1
# """将user与computer比较,告诉user猜大了还是猜小了"""
while user != computer:
if user computer and user != 0:
user = int(input
zz
通过Haskell文件定义文字冒险的框架。 通过组合功能进行演奏,而不是猜测短语。
其中包括两个小示例游戏, games/castle和games/maze 。 一个示例游戏的播放方式如下:
$ stack run hyzzy games/castle
A toy text adventure where commands have Haskell types.
Type ":help" to view the meta-commands.
> look
You stand i