第13步:让我们完成游戏中最后三个组合!

  • 再添加三次 if and 。在每个 if 语句中测试玩家是否选择 "scissors" 而计算机选择 "rock"、"paper""scissors"
  • 向每个 if 语句添加 Set Text 。将字符串更改为 "Computer wins!""Player wins!""Tie game!" ,具体取决于谁获胜。

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)