Go to file
En Yi 8726f09a91 Polishing 2019-06-15 18:12:37 +01:00
ai_comp Move around stuff 2019-06-15 15:26:13 +01:00
resource Fix card backimage outline 2019-06-05 21:42:48 +01:00
seeds Finish up Vbot play 2019-06-14 18:48:50 +01:00
.gitignore Add README and example rng seed 2019-06-05 13:58:42 +01:00
README.md Polishing 2019-06-15 18:12:37 +01:00
UI.py Fix mouse click and UI bug 2019-06-15 17:02:31 +01:00
cards.py Fix mouse click and UI bug 2019-06-15 17:02:31 +01:00
game.py Allow legacy terminal play 2019-06-15 12:40:43 +01:00
game_consts.py Add declarer and partner label, fix first bid display 2019-06-15 01:02:49 +01:00
main.py Fix mouse click and UI bug 2019-06-15 17:02:31 +01:00
players.py Fix mouse click and UI bug 2019-06-15 17:02:31 +01:00
requirements.txt First commit 2019-05-04 11:45:21 +01:00
table.py Put back error messages 2019-06-15 17:10:03 +01:00
view.py Block mouse motions in pygame event grabbing 2019-06-13 11:45:25 +01:00

README.md

SingBridge

A python implementation of the Floating Bridge Card game using PyGame.

Requirements

Python 3.6, pygame, signalslot

Installation

  1. Clone this repository
  2. Make a virtual environment (optional but recommended). Remember to activate it.
  3. Install the required packages from requirements.txt: pip install -r requirements.txt
  4. Run main.py: python main.py

Run Options

When running main.py, you can give options:

python main.py [options]

3 options are availables:

  • -a or --autoplay: To run the game with all bots
  • -va or --view-all: All player cards are revealed
  • -s or --seed followed by a file path: To run the game with a specified RNG seed
  • -t or --terminal: To play with legacy terminal inputting

An example command:

python main.py -a -s ./seeds/low_point_hand.rng

This command runs the game with all bots and a seed from ./seeds/low_point_hand.rng

Controls

The p key has to be pressed to begin the game. During the game, a panel will pop up for you to input the bid and call you partner, in which the list is scrollable. To play a card, double click on a card in your hand.

If you are using the legacy terminal inputting option, all inputs are done through the terminal. Instructions on the input format should appear in the terminal.

When closing the game, please be a bit patient. It should close within a second or two. You may also close it via Keyboard Interrupt (i.e. Ctrl+c) in the terminal.

Bugs and Suggestions

Please report any bugs, specifying how the bug can be recreated. The more specific it is, the better.

Suggestions for improvements are welcomed.