You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement a basic framework for handling IRC games in the bot.
I was thinking that we probably want to handle game-related commands separately from other CommandHandlers. I was thinking have a GameHandler that acts as an intermediary CommandHandler between the bot and the various game packages, and is a per-channel CommandHandler.
Basic sketch:
When no games are being played, GameHandler provides a ?play command that takes the name of the game to be played as an argument.
Now, with a game selected but not yet started, GameHandler hands control of game setup to the appropriate game classes, but allows the selected game to be changed too - i.e., proxying the commands of the game's CommandHandler, but also still responding to the ?play command.
Once the game setup is completed and it starts, the game classes signal GameHandler that the game is now properly in progress, and prevents the game from being switched - at this point, the game is under control of game class entirely, and GameHandler proxies everything to the game class's commandhandler.
When the game is over, the game class signals this to GameHandler; return to 1.
Oh, and maybe for commands to be passed through to the games' CommandHandlers, use a different trigger to prevent conflicts with the bot's primary commands?
Worth noting that this architecture may be obsolete or require changes in the post-PircBotX era (no guarantees either way; the PircBotX replacement is still in prototyping)
Right, but since there's no timeframe for replacing PircBotX, I'd say we might as well implement this now so we can get started on the games, and cross the post-PircBotX bridge when we get to it.
Implement a basic framework for handling IRC games in the bot.
I was thinking that we probably want to handle game-related commands separately from other CommandHandlers. I was thinking have a GameHandler that acts as an intermediary CommandHandler between the bot and the various game packages, and is a per-channel CommandHandler.
Basic sketch:
Blocks #10, #20, and #21
The text was updated successfully, but these errors were encountered: