I think so–this takes a bit more trickery because we can’t just repeat through the cards, but we can assign places to the cards when we redraw and then use those places to list them (or dashes, if there’s nothing in the place).
A card has a number called the hand order. Carry out redrawing: now every card is in the discard; now every card is unwritten; repeat with N running from 1 to the focus of the player: if there is a card (called the draw) in the discard: initialize the draw; now the player has the draw; now the hand order of the draw is N; [new!] otherwise: say "The discard has been exhausted."; break. [this stops the loop so the message doesn't repeat--not that it should be possible to get here anyway!]
Ordering relates a card (called X) to a number (called Y) when the hand order of X is Y. The verb to be ordered in means the ordering relation. To say abbreviated description of the player's hand: repeat with index running from 1 to the focus of the player: if the player has a card (called flop) that is ordered in the index: say "[rank of flop as an abbreviated card name] [abbreviation of suit of flop] "; otherwise: say "-- ".
I feel like there should be some less roundabout way to check whether the player has a card with hand order index other than by defining a new relation, but I couldn’t think of one.
Oh OK! I get the logic now–I think there was some trickery with the command prompt that was confusing me, but that might be due to my changes too.
Also I think my “every turn” logic isn’t quite working. Probably what would work better than “every turn” is to put the check for whether you beat the spider in the carry out playing rules, and maybe change the report playing rules to report whether the spider is defeated.
Yes, adding an adjective to things to prevent disambiguation loops is very useful!
I see, that’s where I introduced the bug!