A Telegram bot @setwithfriends_bot that plays the online multiplayer card-matching game Set!
It can join live game lobbies and will play once the game begins!
Set revolves around matching a combination of 3 cards based on 4 features:
- colour (purple, red, green)
- number (1, 2, 3)
- shape (oval, diamond, squiggle)
- shading (solid, outline, striped)
The cards of a set must display features that are either all the same or all different.
Currently deployed on Heroku under the Eco-Dyno
- On start, bot will request for
html
of game lobby. (Timeout after 5 minutes if game does not start) Selenium
library to dynamically scrape javascript elements that control the game.Beautiful Soup 4
library to parse html and process into card information.- Backtracking to generate all combinations of sets of 3 cards from cards shown. Sets are checked after generation based on game rules.
Source codes are available under the MIT License. Developed by Ryan Lau Q. F.
Enjoy playing against it!