@MisterBoring said in Code Question: Rock, Paper, Scissors:
You do have a point about RPS strategy that I hadnât considered, so perhaps having the command be a bit more interactive so that each player inputs their choice.
If it only ever runs one game at a time, you can run it so you rps <choice> and it creates a data attribute on an object. If youâre the first player, it stores your data and emits something about âwaiting for 2nd playerâŚâ
If it already has one DATA-* attribute, then it knows youâre the second player, and it resolves the match, emits the resolution, and wipes the data.
If it already has two DATA-* attributes, then it is broken. đ