Hello, all:
I had this entry in another topic, it was entitled “Honestly, I have no idea how to code this.” Using a bastardization of two responses but it compiles. Anyway, the code is constructed to randomly pick the printed name of a tarot card and two distractor cards. It will print the name of the tarot card correctly but not the two distractors. Instead of listening the three printed names, the room description says “Two of Wands, and two distractor cards.” I can’t figure out why the code isn’t also assigning the printed name of the distractor cards
The correct card is a tarot card that varies.
Definition: A tarot card is incorrect if it is not the correct card.
a distractor is a kind of thing.
when play begins:
assign the next correct card;
The distractor card is a distractor that varies.
tarotcard1 is a tarot card. fortuneteller is carrying tarotcard1.
distractor01 is a distractor. fortuneteller is carrying distractor01.
distractor02 is a distractor. fortuneteller is carrying distractor02.
To assign the next correct card:
let distractor1 be false;
if distractor1 is false:
choose a random row in Table of Distract;
now usedyet entry is true;
now distractor1 is true;
now the printed name of distractor01 is Tarot card entry;
let distractor2 be false;
if distractor2 is false:
choose a random row in Table of Distract;
now usedyet entry is true;
now distractor2 is true;
now the printed name of distractor02 is Tarot card entry;
let cardpicked be false;
repeat through Table of Correct Tarot Cards:
if cardpicked is false:
now usedyet entry is true;
now cardpicked is true;
now the printed name of correct card is card entry;
present a tarot challenge;
if cardpicked is false:
say "'That's all the correct cards, so I guess you win!'";
end the story.
Table of Correct Tarot Cards
usedyet card
false "Two of Wands"
false "Six of Pentacles"
false "The Hanged Man"
false "Five of cups"
false "Eight of swords"
Table of Distract
usedyet Tarot card
false "Two of Wands"
false "Six of Pentacles"
false "The Hanged Man"
false "Five of cups"
false "Eight of swords"
false "Six of swords"