I have some code at the end-of-game menu that shows the player random puzzles they missed.

At the beginning, the game picks 1 of 5 obstacles from each pod and dumps them in the puzzle room. A command in the end menu will show the obstacles the player missed.

Now my current code works, but there is a lot of duplication in the “show seeds rule”.

```
a picaro is a kind of person. a picaro has a number called pod-ord. a picaro has a number called pod-num.
a pickup-line is a kind of thing. a pickup-line has a number called pod-ord. a pickup-line has a number called pod-num.
global-ord is a number that varies.
definition: a thing (called th) is current-list:
if pod-num of th is global-pod-num, yes;
no;
this is the show seeds rule:
now global-pod-num is 1;
say "Here is a complete list of randomizations with no spoilers. Ones you encountered this play-through are in [b]BOLD[r].";
say "Here are the pods for Rodney's prosaic picaros:[line break]";
while number of current-list picaros > 0:
say "You will see one of pod [global-ord] at random: [list of current-list picaros].";
increment global-pod-num;
now global-pod-num is 1;
say "Here are the pods for the parleys splayer players['] pickup lines:[line break]";
while number of current-list pickup-lines > 0:
say "You will see one pickup line from pod [global-pod-num] at random: [list of current-list pickup-lines].";
increment global-pod-num;
```

This works, but the code feels bloated, and I feel like I’m missing some major concepts.

First, I was unable to get something like

```
to list-picaros:
let current-num be 1;
while number of picaros with pod-num of current-num > 0:
say "One of [list of picaros with pod-num of current-num].";
increment current-num;
to list-lines:
let current-num be 1;
while number of pickup-lines with pod-num of current-num > 0:
say "One of [list of pickup-lines with pod-num of current-num].";
increment current-num;
```

To compile. That is why I have the definition and the global-pod-num.

I was also hoping for pseudocode that could work on both the picaros and pickup lines.

```
to pod-list (ty - a type of thing):
let current-num be 1:
while number of (things of type ty) with pod-num of current-num > 0:
say "One of [list of picaros with pod-num of current-num].";
increment current-num;
this is the show-seeds rule:
pod-list picaros;
pod-list pickup-lines;
```

Thus I could just **pod-list picaros; pod-list pickup-lines;** and have some pretty nice code.

Is there a way to do better than what I did?