feliperenan / truco Goto Github PK
View Code? Open in Web Editor NEWTruco paulista implemented in Elixir :)
Truco paulista implemented in Elixir :)
Once a message has been received from Telegram through Webhooks, it can be processed async. Besides answering the telegram right away that the app received the message, this approach will avoid telegram to re-send the message in case this telegram_bot
crashes for any reason (which is happening today).
For now, if the app crashes, we don't need to worry if the telegram message is going to be lost since it can be sent again by the User.
https://github.com/feliperenan/truco/blob/master/apps/telegram_bot/lib/telegram_bot/endpoint.ex#L50
This command is supposed to info such as: score, players info, and so on...
Currently it is not possible to play this game on multiple group simultaneously because I could not figure out a good way of doing so with inline queries yet.
The main issue is that we can't get the chat_id
when a inline query
is sent by the User so we can't say which games the user belongs to. For now, since I added this limitation on telegram bot that one user will be in just one game, from its ID I'm able to find which game he is associated to.
Keep in mind this is a Telegram bot limitation, in other words, the game engine is ready for this feature, I just need to figure out how to do so on telegram chat with inline queries.
When a match is finished, it does not matter who won or not that match, the next player is always the one in the right from The Who started the previous match in clockwise.
Player might want to run away from a game in case their cards does not look good for them. In that case, the are giving up about that match giving one point to the another team.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.