SignetStudios / slackbot-uno

MIT License
4 stars 5 forks source link

Make playing a wild more atomic #42

Open kingofzeal opened 7 years ago

kingofzeal commented 7 years ago

Currently, when playing a wild, the 'wild' is played from the hand, and a separate action is required to determine the color of the wild.

During the time between playing the wild and choosing the color, the 'up' card is reported as wild wild or wild draw 4, and normal play checks are not performed (see #38, #37). Additionally, if any other commands are issued by the player in between playing and choosing, it seems to break the interactive messages.

While this works well with a REST-based perspective, it's not ideal because both playing and choosing should be a single atomic action. This should be corrected to be a proper atomic action.

Also by doing this, we get the ability for the player to change their mind (play something else besides a wild).