zulip / python-zulip-api

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

[WIP] bots: Create trivia_quiz_game bot #565

Open fremiller opened 4 years ago

fremiller commented 4 years ago

This is a trivia bot, but formatted like a competitive game instead of individual questions

fremiller commented 4 years ago

I have done the bot, I just need to rewrite the tests

fremiller commented 4 years ago

I've made some changes to game_handler

  1. Player colours / tokens are not required for a game
  2. A game "board" can include widget_content. This is done by returning (str, str) instead of str in parse_board
  3. move_data has been added. This is an extra parameter to alert_move_message which contains data returned by make_move
  4. Exceptions which occur in a game instance are now caught separately and cause the game to end

I haven't gotten onto writing the tests yet. I just switched my development environment from wsl to windows, which has made everything way faster (tests & autocompletion took forever on wsl)

zulipbot commented 4 years ago

Heads up @fishfred, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/master branch and resolve your pull request's merge conflicts accordingly.

showell commented 4 years ago

@fishfred Sorry I haven't gotten around to merging this--I just haven't found time to test it out yet. Can you rebase to deal with the conflicts here?

fremiller commented 4 years ago

@showell No worries, there are a few changes I still want to make, I just have to finish off some projects for university so I haven't had time to. I will hopefully get some time to finish this weekend

showell commented 3 years ago

@fishfred Hope all is well! I am just pinging you on this, since this got blocked a while ago by you getting busy with university stuff. My timing is off, but I am wondering if you have time to work this again?

fremiller commented 3 years ago

Yeah, I've still got a couple of weeks until term starts so I can work on it

fremiller commented 3 years ago

There are some things in game_handler which I think could be better so I might refactor that quickly before continuing work on this

fremiller commented 3 years ago

Ah I might do that after as it would make the PR quite confusing. There shouldn't need to be any changes to bots so I may as well just do it after.

showell commented 3 years ago

Sounds good, have fun!

PIG208 commented 3 years ago

@fishfred Are you still wishing to work on this and do a rebase?

fremiller commented 3 years ago

@PIG208 I'd have enough time to just do a rebase, but I don't have enough time if the PR needs more work than that I'll clone it again and take a look

fremiller commented 3 years ago

@PIG208 Sorry I tried working on this a week ago but I don't have enough time to continue working on it right now

showell commented 3 years ago

No worries, @fishfred! Thanks for taking a look at it.

zulipbot commented 3 years ago

Heads up @fremiller, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/main branch and resolve your pull request's merge conflicts accordingly.