cjsaylor / chessbot

Slack bot for playing chess.
https://www.chris-saylor.com/chessbot/
MIT License
35 stars 4 forks source link

Implement setting for takeback timeout or mutually agreed takeback #52

Closed geebioso closed 4 years ago

geebioso commented 4 years ago

Is your feature request related to a problem? Please describe. I'm frustrated that if I don't realize I made a mistake within a minute I can't take back a move even when the person I'm playing against agrees that I should be able to take it back.

Describe the solution you'd like Either a) a mechanic where if I can take back a move if both my opponent and I agree it can be taken back (e.g, I say @chessbot takeback and if my opponent agrees he says @chessbot allow, or something similar) or b) a setting where you can change the take back time from 0 to anytime before the next player makes a move

Additional context That's it! Thanks for programming the app. It's great!

cjsaylor commented 4 years ago

@geebioso Agreed, the current implementation of the take back was a simple stop-gap for a more robust solution.

I plan on making the take back request that occur after that initial 1 minute threshold go through a workflow that is similar to the challenge a player workflow. An ephemeral private message will be sent to the other player with a choice to accept or reject the take back request. The complicated part is if I can get the message to only appear to the other player within the thread, or just display it for everyone and reject input from the player requesting the take back.

An additional complication will be if the other player ignores the message and makes a move, I will need to delete/dismiss the option to accept the take back move from prior to the player's move.

I will see if I can get something going for that in the next couple of weeks.

cjsaylor commented 4 years ago

The solution to this could also be used in #25

geebioso commented 4 years ago

Great to hear you're developing on this feature! Thanks for all the work you've put in.

The draw idea is a good add as well!

cjsaylor commented 4 years ago

After looking at this, I think the solution outlined above with an interface to request the take back wouldn't replace the timed take back, it would just be the interface to do so after the initial immediate take back time limit has expired.

cjsaylor commented 4 years ago

@geebioso This is now live, you can now request a take back after the 1 minute threshold has expired.

geebioso commented 4 years ago

@cjsaylor That's awesome. Thank you!