kakegurui

Kakegurui Anime: Indian Poker

Kakegurui Indian Poker Game In Python

The gambling addict Anime Kakegurui is one of the most thrilling and entertaining shows to binge in a day. The gamble fetish Jabami Yumeko joins Hyakkaou Private Academy. Hyakkaou Private Academy where students are evaluated based on their gambling skills. Kakegurui Indian Poker Game a.k.a Debt Swapping Game is one of the most bewitching game in this series. Typical Anime fans remember it as Saotome Mary’s Baka Scene. 

Everything about this Anime is crazy, especially the epicness of Voice Actors. The Voice Actors Of Kakegurui Cast have done a terrific job. There are only a few Animes, where we get to witness voice actors go all out. And Kakegurui is one such kind.

Kakegurui Indian Poker

Gambling is the main culture of Hyakkaou Pirate Academy. Due to this considerable students end up with unpayable debt. The student council gives a golden opportunity to them to pay their debt by settling it in a game. Indian Poker is a game played to settle debt. The event or game is named “Debt Swapping Game”. This may be a golden opportunity for a few players but not for everyone. The game is played by a group of 4 to 5 members. The members are to report their respective debts before starting the game. After the end of the game, The player that ranks first swaps his debt with the lowest debt in that group. And if in case the first player itself has the lowest debt then the student council pays off the entire debt. The second player swaps the second lowest and so on. 

We will implement this game in Python, and here are the rules…

Game Rules

kakegurui_mary_yumeko

Rules of this game is very simple:

Each group of 4 plays with a Deck of 40 cards instead of 52, with all the face cards and joker removed. The dealer will pass out 2 cards to each player. . Initially, 10 chips are provided to each player, which adds up to the total of their debt. If you do the calculation, each chip costs 1/10 of the players’ debt, so it is not like a normal poker where the actual sum matters. The game will be played for 10 Rounds, each player needs to pay at least one chip in each round to participate. Furthermore, players may only bet up to 5 chips at once. Players can fold when they are not willing to bet.

The strongest hand is Pair, where the number match. Up next is Suit, where the club match. And the weakest is the pig, where there is no similarity in the cards. In case multiplayer players have the same hand then the winner is decided by the highest sum of the cards

Also Play: Bungo Stray Dogs Game

Python Code For Kakegurui Indian Poker

This article presumes you have some Python knowledge, if not learn Python with Anime Vyuh. A weeb will find it very easy to follow up with Anime Vyuh Python Series, trust me it is super easy.

Prerequisites Required:

Ok, since we will implement the above rules in Python, there are a few changeovers done in the rule. Instead of 4 or 5 players, this code is programmed only for 2 players i.e., you and the computer. Programming it for 4 to 5 players is no nig deal but since it is command-line Python Code, 1 player vs Computer is the most preferable. Ok moving on to the next modification. There is no debt imposed on the player, instead, chips are at stake. Players compete with computers starting with 20 chips. A Match fee of 1 chip is collected after every round. Once the fee is collected, the player is supposed to bet in a range of 1-5. And 0 is to Show or Fold when you are not willing to bet. 

Use a variable total_chips_won to add up the bet of both player and computer before showing. And later add it to chips of the Round winner.

Also Play: Anime Hangman

Python Termcolor Library

Adding feedback messages is very important in this game. Without feedback executing statements it is impossible to follow up this game. Here is where Termcolor Python Library Comes Into Play. 

Termcolor provides better execution statements by enabling us to choose a color for Python print statements. It is one of the coolest Python module to try out. It is super simple to implement. 

Syntax:
termcolor.cprint("Message","color")

Example:
import termcolor
termcolor.cprint("Anime Vyuh","red") 

And make good use of Escape Characters for the good structure of the output. And Time Module to add a delay after every Round. Moreover, we have used the Pygame module to play the famous Yumeko dialogue, which she says before gambling.

pygame.mixer.music.load(dialog_path)
pygame.mixer.music.play(loops=1)
#play only one time

To add delay in between the execution statement use the time module.

import time
time.sleep(2) #2 seconds delay

The Rest of the rules remain the same. This game will have 10 Rounds, to participate one chip is collected in each round. The one having more chips at the end wins. Is it you or a computer, it’s finally time to check it out.

Conclusion

Kakegurui Indian Poker sounds easy to implement in Python. But still, it cracks your head in figuring out every possibility. Leaving Skilled CP programmers aside as they are exceptions. And yes sorry to keep you waiting till the end, only if you read the entire article. Well explaining the Rules was necessary.

Non Programmers, You can play the game here. Programmers can get the source code on GitHub.

Be a part of our Newsletter to stay tuned.

Subscribe to Anime Vyuh.

If you like the game or Anime Vyuh Contents, Support Us by Buying A Coffee.