Rock, paper, scissors

Hello! I am trying to make a “rock, paper, scissors” game with Harlowe 2.1.0. There are many examples to do this in javascript but I’m not sure how to implement this. Can somebody help me? (It is my first post here, I hope to do well. Thank you very much!)

Twine Version: Twine 2
Story Format: Harlowe 2.1.0

1 Like

(set: $a to (shuffled: “rock”,“paper”,“scissors”))

(link: “Rock”)[(if: 1st of $a is “paper”)[You lost.]

(else-if: 1st of $a is “rock”)[You drew.]

(else-if: 1st of $a is “scissors”)[You won]]

(link: “Paper”)[(if: 1st of $a is “paper”)[You drew.]

(else-if: 1st of $a is “rock”)[You won.]

(else-if: 1st of $a is “scissors”)[You lost.]]

(link: “scissors”)[(if: 1st of $a is “paper”)[You won.]

(else-if: 1st of $a is “rock”)[You lost.]

(else-if: 1st of $a is “scissors”)[You drew]]

1 Like