小编sho*_*e_i的帖子

比较数组中的内容

如何在ruby中比较数组中的值?

我想比较数组中的值来检查数组的最大值.

ruby arrays

1
推荐指数
1
解决办法
99
查看次数

Inform7:如何在inform7中的特定环境中创建随机机会事件?

我想在我的Inform7游戏中创建一个功能:

当玩家决定通过向北走过人行横道时,叙述者会第一次向玩家表明玩家有可能死亡,如果玩家再次向北走,那么事件就会发生并且在一次成功的偶数中,玩家可以去花园.像这样:

        Instead of going north in the road for the second time when a random chance of 1 in 2 succeeds:
        say "Yay! You made it!";
        now the player is in the Garden.

        otherwise:
        say "The car crashed you instantly - without any hope, you lost your whole strength in your body…";
        end the game in death.
Run Code Online (Sandbox Code Playgroud)

是的,这段代码不起作用..任何人都可以帮我弄清楚如何使这项工作?

random inform7

1
推荐指数
1
解决办法
298
查看次数

标签 统计

arrays ×1

inform7 ×1

random ×1

ruby ×1