adjust README: easier setup of DB

This commit is contained in:
Maximilian Keßler 2023-08-02 11:50:08 +02:00
parent fb3f25b890
commit a85504cc1c
Signed by: max
GPG Key ID: BCC5A619923C0BA5
3 changed files with 8 additions and 3 deletions

View File

@ -63,10 +63,8 @@ Create a new database and user, for example:
```
$ sudo -iu postgres
$ psql
# CREATE DATABASE "hanab-live";
# \c hanab-live
# CREATE USER hanabi WITH PASSWORD 'Insert password here';
# ALTER DATABASE "hanab-live" OWNER TO hanabi;
# CREATE DATABASE "hanab-live" with owner "hanabi";
```
Put the connection parameters in a config file (for the format, see `example_config.yaml`).
This should be located at your system default for the application `hanabi-suite`,

View File

@ -287,6 +287,12 @@ class GameState:
# Utilities
def is_playable(self, card: DeckCard):
return self.stacks[card.suitIndex] + 1 == card.rank
def is_trash(self, card: DeckCard):
return self.stacks[card.suitIndex] >= card.rank
def holding_players(self, card):
for (player, hand) in enumerate(self.hands):
if card in hand:

View File

@ -10,3 +10,4 @@ verboselogs
pebble
platformdirs
PyYAML
cython==0.29.36