(RPSSL)=
# Rock paper scissors Spock lizard

You must have played Rock paper scissors in your childhood. In this problem, we will implement a variation with Spock and lizard shapes which we refer to as *RPSSL*.

:::{commons-figure} https://commons.wikimedia.org/wiki/File:Roshambo-Laos.jpg
:figwidth: 30%
:align: right
Children in Laos playing rock paper scissors
:::

RPSSL shapes are resolved as in {numref}`rpssl-resolution`.

:::{commons-figure} https://commons.wikimedia.org/wiki/File:Pierre_ciseaux_feuille_l%C3%A9zard_spock_aligned.svg
:figwidth: 30%
:align: right
:name: rpssl-resolution
RPSSL resolution diagram. ️`a->b` means `a` wins against `b`.
:::

Example run:

```text
Welcome to 🪨  ✂️  🗒️  🖖  🦎 !
(s) Single player
(e) Exit
Select an item: s
Starting game 🎉

Select a shape:
0🪨  || 1🦎  || 2✂️  || 3🗒️  || 4🖖 : 90
❌ Shape key 9 does not exist. Try again.

Select a shape:
0🪨  || 1🦎  || 2✂️  || 3🗒️  || 4🖖 : 0
Agent: 2
👫:🤖  1:0

Select a shape:
0🪨  || 1🦎  || 2✂️  || 3🗒️  || 4🖖 : 2
Agent: 2
👫:🤖  1:0

Select a shape:
0🪨  || 1🦎  || 2✂️  || 3🗒️  || 4🖖 : 0
Agent: 4
👫:🤖  1:1

...

Select a shape:
0🪨  || 1🦎  || 2✂️  || 3🗒️  || 4🖖 : 1
Agent: 0
👫:🤖  2:5
🤖 Agent won!
```

Expectations:
- has an entry menu
- the agent can play randomly
- shows score after each shape comparison
- can handle wrong input both in the menu and gameplay, e.g., by showing an error message
  - in case you know `EOF`: you don't have to handle it
- if a player reaches the `WINNING_SCORE`
  - then this player wins
  - the program exits.
<!-- otherwise we have to put the game logic into a function to to able to integrate it into the switch statement, but we did not introduce functions-->

:::{important}
Applies to all problems: you may override expectations and be creative, as long as your design decisions make sense to you and you can explain it.
:::

:::{activity} Flowchart v1 – overview
:label: rpssl-flowchart-overview
Draw a flowchart for the problem. First focus on the menu and leave the details of a *game round* (until someone wins) out. In other words, represent a game round with a single process.
:::

:::{activity} Needed language syntax
Break the flowchart down into language components. Which syntax from C can we use?
:::