fix reveal role

This commit is contained in:
Alberto Xamin 2020-12-16 20:29:25 +01:00
parent d4bee9c3f2
commit d3bf18c9a2
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
4 changed files with 9 additions and 1 deletions

View File

@ -5,6 +5,8 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: '1'
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Build the Unified Docker image - name: Build the Unified Docker image

View File

@ -5,6 +5,8 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: '1'
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Build the Unified Docker image - name: Build the Unified Docker image

View File

@ -4,6 +4,8 @@ on:
jobs: jobs:
test_build: test_build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: '1'
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Build the Unified Docker image - name: Build the Unified Docker image

View File

@ -90,7 +90,9 @@ class Game:
for k in range(self.players[i].max_lives): for k in range(self.players[i].max_lives):
self.players[i].hand.append(self.deck.draw()) self.players[i].hand.append(self.deck.draw())
self.players[i].notify_self() self.players[i].notify_self()
self.sio.emit('chat_message', room=self.name, data=f'_allroles|{", ".join([type(x.role).__name__ for x in self.players])}') current_roles = [type(x.role).__name__ for x in self.players]
current_roles = {x:current_roles.count(x) for x in current_roles}
self.sio.emit('chat_message', room=self.name, data=f'_allroles|{current_roles}')
self.players[self.turn].play_turn() self.players[self.turn].play_turn()
def choose_characters(self): def choose_characters(self):