zulip / python-zulip-api

Python library for the Zulip API.
https://zulip.com/api/
Apache License 2.0
362 stars 364 forks source link

Consolidate game-playing bots #283

Open showell opened 6 years ago

showell commented 6 years ago

We have at least three bots related to two-player games: chess, tictactoe, connectfour.

We should try to consolidate some of the code related to two-player games, so that it's easy to create future two-player games without duplicating logic for inviting players to games, managing message flow, etc., that is really the same for all two-player games, apart from small details that could be delegated to game-specific classes.

The best example we have so far in terms of high level design is the connect-four game. The connect-four game is nice, too, because it's pretty moderate in terms of programming difficulty and fun to play.

The connect-four game has two flaws that I know of:

If you take this ticket, you'll want to discuss ideas on the "integrations" stream.

fremiller commented 6 years ago

@zulipbot claim

zulipbot commented 6 years ago

Welcome to Zulip, @fredfishgames! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

fremiller commented 6 years ago

@zulipbot claim

fremiller commented 6 years ago
showell commented 6 years ago

As I mentioned on chat, I'm eager to get some of this PR merged, and we can create a few split-out issues for some of the remaining items:

@fredfishgames If you can get this PR to a stable state, we'll merge it even if there a few loose ends, and you can create follow up issues and assign them to yourself. It would be great to try to get another dev to port your stuff either to chess/merel or a new game as a way to get some feedback on the internals.

zulipbot commented 6 years ago

Hello @fredfishgames, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days.

You can reclaim this issue or claim any other issue by commenting @zulipbot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

amanagr commented 6 years ago

After working on #324, I identified these issues with game_handler:

showell commented 6 years ago

@amanagr How hard do you think it would be to make the GameHandler for multi-player games?

amanagr commented 6 years ago

I am working on it, will update in 2-3 days.

neiljp commented 6 years ago

@amanagr Did you make any progress on this?

amanagr commented 6 years ago

Yeah! #324 (Port Merels) and #325(Playing the game with a range of players) are already merged. Maybe I can work more on it after Summer. @showell we should update this comment.