Inspiration
As a mahjong player, I can keep track of the tiles everyone has so that I know if they are going to win or not.
As a mahjong player, I can update the game's remaining tiles has so that I can better plan out my winning strategy.
As a blackjack player, I can calculate the probability my current hand will win so that I can win chips.
As a blackjack player, I can update the game's state so that I can get an accurate probability of my chance of winning given my current hand.
What it does
The telegram bot is built to help the player for 2 games - mahjong and blackjack.
In mahjong, the bot serves as a companion to help the user keep track of the game's state so that users do not have to actively remember the opponent's deck. This is inspired from Don Norman's approach to leave knowledge in the world as opposed to in the head.
In blackjack, the bot serves to keep track of the game's state and also calculates the probability of the player winning.
How we built it
Python and Telegram bot. Pair programming
Challenges we ran into
The main issue we had was to understand the issues faced and formulate a problem statement that serves a value to the user. What we realised was that we spent a long time deliberating over the sort of information to be displayed etc and only the hackathon period to code up the solution. Below are some technical issues we faced:
Mahjong: due to the different commands we had, we faced many bugs and it was very hard to anticipate what users might input that could break the app. Mahjong also has many tile types and their corresponding rulesets along with them. Many problems are also overlapping in nature, eg you can pong and gang a certain set of tiles, so we had to do a lot of checking to ensure that the rules were conformed to and the tabulation are correct.
Blackjack: the main issue we faced was with probability and statistics calculation due to the nature of the game being dependent on the house's hand. Another issue we faced was with state management and interpretation of inputs due to non-conformity of data eg "C9" is of length 2 while "C10" is of length 3, and "CJ" has a non-integer as the 1st index char.
Accomplishments that we're proud of
Having been able to scope out a problem where our solution is one where we believe many others can and will use, especially since the games are played commonly during festive periods.
What we learned
It is very hard to formulate real world problems into a programmable solution. But we enjoyed it, especially since we think it is a socially useful hack!
What's next for Legal Game Companion
We would like to be able to include more commonly played games into our repertoire of games :)
Log in or sign up for Devpost to join the conversation.