I absolutely agree that the time required to implement this would vastly outweigh the purported benefit. I expect this would be used by very few people in very few cases.
A majority of the effort wouldn't even be the interface. This is generally what would be required to implement this suggestion on a single game:
Front End
A majority of the effort wouldn't even be the interface. This is generally what would be required to implement this suggestion on a single game:
Front End
- Create an unintrusive interface that allows you to describe the move taken by the other player and the move you would take in response.
- Create a new action (event handlers, ajax call, etc) that communicates the intended condition and response to the server.
- Create a new database table to store conditions and responses, along with a series of functions to receive conditional action registrations and clear the table on every turn. Since the condition and response will probably be passed as strings and added to the table, it will be necessary to protect against SQL injections as mentioned by Jest Phulin, even if you are not writing the strings directly.
- Add to the upgradeTableDb function to preserve existing tables.
- Every "Active Player" state would have to become a "Multiple Active Player" state in order to properly allow the other player to take the action to register a conditional move on another player's turn. This would require refactoring every single state and action in the game.