adjust README: easier setup of DB
This commit is contained in:
parent
fb3f25b890
commit
a85504cc1c
3 changed files with 8 additions and 3 deletions
|
@ -63,10 +63,8 @@ Create a new database and user, for example:
|
||||||
```
|
```
|
||||||
$ sudo -iu postgres
|
$ sudo -iu postgres
|
||||||
$ psql
|
$ psql
|
||||||
# CREATE DATABASE "hanab-live";
|
|
||||||
# \c hanab-live
|
|
||||||
# CREATE USER hanabi WITH PASSWORD 'Insert password here';
|
# 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`).
|
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`,
|
This should be located at your system default for the application `hanabi-suite`,
|
||||||
|
|
|
@ -287,6 +287,12 @@ class GameState:
|
||||||
|
|
||||||
# Utilities
|
# 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):
|
def holding_players(self, card):
|
||||||
for (player, hand) in enumerate(self.hands):
|
for (player, hand) in enumerate(self.hands):
|
||||||
if card in hand:
|
if card in hand:
|
||||||
|
|
|
@ -10,3 +10,4 @@ verboselogs
|
||||||
pebble
|
pebble
|
||||||
platformdirs
|
platformdirs
|
||||||
PyYAML
|
PyYAML
|
||||||
|
cython==0.29.36
|
||||||
|
|
Loading…
Reference in a new issue