Skip to content

EricluvPython/Fight-the-professor

Repository files navigation

Fight the landlord!

Version

V1.2b - beautified UI, added more comments in code

Description

This is a 3-player online card game developed using python, with dependency on Professor Saquib Razak's chat server.
The game rules are identical to those of the famous Chinese card game Dou Di Zhu (斗地主), for more details please check Wikipedia.
In short, the rules can be summarized as: students rebel their professor and professor oppresses their students, with no hint to Marxism whatsoever.
The two students are in a team against the one professor in game. Whichever team has a first player that plays all of their handcards win.
What cards you can play depends on the previous card play. For this part please refer to Wikipedia.

How to play it?

Ofc the first thing is to familiarize youself with the basic rules of the game. This is important for you to enjoy the game!
Clone this repository, then find two of your friends that are on the chat server to also clone it.
Decide on who's the host of the game, and the other two as participants.
Both the host and the clients would open and run the main.py file and choose Multiplayer mode.
The host needs to log in to the server with username and password, and then select the names of the other two players to start a game with.
The other two players simply needs to login with username and password.
And you've got a chance to be or not to be a professor!

If you don't like playing with humans (which is sometimes an excuse for not having friends), you could fight 2 AIs!
To play with AI, open and run the main.py file and select Single Player mode. And have fun!

Any issues playing it?

Please report any bugs and suggestions to me at ericgao@cmu.edu. And please enjoy!

Disclaimer

This is an academic project. Do not copy, plagerize or use any part of the project without consent.
Game rules are directly taken from Dou Di Zhu (斗地主) gameplay in China, with some regional rules implemented.
Deck images used are from https://code.google.com/archive/p/vector-playing-cards/, with respect of its public distribution and open-source liscence.
Professor faces are used with their consent (hopefully).
Part of the code are inspired by Douzero: https://github.com/kwai/DouZero

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages