Compare commits

..

1394 Commits
0.1.0b ... main

Author SHA1 Message Date
Alberto Xamin
4d2a222f93
fix replacement 2024-12-30 17:29:30 +01:00
Alberto Xamin
61fa295f8d
Update docker-image.yml 2024-12-30 17:23:51 +01:00
Alberto Xamin
0a2bbce2da
Update docker-image.yml 2024-12-30 17:13:44 +01:00
Alberto Xamin
6bc10f1bff
Update docker-image.yml 2024-12-30 16:16:12 +01:00
Alberto Xamin
123e569010
speedup image compile 2024-12-30 16:10:12 +01:00
Alberto Xamin
b45d04bf30
allow keeping owner 2024-10-29 16:37:04 +00:00
Alberto Xamin
b2b9eac1cd
really fix bandidos 2024-10-29 15:25:31 +00:00
Alberto Xamin
345e04ef06
fix big spencer 2024-10-22 15:43:24 +01:00
Alberto Xamin
2af8e5ec54
fxi bandidos 2024-10-22 15:41:16 +01:00
Alberto Xamin
3642c0dbb5
fix blood brothers desc 2024-10-22 15:37:25 +01:00
Alberto Xamin
86441f92c8
fix tornado 2024-10-22 15:36:44 +01:00
Alberto Xamin
df65a97225
fix disabled cursor 2024-07-03 10:12:14 +01:00
Alberto Xamin
d2bddb9eda
fix broken card descriptions 2024-06-26 14:08:17 +03:00
Alberto Xamin
dd84d91b43
Merge pull request #507 from albertoxamin/train-robbery
add better info screen
2024-06-15 18:59:41 +03:00
Alberto Xamin
bae85b7508
add better info screen 2024-06-15 18:58:06 +03:00
Alberto Xamin
5d0e46f205
Merge pull request #505 from albertoxamin/train-robbery
Add Train robbery expansion
2024-06-14 18:16:09 +03:00
Alberto Xamin
7dab001bb0
fix duello 2024-06-14 18:11:20 +03:00
Alberto Xamin
a474dfbc24
also add new animations 2024-06-14 18:09:24 +03:00
Alberto Xamin
c171739db8
add circus wagon 2024-06-13 15:57:13 +03:00
Alberto Xamin
344b7cc043
add cattletruck 2024-06-13 15:32:52 +03:00
Alberto Xamin
db98f88db0
add localized str 2024-06-13 14:19:15 +03:00
Alberto Xamin
c2b123b482
make it for trains aswell 2024-06-10 17:28:37 +01:00
Alberto Xamin
da7e4834b7
refactor pending action 2024-06-10 17:22:30 +01:00
Alberto Xamin
399645de27
add express car, lumber, mail 2024-06-10 17:02:47 +01:00
Alberto Xamin
beff8151c2
add train robbery cards to help 2024-06-10 14:25:05 +01:00
Alberto Xamin
b72319f335
fix potential bugs 2024-06-10 14:04:06 +01:00
Alberto Xamin
64feee23ae
fix lint 2024-06-08 17:51:38 +01:00
Alberto Xamin
0691780472
fix recursive import 2024-06-08 17:48:02 +01:00
Alberto Xamin
3707b24f8c wip 2024-06-08 17:34:49 +01:00
Alberto Xamin
9d5ac5b166 stations and train info 2024-06-08 17:34:49 +01:00
Alberto Xamin
f716a96334 buy trains 2024-06-08 17:34:49 +01:00
Alberto Xamin
a6029cdb0d tab completion 2024-06-08 17:34:49 +01:00
Alberto Xamin
14534997e8 progress 2024-06-08 17:34:49 +01:00
Alberto Xamin
1ee92afb9a add trains 2024-06-08 17:34:49 +01:00
Alberto Xamin
9e89092090 stations in the deck 2024-06-08 17:34:49 +01:00
Alberto Xamin
ca74f692ec train robbery deck display 2024-06-08 17:34:49 +01:00
Alberto Xamin
9bc1922e76
allow tequila to be played on self always 2024-06-08 15:36:34 +01:00
Alberto Xamin
b4d04d081f
be sure mira does -2 2024-06-08 15:30:59 +01:00
Alberto Xamin
ad5c10249c
Update README.md 2024-06-03 09:10:24 +01:00
Alberto Xamin
689725fe5c
fix ritorno di fiamma con roulette russa 2024-06-02 16:27:32 +01:00
Alberto Xamin
e08c7162a1
fix Mira 2024-06-02 16:24:37 +01:00
Alberto Xamin
72dc942901
fix miniera abbandonata 2024-06-02 16:15:48 +01:00
Alberto Xamin
c9df3d0b78
update cz translation 2024-05-28 10:13:16 +01:00
Alberto Xamin
7071e85f1b
Merge pull request #496 from albertoxamin/dependabot/npm_and_yarn/frontend/vite-4.5.3
Bump vite from 4.5.2 to 4.5.3 in /frontend
2024-05-26 20:06:26 +01:00
Alberto Xamin
1a839db4c8
Merge pull request #497 from albertoxamin/dependabot/pip/backend/eventlet-0.35.2
Bump eventlet from 0.33.3 to 0.35.2 in /backend
2024-05-26 20:06:13 +01:00
Alberto Xamin
3c5300e5da
fix sventagliata 2024-05-26 20:04:46 +01:00
Alberto Xamin
ade95b4818
Merge pull request #500 from albertoxamin/dependabot/npm_and_yarn/frontend/ejs-3.1.10
Bump ejs from 3.1.9 to 3.1.10 in /frontend
2024-05-21 13:46:37 +01:00
Alberto Xamin
763bd10b7c
Merge pull request #502 from albertoxamin/dependabot/pip/backend/requests-2.32.0
Bump requests from 2.31.0 to 2.32.0 in /backend
2024-05-21 13:46:23 +01:00
dependabot[bot]
1f57d1a700
---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-21 08:01:34 +00:00
Alberto Xamin
6aa3d6508f
add russian localization 2024-05-17 16:28:52 +01:00
Alberto Xamin
6b178d952a
add Spanish translation 2024-05-17 16:19:42 +01:00
Alberto Xamin
3252fdbf34
Add French language 2024-05-17 12:40:28 +01:00
Alberto Xamin
424d88e7b8
Update index.js 2024-05-16 22:33:40 +01:00
Alberto Xamin
7a793d902f
Create fr.json 2024-05-16 22:33:13 +01:00
dependabot[bot]
bd3c666703
Bump ejs from 3.1.9 to 3.1.10 in /frontend
Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](https://github.com/mde/ejs/compare/v3.1.9...v3.1.10)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-02 17:32:42 +00:00
dependabot[bot]
e6dc40bc57
Bump eventlet from 0.33.3 to 0.35.2 in /backend
Bumps [eventlet](https://github.com/eventlet/eventlet) from 0.33.3 to 0.35.2.
- [Changelog](https://github.com/eventlet/eventlet/blob/master/NEWS)
- [Commits](https://github.com/eventlet/eventlet/compare/v0.33.3...v0.35.2)

---
updated-dependencies:
- dependency-name: eventlet
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-12 21:53:39 +00:00
dependabot[bot]
359089c4c6
Bump vite from 4.5.2 to 4.5.3 in /frontend
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.5.2 to 4.5.3.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.5.3/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-04 01:53:56 +00:00
Alberto Xamin
ae36bbcec6
Merge pull request #471 from albertoxamin/dependabot/pip/backend/requests-2.31.0
Bump requests from 2.28.2 to 2.31.0 in /backend
2024-03-25 11:16:00 +00:00
Alberto Xamin
442e58effd
update npm packages 2024-02-27 10:51:48 +00:00
Alberto Xamin
badd8ebbf6
update npm lock file 2024-02-23 11:19:29 +00:00
Alberto Xamin
73c5b1573a
fix outdated docker build 2024-02-23 11:09:43 +00:00
Alberto Xamin
4eb1a82ab7
expire and remove secrets 2024-02-23 10:45:52 +00:00
dependabot[bot]
6995714835
Bump requests from 2.28.2 to 2.31.0 in /backend
Bumps [requests](https://github.com/psf/requests) from 2.28.2 to 2.31.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.28.2...v2.31.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-23 05:53:48 +00:00
Alberto Xamin
2ddf18b8c0
user rng instead of random 2023-04-18 19:58:48 +01:00
Alberto Xamin
06069462ae
fix gary looter and big spencer 2023-04-18 19:52:18 +01:00
Alberto Xamin
c0dc2b799b
better visibility 2023-04-15 12:20:59 +01:00
Alberto Xamin
8a5e25385f
small readability updates 2023-04-15 11:19:21 +01:00
Alberto Xamin
9ea0a49c2e
fix flint westwood 2023-04-10 14:24:29 +01:00
Alberto Xamin
674a25bcf3
more details to chat 2023-04-10 14:16:13 +01:00
Alberto Xamin
6b233b652d
fix manette 2023-04-10 10:33:59 +01:00
Alberto Xamin
980774e51e
fix some animations 2023-04-10 00:56:53 +01:00
Alberto Xamin
25f5f5062e
add some effects on some actions 2023-04-09 21:08:14 +01:00
Alberto Xamin
95ca45b059
add suggest expansion 2023-04-09 20:45:04 +01:00
Alberto Xamin
ad1db9e0dc
fix broken password login 2023-04-09 19:46:51 +01:00
Alberto Xamin
340c86b5db
fix username renaming 2023-04-09 12:22:42 +01:00
Alberto Xamin
bda273849b
add option to set characters to distribute 2023-04-09 12:10:06 +01:00
Alberto Xamin
2501b96185
minor ui improvements 2023-04-09 11:43:06 +01:00
Alberto Xamin
cd16c9022f
shariff health yellow 2023-04-09 11:16:49 +01:00
Alberto Xamin
55c90ddd56
add gary looter 2023-04-09 11:05:33 +01:00
Alberto Xamin
a5a6e2d8b9
localize en cards 2023-04-09 10:49:26 +01:00
Alberto Xamin
475972bf05
add event desc to chat 2023-04-09 10:44:22 +01:00
Alberto Xamin
c81a806a6b
fix regolamento di conti 2023-04-09 10:24:44 +01:00
Alberto Xamin
1ebc4b4bd0
enable heatmaps ddog 2023-04-09 10:16:02 +01:00
Alberto Xamin
6c611aec0b
no double prigione 2023-04-04 16:41:36 +01:00
Alberto Xamin
f3f515318a
new wild-west-show css 2023-04-02 23:19:54 +01:00
Alberto Xamin
a936f44099
add Lee Van Kliff 2023-04-02 22:36:26 +01:00
Alberto Xamin
744bc44950
card refactor 2023-04-02 17:34:31 +01:00
Alberto Xamin
21b7c261bf
rename bots 2023-04-02 17:21:11 +01:00
Alberto Xamin
7692c7818f
add henry block 2023-04-02 17:05:49 +01:00
Alberto Xamin
0d960390be
fix bot overusing self panico 2023-04-02 16:38:30 +01:00
Alberto Xamin
ba6d8ddecb
fix mira for bots 2023-04-02 15:09:25 +01:00
Alberto Xamin
72bb52d037
fix Lemat 2023-04-02 14:56:52 +01:00
Alberto Xamin
cadabeb5f4
characters refactor 2023-04-02 14:37:14 +01:00
Alberto Xamin
c76cdc4fb1
add click on the card text 2023-04-02 14:24:26 +01:00
Alberto Xamin
e3b168ff57
card event refactoring and moved wild-west-show to its own pile 2023-04-02 13:47:08 +01:00
Alberto Xamin
f56120d44e
show wild west show cards in help screen 2023-04-01 08:38:58 +02:00
Alberto Xamin
4e0839350b
Merge pull request #456 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/eslint-plugin-vue-9.10.0
Bump eslint-plugin-vue from 9.9.0 to 9.10.0 in /frontend
2023-03-28 19:05:19 +02:00
Alberto Xamin
543c08a865
Merge pull request #457 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/datadog/browser-rum-4.36.0
Bump @datadog/browser-rum from 4.35.0 to 4.36.0 in /frontend
2023-03-28 19:05:06 +02:00
Alberto Xamin
2bcb4b4ff6
Merge pull request #458 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001470
Bump caniuse-lite from 1.0.30001469 to 1.0.30001470 in /frontend
2023-03-28 19:04:58 +02:00
dependabot[bot]
e13883663c
Bump caniuse-lite from 1.0.30001469 to 1.0.30001470 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001469 to 1.0.30001470.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001469...1.0.30001470)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-27 05:02:32 +00:00
dependabot[bot]
32cb76d155
Bump @datadog/browser-rum from 4.35.0 to 4.36.0 in /frontend
Bumps [@datadog/browser-rum](https://github.com/DataDog/browser-sdk/tree/HEAD/packages/rum) from 4.35.0 to 4.36.0.
- [Release notes](https://github.com/DataDog/browser-sdk/releases)
- [Changelog](https://github.com/DataDog/browser-sdk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/DataDog/browser-sdk/commits/v4.36.0/packages/rum)

---
updated-dependencies:
- dependency-name: "@datadog/browser-rum"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-24 05:02:18 +00:00
dependabot[bot]
8d3f4cfdf5
Bump eslint-plugin-vue from 9.9.0 to 9.10.0 in /frontend
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 9.9.0 to 9.10.0.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v9.9.0...v9.10.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-24 05:01:59 +00:00
dependabot[bot]
246125691a Bump vite-plugin-pwa from 0.14.5 to 0.14.6 in /frontend
Bumps [vite-plugin-pwa](https://github.com/antfu/vite-plugin-pwa) from 0.14.5 to 0.14.6.
- [Release notes](https://github.com/antfu/vite-plugin-pwa/releases)
- [Commits](https://github.com/antfu/vite-plugin-pwa/compare/v0.14.5...v0.14.6)

---
updated-dependencies:
- dependency-name: vite-plugin-pwa
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-23 23:18:45 +01:00
dependabot[bot]
8eb5b334a1 Bump vite from 4.1.4 to 4.2.1 in /frontend
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.1.4 to 4.2.1.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.2.1/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-23 23:03:02 +01:00
dependabot[bot]
bb3b66a182 Bump eslint from 8.35.0 to 8.36.0 in /frontend
Bumps [eslint](https://github.com/eslint/eslint) from 8.35.0 to 8.36.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.35.0...v8.36.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-23 23:02:58 +01:00
dependabot[bot]
b47ff20624 Bump datadog from 0.44.0 to 0.45.0 in /backend
Bumps [datadog](https://github.com/DataDog/datadogpy) from 0.44.0 to 0.45.0.
- [Release notes](https://github.com/DataDog/datadogpy/releases)
- [Changelog](https://github.com/DataDog/datadogpy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/DataDog/datadogpy/compare/v0.44.0...v0.45.0)

---
updated-dependencies:
- dependency-name: datadog
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-23 23:02:53 +01:00
dependabot[bot]
302e131cde Bump python-socketio from 5.7.2 to 5.8.0 in /backend
Bumps [python-socketio](https://github.com/miguelgrinberg/python-socketio) from 5.7.2 to 5.8.0.
- [Release notes](https://github.com/miguelgrinberg/python-socketio/releases)
- [Changelog](https://github.com/miguelgrinberg/python-socketio/blob/main/CHANGES.md)
- [Commits](https://github.com/miguelgrinberg/python-socketio/compare/v5.7.2...v5.8.0)

---
updated-dependencies:
- dependency-name: python-socketio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-23 23:02:47 +01:00
dependabot[bot]
19e7d1f005 Bump caniuse-lite from 1.0.30001462 to 1.0.30001469 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001462 to 1.0.30001469.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001462...1.0.30001469)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-23 23:02:41 +01:00
dependabot[bot]
98f65aaf76 Bump vite-plugin-pwa from 0.14.4 to 0.14.5 in /frontend
Bumps [vite-plugin-pwa](https://github.com/antfu/vite-plugin-pwa) from 0.14.4 to 0.14.5.
- [Release notes](https://github.com/antfu/vite-plugin-pwa/releases)
- [Commits](https://github.com/antfu/vite-plugin-pwa/compare/v0.14.4...v0.14.5)

---
updated-dependencies:
- dependency-name: vite-plugin-pwa
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-23 23:02:37 +01:00
Alberto Xamin
5186fd2a8c
add translation of base game 2023-03-12 12:24:18 +00:00
Alberto Xamin
0bf2354605
add localizations 2023-03-12 12:03:31 +00:00
Alberto Xamin
d98c7de4b9
Merge branch 'wild-west-show' into dev 2023-03-12 11:44:42 +00:00
Alberto Xamin
555e48a10a
allow for alpha status 2023-03-12 11:44:09 +00:00
Alberto Xamin
d3a056cc6a
add terenkill and youlgrinner 2023-03-11 22:51:34 +02:00
dependabot[bot]
cdab162c06 Bump pytest from 7.2.1 to 7.2.2 in /backend
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.2.1 to 7.2.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.2.1...7.2.2)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-09 10:17:54 +01:00
dependabot[bot]
33b1fd205e Bump @datadog/browser-rum from 4.34.2 to 4.35.0 in /frontend
Bumps [@datadog/browser-rum](https://github.com/DataDog/browser-sdk/tree/HEAD/packages/rum) from 4.34.2 to 4.35.0.
- [Release notes](https://github.com/DataDog/browser-sdk/releases)
- [Changelog](https://github.com/DataDog/browser-sdk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/DataDog/browser-sdk/commits/v4.35.0/packages/rum)

---
updated-dependencies:
- dependency-name: "@datadog/browser-rum"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-09 10:17:45 +01:00
dependabot[bot]
03225b234a Bump caniuse-lite from 1.0.30001458 to 1.0.30001462 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001458 to 1.0.30001462.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001458...1.0.30001462)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-09 10:17:34 +01:00
Giulio
e69f214959 Merge branch 'main' into dev 2023-03-09 10:13:06 +01:00
Alberto Xamin
e4f9cfc886
fix johnpain, bigspencer and tests 2023-03-05 19:49:34 +00:00
Alberto Xamin
499763ffca
add john pain 2023-03-05 18:30:05 +00:00
Alberto Xamin
8f645cf82a
add bigspencer 2023-03-05 18:22:15 +00:00
Alberto Xamin
3b568c987f
add Lady Rosa del Texas 2023-03-05 18:08:01 +00:00
Alberto Xamin
e33c2c3c48
add RegolamentoDiConti 2023-03-05 17:57:31 +00:00
Alberto Xamin
47a099d624
add wild-west-show endgame 2023-03-05 17:46:26 +00:00
Alberto Xamin
9f5d037437
add miss suzanna 2023-03-05 17:31:23 +00:00
Alberto Xamin
9598a6f811
add Sacagaway 2023-03-05 17:14:52 +00:00
Alberto Xamin
5811821ccf
add tests 2023-03-05 16:49:52 +00:00
Alberto Xamin
1f28c9b715
Merge pull request #430 from albertoxamin/dependabot/pip/backend/dev/discord-webhook-1.1.0
Bump discord-webhook from 0.15.0 to 1.1.0 in /backend
2023-03-01 16:01:51 +01:00
Alberto Xamin
cab83b45a8
Merge pull request #436 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vite-4.1.4
Bump vite from 4.1.1 to 4.1.4 in /frontend
2023-03-01 16:01:35 +01:00
Alberto Xamin
01de0beb55
Merge pull request #437 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001458
Bump caniuse-lite from 1.0.30001451 to 1.0.30001458 in /frontend
2023-03-01 16:01:16 +01:00
Alberto Xamin
31becfdf70
Merge pull request #438 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/eslint-8.35.0
Bump eslint from 8.34.0 to 8.35.0 in /frontend
2023-03-01 16:01:03 +01:00
Alberto Xamin
8bd293fcbf
Merge pull request #439 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/datadog/browser-rum-4.34.2
Bump @datadog/browser-rum from 4.34.0 to 4.34.2 in /frontend
2023-03-01 16:00:39 +01:00
dependabot[bot]
572941c4a1
Bump @datadog/browser-rum from 4.34.0 to 4.34.2 in /frontend
Bumps [@datadog/browser-rum](https://github.com/DataDog/browser-sdk/tree/HEAD/packages/rum) from 4.34.0 to 4.34.2.
- [Release notes](https://github.com/DataDog/browser-sdk/releases)
- [Changelog](https://github.com/DataDog/browser-sdk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/DataDog/browser-sdk/commits/v4.34.2/packages/rum)

---
updated-dependencies:
- dependency-name: "@datadog/browser-rum"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-28 05:00:54 +00:00
dependabot[bot]
b61a93e201
Bump eslint from 8.34.0 to 8.35.0 in /frontend
Bumps [eslint](https://github.com/eslint/eslint) from 8.34.0 to 8.35.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.34.0...v8.35.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 05:10:39 +00:00
dependabot[bot]
794127a4f3
Bump caniuse-lite from 1.0.30001451 to 1.0.30001458 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001451 to 1.0.30001458.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001451...1.0.30001458)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 05:08:52 +00:00
Alberto Xamin
c4d23b6e37 add elena zontero 2023-02-26 16:39:36 +00:00
Alberto Xamin
d089cce48d add camposanto DarlingValentine 2023-02-26 16:14:56 +00:00
Annalisa Xamin
e68be77edc add choose_flint_special localization 2023-02-26 10:55:37 +00:00
Annalisa Xamin
d1bd07c717 add Flint Westwood 2023-02-26 10:54:58 +00:00
Annalisa Xamin
035fbb161d register expansion 2023-02-26 10:54:58 +00:00
Annalisa Xamin
dd2b7be199 add cards definitions 2023-02-26 10:54:58 +00:00
dependabot[bot]
60abb38cd5
Bump vite from 4.1.1 to 4.1.4 in /frontend
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.1.1 to 4.1.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.1.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-22 04:19:59 +00:00
Alberto Xamin
aed05b5439 fix deck layout issues 2023-02-20 20:52:19 +00:00
Alberto Xamin
5d25e8708e hopefully fix again broken service worker 2023-02-19 12:12:31 +00:00
Alberto Xamin
bb7f1a7157 replace checkbox for expansions 2023-02-19 11:24:08 +00:00
Alberto Xamin
c269c950e7 add emojis to lobbies 2023-02-18 17:35:16 +00:00
dependabot[bot]
d08ff81c59
Bump discord-webhook from 0.15.0 to 1.1.0 in /backend
Bumps [discord-webhook](https://github.com/lovvskillz/python-discord-webhook) from 0.15.0 to 1.1.0.
- [Release notes](https://github.com/lovvskillz/python-discord-webhook/releases)
- [Changelog](https://github.com/lovvskillz/python-discord-webhook/blob/master/CHANGES.md)
- [Commits](https://github.com/lovvskillz/python-discord-webhook/compare/0.15.0...1.1.0)

---
updated-dependencies:
- dependency-name: discord-webhook
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-16 04:59:01 +00:00
dependabot[bot]
276b52ffd1 Bump certifi from 2021.10.8 to 2022.12.7 in /backend
Bumps [certifi](https://github.com/certifi/python-certifi) from 2021.10.8 to 2022.12.7.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2021.10.08...2022.12.07)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 09:52:48 +01:00
dependabot[bot]
8df9718cca
Bump vite-plugin-pwa from 0.14.3 to 0.14.4 in /frontend
Bumps [vite-plugin-pwa](https://github.com/antfu/vite-plugin-pwa) from 0.14.3 to 0.14.4.
- [Release notes](https://github.com/antfu/vite-plugin-pwa/releases)
- [Commits](https://github.com/antfu/vite-plugin-pwa/compare/v0.14.3...v0.14.4)

---
updated-dependencies:
- dependency-name: vite-plugin-pwa
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 05:04:48 +00:00
dependabot[bot]
161d01054a
Bump eslint from 8.33.0 to 8.34.0 in /frontend
Bumps [eslint](https://github.com/eslint/eslint) from 8.33.0 to 8.34.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.33.0...v8.34.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-10 22:46:58 +00:00
Giulio
d0fdf3fe7e Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/json5-2.2.3' into dev 2023-02-10 23:23:59 +01:00
GM
41e694d87b fix static files 2023-02-10 22:11:02 +00:00
dependabot[bot]
79855bbf9a
Bump json5 from 1.0.1 to 2.2.3 in /frontend
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-10 18:28:29 +00:00
Alberto Xamin
42a85025a3
change node builder 2023-02-10 17:05:40 +00:00
Alberto Xamin
485f4066df
bump vue version 2023-02-10 16:21:35 +00:00
Alberto Xamin
4472576f11
update devcontainer 2023-02-10 16:19:47 +00:00
Alberto Xamin
2701e682b4
migrate vue-cli to vite 2023-02-10 16:15:28 +00:00
Giulio
26869b79e0 Merge branch 'dev' into main 2023-02-10 00:12:19 +01:00
Giulio
85c18bcb82 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001451' into dev 2023-02-10 00:08:43 +01:00
Giulio
6ca4e70edc Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/datadog/browser-rum-4.33.0' into dev 2023-02-10 00:07:50 +01:00
Giulio
31bdeb3436 Merge branch 'main' into dev 2023-02-10 00:07:00 +01:00
Alberto Xamin
840677f839 make the valley of shadows generally available 2023-02-09 16:40:45 +00:00
Alberto Xamin
d3f70454be fix no players in range 2023-02-09 16:39:29 +00:00
Alberto Xamin
005ec8dd3c add link for backend switching 2023-02-09 15:41:30 +00:00
Alberto Xamin
cbe1945f5d add possibility to use a different backend 2023-02-09 14:40:11 +00:00
Alberto Xamin
621739546e add lemat 2023-02-09 11:45:32 +00:00
Alberto Xamin
8d06cc2a77 fix discord login errors 2023-02-09 10:56:48 +00:00
Alberto Xamin
84d4dcd98e blackflower to choose_play_as_bang 2023-02-09 10:43:22 +00:00
dependabot[bot]
e8fcafd4a1
Bump caniuse-lite from 1.0.30001450 to 1.0.30001451 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001450 to 1.0.30001451.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001450...1.0.30001451)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-09 04:06:53 +00:00
dependabot[bot]
90b0f033e3
Bump @datadog/browser-rum from 4.32.0 to 4.33.0 in /frontend
Bumps [@datadog/browser-rum](https://github.com/DataDog/browser-sdk/tree/HEAD/packages/rum) from 4.32.0 to 4.33.0.
- [Release notes](https://github.com/DataDog/browser-sdk/releases)
- [Changelog](https://github.com/DataDog/browser-sdk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/DataDog/browser-sdk/commits/v4.33.0/packages/rum)

---
updated-dependencies:
- dependency-name: "@datadog/browser-rum"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-09 04:06:17 +00:00
Alberto Xamin
62ac700c5b minor refactor 2023-02-08 15:56:53 +00:00
Alberto Xamin
3262580592 fix blackflower 2023-02-08 13:54:43 +00:00
Alberto Xamin
2418f7cc53 use dict instead of list 2023-02-05 09:27:30 +00:00
Alberto Xamin
7de4fb1135 fix typo 2023-02-04 22:12:17 +00:00
Alberto Xamin
1f17560729 improve load handling 2023-02-04 22:06:04 +00:00
Alberto Xamin
17a3568ba5 bullet holes in card borders and less tidy equipments 2023-02-02 12:41:58 +00:00
dependabot[bot]
d346400f51 Bump caniuse-lite from 1.0.30001449 to 1.0.30001450 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001449 to 1.0.30001450.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001449...1.0.30001450)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 12:37:38 +01:00
Giulio
768a5239e3 Bump caniuse-lite from 1.0.30001447 to 1.0.30001449 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001447 to 1.0.30001449.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001447...1.0.30001449)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 12:35:05 +01:00
dependabot[bot]
1b552fdf19 Bump @datadog/browser-rum from 4.30.1 to 4.32.0 in /frontend
Bumps [@datadog/browser-rum](https://github.com/DataDog/browser-sdk/tree/HEAD/packages/rum) from 4.30.1 to 4.32.0.
- [Release notes](https://github.com/DataDog/browser-sdk/releases)
- [Changelog](https://github.com/DataDog/browser-sdk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/DataDog/browser-sdk/commits/v4.32.0/packages/rum)

---
updated-dependencies:
- dependency-name: "@datadog/browser-rum"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 12:34:03 +01:00
Alberto Xamin
cc936fb3b9 improve feedback experience 2023-02-01 10:36:39 +00:00
Alberto Xamin
ff27d2a5b2 fix hastebin changing apis 2023-02-01 10:27:28 +00:00
Alberto Xamin
bfb65e3e33 check for boundaries in scrap 2023-02-01 10:13:45 +00:00
Alberto Xamin
c1d3eaea86 disable rewards for hitting ghosts 2023-02-01 10:06:32 +00:00
Alberto Xamin
766ce0c5c5 fix sventagliata showing roles 2023-02-01 10:00:57 +00:00
Alberto Xamin
9ab96088b9 add mira, fix sventagliata 2023-01-30 13:50:53 +00:00
Alberto Xamin
cd1d1a0e2d make duel response less confusing 2023-01-30 12:11:48 +00:00
Alberto Xamin
f774a10e04 bring back functionality in development 2023-01-30 12:07:27 +00:00
Alberto Xamin
a4272f83d9 fix died_role localization 2023-01-30 11:33:56 +00:00
Alberto Xamin
c9c6101eef add fuga and MickDefender 2023-01-29 15:45:26 +00:00
Alberto Xamin
373954bc71 add comments to card 2023-01-29 09:48:06 +00:00
Alberto Xamin
c5bb95714d add czech language 2023-01-28 19:55:43 +00:00
Alberto Xamin
e11acd4c32 update localizations 2023-01-28 19:15:09 +00:00
Alberto Xamin
fc603dcba3 add black flower 2023-01-28 19:05:17 +00:00
Alberto Xamin
89f5de47c7 add Der Spot Burst Ringer 2023-01-28 18:36:37 +00:00
Alberto Xamin
a4876a3b17 fix service worker 2023-01-27 19:27:41 +00:00
Alberto Xamin
983e1cb9cd remove workbox references to service worker 2023-01-27 15:20:30 +00:00
Alberto Xamin
decd959328 add colorado bill 2023-01-27 15:08:23 +00:00
Alberto Xamin
2a69f8ba7c update gitignore for save 2023-01-27 14:49:55 +00:00
Alberto Xamin
11dc392d70 fix manette for green cards and fix must_be_used for equipment 2023-01-27 14:48:47 +00:00
Alberto Xamin
c4a2d67a29 add test for borraccia 2023-01-27 14:29:59 +00:00
Alberto Xamin
c163e6405d remove vulnerabilities from devdependencies 2023-01-27 14:00:22 +00:00
Alberto Xamin
af588b368d cleaner discord button 2023-01-26 17:39:30 +00:00
Alberto Xamin
9fea8bcae0 add true black theme 2023-01-26 17:27:42 +00:00
Alberto Xamin
a6ae613927 reduce discord button size and add link to /help to improve seo 2023-01-26 16:05:28 +00:00
Alberto Xamin
f7d793c929 safari ui fix 2023-01-26 15:50:41 +00:00
Alberto Xamin
53137eea9f safari tab group color 2023-01-26 15:44:45 +00:00
Alberto Xamin
b998405578 add tuco tests and strings 2023-01-26 15:39:52 +00:00
Alberto Xamin
bc143190c3 add tucoFranziskaner Logic 2023-01-26 15:30:15 +00:00
Alberto Xamin
3a6bbb2427 add characters definitions for valley of shadows 2023-01-26 15:29:59 +00:00
Alberto Xamin
9487a59750 update dummy socket 2023-01-25 18:36:48 +00:00
Alberto Xamin
4f08874c9a add animations for cards against someone 2023-01-25 18:33:57 +00:00
Alberto Xamin
33f90901de remove redundant call in can can 2023-01-25 17:57:22 +00:00
Alberto Xamin
a7ef721f1b enable draw animation from other players 2023-01-25 17:46:16 +00:00
Alberto Xamin
e5072d7db9 add avatar to self in panico and cat balou 2023-01-25 17:40:09 +00:00
Alberto Xamin
3815cc719f add animation for scrap 2023-01-25 15:56:12 +00:00
GM
7c36bd9014 hastebin link on report 2023-01-25 15:28:36 +00:00
GM
33f51eac96 competitive replay 2023-01-25 15:25:21 +00:00
Alberto Xamin
fdda9457ca add draw from deck animation 2023-01-25 15:09:21 +00:00
Alberto Xamin
3cc94dafd7
improve seo 2023-01-25 12:58:15 +01:00
GM
bea9529912 typo 2023-01-25 11:10:38 +00:00
GM
28baebb6d1 remove replay players on reset 2023-01-25 11:09:31 +00:00
GM
0dd284c9d6 show sid on status 2023-01-25 10:33:19 +00:00
Alberto Xamin
1146df0571
remove players once replay is done 2023-01-25 11:21:19 +01:00
GM
323b6b773c send error to room or to admins 2023-01-25 09:28:08 +00:00
Alberto Xamin
1e5c645c5e
don't notify role if people are winning 2023-01-24 21:48:01 +01:00
Alberto Xamin
18d46f3ffc
check if can select and cancel rum errors 2023-01-24 21:00:59 +01:00
Alberto Xamin
19be866323
add more tips and fix translations 2023-01-24 20:52:52 +01:00
Alberto Xamin
37eaa751c9 fix password check for empty password 2023-01-24 19:28:41 +00:00
Alberto Xamin
9639b6a43b fix molly slab the killer index 2023-01-24 17:48:21 +00:00
Alberto Xamin
6112a99ed8 more info on report and autofix 2023-01-24 17:24:34 +00:00
Alberto Xamin
51430c771d add rum version tracking 2023-01-24 17:15:39 +00:00
Alberto Xamin
992513d850 balance update 2023-01-24 14:24:42 +00:00
Alberto Xamin
24ff63d4c2 fix tooltip for english and emporio 2023-01-24 14:13:30 +00:00
Alberto Xamin
ab22c3d52d rebalance chuck wengam 2023-01-24 13:59:21 +00:00
Alberto Xamin
5193c5aa47 fix fantasma dead man 2023-01-24 13:56:28 +00:00
Alberto Xamin
4c337c560c
Merge pull request #414 from albertoxamin/dev
merge upgrade socketio
2023-01-24 12:51:43 +00:00
Alberto Xamin
74eb84ed08 remove unused greenlet 2023-01-24 12:14:39 +00:00
Alberto Xamin
1955d66c7c update socketio on main.js 2023-01-24 11:54:11 +00:00
Alberto Xamin
20b0db20e6
packages upgrade 2023-01-24 12:39:36 +01:00
Alberto Xamin
8e58492930
add check for non player disconnect 2023-01-24 12:37:07 +01:00
dependabot[bot]
0d74b829b0 Bump caniuse-lite from 1.0.30001446 to 1.0.30001447 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001446 to 1.0.30001447.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001446...1.0.30001447)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-24 12:26:16 +01:00
Alberto Xamin
65a3705e25
update github actions 2023-01-23 16:05:57 +00:00
Alberto Xamin
ad9007628c
update even for the setevent 2023-01-23 14:54:57 +00:00
Alberto Xamin
6ae2360adb
change is none checks 2023-01-23 14:50:03 +00:00
Alberto Xamin
1b8690a5c6
remove spectators from gamesaves 2023-01-23 14:39:59 +00:00
Alberto Xamin
5a0abfea54
simplify server logic with assignment expressions 2023-01-23 14:38:53 +00:00
GM
da28f045a3 default settings and extensions on codespaces 2023-01-23 13:46:58 +00:00
GM
99c89aa845 yarn 2023-01-23 13:05:54 +00:00
GM
bf0df3b1ef python 3.11.1 on codespaces 2023-01-23 12:53:39 +00:00
Alberto Xamin
7e7483c10b
migrate to python 3.11 2023-01-23 10:38:44 +00:00
Alberto Xamin
9be6b0f387
Merge pull request #412 from albertoxamin/test-save
Add some form of persistency during restarts
2023-01-23 10:36:27 +00:00
GM
10ea588a16 fix status page 2023-01-23 10:23:03 +00:00
GM
218e348a53 view the expansion valley_of_shadows only once 2023-01-23 09:08:09 +00:00
GM
c888632fa7 create the folder if it doesn't exist 2023-01-23 08:59:48 +00:00
Giulio
65339b5435 Merge branch 'dev' into test-save 2023-01-23 09:00:09 +01:00
Alberto Xamin
c3a53b7ace
add more importance to a dead role 2023-01-22 23:03:26 +00:00
GM
953a024ff1 just for commit 2023-01-22 21:44:34 +00:00
GM
a7ec4935e0 fix folder 2023-01-22 21:17:18 +00:00
GM
292fbe4dde volume save 2023-01-22 20:51:44 +00:00
Giulio
8b0b5228de Merge branch 'test-save' into dev 2023-01-22 20:34:04 +01:00
GM
ee7e02a525 fix deadman and fantasma 2023-01-22 18:36:14 +00:00
GM
a5e827c882 fix name desc for Players - frontend 2023-01-22 18:35:36 +00:00
Alberto Xamin
87dcbedc29
don't save hidden games 2023-01-22 11:52:34 +00:00
Alberto Xamin
fee3171e8a
reduce times that the player is forced to change name 2023-01-22 11:44:55 +00:00
Alberto Xamin
e2b78a37e9
block disconnect only while with debugger 2023-01-22 11:24:43 +00:00
GM
867a079341 fix bot logic with The Judge and green cards 2023-01-21 18:09:07 +01:00
GM
fc16756805 fix bot logic with The Judge and green cards 2023-01-21 17:07:48 +00:00
Alberto Xamin
08c81c4a21 fix error if no player is alive 2023-01-21 17:16:19 +01:00
Alberto Xamin
3c4357eaac
fix error if no player is alive 2023-01-21 16:13:03 +00:00
Alberto Xamin
ca342f0106
prevent infinite loop 2023-01-21 14:53:08 +00:00
Alberto Xamin
28a093d337
remove recursion 2023-01-21 14:41:53 +00:00
Alberto Xamin
1b263adc80
fix players becoming bots 2023-01-21 14:28:34 +00:00
Alberto Xamin
461dfb8841
fix debug disconnect 2023-01-21 14:16:48 +00:00
Alberto Xamin
699c976c75
fix replays 2023-01-21 14:03:27 +00:00
Alberto Xamin
13ab981c59
introduce back delay 2023-01-21 13:40:41 +00:00
Alberto Xamin
ec48007377
add save lock 2023-01-21 13:15:20 +00:00
Alberto Xamin
8e745fa796
update gitignore 2023-01-21 13:03:00 +00:00
Alberto Xamin
d7187dbc61
add reset button 2023-01-21 11:50:11 +00:00
Alberto Xamin
5d7f833916
prevent debugger disconnect 2023-01-21 11:07:30 +00:00
Alberto Xamin
babc4f3f48
start bot disconnect on restart 2023-01-21 10:56:11 +00:00
Alberto Xamin
5eafa4fa18 remove reference to sio in replay 2023-01-20 21:03:39 +00:00
Alberto Xamin
2b4643b237 add game save 2023-01-20 20:57:30 +00:00
Alberto Xamin
3f44093560
handle audio errors 2023-01-20 17:29:04 +00:00
Alberto Xamin
0574117028
add username in rum 2023-01-20 17:28:38 +00:00
GM
ce0611cf8d fix scrap cards of the dead players
with Vulture Sam
2023-01-20 11:48:07 +00:00
GM
89dfb533b5 fix game freeze when a ghost kill himself 2023-01-20 11:03:43 +00:00
dependabot[bot]
6f21f5885f Bump dnspython from 2.2.1 to 2.3.0 in /backend
Bumps [dnspython](https://github.com/rthalley/dnspython) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/rthalley/dnspython/releases)
- [Changelog](https://github.com/rthalley/dnspython/blob/master/doc/whatsnew.rst)
- [Commits](https://github.com/rthalley/dnspython/compare/v2.2.1...v2.3.0)

---
updated-dependencies:
- dependency-name: dnspython
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-20 09:47:14 +01:00
Alberto Xamin
d9c3493661
add spectate button 2023-01-19 10:56:38 +00:00
Alberto Xamin
c05e2a69e2
add ffw to replay 2023-01-19 10:04:02 +00:00
Giulio
c5dab6fde7 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001446' into dev 2023-01-19 09:45:38 +01:00
Giulio
70ff973f77 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/eventlet-0.33.3' into dev 2023-01-19 09:45:34 +01:00
dependabot[bot]
bb94de0f0b
Bump caniuse-lite from 1.0.30001445 to 1.0.30001446 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001445 to 1.0.30001446.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001445...1.0.30001446)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-19 04:04:51 +00:00
dependabot[bot]
96abdfe60d
Bump eventlet from 0.33.2 to 0.33.3 in /backend
Bumps [eventlet](https://github.com/eventlet/eventlet) from 0.33.2 to 0.33.3.
- [Release notes](https://github.com/eventlet/eventlet/releases)
- [Changelog](https://github.com/eventlet/eventlet/blob/master/NEWS)
- [Commits](https://github.com/eventlet/eventlet/compare/v0.33.2...v0.33.3)

---
updated-dependencies:
- dependency-name: eventlet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-19 04:04:10 +00:00
Alberto Xamin
9d849d4343
better chat log 2023-01-18 14:01:40 +00:00
GM
42187a0698 rum config update 2023-01-17 09:38:01 +00:00
GM
536ceead77 fix undefined length 2023-01-17 09:37:04 +00:00
Alberto Xamin
9e2b6263f2
add sventagliata 2023-01-16 17:13:53 +00:00
Alberto Xamin
a7098bca97
add tornado, bandidos, poker cards to log 2023-01-16 16:34:20 +00:00
Giulio
5cc8eec606 Merge branch 'dev' into main 2023-01-16 09:40:37 +01:00
Giulio
b769e53bfd Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001445' into dev 2023-01-16 09:30:32 +01:00
Giulio
1336e61109 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/pytest-7.2.1' into dev 2023-01-16 09:30:26 +01:00
dependabot[bot]
63a3036d92
Bump caniuse-lite from 1.0.30001443 to 1.0.30001445 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001443 to 1.0.30001445.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001443...1.0.30001445)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-16 04:12:58 +00:00
dependabot[bot]
3b8594482f
Bump pytest from 7.2.0 to 7.2.1 in /backend
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.2.0 to 7.2.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.2.0...7.2.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-16 04:10:05 +00:00
GM
ad05f82ffa comments 2023-01-14 18:19:08 +00:00
Giulio
159481df4b Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/requests-2.28.2' into dev 2023-01-14 18:55:04 +01:00
GM
e966c82d5f fix equipment usable on equipment slot 2023-01-14 17:46:19 +00:00
GM
cea89bf9b4 fix taglia usable on equipment 2023-01-14 15:59:38 +00:00
GM
e400ab22ba fix player desc 2023-01-14 15:58:23 +00:00
Alberto Xamin
edeefa28c6
add attack queue 2023-01-13 17:50:50 +00:00
Alberto Xamin
63e0892cc3
add test for poker and tornado 2023-01-13 16:01:44 +00:00
Alberto Xamin
3972df1809
fix bandidos and add taglia test 2023-01-13 15:52:58 +00:00
GM
473cb2a207 fix avatar none & change beta expansions 2023-01-13 14:47:48 +00:00
GM
5fb53a7be6 report text on discord 2023-01-13 11:01:07 +00:00
GM
14a8c00dff Lazo again 2023-01-13 09:18:02 +00:00
Giulio
49512056e3 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001443' into dev 2023-01-13 09:40:09 +01:00
Giulio
457a04ee10 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/datadog/browser-rum-4.30.1' into dev 2023-01-13 09:39:29 +01:00
Giulio
f835a74ded Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/vue-i18n-8.28.2' into dev 2023-01-13 09:39:22 +01:00
Giulio
d6fa20923b Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/greenlet-1.1.3.post0' into dev 2023-01-13 09:39:11 +01:00
dependabot[bot]
2cf39aac1b
Bump caniuse-lite from 1.0.30001441 to 1.0.30001443 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001441 to 1.0.30001443.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001441...1.0.30001443)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-13 04:06:20 +00:00
dependabot[bot]
6b4cfff2fe
Bump @datadog/browser-rum from 4.30.0 to 4.30.1 in /frontend
Bumps [@datadog/browser-rum](https://github.com/DataDog/browser-sdk/tree/HEAD/packages/rum) from 4.30.0 to 4.30.1.
- [Release notes](https://github.com/DataDog/browser-sdk/releases)
- [Changelog](https://github.com/DataDog/browser-sdk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/DataDog/browser-sdk/commits/v4.30.1/packages/rum)

---
updated-dependencies:
- dependency-name: "@datadog/browser-rum"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-13 04:04:46 +00:00
dependabot[bot]
df09fbf79f
Bump vue-i18n from 8.27.1 to 8.28.2 in /frontend
Bumps [vue-i18n](https://github.com/intlify/vue-i18n-next/tree/HEAD/packages/vue-i18n) from 8.27.1 to 8.28.2.
- [Release notes](https://github.com/intlify/vue-i18n-next/releases)
- [Changelog](https://github.com/intlify/vue-i18n-next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/intlify/vue-i18n-next/commits/HEAD/packages/vue-i18n)

---
updated-dependencies:
- dependency-name: vue-i18n
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-13 04:04:30 +00:00
dependabot[bot]
33b7cd41ca
Bump greenlet from 1.1.2 to 1.1.3.post0 in /backend
Bumps [greenlet](https://github.com/python-greenlet/greenlet) from 1.1.2 to 1.1.3.post0.
- [Release notes](https://github.com/python-greenlet/greenlet/releases)
- [Changelog](https://github.com/python-greenlet/greenlet/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-greenlet/greenlet/compare/1.1.2...1.1.3.post0)

---
updated-dependencies:
- dependency-name: greenlet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-13 04:03:45 +00:00
dependabot[bot]
a42fb55bed
Bump requests from 2.27.1 to 2.28.2 in /backend
Bumps [requests](https://github.com/psf/requests) from 2.27.1 to 2.28.2.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.27.1...v2.28.2)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-13 04:03:39 +00:00
Alberto Xamin
8b33aeaf1c
fix valley cards interfering with card events damage 2023-01-12 20:43:26 +00:00
Alberto Xamin
4ca6bda07a
Change simeon picos emoji 2023-01-12 20:28:25 +00:00
GM
389c2da37a fix lazo with bounty and shotgun 2023-01-12 16:07:00 +00:00
Alberto Xamin
bbf87a59c4
add poker 2023-01-12 15:27:57 +00:00
GM
f2d6e2315c fix chat ui 2023-01-12 14:35:21 +00:00
Alberto Xamin
812d8d8a1e
more ai generate robots avatars 2023-01-12 14:17:56 +00:00
GM
18ce61c3c4 Merge branch dev into main 2023-01-12 11:50:57 +00:00
Giulio
48c04dabfe Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/vue-router-3.6.5' into dev 2023-01-12 12:18:52 +01:00
Giulio
98a1c83f30 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/eventlet-0.33.2' into dev 2023-01-12 12:12:52 +01:00
Giulio
c9003e12be Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/workbox-webpack-plugin-6.5.4' into dev 2023-01-12 11:59:00 +01:00
Giulio
8808e24e25 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/pytest-7.2.0' into dev 2023-01-12 11:54:56 +01:00
Giulio
56bec9cbaf Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/datadog/browser-rum-4.30.0' into dev 2023-01-12 11:52:29 +01:00
dependabot[bot]
95e3ef4dc7
Bump vue-router from 3.5.4 to 3.6.5 in /frontend
Bumps [vue-router](https://github.com/vuejs/router) from 3.5.4 to 3.6.5.
- [Release notes](https://github.com/vuejs/router/releases)
- [Commits](https://github.com/vuejs/router/commits)

---
updated-dependencies:
- dependency-name: vue-router
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-12 10:47:45 +00:00
dependabot[bot]
30c626e6e4
Bump eventlet from 0.33.1 to 0.33.2 in /backend
Bumps [eventlet](https://github.com/eventlet/eventlet) from 0.33.1 to 0.33.2.
- [Release notes](https://github.com/eventlet/eventlet/releases)
- [Changelog](https://github.com/eventlet/eventlet/blob/master/NEWS)
- [Commits](https://github.com/eventlet/eventlet/compare/v0.33.1...v0.33.2)

---
updated-dependencies:
- dependency-name: eventlet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-12 10:47:23 +00:00
dependabot[bot]
1affb63c97
Bump workbox-webpack-plugin from 6.5.3 to 6.5.4 in /frontend
Bumps [workbox-webpack-plugin](https://github.com/googlechrome/workbox) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/googlechrome/workbox/releases)
- [Commits](https://github.com/googlechrome/workbox/compare/v6.5.3...v6.5.4)

---
updated-dependencies:
- dependency-name: workbox-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-12 10:47:04 +00:00
dependabot[bot]
ae7a30fdae
Bump pytest from 7.1.2 to 7.2.0 in /backend
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.1.2 to 7.2.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.1.2...7.2.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-12 10:46:54 +00:00
dependabot[bot]
4eab9f6c6c
Bump @datadog/browser-rum from 4.11.4 to 4.30.0 in /frontend
Bumps [@datadog/browser-rum](https://github.com/DataDog/browser-sdk/tree/HEAD/packages/rum) from 4.11.4 to 4.30.0.
- [Release notes](https://github.com/DataDog/browser-sdk/releases)
- [Changelog](https://github.com/DataDog/browser-sdk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/DataDog/browser-sdk/commits/v4.30.0/packages/rum)

---
updated-dependencies:
- dependency-name: "@datadog/browser-rum"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-12 10:44:23 +00:00
Giulio
f6bdbd2040 Merge branch 'dev' into main 2023-01-12 11:38:12 +01:00
Giulio
408c53ff43 removed dd-trace 2023-01-12 11:37:40 +01:00
Giulio
5b51ed5e95 Merge branch 'main' into dev 2023-01-12 11:11:05 +01:00
GM
c8a6e36023 sync dependencies from main to dev 2023-01-12 10:09:33 +00:00
Alberto Xamin
7767f75604 fix ghost card on ghost town 2023-01-10 20:16:49 +00:00
Alberto Xamin
47c2d2e297 fix ui issues 2023-01-10 17:10:06 +00:00
Giulio
5a309aeac5 Merge branch 'main' into dev 2023-01-10 18:00:43 +01:00
Alberto Xamin
8734c01843 improve character visual 2023-01-09 18:00:28 +00:00
Alberto Xamin
feedc5c784 fix bots 2023-01-09 17:40:43 +00:00
Alberto Xamin
a85b42d5b5
fix bugs 2023-01-09 18:09:23 +01:00
Alberto Xamin
888725a6ec
Update players.py 2023-01-09 17:45:50 +01:00
Alberto Xamin
33bc725eea add bandidos 2023-01-09 16:02:31 +00:00
Alberto Xamin
c5525527f4 fix admin status page color 2023-01-09 15:37:25 +00:00
Alberto Xamin
02311e7cec add player shuffling 2023-01-09 15:31:56 +00:00
Alberto Xamin
c13b79c38b add tornado 2023-01-09 14:10:38 +00:00
Alberto Xamin
e1fe906dbf hurt indicator 2023-01-09 13:31:34 +00:00
Alberto Xamin
8a622def7a even less allocations 2023-01-09 13:04:47 +00:00
Alberto Xamin
e03883bf7c reduce allocations 2023-01-09 12:52:47 +00:00
Alberto Xamin
0470e20cbb pylint happy 2023-01-09 10:36:46 +00:00
Alberto Xamin
60ef42f98a
write errors in the chat during debug 2023-01-09 10:14:27 +01:00
Alberto Xamin
1ea91af237 add taglia 2023-01-07 12:11:18 +00:00
Alberto Xamin
4958a2c7dc tweak timer 2023-01-07 12:03:55 +00:00
Alberto Xamin
30b3e826a0 add shotgun 2023-01-07 12:03:23 +00:00
Alberto Xamin
ed057502d6 add ritorno di fiamma 2023-01-07 11:15:40 +00:00
Alberto Xamin
1facfb354d fix broken bot spin 2023-01-07 09:43:54 +00:00
Alberto Xamin
8ffae000ef add hand count 2023-01-07 09:43:07 +00:00
Alberto Xamin
96edc77efe fix found bugs 2023-01-06 18:38:57 +00:00
Alberto Xamin
352f7f006f reduce memory allocations for checks 2023-01-06 17:24:16 +00:00
Alberto Xamin
0668fbf670 add fantasma, serpente a sonagli 2023-01-06 17:16:18 +00:00
Alberto Xamin
e7bfcb02ff valley cards definitions 2023-01-04 21:34:18 +00:00
Alberto Xamin
e4f3976c24 fix lint 2023-01-04 14:14:33 +00:00
Alberto Xamin
916d9af322 add valley of shadows under feature flag 2023-01-04 14:09:17 +00:00
Alberto Xamin
f6e8d193af add cards of valley of shadows 2023-01-04 12:04:37 +00:00
Alberto Xamin
63515c1d5f easier replayes 2023-01-03 20:51:51 +00:00
Alberto Xamin
7cba6fc7ef fix login flow 2023-01-03 16:15:11 +00:00
Alberto Xamin
8d90935e7d improved admin tools 2023-01-03 15:29:46 +00:00
Alberto Xamin
4d48a4bd69 add discord login 2023-01-03 13:50:41 +00:00
Alberto Xamin
e97c0d4bda fix broken report 2023-01-02 12:42:23 +00:00
Alberto Xamin
30f1251b3c fix manette 2022-12-30 16:45:21 +00:00
Alberto Xamin
7e2c218c3d notify scrap pile on reconnection 2022-12-29 16:36:45 +00:00
Alberto Xamin
0138c8b4fd speedup pull request tests 2022-12-29 15:43:52 +00:00
Alberto Xamin
5dacbc0c76
Merge pull request #395 from albertoxamin/dependabot/npm_and_yarn/frontend/minimatch-3.1.2
Bump minimatch from 3.0.4 to 3.1.2 in /frontend
2022-12-29 16:38:39 +01:00
dependabot[bot]
2c1d223cde
Bump minimatch from 3.0.4 to 3.1.2 in /frontend
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-29 13:52:39 +00:00
Alberto Xamin
eb2a6d28bc
Merge pull request #393 from albertoxamin/dependabot/npm_and_yarn/frontend/express-4.18.2
Bump express from 4.17.2 to 4.18.2 in /frontend
2022-12-29 14:52:08 +01:00
Alberto Xamin
a6edde725a Merge branch 'main' into dev 2022-12-29 13:36:24 +00:00
dependabot[bot]
eb7c323cfc
Bump express from 4.17.2 to 4.18.2 in /frontend
Bumps [express](https://github.com/expressjs/express) from 4.17.2 to 4.18.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.2...4.18.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-29 13:33:17 +00:00
Alberto Xamin
1c2864531b remove discord from pullrequests 2022-12-29 13:31:53 +00:00
Alberto Xamin
0d73ec86b7 show turn arrows 2022-12-28 16:20:16 +00:00
Alberto Xamin
cc8cd52c6b add info about which card is attacking you 2022-12-28 13:38:40 +00:00
Alberto Xamin
f9d2d48d8a fix chat color 2022-12-28 13:02:29 +00:00
Alberto Xamin
16c213a842 add devcontainer config 2022-12-27 17:24:10 +00:00
Alberto Xamin
984ce50ad8
chat improvements 2022-12-14 11:57:23 +01:00
Alberto Xamin
e16f89d0f6
fix broken build 2022-12-13 22:33:17 +01:00
Alberto Xamin
5dcfc884c9
add chat background so it is easier to see 2022-12-13 22:24:13 +01:00
Alberto Xamin
35c241d9cf fix jacky murieta description 2022-12-13 21:10:19 +01:00
Giulio
d4f13014f9 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/requests-2.28.0' into dev 2022-06-14 11:14:51 +02:00
Giulio
ef90855b12 Merge remote-tracking branch 'origin/dependabot/github_actions/dev/actions/setup-python-4' into dev 2022-06-14 11:14:28 +02:00
Giulio
c0e16f9472 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001352' into dev 2022-06-14 11:14:22 +02:00
Giulio
7a2d2ee834 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/datadog/browser-rum-4.11.4' into dev 2022-06-14 11:11:24 +02:00
Giulio
307a61a2c6 Emporio writes the drawn cards in the chat 2022-06-14 11:07:44 +02:00
Giulio
37cd396a9c Emporio writes the drawn cards in the chat 2022-06-14 11:07:27 +02:00
dependabot[bot]
fda5e78c34
Bump @datadog/browser-rum from 4.11.2 to 4.11.4 in /frontend
Bumps [@datadog/browser-rum](https://github.com/DataDog/browser-sdk/tree/HEAD/packages/rum) from 4.11.2 to 4.11.4.
- [Release notes](https://github.com/DataDog/browser-sdk/releases)
- [Changelog](https://github.com/DataDog/browser-sdk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/DataDog/browser-sdk/commits/v4.11.4/packages/rum)

---
updated-dependencies:
- dependency-name: "@datadog/browser-rum"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-14 04:26:57 +00:00
dependabot[bot]
9272e18ac0
Bump caniuse-lite from 1.0.30001344 to 1.0.30001352 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001344 to 1.0.30001352.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001344...1.0.30001352)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-10 04:26:03 +00:00
dependabot[bot]
dbe6592236
Bump requests from 2.27.1 to 2.28.0 in /backend
Bumps [requests](https://github.com/psf/requests) from 2.27.1 to 2.28.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.27.1...v2.28.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-10 04:15:47 +00:00
dependabot[bot]
d7f28f3053
Bump actions/setup-python from 3 to 4
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-09 04:17:29 +00:00
Giulio
02070f5e55 fix Josh McCloud 2022-06-02 11:26:02 +02:00
Giulio
e1dfff2118 fix Josh McCloud 2022-06-02 11:25:36 +02:00
Giulio
7fe4d3680d fix ghost draw
dutch will & Kit Carlson
2022-06-02 10:29:04 +02:00
Giulio
469c2c0d57 Bump eventsource from 1.1.0 to 1.1.1 in /frontend 2022-06-02 09:59:36 +02:00
Giulio
d4aa03c85e Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/eventsource-1.1.1' into dev 2022-06-02 09:51:12 +02:00
Giulio
c83cf498c9 yarn update 2022-06-02 09:39:50 +02:00
Giulio
3e6f09cea1 fix ghost draw
dutch will & Kit Carlson
2022-06-02 09:39:30 +02:00
dependabot[bot]
1ba473d777
Bump eventsource from 1.1.0 to 1.1.1 in /frontend
Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 22:49:52 +00:00
Giulio
1411be11fe Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001344' into dev 2022-06-01 16:11:33 +02:00
Giulio
a9151b0beb Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/ddtrace-1.1.4' into dev 2022-06-01 16:11:01 +02:00
Giulio
862ef0fab8 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/socket.io-client-4.5.1' into dev 2022-06-01 16:10:46 +02:00
Giulio
a541b17de8 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/certifi-2022.5.18.1' into dev 2022-06-01 16:09:04 +02:00
Giulio
b84b932607 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/datadog/browser-rum-4.11.2' into dev 2022-06-01 16:08:34 +02:00
dependabot[bot]
11c339afe8
Bump @datadog/browser-rum from 4.10.3 to 4.11.2 in /frontend
Bumps [@datadog/browser-rum](https://github.com/DataDog/browser-sdk/tree/HEAD/packages/rum) from 4.10.3 to 4.11.2.
- [Release notes](https://github.com/DataDog/browser-sdk/releases)
- [Changelog](https://github.com/DataDog/browser-sdk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/DataDog/browser-sdk/commits/v4.11.2/packages/rum)

---
updated-dependencies:
- dependency-name: "@datadog/browser-rum"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-31 04:19:56 +00:00
dependabot[bot]
b319231dfe
Bump caniuse-lite from 1.0.30001341 to 1.0.30001344 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001341 to 1.0.30001344.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001341...1.0.30001344)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 04:25:40 +00:00
dependabot[bot]
bff3b4ec95
Bump ddtrace from 1.1.3 to 1.1.4 in /backend
Bumps [ddtrace](https://github.com/DataDog/dd-trace-py) from 1.1.3 to 1.1.4.
- [Release notes](https://github.com/DataDog/dd-trace-py/releases)
- [Changelog](https://github.com/DataDog/dd-trace-py/blob/1.x/CHANGELOG.md)
- [Commits](https://github.com/DataDog/dd-trace-py/compare/v1.1.3...v1.1.4)

---
updated-dependencies:
- dependency-name: ddtrace
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 04:18:13 +00:00
dependabot[bot]
d05a1e48b5
Bump certifi from 2022.5.18 to 2022.5.18.1 in /backend
Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.5.18 to 2022.5.18.1.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2022.05.18...2022.05.18.1)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-20 04:23:01 +00:00
dependabot[bot]
acb977b9ba
Bump socket.io-client from 4.5.0 to 4.5.1 in /frontend
Bumps [socket.io-client](https://github.com/socketio/socket.io-client) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/socketio/socket.io-client/releases)
- [Changelog](https://github.com/socketio/socket.io-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-client/compare/4.5.0...4.5.1)

---
updated-dependencies:
- dependency-name: socket.io-client
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-19 13:01:13 +00:00
Giulio
a5a5ca741b Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/datadog/browser-rum-4.10.3' into dev 2022-05-19 14:54:34 +02:00
Giulio
fd104414eb Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/certifi-2022.5.18' into dev 2022-05-19 14:53:28 +02:00
Giulio
91ce954c9e Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/ddtrace-1.1.3' into dev 2022-05-19 14:53:24 +02:00
Giulio
aa69d2c525 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/vue-router-3.5.4' into dev 2022-05-19 14:53:14 +02:00
Giulio
8ba40a48e5 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001341' into dev 2022-05-19 14:53:02 +02:00
Giulio
9757bdda35 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/discord-webhook-0.16.3' into dev 2022-05-19 14:52:56 +02:00
Giulio
390a03e033 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/eventlet-0.33.1' into dev 2022-05-19 14:52:46 +02:00
dependabot[bot]
f885203606
Bump @datadog/browser-rum from 4.8.1 to 4.10.3 in /frontend
Bumps [@datadog/browser-rum](https://github.com/DataDog/browser-sdk/tree/HEAD/packages/rum) from 4.8.1 to 4.10.3.
- [Release notes](https://github.com/DataDog/browser-sdk/releases)
- [Changelog](https://github.com/DataDog/browser-sdk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/DataDog/browser-sdk/commits/v4.10.3/packages/rum)

---
updated-dependencies:
- dependency-name: "@datadog/browser-rum"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-19 04:17:01 +00:00
dependabot[bot]
0502304c78
Bump certifi from 2021.10.8 to 2022.5.18 in /backend
Bumps [certifi](https://github.com/certifi/python-certifi) from 2021.10.8 to 2022.5.18.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/commits)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-19 04:13:18 +00:00
dependabot[bot]
3804b6e92d
Bump ddtrace from 1.1.2 to 1.1.3 in /backend
Bumps [ddtrace](https://github.com/DataDog/dd-trace-py) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/DataDog/dd-trace-py/releases)
- [Changelog](https://github.com/DataDog/dd-trace-py/blob/1.x/CHANGELOG.md)
- [Commits](https://github.com/DataDog/dd-trace-py/compare/v1.1.2...v1.1.3)

---
updated-dependencies:
- dependency-name: ddtrace
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 04:13:12 +00:00
dependabot[bot]
dd521c483a
Bump vue-router from 3.5.3 to 3.5.4 in /frontend
Bumps [vue-router](https://github.com/vuejs/router) from 3.5.3 to 3.5.4.
- [Release notes](https://github.com/vuejs/router/releases)
- [Changelog](https://github.com/vuejs/router/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/router/commits)

---
updated-dependencies:
- dependency-name: vue-router
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-17 04:19:38 +00:00
dependabot[bot]
5919138616
Bump caniuse-lite from 1.0.30001338 to 1.0.30001341 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001338 to 1.0.30001341.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001338...1.0.30001341)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-16 04:23:01 +00:00
dependabot[bot]
207b0a2dbd
Bump discord-webhook from 0.16.0 to 0.16.3 in /backend
Bumps [discord-webhook](https://github.com/lovvskillz/python-discord-webhook) from 0.16.0 to 0.16.3.
- [Release notes](https://github.com/lovvskillz/python-discord-webhook/releases)
- [Changelog](https://github.com/lovvskillz/python-discord-webhook/blob/master/CHANGES.md)
- [Commits](https://github.com/lovvskillz/python-discord-webhook/compare/0.16.0...0.16.3)

---
updated-dependencies:
- dependency-name: discord-webhook
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-16 04:16:34 +00:00
dependabot[bot]
73aa4e16db
Bump eventlet from 0.33.0 to 0.33.1 in /backend
Bumps [eventlet](https://github.com/eventlet/eventlet) from 0.33.0 to 0.33.1.
- [Release notes](https://github.com/eventlet/eventlet/releases)
- [Changelog](https://github.com/eventlet/eventlet/blob/master/NEWS)
- [Commits](https://github.com/eventlet/eventlet/compare/v0.33.0...v0.33.1)

---
updated-dependencies:
- dependency-name: eventlet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-13 04:14:07 +00:00
Giulio
770792f224 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001338' into dev 2022-05-09 10:27:46 +02:00
Giulio
84772ddabf Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/discord-webhook-0.16.0' into dev 2022-05-09 10:27:40 +02:00
Giulio
e4ffbff8e4 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/ddtrace-1.1.2' into dev 2022-05-09 10:27:33 +02:00
Giulio
659199439a Merge remote-tracking branch 'origin/dependabot/github_actions/dev/docker/login-action-2' into dev 2022-05-09 10:27:17 +02:00
dependabot[bot]
8e1431fef0
Bump caniuse-lite from 1.0.30001336 to 1.0.30001338 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001336 to 1.0.30001338.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001336...1.0.30001338)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 04:29:55 +00:00
dependabot[bot]
f0814a3c58
Bump discord-webhook from 0.15.0 to 0.16.0 in /backend
Bumps [discord-webhook](https://github.com/lovvskillz/python-discord-webhook) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/lovvskillz/python-discord-webhook/releases)
- [Changelog](https://github.com/lovvskillz/python-discord-webhook/blob/master/CHANGES.md)
- [Commits](https://github.com/lovvskillz/python-discord-webhook/compare/0.15.0...0.16.0)

---
updated-dependencies:
- dependency-name: discord-webhook
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 04:24:26 +00:00
dependabot[bot]
3a07fda0c8
Bump ddtrace from 1.1.1 to 1.1.2 in /backend
Bumps [ddtrace](https://github.com/DataDog/dd-trace-py) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/DataDog/dd-trace-py/releases)
- [Changelog](https://github.com/DataDog/dd-trace-py/blob/1.x/CHANGELOG.md)
- [Commits](https://github.com/DataDog/dd-trace-py/compare/v1.1.1...v1.1.2)

---
updated-dependencies:
- dependency-name: ddtrace
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 04:24:23 +00:00
dependabot[bot]
0244220079
Bump docker/login-action from 1 to 2
Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-06 04:16:07 +00:00
Giulio
efd4e20037 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001336' into dev 2022-05-05 11:30:06 +02:00
Giulio
de878c3144 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/socket.io-client-4.5.0' into dev 2022-05-05 11:29:58 +02:00
GM
8efe598fde
Merge branch 'dev' into dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001336 2022-05-05 11:17:04 +02:00
dependabot[bot]
0c3c5bc1dd
Bump socket.io-client from 4.4.1 to 4.5.0 in /frontend
Bumps [socket.io-client](https://github.com/socketio/socket.io-client) from 4.4.1 to 4.5.0.
- [Release notes](https://github.com/socketio/socket.io-client/releases)
- [Changelog](https://github.com/socketio/socket.io-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-client/compare/4.4.1...4.5.0)

---
updated-dependencies:
- dependency-name: socket.io-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-05 09:12:35 +00:00
dependabot[bot]
d4d48a6e4a
Bump caniuse-lite from 1.0.30001335 to 1.0.30001336 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001335 to 1.0.30001336.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001335...1.0.30001336)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-05 09:12:11 +00:00
Giulio
7ea60057c7 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/ddtrace-1.1.1' into dev 2022-05-05 11:05:03 +02:00
Giulio
909df6802b Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001335' into dev 2022-05-05 11:04:57 +02:00
Giulio
ecd6861856 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/datadog/browser-rum-4.8.1' into dev 2022-05-05 11:04:02 +02:00
Giulio
3324ccd5da Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/pytest-7.1.2' into dev 2022-05-05 11:03:56 +02:00
Giulio
78f2b47ef6 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/workbox-webpack-plugin-6.5.3' into dev 2022-05-05 11:03:49 +02:00
dependabot[bot]
f9830644a9
Bump ddtrace from 0.60.1 to 1.1.1 in /backend
Bumps [ddtrace](https://github.com/DataDog/dd-trace-py) from 0.60.1 to 1.1.1.
- [Release notes](https://github.com/DataDog/dd-trace-py/releases)
- [Changelog](https://github.com/DataDog/dd-trace-py/blob/1.x/CHANGELOG.md)
- [Commits](https://github.com/DataDog/dd-trace-py/compare/v0.60.1...v1.1.1)

---
updated-dependencies:
- dependency-name: ddtrace
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-04 04:15:05 +00:00
dependabot[bot]
9a52cfba53
Bump caniuse-lite from 1.0.30001325 to 1.0.30001335 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001325 to 1.0.30001335.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001325...1.0.30001335)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-03 04:17:52 +00:00
dependabot[bot]
1d225390cb
Bump @datadog/browser-rum from 4.7.0 to 4.8.1 in /frontend
Bumps [@datadog/browser-rum](https://github.com/DataDog/browser-sdk/tree/HEAD/packages/rum) from 4.7.0 to 4.8.1.
- [Release notes](https://github.com/DataDog/browser-sdk/releases)
- [Changelog](https://github.com/DataDog/browser-sdk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/DataDog/browser-sdk/commits/v4.8.1/packages/rum)

---
updated-dependencies:
- dependency-name: "@datadog/browser-rum"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-29 04:53:14 +00:00
dependabot[bot]
a5fc835b95
Bump pytest from 7.1.1 to 7.1.2 in /backend
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.1.1 to 7.1.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.1.1...7.1.2)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 04:18:27 +00:00
dependabot[bot]
16ee653a5b
Bump workbox-webpack-plugin from 6.5.2 to 6.5.3 in /frontend
Bumps [workbox-webpack-plugin](https://github.com/googlechrome/workbox) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/googlechrome/workbox/releases)
- [Commits](https://github.com/googlechrome/workbox/compare/v6.5.2...v6.5.3)

---
updated-dependencies:
- dependency-name: workbox-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-13 04:22:18 +00:00
Giulio
b3dd149014 docker buildx typo 2022-04-11 16:16:23 +02:00
Giulio
7dd59e09ed docker buildx typo 2022-04-11 16:11:23 +02:00
Giulio
f492f3995d remove armv-7 2022-04-11 16:10:56 +02:00
Alberto Xamin
ee5f91fcad more tracing 2022-04-11 14:51:55 +02:00
Alberto Xamin
19bea99961 add datadog proxy 2022-04-10 19:09:27 +02:00
Alberto Xamin
468b439dd4 add datadog proxy 2022-04-10 19:08:36 +02:00
Giulio
9af8a85df3 fix ddtrace PATH 2022-04-07 23:45:15 +02:00
Giulio
67e49e82dd Merge remote-tracking branch 'origin/main' into dev 2022-04-07 16:26:06 +02:00
Alberto Xamin
a56ff25105 add ddog rum 2022-04-07 11:23:42 +02:00
Alberto Xamin
78b0f9fe7c change the right dockerfile 2022-04-07 09:44:11 +02:00
Alberto Xamin
94735d1775 remove armv7 and add ddtrace command to docker 2022-04-06 16:19:03 +02:00
Alberto Xamin
df1a381909 add ddtrace 2022-04-06 12:11:02 +02:00
Giulio
38d0244793 exclude replays from metrics 2022-04-05 15:18:12 +02:00
dependabot[bot]
89917a7824
Bump caniuse-lite from 1.0.30001323 to 1.0.30001325 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001323 to 1.0.30001325.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001323...1.0.30001325)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 04:23:15 +00:00
Giulio
24daac2859 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001323' into dev 2022-04-01 11:22:02 +02:00
dependabot[bot]
87fb52ff1e
Bump caniuse-lite from 1.0.30001322 to 1.0.30001323 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001322 to 1.0.30001323.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001322...1.0.30001323)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 04:23:56 +00:00
Giulio
433209f75b Merge branch 'dev' into main 2022-03-31 23:29:56 +02:00
Giulio
90b138d70a fixed rangeless card 2022-03-31 23:11:07 +02:00
Giulio
91a1d2122d fix for belle star and event cards 2022-03-31 13:10:17 +02:00
Giulio
3c6dc912c8 minor changes 2022-03-31 13:09:41 +02:00
Giulio
1e526a0175 Merge branch 'dev' into main 2022-03-30 15:00:39 +02:00
Giulio
b90c5553e3 fix rissa 2 2022-03-30 14:30:12 +02:00
Giulio
0818bfbf22 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/vue-i18n-8.27.1' into dev 2022-03-30 12:35:28 +02:00
Giulio
dc40adbf32 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001322' into dev 2022-03-30 12:33:42 +02:00
Giulio
4bed4484b5 fix rissa 2022-03-30 12:29:46 +02:00
Giulio
f985d84483 fast forward in replay 2022-03-30 12:22:27 +02:00
Giulio
7aebb2318b typo in rpc_log 2022-03-30 12:21:14 +02:00
dependabot[bot]
fdf4c97176
Bump caniuse-lite from 1.0.30001320 to 1.0.30001322 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001320 to 1.0.30001322.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001320...1.0.30001322)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-30 04:20:56 +00:00
dependabot[bot]
0c3ff913b1
Bump vue-i18n from 8.27.0 to 8.27.1 in /frontend
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.27.0 to 8.27.1.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/v8.x/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.27.0...v8.27.1)

---
updated-dependencies:
- dependency-name: vue-i18n
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-29 04:22:55 +00:00
Giulio
744759f224 Merge branch 'dev' into main 2022-03-28 20:54:36 +02:00
Giulio
d0159ea0e1 fix ghost in player death check win status 2022-03-28 15:33:26 +02:00
Giulio
ff758c2a39 fix end of replay 2022-03-28 15:31:43 +02:00
Giulio
b564b8e504 herb hunter fix when sheriff kills deputy 2022-03-28 14:11:12 +02:00
Alberto Xamin
99970d0df9 add metric polling 2022-03-27 14:33:54 +02:00
Alberto Xamin
803d144c6d
Merge pull request #200 from albertoxamin/dev
metrics for more things!
2022-03-27 11:13:25 +02:00
Alberto Xamin
05e0babad5 fix broken tests 2022-03-26 12:17:16 +01:00
Alberto Xamin
20819cedd0 add more metrics 2022-03-26 12:12:16 +01:00
Giulio
bdaa848b5b Merge branch 'dev' into main 2022-03-25 17:51:24 +01:00
Giulio
dcfdacc6df metric of the number of players 2022-03-25 17:50:16 +01:00
Giulio
4af54f79dd import refactor 2022-03-25 17:49:13 +01:00
Alberto Xamin
88b8e26734
Merge pull request #199 from albertoxamin/dev
refactor metrics ands add metrics on cards usage
2022-03-25 15:44:16 +01:00
Alberto Xamin
fd6c4cca1d add cards metrics 2022-03-25 15:42:44 +01:00
Alberto Xamin
50fd2b5b06 refactor metric collection 2022-03-25 15:29:28 +01:00
Giulio
eaf3d374ad Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/workbox-webpack-plugin-6.5.2' into dev 2022-03-25 13:58:07 +01:00
Giulio
4893f69e27 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/vue/cli-plugin-router-5.0.4' into dev 2022-03-25 13:58:03 +01:00
Giulio
e8b236073f Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001320' into dev 2022-03-25 13:57:59 +01:00
Giulio
0231d0a507 Merge remote-tracking branch 'origin/dependabot/github_actions/dev/actions/setup-python-3' into dev 2022-03-25 13:57:53 +01:00
Giulio
25aeee6354 Merge branch 'dev' into main 2022-03-25 13:30:19 +01:00
Giulio
56529f505e Merge branch 'main' into dev 2022-03-25 13:29:58 +01:00
Giulio
207818bc41 fix don bell 2022-03-25 13:08:14 +01:00
Alberto Xamin
ccb35606e1 fix not closing lobbies 2022-03-25 12:39:45 +01:00
Giulio
4847aee1f6 typo 2022-03-25 11:55:30 +01:00
Giulio
7c55939e6a Merge branch 'main' into dev 2022-03-25 11:45:47 +01:00
Alberto Xamin
3bc4bd200f fix error 2022-03-25 11:12:29 +01:00
Alberto Xamin
8a45186ecb add more metrics 2022-03-25 11:07:36 +01:00
dependabot[bot]
111934e728
Bump workbox-webpack-plugin from 6.5.1 to 6.5.2 in /frontend
Bumps [workbox-webpack-plugin](https://github.com/googlechrome/workbox) from 6.5.1 to 6.5.2.
- [Release notes](https://github.com/googlechrome/workbox/releases)
- [Commits](https://github.com/googlechrome/workbox/compare/v6.5.1...v6.5.2)

---
updated-dependencies:
- dependency-name: workbox-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-25 04:23:33 +00:00
dependabot[bot]
c799ba8e26
Bump @vue/cli-plugin-router from 5.0.3 to 5.0.4 in /frontend
Bumps [@vue/cli-plugin-router](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-router) from 5.0.3 to 5.0.4.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v5.0.4/packages/@vue/cli-plugin-router)

---
updated-dependencies:
- dependency-name: "@vue/cli-plugin-router"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-25 04:22:38 +00:00
dependabot[bot]
63c8b1ab02
Bump caniuse-lite from 1.0.30001317 to 1.0.30001320 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001317 to 1.0.30001320.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001317...1.0.30001320)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-25 04:21:06 +00:00
dependabot[bot]
53b4cf0125
Bump actions/setup-python from 2 to 3
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 3.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-25 04:17:01 +00:00
Giulio
9f1ec34d73 fix il giudice 2022-03-25 01:55:45 +01:00
Giulio
1bddd3c135 Merge branch 'dev' into main 2022-03-25 01:11:37 +01:00
Giulio
e7a79b0858 variable initialization pylint 2022-03-25 01:05:23 +01:00
Alberto Xamin
bc1d18d91c
Merge pull request #194 from albertoxamin/dev
Add datadog monitoring
2022-03-25 00:36:58 +01:00
Alberto Xamin
11f916649d
Merge branch 'main' into dev 2022-03-25 00:36:29 +01:00
Alberto Xamin
95a3061f74 add more metrics 2022-03-25 00:35:18 +01:00
Alberto Xamin
4473886486 add requirements to pylint 2022-03-24 20:30:44 +01:00
Alberto Xamin
68122a78e7 fix pylint 2022-03-24 20:28:58 +01:00
Alberto Xamin
2cc441ea7e Create pylint.yml 2022-03-24 20:20:04 +01:00
Alberto Xamin
3916408614 fix issues 2022-03-24 20:19:41 +01:00
Alberto Xamin
2743d0b9ce
Create pylint.yml 2022-03-24 20:15:57 +01:00
Alberto Xamin
e88a8f8f12 fix typo 2022-03-24 19:51:05 +01:00
Alberto Xamin
1e8c399c3b add datadog monitoring 2022-03-24 19:22:09 +01:00
Giulio
c88c71feb0 Merge branch 'dev' into main 2022-03-22 22:05:25 +01:00
Giulio
8ca795f680 restore bad fix for roulette event 2022-03-22 22:05:00 +01:00
Giulio
bd84d07562 fix dsh 2022-03-22 22:04:04 +01:00
Giulio
4fe7d09a8e Merge branch 'dev' into main 2022-03-22 14:18:20 +01:00
Giulio
0ed50022f1 fix heal in roulette event 2022-03-22 13:55:55 +01:00
Giulio
2e0bfc240c fix gold rush equipment on roulette 2022-03-22 13:09:44 +01:00
Giulio
2cda50e825 choose a random card when it is face down 2022-03-22 12:42:20 +01:00
Giulio
ab5a684822 Merge remote-tracking branch 'origin/dependabot/github_actions/dev/actions/cache-3' into dev 2022-03-22 11:03:44 +01:00
Giulio
6b77122778 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/pytest-7.1.1' into dev 2022-03-22 11:03:37 +01:00
dependabot[bot]
2181d1355d
Bump actions/cache from 2 to 3
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-22 04:14:25 +00:00
dependabot[bot]
ca6c396c45
Bump pytest from 7.1.0 to 7.1.1 in /backend
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.1.0 to 7.1.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.1.0...7.1.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-18 04:15:11 +00:00
Giulio
bef592c36a Merge branch 'dev' into main 2022-03-17 00:21:25 +01:00
Giulio
7e98b98b1c fix again panic + scope 2022-03-17 00:18:42 +01:00
Giulio
4ac7721b4c Merge branch 'dev' into main 2022-03-16 13:33:24 +01:00
Giulio
81e3dfb635 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/vue/cli-plugin-router-5.0.3' into dev 2022-03-16 11:33:51 +01:00
dependabot[bot]
e34ef050b3
Bump @vue/cli-plugin-router from 5.0.1 to 5.0.3 in /frontend
Bumps [@vue/cli-plugin-router](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-router) from 5.0.1 to 5.0.3.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v5.0.3/packages/@vue/cli-plugin-router)

---
updated-dependencies:
- dependency-name: "@vue/cli-plugin-router"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 10:18:45 +00:00
Giulio
a7e1e7c8ed fix panic + scope 2022-03-16 11:12:44 +01:00
Giulio
513fc00d49 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/pytest-7.1.0' into dev 2022-03-16 11:11:25 +01:00
Giulio
590b9e0b18 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001317' into dev 2022-03-16 11:11:08 +01:00
Giulio
8cace87776 Merge branch 'main' into dev 2022-03-16 11:11:00 +01:00
Alberto Xamin
8a1e5f84ca make icon more visible 2022-03-16 10:20:01 +01:00
Alberto Xamin
3ebff62a4a responsive language and theme buttons 2022-03-16 09:36:53 +01:00
dependabot[bot]
fb8e9f6fb5
Bump caniuse-lite from 1.0.30001314 to 1.0.30001317 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001314 to 1.0.30001317.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001314...1.0.30001317)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 04:20:48 +00:00
dependabot[bot]
cbe4490549
Bump pytest from 7.0.1 to 7.1.0 in /backend
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.0.1 to 7.1.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.0.1...7.1.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 04:12:35 +00:00
Giulio
594e74e111 Merge branch 'dev' into main 2022-03-11 10:42:18 +01:00
Giulio
7d92ca0f41 user friendly bug report 2022-03-10 23:56:07 +01:00
Giulio
604aa8410e Merge branch 'dev' into main 2022-03-10 15:01:44 +01:00
Giulio
8d63835541 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/url-parse-1.5.10' into dev 2022-03-10 15:00:44 +01:00
Giulio
400e301c19 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001314' into dev 2022-03-10 14:59:03 +01:00
Giulio
341ef3aef7 fix duplicated choose in log 2022-03-10 14:58:42 +01:00
dependabot[bot]
c26ab71a95
Bump url-parse from 1.5.3 to 1.5.10 in /frontend
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.3 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.3...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-10 12:48:14 +00:00
Alberto Xamin
ae941ba2af
Merge pull request #179 from albertoxamin/dev
Add gold rush and replay capabilities
2022-03-10 13:46:42 +01:00
dependabot[bot]
a9fbc0da12
Bump caniuse-lite from 1.0.30001313 to 1.0.30001314 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001313 to 1.0.30001314.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001313...1.0.30001314)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-09 04:28:43 +00:00
Giulio
84c71262e0 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/dnspython-2.2.1' into dev 2022-03-07 19:23:33 +01:00
Giulio
d2035ed4b3 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001313' into dev 2022-03-07 19:23:29 +01:00
Giulio
49ab88b007 fix replay for Vera Custer 2022-03-07 19:21:58 +01:00
dependabot[bot]
daeea7a74a
Bump caniuse-lite from 1.0.30001312 to 1.0.30001313 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001312 to 1.0.30001313.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001312...1.0.30001313)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 04:24:04 +00:00
dependabot[bot]
99ffc649b6
Bump dnspython from 2.2.0 to 2.2.1 in /backend
Bumps [dnspython](https://github.com/rthalley/dnspython) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/rthalley/dnspython/releases)
- [Changelog](https://github.com/rthalley/dnspython/blob/v2.2.1/doc/whatsnew.rst)
- [Commits](https://github.com/rthalley/dnspython/compare/v2.2.0...v2.2.1)

---
updated-dependencies:
- dependency-name: dnspython
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 04:19:04 +00:00
Giulio
ab112165f0 fix replayspeed 2022-03-05 20:48:43 +01:00
Giulio
fa231dade2 fix renegade death win 2022-03-05 20:48:17 +01:00
Giulio
453c15cf3a Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/workbox-webpack-plugin-6.5.1' into dev 2022-03-05 03:50:55 +01:00
Giulio
909c02de53 minor fix
bug with Russian roulette as attacker
2022-03-05 03:46:22 +01:00
dependabot[bot]
631ef2627b
Bump workbox-webpack-plugin from 6.5.0 to 6.5.1 in /frontend
Bumps [workbox-webpack-plugin](https://github.com/googlechrome/workbox) from 6.5.0 to 6.5.1.
- [Release notes](https://github.com/googlechrome/workbox/releases)
- [Commits](https://github.com/googlechrome/workbox/compare/v6.5.0...v6.5.1)

---
updated-dependencies:
- dependency-name: workbox-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-04 04:21:07 +00:00
Giulio
b3626dd662 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/discord-webhook-0.15.0' into dev 2022-03-04 01:50:26 +01:00
Giulio
995853e046 fix outlaw and victory from death 2022-03-04 01:49:04 +01:00
dependabot[bot]
d161d14ec3
Bump discord-webhook from 0.14.0 to 0.15.0 in /backend
Bumps [discord-webhook](https://github.com/lovvskillz/python-discord-webhook) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/lovvskillz/python-discord-webhook/releases)
- [Changelog](https://github.com/lovvskillz/python-discord-webhook/blob/master/CHANGES.md)
- [Commits](https://github.com/lovvskillz/python-discord-webhook/compare/0.14.0...0.15.0)

---
updated-dependencies:
- dependency-name: discord-webhook
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-03 04:14:56 +00:00
Giulio
1c95327b83 fix distance with sight_mod card
also handled the hangover event
2022-03-02 23:15:32 +01:00
Giulio
767febb512 filter log in gameinfo 2022-03-02 23:12:22 +01:00
Giulio
7d6746c687 fix equipment
equipment could be reused from the equipment slot
2022-03-02 16:40:04 +01:00
Giulio
1c565e2ccc fix for don bell and green card
when don bell used his ability green cards could not be used
2022-03-02 15:43:53 +01:00
Giulio
34ed060b5c Merge remote-tracking branch 'origin/dependabot/github_actions/dev/actions/checkout-3' into dev 2022-03-02 15:06:14 +01:00
Giulio
39fbd9d711 Merge remote-tracking branch 'origin/dependabot/github_actions/dev/actions/setup-python-3' into dev 2022-03-02 15:06:06 +01:00
Giulio
43c88f0198 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/workbox-webpack-plugin-6.5.0' into dev 2022-03-02 15:05:55 +01:00
dependabot[bot]
abe684efa7
Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-02 04:21:48 +00:00
dependabot[bot]
0e88c5b493
Bump actions/setup-python from 2 to 3
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 3.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 04:18:44 +00:00
Giulio
dd6fa92af8 fix desc in roles cards 2022-02-27 23:22:35 +01:00
Alberto Xamin
019396e615
fix replay bug with non ascii chars in characters names 2022-02-25 16:27:55 +02:00
dependabot[bot]
e2cbbd0550
Bump workbox-webpack-plugin from 6.4.2 to 6.5.0 in /frontend
Bumps [workbox-webpack-plugin](https://github.com/googlechrome/workbox) from 6.4.2 to 6.5.0.
- [Release notes](https://github.com/googlechrome/workbox/releases)
- [Commits](https://github.com/googlechrome/workbox/compare/v6.4.2...v6.5.0)

---
updated-dependencies:
- dependency-name: workbox-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 04:21:57 +00:00
Giulio
adeb9f1d06 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/vue/cli-plugin-router-5.0.1' into dev 2022-02-21 19:06:25 +01:00
dependabot[bot]
eae7e4d030
Bump @vue/cli-plugin-router from 4.5.15 to 5.0.1 in /frontend
Bumps [@vue/cli-plugin-router](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-router) from 4.5.15 to 5.0.1.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v5.0.1/packages/@vue/cli-plugin-router)

---
updated-dependencies:
- dependency-name: "@vue/cli-plugin-router"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 17:46:11 +00:00
Giulio
3a222eb3b2 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001312' into dev 2022-02-21 18:27:40 +01:00
Giulio
e12cce1c68 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/pytest-7.0.1' into dev 2022-02-21 18:27:32 +01:00
Giulio
9f54531f2a Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/vue-i18n-8.27.0' into dev 2022-02-21 18:27:18 +01:00
Giulio
e49002b039 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/dnspython-2.2.0' into dev 2022-02-21 18:27:03 +01:00
dependabot[bot]
a2da913291
Bump caniuse-lite from 1.0.30001297 to 1.0.30001312 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001297 to 1.0.30001312.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001297...1.0.30001312)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 04:24:05 +00:00
dependabot[bot]
2f3fc812b1
Bump pytest from 6.2.5 to 7.0.1 in /backend
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.5 to 7.0.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.2.5...7.0.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 04:17:06 +00:00
dependabot[bot]
594fc158f5
Bump vue-i18n from 8.26.8 to 8.27.0 in /frontend
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.26.8 to 8.27.0.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/v8.x/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.26.8...v8.27.0)

---
updated-dependencies:
- dependency-name: vue-i18n
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 04:21:32 +00:00
dependabot[bot]
8657456a73
Bump dnspython from 1.16.0 to 2.2.0 in /backend
Bumps [dnspython]() from 1.16.0 to 2.2.0.

---
updated-dependencies:
- dependency-name: dnspython
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-19 04:17:41 +00:00
Giulio
15b3f1b751 Merge branch 'main' into dev 2022-01-18 01:14:03 +01:00
Alberto Xamin
3a292efd3c
Merge pull request #141 from albertoxamin/dependabot/npm_and_yarn/frontend/follow-redirects-1.14.7
Bump follow-redirects from 1.13.0 to 1.14.7 in /frontend
2022-01-17 17:41:47 +01:00
dependabot[bot]
d322446af7
Bump follow-redirects from 1.13.0 to 1.14.7 in /frontend
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.13.0 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.13.0...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-15 08:59:07 +00:00
GM
8952a6638e
Merge pull request #135 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/socket.io-client-4.4.1
Bump socket.io-client from 4.4.0 to 4.4.1 in /frontend
2022-01-08 03:15:17 +01:00
GM
14f5c80b58
Merge pull request #136 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/caniuse-lite-1.0.30001297
Bump caniuse-lite from 1.0.30001287 to 1.0.30001297 in /frontend
2022-01-08 03:05:13 +01:00
dependabot[bot]
563a7efaf4
Bump caniuse-lite from 1.0.30001287 to 1.0.30001297 in /frontend
Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001287 to 1.0.30001297.
- [Release notes](https://github.com/browserslist/caniuse-lite/releases)
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001287...1.0.30001297)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-08 01:58:37 +00:00
dependabot[bot]
a0c75d3f64
Bump socket.io-client from 4.4.0 to 4.4.1 in /frontend
Bumps [socket.io-client](https://github.com/socketio/socket.io-client) from 4.4.0 to 4.4.1.
- [Release notes](https://github.com/socketio/socket.io-client/releases)
- [Changelog](https://github.com/socketio/socket.io-client/blob/master/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-client/compare/4.4.0...4.4.1)

---
updated-dependencies:
- dependency-name: socket.io-client
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-08 01:58:24 +00:00
GM
21f080f809
Merge pull request #134 from albertoxamin/dependabot/pip/backend/dev/requests-2.27.1
Bump requests from 2.26.0 to 2.27.1 in /backend
2022-01-08 02:55:53 +01:00
GM
a248493589
Merge pull request #129 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue-i18n-8.26.8
Bump vue-i18n from 8.26.7 to 8.26.8 in /frontend
2022-01-08 02:55:23 +01:00
dependabot[bot]
314a0faac1
Bump requests from 2.26.0 to 2.27.1 in /backend
Bumps [requests](https://github.com/psf/requests) from 2.26.0 to 2.27.1.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.26.0...v2.27.1)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-06 04:18:09 +00:00
dependabot[bot]
202360cec7
Bump vue-i18n from 8.26.7 to 8.26.8 in /frontend
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.26.7 to 8.26.8.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/v8.x/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.26.7...v8.26.8)

---
updated-dependencies:
- dependency-name: vue-i18n
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-29 04:20:57 +00:00
Giulio
697e597cf9 fix pytest to work locally 2021-12-19 17:37:46 +01:00
Giulio
70a2c0609a fix setaccio 2021-12-18 15:38:15 +01:00
Giulio
c043c2036f update node dependencies 2021-12-18 02:52:31 +01:00
Giulio
3ce7913e47 fix apache kid - sbornia - cat balou 2021-12-18 02:50:19 +01:00
Giulio
a83869f9bc fix report and replay 2021-12-18 01:15:14 +01:00
Giulio
852701bc03 update hastebin api
Co-authored-by: Alberto Xamin <alberto@xamin.it>
2021-12-17 23:56:41 +01:00
Giulio
88b5db2afe chat emit report confirm 2021-12-17 22:47:03 +01:00
Giulio
93794671f3 fix report webhook 2021-12-13 18:01:01 +01:00
Giulio
d14afb495e Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/workbox-webpack-plugin-6.4.2' into dev 2021-12-12 15:51:54 +01:00
Giulio
0e02343da9 better 2021-12-12 15:50:58 +01:00
dependabot[bot]
93343f3090
Bump workbox-webpack-plugin from 6.3.0 to 6.4.2 in /frontend
Bumps [workbox-webpack-plugin](https://github.com/googlechrome/workbox) from 6.3.0 to 6.4.2.
- [Release notes](https://github.com/googlechrome/workbox/releases)
- [Commits](https://github.com/googlechrome/workbox/compare/v6.3.0...v6.4.2)

---
updated-dependencies:
- dependency-name: workbox-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-12 09:56:30 +00:00
Giulio
32feae4601 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/eventlet-0.33.0' into dev 2021-12-12 10:52:13 +01:00
Giulio
966d327c50 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/vue/cli-service-4.5.15' into dev 2021-12-12 10:51:53 +01:00
Giulio
0cea402a4d Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/vue/cli-plugin-babel-4.5.15' into dev 2021-12-12 10:51:39 +01:00
Giulio
8002801cde Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/vue-i18n-8.26.7' into dev 2021-12-12 10:51:14 +01:00
Giulio
cec0f060c1 making robots file optional 2021-12-12 10:43:28 +01:00
Giulio
190d872e29 fix miniera abbandonata 2021-12-11 19:02:41 +01:00
dependabot[bot]
161cde9498
Bump eventlet from 0.32.0 to 0.33.0 in /backend
Bumps [eventlet](https://github.com/eventlet/eventlet) from 0.32.0 to 0.33.0.
- [Release notes](https://github.com/eventlet/eventlet/releases)
- [Changelog](https://github.com/eventlet/eventlet/blob/master/NEWS)
- [Commits](https://github.com/eventlet/eventlet/compare/v0.32.0...v0.33.0)

---
updated-dependencies:
- dependency-name: eventlet
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-17 04:16:40 +00:00
dependabot[bot]
5aa446dc47
Bump @vue/cli-service from 4.5.14 to 4.5.15 in /frontend
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 4.5.14 to 4.5.15.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.15/packages/@vue/cli-service)

---
updated-dependencies:
- dependency-name: "@vue/cli-service"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-09 10:35:11 +00:00
dependabot[bot]
1301af8edf
Bump @vue/cli-plugin-babel from 4.5.14 to 4.5.15 in /frontend
Bumps [@vue/cli-plugin-babel](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-babel) from 4.5.14 to 4.5.15.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.15/packages/@vue/cli-plugin-babel)

---
updated-dependencies:
- dependency-name: "@vue/cli-plugin-babel"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-09 10:34:55 +00:00
dependabot[bot]
b0efec761f
Bump vue-i18n from 8.26.5 to 8.26.7 in /frontend
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.26.5 to 8.26.7.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/v8.x/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.26.5...v8.26.7)

---
updated-dependencies:
- dependency-name: vue-i18n
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-09 10:34:49 +00:00
Alberto Xamin
d1fe45095b
Merge pull request #117 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue/cli-plugin-pwa-4.5.15 2021-11-09 12:32:04 +02:00
dependabot[bot]
007f865c38
Bump @vue/cli-plugin-pwa from 4.5.14 to 4.5.15 in /frontend
Bumps [@vue/cli-plugin-pwa](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-pwa) from 4.5.14 to 4.5.15.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.15/packages/@vue/cli-plugin-pwa)

---
updated-dependencies:
- dependency-name: "@vue/cli-plugin-pwa"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-08 16:34:17 +00:00
Alberto Xamin
c0054ab353
Merge pull request #116 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue/cli-plugin-router-4.5.15
Bump @vue/cli-plugin-router from 4.5.14 to 4.5.15 in /frontend
2021-11-08 18:29:32 +02:00
dependabot[bot]
47f9b99d0c
Bump @vue/cli-plugin-router from 4.5.14 to 4.5.15 in /frontend
Bumps [@vue/cli-plugin-router](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-router) from 4.5.14 to 4.5.15.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.15/packages/@vue/cli-plugin-router)

---
updated-dependencies:
- dependency-name: "@vue/cli-plugin-router"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-07 08:23:40 +00:00
Alberto Xamin
8272a7505b
Merge pull request #114 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue/cli-plugin-eslint-4.5.15
Bump @vue/cli-plugin-eslint from 4.5.14 to 4.5.15 in /frontend
2021-11-07 10:20:34 +02:00
dependabot[bot]
ea98f95714
Bump @vue/cli-plugin-eslint from 4.5.14 to 4.5.15 in /frontend
Bumps [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-eslint) from 4.5.14 to 4.5.15.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.15/packages/@vue/cli-plugin-eslint)

---
updated-dependencies:
- dependency-name: "@vue/cli-plugin-eslint"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-29 04:23:42 +00:00
Alberto Xamin
b3d00033dc
Merge pull request #113 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue-router-3.5.3
Bump vue-router from 3.5.2 to 3.5.3 in /frontend
2021-10-27 10:30:39 +03:00
dependabot[bot]
1042d43904
Bump vue-router from 3.5.2 to 3.5.3 in /frontend
Bumps [vue-router](https://github.com/vuejs/vue-router) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/vuejs/vue-router/releases)
- [Changelog](https://github.com/vuejs/vue-router/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-router/compare/v3.5.2...v3.5.3)

---
updated-dependencies:
- dependency-name: vue-router
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-27 04:24:42 +00:00
Alberto Xamin
be535704a1
Merge pull request #112 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/eslint-plugin-vue-7.20.0
Bump eslint-plugin-vue from 7.19.1 to 7.20.0 in /frontend
2021-10-24 15:03:28 +03:00
dependabot[bot]
4970b7f7e4
Bump eslint-plugin-vue from 7.19.1 to 7.20.0 in /frontend
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 7.19.1 to 7.20.0.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v7.19.1...v7.20.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-21 04:21:36 +00:00
Alberto Xamin
82e9e1fe8b
Merge pull request #111 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue/cli-plugin-pwa-4.5.14 2021-10-20 10:17:54 +03:00
dependabot[bot]
d0b9f31a55
Bump @vue/cli-plugin-pwa from 4.5.13 to 4.5.14 in /frontend
Bumps [@vue/cli-plugin-pwa](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-pwa) from 4.5.13 to 4.5.14.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.14/packages/@vue/cli-plugin-pwa)

---
updated-dependencies:
- dependency-name: "@vue/cli-plugin-pwa"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 04:31:28 +00:00
Alberto Xamin
4c04460de0
Merge pull request #107 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue/cli-plugin-babel-4.5.14
Bump @vue/cli-plugin-babel from 4.5.13 to 4.5.14 in /frontend
2021-10-15 14:02:05 +03:00
dependabot[bot]
63ced4b014
Bump @vue/cli-plugin-babel from 4.5.13 to 4.5.14 in /frontend
Bumps [@vue/cli-plugin-babel](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-babel) from 4.5.13 to 4.5.14.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.14/packages/@vue/cli-plugin-babel)

---
updated-dependencies:
- dependency-name: "@vue/cli-plugin-babel"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-15 10:56:29 +00:00
Alberto Xamin
71f32bbfea
Merge pull request #105 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue/cli-service-4.5.14
Bump @vue/cli-service from 4.5.13 to 4.5.14 in /frontend
2021-10-15 13:52:41 +03:00
Alberto Xamin
ab57537c17
Merge pull request #108 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue/cli-plugin-eslint-4.5.14
Bump @vue/cli-plugin-eslint from 4.5.13 to 4.5.14 in /frontend
2021-10-15 13:51:55 +03:00
dependabot[bot]
3f1859a137
Bump @vue/cli-plugin-eslint from 4.5.13 to 4.5.14 in /frontend
Bumps [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-eslint) from 4.5.13 to 4.5.14.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.14/packages/@vue/cli-plugin-eslint)

---
updated-dependencies:
- dependency-name: "@vue/cli-plugin-eslint"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-15 04:26:46 +00:00
dependabot[bot]
d58a38c169
Bump @vue/cli-service from 4.5.13 to 4.5.14 in /frontend
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 4.5.13 to 4.5.14.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.14/packages/@vue/cli-service)

---
updated-dependencies:
- dependency-name: "@vue/cli-service"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-15 04:25:07 +00:00
Alberto Xamin
949ba1a5e6
Merge pull request #104 from albertoxamin/dependabot/pip/backend/dev/certifi-2021.10.8 2021-10-11 08:14:00 +03:00
dependabot[bot]
de39971caf
Bump certifi from 2021.5.30 to 2021.10.8 in /backend
Bumps [certifi](https://github.com/certifi/python-certifi) from 2021.5.30 to 2021.10.8.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2021.05.30...2021.10.08)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 04:25:36 +00:00
Giulio
1cdb524255 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/eslint-plugin-vue-7.19.1' into dev 2021-10-07 16:25:52 +02:00
Alberto Xamin
7f9e0bd964
work on replays
Co-authored-by: GM <giulio.migani@studenti.unitn.it>
2021-10-07 16:53:53 +03:00
dependabot[bot]
d2223aafcb
Bump eslint-plugin-vue from 7.19.0 to 7.19.1 in /frontend
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 7.19.0 to 7.19.1.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v7.19.0...v7.19.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-07 04:25:36 +00:00
Alberto Xamin
fa983d44dc
Merge pull request #102 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/eslint-plugin-vue-7.19.0
Bump eslint-plugin-vue from 7.18.0 to 7.19.0 in /frontend
2021-10-05 07:58:26 +03:00
dependabot[bot]
4b8e036751
Bump eslint-plugin-vue from 7.18.0 to 7.19.0 in /frontend
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 7.18.0 to 7.19.0.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v7.18.0...v7.19.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-05 04:28:20 +00:00
Alberto Xamin
ac8129b22f
Merge pull request #101 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue-i18n-8.26.5
Bump vue-i18n from 8.26.4 to 8.26.5 in /frontend
2021-10-04 14:36:58 +03:00
dependabot[bot]
56fbae07ea
Bump vue-i18n from 8.26.4 to 8.26.5 in /frontend
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.26.4 to 8.26.5.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/v8.x/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.26.4...v8.26.5)

---
updated-dependencies:
- dependency-name: vue-i18n
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-04 04:28:09 +00:00
Alberto Xamin
d4a6ca48af
Merge pull request #99 from albertoxamin/dependabot/pip/backend/dev/greenlet-1.1.2
Bump greenlet from 1.1.1 to 1.1.2 in /backend
2021-10-01 20:51:34 +03:00
Alberto Xamin
cbc8619cf5
Merge pull request #100 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue-i18n-8.26.4
Bump vue-i18n from 8.26.2 to 8.26.4 in /frontend
2021-10-01 20:51:13 +03:00
dependabot[bot]
8e0d291307
Bump vue-i18n from 8.26.2 to 8.26.4 in /frontend
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.26.2 to 8.26.4.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/v8.x/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.26.2...v8.26.4)

---
updated-dependencies:
- dependency-name: vue-i18n
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-01 04:25:04 +00:00
dependabot[bot]
89bfd34abe
Bump greenlet from 1.1.1 to 1.1.2 in /backend
Bumps [greenlet](https://github.com/python-greenlet/greenlet) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/python-greenlet/greenlet/releases)
- [Changelog](https://github.com/python-greenlet/greenlet/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-greenlet/greenlet/compare/1.1.1...1.1.2)

---
updated-dependencies:
- dependency-name: greenlet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-30 04:25:19 +00:00
Alberto Xamin
225a18d1a5
Merge pull request #95 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/eslint-plugin-vue-7.18.0
Bump eslint-plugin-vue from 7.17.0 to 7.18.0 in /frontend
2021-09-29 14:40:40 +03:00
Alberto Xamin
6755b06fc7
Merge pull request #98 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue-i18n-8.26.2
Bump vue-i18n from 8.25.1 to 8.26.2 in /frontend
2021-09-29 14:40:30 +03:00
dependabot[bot]
3522bf804d
Bump vue-i18n from 8.25.1 to 8.26.2 in /frontend
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.25.1 to 8.26.2.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/v8.x/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.25.1...v8.26.2)

---
updated-dependencies:
- dependency-name: vue-i18n
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-29 04:23:32 +00:00
Alberto Xamin
878333746e
show desc if there is only one card, makes it easier on mobile 2021-09-23 18:02:49 +03:00
dependabot[bot]
70b6f6a8e3
Bump eslint-plugin-vue from 7.17.0 to 7.18.0 in /frontend
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 7.17.0 to 7.18.0.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v7.17.0...v7.18.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-20 04:31:59 +00:00
Alberto Xamin
b43e26805c
Merge pull request #94 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue-clipboard2-0.3.3
Bump vue-clipboard2 from 0.3.2 to 0.3.3 in /frontend
2021-09-17 14:54:31 +03:00
dependabot[bot]
2fa748ded8
Bump vue-clipboard2 from 0.3.2 to 0.3.3 in /frontend
Bumps [vue-clipboard2](https://github.com/Inndy/vue-clipboard2) from 0.3.2 to 0.3.3.
- [Release notes](https://github.com/Inndy/vue-clipboard2/releases)
- [Changelog](https://github.com/Inndy/vue-clipboard2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Inndy/vue-clipboard2/compare/v0.3.2...v0.3.3)

---
updated-dependencies:
- dependency-name: vue-clipboard2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-16 04:20:57 +00:00
Alberto Xamin
64f4fef568
Merge pull request #93 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue-i18n-8.25.1
Bump vue-i18n from 8.25.0 to 8.25.1 in /frontend
2021-09-14 17:01:05 +03:00
dependabot[bot]
10824ed1a3
Bump vue-i18n from 8.25.0 to 8.25.1 in /frontend
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.25.0 to 8.25.1.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/v8.x/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.25.0...v8.25.1)

---
updated-dependencies:
- dependency-name: vue-i18n
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-14 04:22:52 +00:00
Alberto Xamin
45fcb4db5e
Merge pull request #92 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue-clipboard2-0.3.2
Bump vue-clipboard2 from 0.3.1 to 0.3.2 in /frontend
2021-09-13 16:48:51 +03:00
dependabot[bot]
e12e53d38a
Bump vue-clipboard2 from 0.3.1 to 0.3.2 in /frontend
Bumps [vue-clipboard2](https://github.com/Inndy/vue-clipboard2) from 0.3.1 to 0.3.2.
- [Release notes](https://github.com/Inndy/vue-clipboard2/releases)
- [Changelog](https://github.com/Inndy/vue-clipboard2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Inndy/vue-clipboard2/compare/v0.3.1...v0.3.2)

---
updated-dependencies:
- dependency-name: vue-clipboard2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-13 04:27:44 +00:00
Giulio
25a2b2a143 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/workbox-webpack-plugin-6.3.0' into dev 2021-09-10 11:55:20 +02:00
Giulio
560f8cd69a Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/socket.io-client-4.2.0' into dev 2021-09-10 11:55:16 +02:00
Giulio
ab5494bac8 Merge remote-tracking branch 'origin/dependabot/pip/backend/dev/pytest-6.2.5' into dev 2021-09-10 11:55:10 +02:00
dependabot[bot]
41a8abcb1e
Bump workbox-webpack-plugin from 6.2.4 to 6.3.0 in /frontend
Bumps [workbox-webpack-plugin](https://github.com/googlechrome/workbox) from 6.2.4 to 6.3.0.
- [Release notes](https://github.com/googlechrome/workbox/releases)
- [Commits](https://github.com/googlechrome/workbox/compare/v6.2.4...v6.3.0)

---
updated-dependencies:
- dependency-name: workbox-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-10 04:27:21 +00:00
dependabot[bot]
accd168124
Bump pytest from 6.2.4 to 6.2.5 in /backend
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.4 to 6.2.5.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.2.4...6.2.5)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-02 19:44:09 +00:00
Alberto Xamin
7779066e9b
replay on hastebin and discord 2021-09-02 22:39:26 +03:00
Alberto Xamin
1fe7f05680
Merge pull request #90 from albertoxamin/dependabot/pip/backend/dev/eventlet-0.32.0
Bump eventlet from 0.31.1 to 0.32.0 in /backend
2021-09-02 11:03:27 +03:00
dependabot[bot]
bde6bc0557
Bump eventlet from 0.31.1 to 0.32.0 in /backend
Bumps [eventlet](https://github.com/eventlet/eventlet) from 0.31.1 to 0.32.0.
- [Release notes](https://github.com/eventlet/eventlet/releases)
- [Changelog](https://github.com/eventlet/eventlet/blob/master/NEWS)
- [Commits](https://github.com/eventlet/eventlet/compare/v0.31.1...v0.32.0)

---
updated-dependencies:
- dependency-name: eventlet
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-02 04:15:49 +00:00
Alberto Xamin
acc6532648
replay logic 2021-09-01 14:36:24 +03:00
Alberto Xamin
ad27e067e9
add rng to init for tests 2021-09-01 12:33:39 +03:00
Alberto Xamin
ac55dadc9d
each game has now a different rng 2021-09-01 12:28:15 +03:00
Alberto Xamin
aaec015a6c
fix private lobbies 2021-09-01 12:07:27 +03:00
dependabot[bot]
ef6c43a9ad
Bump socket.io-client from 4.1.3 to 4.2.0 in /frontend
Bumps [socket.io-client](https://github.com/socketio/socket.io-client) from 4.1.3 to 4.2.0.
- [Release notes](https://github.com/socketio/socket.io-client/releases)
- [Changelog](https://github.com/socketio/socket.io-client/blob/master/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-client/compare/4.1.3...4.2.0)

---
updated-dependencies:
- dependency-name: socket.io-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-31 04:22:58 +00:00
Alberto Xamin
76621efb40
Merge pull request #87 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/eslint-plugin-vue-7.17.0 2021-08-27 08:44:30 +03:00
dependabot[bot]
3205388d1d
Bump eslint-plugin-vue from 7.16.0 to 7.17.0 in /frontend
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 7.16.0 to 7.17.0.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v7.16.0...v7.17.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-27 04:23:42 +00:00
Alberto Xamin
518a7092c7
add startwith seed 2021-08-24 20:05:04 +03:00
Giulio
2175b6a9ff fix ricercato 2021-08-21 16:40:23 +02:00
Giulio
bab8a10b25 fix mebot when a bot must remain bot 2021-08-21 12:40:03 +02:00
Giulio
88defd46a8 fix Elena Fuente & Sbornia 2021-08-21 11:47:19 +02:00
Alberto Xamin
1871030bf1 fix username input 2021-08-20 14:36:37 +03:00
Alberto Xamin
6922470fea fix elena fuente duello/indiani 2021-08-20 14:28:28 +03:00
Alberto Xamin
a8ffa008af add card purchase sound 2021-08-20 12:23:18 +03:00
Alberto Xamin
be7656d091 add suit color for windows 2021-08-20 12:03:04 +03:00
Alberto Xamin
c3d3cf8171 add tests for all the base players 2021-08-20 11:36:26 +03:00
Alberto Xamin
7825a7ac85 add some character test 2021-08-19 11:18:08 +03:00
Alberto Xamin
80a9a61251 add discord notifications 2021-08-19 10:36:28 +03:00
Giulio
6e8d038a6a Merge branch 'main' into dev 2021-08-18 21:27:08 +02:00
Alberto Xamin
4c00131f32
Merge pull request #83 from albertoxamin/dependabot/npm_and_yarn/frontend/socket.io-parser-3.3.2
Bump socket.io-parser from 3.3.1 to 3.3.2 in /frontend
2021-08-18 10:30:11 +03:00
Alberto Xamin
ab32cca43c
Merge pull request #82 from albertoxamin/dependabot/npm_and_yarn/frontend/url-parse-1.5.3
Bump url-parse from 1.5.1 to 1.5.3 in /frontend
2021-08-18 10:29:01 +03:00
Alberto Xamin
1182e50bcd
Merge pull request #84 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/core-js-3.16.2
Bump core-js from 3.16.1 to 3.16.2 in /frontend
2021-08-18 10:28:34 +03:00
dependabot[bot]
20aa04cd28
Bump core-js from 3.16.1 to 3.16.2 in /frontend
Bumps [core-js](https://github.com/zloirock/core-js) from 3.16.1 to 3.16.2.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.16.1...v3.16.2)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-18 04:25:43 +00:00
Alberto Xamin
bee1ba6986
fix kit carlson 2021-08-14 22:49:31 +03:00
dependabot[bot]
18bba8c4be
Bump socket.io-parser from 3.3.1 to 3.3.2 in /frontend
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/3.3.2/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/3.3.1...3.3.2)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-13 06:17:19 +00:00
dependabot[bot]
60537ca168
Bump url-parse from 1.5.1 to 1.5.3 in /frontend
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-13 06:16:58 +00:00
Alberto Xamin
782a15d394
Merge pull request #78 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/eslint-plugin-vue-7.16.0 2021-08-13 09:16:03 +03:00
Alberto Xamin
7c4cf5abf7
Merge pull request #80 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/workbox-webpack-plugin-6.2.4 2021-08-13 09:15:36 +03:00
Alberto Xamin
3027e68eb5
Merge pull request #81 from albertoxamin/dependabot/npm_and_yarn/frontend/path-parse-1.0.7 2021-08-13 09:15:25 +03:00
dependabot[bot]
5b5975c253
Bump path-parse from 1.0.6 to 1.0.7 in /frontend
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-13 01:44:25 +00:00
dependabot[bot]
8b4537cabb
Bump workbox-webpack-plugin from 6.2.2 to 6.2.4 in /frontend
Bumps [workbox-webpack-plugin](https://github.com/googlechrome/workbox) from 6.2.2 to 6.2.4.
- [Release notes](https://github.com/googlechrome/workbox/releases)
- [Commits](https://github.com/googlechrome/workbox/compare/v6.2.2...v6.2.4)

---
updated-dependencies:
- dependency-name: workbox-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-12 04:27:58 +00:00
dependabot[bot]
1dd991ee17
Bump eslint-plugin-vue from 7.15.1 to 7.16.0 in /frontend
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 7.15.1 to 7.16.0.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v7.15.1...v7.16.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-11 04:20:04 +00:00
Alberto Xamin
e94561afb3
Merge pull request #74 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/workbox-webpack-plugin-6.2.2
Bump workbox-webpack-plugin from 6.1.5 to 6.2.2 in /frontend
2021-08-09 18:26:54 +03:00
Alberto Xamin
9d4cb3f7ee
Merge pull request #75 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/core-js-3.16.1
Bump core-js from 3.16.0 to 3.16.1 in /frontend
2021-08-09 18:15:37 +03:00
dependabot[bot]
1214624ac0
Bump workbox-webpack-plugin from 6.1.5 to 6.2.2 in /frontend
Bumps [workbox-webpack-plugin](https://github.com/googlechrome/workbox) from 6.1.5 to 6.2.2.
- [Release notes](https://github.com/googlechrome/workbox/releases)
- [Commits](https://github.com/googlechrome/workbox/compare/v6.1.5...v6.2.2)

---
updated-dependencies:
- dependency-name: workbox-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 15:15:19 +00:00
dependabot[bot]
92758b94e5
Bump core-js from 3.16.0 to 3.16.1 in /frontend
Bumps [core-js](https://github.com/zloirock/core-js) from 3.16.0 to 3.16.1.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.16.0...v3.16.1)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 15:13:49 +00:00
Alberto Xamin
9e5b29f0b9
Merge pull request #73 from albertoxamin/dependabot/pip/backend/dev/greenlet-1.1.1
Bump greenlet from 1.1.0 to 1.1.1 in /backend
2021-08-09 18:13:12 +03:00
dependabot[bot]
db682a8f1b
Bump greenlet from 1.1.0 to 1.1.1 in /backend
Bumps [greenlet](https://github.com/python-greenlet/greenlet) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/python-greenlet/greenlet/releases)
- [Changelog](https://github.com/python-greenlet/greenlet/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-greenlet/greenlet/compare/1.1.0...1.1.1)

---
updated-dependencies:
- dependency-name: greenlet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 15:11:47 +00:00
Alberto Xamin
b77c56763d
Fix multi death
Co-authored-by: GM <giulio.migani@studenti.unitn.it>
2021-08-09 17:58:36 +03:00
Alberto Xamin
87f37dbf90
Merge pull request #71 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/eslint-plugin-vue-7.15.1
Bump eslint-plugin-vue from 7.14.0 to 7.15.1 in /frontend
2021-08-03 11:21:51 +03:00
dependabot[bot]
2ab8540894
Bump eslint-plugin-vue from 7.14.0 to 7.15.1 in /frontend
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 7.14.0 to 7.15.1.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v7.14.0...v7.15.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-03 04:26:32 +00:00
Alberto Xamin
4a1b67c2bc
Merge pull request #67 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/core-js-3.16.0
Bump core-js from 3.15.2 to 3.16.0 in /frontend
2021-07-30 09:24:33 +02:00
dependabot[bot]
b72f14c69f
Bump core-js from 3.15.2 to 3.16.0 in /frontend
Bumps [core-js](https://github.com/zloirock/core-js) from 3.15.2 to 3.16.0.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.15.2...v3.16.0)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-30 04:31:53 +00:00
Alberto Xamin
c0728f0225
add test gatling win 2021-07-21 08:33:38 +03:00
Alberto Xamin
ef99a55685
allow bots to use panico and cat balou on self 2021-07-20 15:38:43 +03:00
Alberto Xamin
655fde3e2b
add tests on win conditions 2021-07-20 14:10:34 +03:00
Giulio
1842b2c412 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/eslint-plugin-vue-7.14.0' into dev 2021-07-20 11:31:54 +02:00
Alberto Xamin
d85788c43c
Merge pull request #66 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue-i18n-8.25.0
Bump vue-i18n from 8.24.5 to 8.25.0 in /frontend
2021-07-19 21:08:54 +03:00
dependabot[bot]
e933265851
Bump vue-i18n from 8.24.5 to 8.25.0 in /frontend
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.24.5 to 8.25.0.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/v8.x/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.24.5...v8.25.0)

---
updated-dependencies:
- dependency-name: vue-i18n
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-19 04:22:50 +00:00
dependabot[bot]
c0923cdbf7
Bump eslint-plugin-vue from 7.13.0 to 7.14.0 in /frontend
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 7.13.0 to 7.14.0.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v7.13.0...v7.14.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-19 04:22:19 +00:00
Giulio
0b114817e2 Merge branch 'dependabot/npm_and_yarn/frontend/dev/socket.io-client-4.1.3' into dev 2021-07-16 11:33:21 +02:00
Giulio
f3e2015939 Merge branch 'dependabot/pip/backend/dev/eventlet-0.31.1' into dev 2021-07-16 11:33:16 +02:00
GM
db87fecf6f
Merge pull request #62 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/eslint-plugin-vue-7.13.0
Bump eslint-plugin-vue from 7.12.1 to 7.13.0 in /frontend
2021-07-16 11:03:57 +02:00
dependabot[bot]
3d2a9b5922
Bump eventlet from 0.31.0 to 0.31.1 in /backend
Bumps [eventlet](https://github.com/eventlet/eventlet) from 0.31.0 to 0.31.1.
- [Release notes](https://github.com/eventlet/eventlet/releases)
- [Changelog](https://github.com/eventlet/eventlet/blob/master/NEWS)
- [Commits](https://github.com/eventlet/eventlet/compare/v0.31.0...v0.31.1)

---
updated-dependencies:
- dependency-name: eventlet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-13 04:20:07 +00:00
dependabot[bot]
a3c5917302
Bump socket.io-client from 4.1.2 to 4.1.3 in /frontend
Bumps [socket.io-client](https://github.com/socketio/socket.io-client) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/socketio/socket.io-client/releases)
- [Changelog](https://github.com/socketio/socket.io-client/blob/master/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-client/compare/4.1.2...4.1.3)

---
updated-dependencies:
- dependency-name: socket.io-client
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-12 04:30:29 +00:00
Alberto Xamin
cc4975851d
fix zaino save 2021-07-10 10:40:42 +02:00
dependabot[bot]
8309958a75
Bump eslint-plugin-vue from 7.12.1 to 7.13.0 in /frontend
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 7.12.1 to 7.13.0.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v7.12.1...v7.13.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-07 04:29:00 +00:00
Alberto Xamin
285cd28660
tests for all base cards 2021-07-04 17:29:04 +02:00
Alberto Xamin
b9d8fc5f7f
add more tests 2021-07-04 14:48:22 +02:00
Alberto Xamin
2be82a7535
fix tests 2021-07-04 14:15:55 +02:00
Alberto Xamin
b307f2bb34
add more tests 2021-07-04 12:20:38 +02:00
Giulio
70740b8493 fix diamond panico 2021-07-03 17:59:50 +02:00
Alberto Xamin
22720c8e12
add bang filter apache 2021-07-02 19:08:27 +02:00
Alberto Xamin
3c3bcfbea4
Legge del west
Co-authored-by: GM <giulio.migani@studenti.unitn.it>
2021-07-02 18:57:17 +02:00
Alberto Xamin
e6dda2b04b
fix tests 2021-07-01 18:11:02 +02:00
Alberto Xamin
109400d217
add room name to debug 2021-07-01 18:02:15 +02:00
Alberto Xamin
276e1c8275
can't play card message 2021-07-01 17:46:16 +02:00
Alberto Xamin
bab5e47041
test barile 2021-07-01 10:06:55 +02:00
Alberto Xamin
8f12f95679
add game tests 2021-07-01 09:48:37 +02:00
Giulio
6185d506c3 refactor & fix of all ways of drawing cards 2021-06-30 23:39:37 +02:00
Alberto Xamin
3e752b352c
Merge pull request #61 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/core-js-3.15.2
Bump core-js from 3.15.1 to 3.15.2 in /frontend
2021-06-30 17:06:24 +02:00
dependabot[bot]
b2faf89ef3
Bump core-js from 3.15.1 to 3.15.2 in /frontend
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.15.1 to 3.15.2.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/commits/v3.15.2/packages/core-js)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-29 14:29:30 +00:00
Alberto Xamin
bae36ccb35
fix dev image compilation 2021-06-29 14:51:28 +02:00
Alberto Xamin
9ca62bd5ba
fix imports 2021-06-29 14:48:33 +02:00
Alberto Xamin
2c794723c7
add backend tests 2021-06-29 14:30:05 +02:00
Giulio
afe14909b0 we write the role of who wins 2021-06-28 12:00:52 +02:00
Giulio
8f1f8a9698 excluding the sheriff from the wanted card 2021-06-28 11:04:50 +02:00
Giulio
03c3af44d9 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/eslint-plugin-vue-7.12.1' into dev 2021-06-28 10:13:20 +02:00
dependabot[bot]
a83d1262b3
Bump eslint-plugin-vue from 7.11.1 to 7.12.1 in /frontend
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 7.11.1 to 7.12.1.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v7.11.1...v7.12.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-28 04:28:42 +00:00
Alberto Xamin
003e27222d
fix bang-bottiglia 2021-06-27 20:49:25 +02:00
Giulio
348e6a7f9c reset nuggets on death 2021-06-27 17:31:10 +02:00
Giulio
a61615c24e fix lucky duke & Rum 2021-06-27 16:32:31 +02:00
Giulio
1ce16a0753 use panico and cat balou on itself 2021-06-27 16:17:23 +02:00
Giulio
7f81276052 ricercato can target self 2021-06-27 14:35:37 +02:00
Giulio
4bb0ac2344 fix Dutch Will 2021-06-27 12:16:24 +02:00
Giulio
f01d31ed2d fix - sheriff kills deputy and loses gold rush equipment 2021-06-27 12:11:20 +02:00
Giulio
185984c364 fix give nuggets 2021-06-26 21:57:17 +02:00
Giulio
dc5cb286c0 edit & fix beer in gold rush 2021-06-26 16:44:14 +02:00
Giulio
83a61b7466 fix gold rush discard 2021-06-26 16:43:24 +02:00
Alberto Xamin
bdd38efcdc
Zaino save 2021-06-26 14:32:14 +02:00
Alberto Xamin
fc485642db
add gold rush to help 2021-06-26 14:24:08 +02:00
Alberto Xamin
0b3f726a60
update github actions and comments to the Dockerfile 2021-06-26 12:53:23 +02:00
Alberto Xamin
4e317728a4
test new slim docker image 2021-06-26 12:18:50 +02:00
Alberto Xamin
57e18a1121
separate builds 2021-06-26 11:25:19 +02:00
Alberto Xamin
35315516e3
pretty luzena frontend 2021-06-26 11:20:02 +02:00
Alberto Xamin
4d8fbb242a
fix ricercato and write more card usage 2021-06-26 11:00:19 +02:00
Alberto Xamin
5ff9b68e14
fix gold rush discard 2021-06-26 10:43:38 +02:00
Giulio
384ddce5dc updated the number of shop cards 2021-06-26 10:09:39 +02:00
Alberto Xamin
305efac192
fix cinturone and text 2021-06-25 18:55:28 +02:00
Alberto Xamin
283c732880
fix emporio 2021-06-25 17:26:34 +02:00
Alberto Xamin
8f8deb2f1c
fix cinturone 2021-06-25 17:21:31 +02:00
Alberto Xamin
24723faee3
chat write discard 2021-06-25 17:21:05 +02:00
Alberto Xamin
7dba5e6ada
fix ricercato 2021-06-25 17:14:33 +02:00
Alberto Xamin
2bb39311c3
emporio faster 2021-06-25 17:13:15 +02:00
Alberto Xamin
62863b38a0
scrap gold rush equipment 2021-06-25 17:02:15 +02:00
Alberto Xamin
38224af408
don't show players with high cost cards 2021-06-25 16:52:47 +02:00
Alberto Xamin
fcc5fa8bbd
disable autocomplete chat 2021-06-25 16:02:16 +02:00
Alberto Xamin
ec3b7bd356
don't recover from large damage 2021-06-25 15:52:53 +02:00
Alberto Xamin
49bb5ee4e5
sid choose cards before death 2021-06-25 15:51:21 +02:00
Alberto Xamin
847ae5187e
fix dottore 2021-06-25 15:13:58 +02:00
Alberto Xamin
a3db6169e6
better command suggestion 2021-06-25 14:52:59 +02:00
Alberto Xamin
abe6d1573d
add disconnected tip 2021-06-25 14:21:30 +02:00
Alberto Xamin
4fc3d57426
add beta label 2021-06-25 14:18:11 +02:00
Alberto Xamin
c1ba77d478
fix equipment layout bug 2021-06-24 18:13:22 +02:00
Alberto
1bbea0c7aa
Merge remote-tracking branch 'origin/gold-rush' into gold-rush 2021-06-24 18:02:49 +02:00
Alberto Xamin
4db85b0980
fix bicchierino bug and add birra missing text 2021-06-24 18:02:17 +02:00
Alberto Xamin
8bc8c025b5
bot purchasing cards 2021-06-24 18:01:44 +02:00
Giulio
edcc3085ad Merge branch 'dev' into main 2021-06-24 17:57:07 +02:00
Giulio
ca55909579 fix merge 2021-06-24 17:55:53 +02:00
Alberto Xamin
3954dcc804
Merge branch 'dev'
Conflicts:
	frontend/src/components/Player.vue
2021-06-24 17:49:55 +02:00
Alberto Xamin
843f8ee363
fix sid ketchum 2021-06-24 17:39:51 +02:00
Giulio
e5c629b5e5 cant-play ability 2021-06-24 17:33:04 +02:00
Giulio
82ca28b99d fix usage of ability 2021-06-24 15:57:33 +02:00
Giulio
9236a415d5 Merge branch 'dev' into gold-rush 2021-06-24 10:40:34 +02:00
Giulio
eeec08e0cc Merge branch 'dev' into main 2021-06-24 10:27:55 +02:00
Giulio
7a4e939eaf fix draw manette indentation again 2021-06-24 10:22:27 +02:00
Giulio
98c9f592b5 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/frontend/dev/core-js-3.15.1' into dev 2021-06-24 09:58:39 +02:00
dependabot[bot]
88a5998056
Bump core-js from 3.15.0 to 3.15.1 in /frontend
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.15.0 to 3.15.1.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/commits/v3.15.1/packages/core-js)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-23 04:29:46 +00:00
Giulio
be18263b8d Merge branch 'dev' into gold-rush 2021-06-22 16:45:35 +02:00
GM
40c60ff000
Merge pull request #58 from albertoxamin/dependabot/npm_and_yarn/frontend/color-string-1.5.5
Bump color-string from 1.5.4 to 1.5.5 in /frontend
2021-06-22 16:06:48 +02:00
Giulio
33b0158558 fix starting error 2021-06-22 16:03:41 +02:00
Alberto Xamin
14919ae476
Update docker-image.yml 2021-06-22 15:08:29 +02:00
Alberto Xamin
1f82ed8324
Update docker-image.yml 2021-06-22 15:06:43 +02:00
Alberto
8d839f1d57
update base docker image 2021-06-22 15:04:12 +02:00
dependabot[bot]
8193e81148
Bump color-string from 1.5.4 to 1.5.5 in /frontend
Bumps [color-string](https://github.com/Qix-/color-string) from 1.5.4 to 1.5.5.
- [Release notes](https://github.com/Qix-/color-string/releases)
- [Changelog](https://github.com/Qix-/color-string/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Qix-/color-string/compare/1.5.4...1.5.5)

---
updated-dependencies:
- dependency-name: color-string
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-22 09:03:01 +00:00
Alberto
f89ba22435
update github action for main image 2021-06-22 11:01:21 +02:00
Alberto Xamin
ebab3b49d1
Merge pull request #57 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue-router-3.5.2
Bump vue-router from 3.5.1 to 3.5.2 in /frontend
2021-06-22 10:59:25 +02:00
Alberto
102dc3873e
add back other stuff 2021-06-22 10:35:45 +02:00
Alberto Xamin
63842fea2a
Update Dockerfile 2021-06-22 10:32:18 +02:00
Alberto Xamin
5b6ac76d24
Update Dockerfile 2021-06-22 10:28:59 +02:00
Alberto
0a548e5a30
Merge remote-tracking branch 'origin/dev' into dev 2021-06-22 10:24:25 +02:00
Alberto
c39e323fd0
test smaller dockerfile 2021-06-22 10:24:02 +02:00
Alberto Xamin
a263fe83a9
Update dev-image.yml 2021-06-22 10:16:53 +02:00
Alberto
d35adf482f
push the right docker file 2021-06-22 10:13:26 +02:00
Alberto Xamin
401fe96988
Update dev-image.yml 2021-06-22 10:06:54 +02:00
Alberto
63b6437248
add apt get install dependencies 2021-06-22 10:03:37 +02:00
dependabot[bot]
06325154c9
Bump vue-router from 3.5.1 to 3.5.2 in /frontend
Bumps [vue-router](https://github.com/vuejs/vue-router) from 3.5.1 to 3.5.2.
- [Release notes](https://github.com/vuejs/vue-router/releases)
- [Changelog](https://github.com/vuejs/vue-router/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-router/compare/v3.5.1...v3.5.2)

---
updated-dependencies:
- dependency-name: vue-router
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-22 04:26:49 +00:00
Alberto Xamin
242d1a8fc5
Update dev-image.yml 2021-06-21 17:27:25 +02:00
Alberto Xamin
d730bb64dd
Update dev-image.yml 2021-06-21 17:25:27 +02:00
Alberto Xamin
1edf0d72ec
Update dev-image.yml 2021-06-21 17:24:11 +02:00
Alberto Xamin
9d412e35ee
Update dev-image.yml 2021-06-21 16:07:24 +02:00
Alberto Xamin
9f1dc376f4
Update dev-image.yml 2021-06-21 15:22:43 +02:00
Alberto Xamin
068ce5da00
Update dev-image.yml 2021-06-21 15:20:19 +02:00
Alberto Xamin
0c1659a4ca
Merge pull request #56 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/core-js-3.15.0
Bump core-js from 3.14.0 to 3.15.0 in /frontend
2021-06-21 15:10:08 +02:00
Alberto Xamin
ad13dc085e
Merge pull request #55 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue-i18n-8.24.5
Bump vue-i18n from 8.24.4 to 8.24.5 in /frontend
2021-06-21 15:09:42 +02:00
dependabot[bot]
c9114493ee
Bump core-js from 3.14.0 to 3.15.0 in /frontend
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.14.0 to 3.15.0.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/commits/v3.15.0/packages/core-js)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-21 04:29:29 +00:00
dependabot[bot]
dc1d39a66e
Bump vue-i18n from 8.24.4 to 8.24.5 in /frontend
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.24.4 to 8.24.5.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/v8.x/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.24.4...v8.24.5)

---
updated-dependencies:
- dependency-name: vue-i18n
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-21 04:29:20 +00:00
Alberto Xamin
f11f5dde0a
usability fixes for small screens 2021-06-20 20:06:13 +02:00
Giulio
29aca8ecbb fix indentation again 2021-06-20 19:49:31 +02:00
Giulio
b2ea62bce9 Merge branch 'dev' into gold-rush 2021-06-20 18:56:11 +02:00
Alberto Xamin
11363a898f
fix vice ricercato 2021-06-20 18:48:42 +02:00
Alberto Xamin
9c0183ea78
disable cancel for bottiglia e complice 2021-06-20 18:44:21 +02:00
Alberto
7c34761f65
Merge remote-tracking branch 'origin/main' into main 2021-06-20 18:29:29 +02:00
Alberto
f3857311d5
add translation tip 2021-06-20 18:29:05 +02:00
Alberto Xamin
a0e8e28c20
fix breaking bug gold rush 2021-06-20 18:23:06 +02:00
Giulio
47ea9c6903 fix icon logic 2021-06-20 18:22:24 +02:00
Giulio
307ce461db localize theme 2021-06-20 17:45:19 +02:00
Alberto Xamin
9b057bb468
discard others cards 2021-06-20 17:44:29 +02:00
Giulio
40197d486a fix draw manette indentation 2021-06-20 16:25:17 +02:00
Giulio
997337581e fix draw notify indentation 2021-06-20 16:21:00 +02:00
Alberto Xamin
09298f8d10
fix return indentation 2021-06-20 15:11:07 +02:00
Alberto Xamin
8fd0ea3fb6
return special success 2021-06-20 15:06:09 +02:00
Alberto Xamin
1b5edfa736
show player money 2021-06-20 15:04:41 +02:00
Alberto Xamin
4a8ff39000
add menu tips and auto set the language based on the browser lang 2021-06-20 11:37:57 +02:00
Alberto
26e9e4c7ce
Merge remote-tracking branch 'origin/dev' into gold-rush 2021-06-20 11:04:07 +02:00
Alberto Xamin
564c5d6821
refactor special abilities 2021-06-20 11:00:17 +02:00
Alberto Xamin
293b458529
Pretty luzena, gold rush new turn and verbose rum 2021-06-20 10:32:36 +02:00
Giulio
467162eb6e reset more card 2021-06-20 03:22:12 +02:00
Giulio
1149aa9dc7 fix multiple gregs and herbs 2021-06-20 02:42:06 +02:00
Giulio
7c4eb60808 fix bot in status page 2021-06-20 00:02:00 +02:00
Alberto Xamin
5948a7ad74
more mobile safari fixes + username suggestions 2021-06-19 19:56:10 +02:00
Alberto Xamin
b984c55f40
fix for mobile safari 2021-06-19 19:25:43 +02:00
Giulio
62174ee74e Merge branch 'dev' into gold-rush 2021-06-19 19:09:57 +02:00
Alberto Xamin
cb1824c0e4
add desc and bug fixes
Co-authored-by: GM <giulio.migani@studenti.unitn.it>
2021-06-19 18:48:39 +02:00
Alberto Xamin
98cf684b3f
some improvements to status page 2021-06-19 17:32:54 +02:00
Alberto Xamin
2e4d7c5ede
blacklist 2021-06-19 17:12:18 +02:00
Alberto Xamin
413f3ae54b
superpowers
Co-authored-by: GM <giulio.migani@studenti.unitn.it>
2021-06-19 16:46:50 +02:00
Alberto Xamin
1ac37f9039
hide bad rooms 2021-06-19 14:00:42 +02:00
Alberto Xamin
87896298f3
Merge pull request #54 from albertoxamin/dev
dependency resolution
2021-06-18 22:26:05 +02:00
Giulio
679403aed2 fix engine socket
The client is using an unsupported version of the Socket.IO or Engine.IO protocols
2021-06-18 11:06:09 +02:00
GM
79420cc7cf
Merge pull request #50 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue/cli-service-4.5.13
Bump @vue/cli-service from 4.5.9 to 4.5.13 in /frontend
2021-06-18 01:57:09 +02:00
GM
bffe7c61e7
Merge pull request #51 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/workbox-webpack-plugin-6.1.5
Bump workbox-webpack-plugin from 6.0.2 to 6.1.5 in /frontend
2021-06-18 01:56:57 +02:00
dependabot[bot]
e9aba90db5
Bump workbox-webpack-plugin from 6.0.2 to 6.1.5 in /frontend
Bumps [workbox-webpack-plugin](https://github.com/googlechrome/workbox) from 6.0.2 to 6.1.5.
- [Release notes](https://github.com/googlechrome/workbox/releases)
- [Commits](https://github.com/googlechrome/workbox/compare/v6.0.2...v6.1.5)

---
updated-dependencies:
- dependency-name: workbox-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 23:54:37 +00:00
dependabot[bot]
776f13696e
Bump @vue/cli-service from 4.5.9 to 4.5.13 in /frontend
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 4.5.9 to 4.5.13.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.13/packages/@vue/cli-service)

---
updated-dependencies:
- dependency-name: "@vue/cli-service"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 23:54:21 +00:00
GM
570032dd90
Merge pull request #48 from albertoxamin/dependabot/pip/backend/dev/greenlet-1.1.0
Bump greenlet from 0.4.17 to 1.1.0 in /backend
2021-06-18 01:52:46 +02:00
dependabot[bot]
ef5834e269
Bump greenlet from 0.4.17 to 1.1.0 in /backend
Bumps [greenlet](https://github.com/python-greenlet/greenlet) from 0.4.17 to 1.1.0.
- [Release notes](https://github.com/python-greenlet/greenlet/releases)
- [Changelog](https://github.com/python-greenlet/greenlet/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-greenlet/greenlet/compare/0.4.17...1.1.0)

---
updated-dependencies:
- dependency-name: greenlet
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 23:48:52 +00:00
GM
112b9fe64e
Merge pull request #47 from albertoxamin/dependabot/npm_and_yarn/frontend/elliptic-6.5.4
Bump elliptic from 6.5.3 to 6.5.4 in /frontend
2021-06-18 01:47:54 +02:00
GM
dc7bc7ed81
Merge pull request #44 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue-router-3.5.1
Bump vue-router from 3.4.9 to 3.5.1 in /frontend
2021-06-18 00:59:05 +02:00
GM
6ac1bc6f74
Merge pull request #42 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/socket.io-client-4.1.2
Bump socket.io-client from 3.0.3 to 4.1.2 in /frontend
2021-06-18 00:58:52 +02:00
dependabot[bot]
cb93e713e9
Bump socket.io-client from 3.0.3 to 4.1.2 in /frontend
Bumps [socket.io-client](https://github.com/socketio/socket.io-client) from 3.0.3 to 4.1.2.
- [Release notes](https://github.com/socketio/socket.io-client/releases)
- [Changelog](https://github.com/socketio/socket.io-client/blob/master/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-client/compare/3.0.3...4.1.2)

---
updated-dependencies:
- dependency-name: socket.io-client
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 22:56:27 +00:00
GM
f148fa0ce5
Merge pull request #43 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue/cli-plugin-pwa-4.5.13
Bump @vue/cli-plugin-pwa from 4.5.9 to 4.5.13 in /frontend
2021-06-18 00:53:39 +02:00
GM
fc4c63cdce
Merge pull request #45 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/eslint-plugin-vue-7.11.1
Bump eslint-plugin-vue from 6.2.2 to 7.11.1 in /frontend
2021-06-18 00:53:24 +02:00
GM
4b5a5df6b5
Merge pull request #46 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/register-service-worker-1.7.2
Bump register-service-worker from 1.7.1 to 1.7.2 in /frontend
2021-06-18 00:53:09 +02:00
dependabot[bot]
c1af1971df
Bump register-service-worker from 1.7.1 to 1.7.2 in /frontend
Bumps [register-service-worker](https://github.com/yyx990803/register-service-worker) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/yyx990803/register-service-worker/releases)
- [Changelog](https://github.com/yyx990803/register-service-worker/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yyx990803/register-service-worker/compare/v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: register-service-worker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 22:45:26 +00:00
dependabot[bot]
7aaf73c90f
Bump eslint-plugin-vue from 6.2.2 to 7.11.1 in /frontend
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 6.2.2 to 7.11.1.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v6.2.2...v7.11.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 22:45:17 +00:00
dependabot[bot]
dec219c86e
Bump vue-router from 3.4.9 to 3.5.1 in /frontend
Bumps [vue-router](https://github.com/vuejs/vue-router) from 3.4.9 to 3.5.1.
- [Release notes](https://github.com/vuejs/vue-router/releases)
- [Changelog](https://github.com/vuejs/vue-router/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-router/compare/v3.4.9...v3.5.1)

---
updated-dependencies:
- dependency-name: vue-router
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 22:45:03 +00:00
dependabot[bot]
2eda81144c
Bump @vue/cli-plugin-pwa from 4.5.9 to 4.5.13 in /frontend
Bumps [@vue/cli-plugin-pwa](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-pwa) from 4.5.9 to 4.5.13.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.13/packages/@vue/cli-plugin-pwa)

---
updated-dependencies:
- dependency-name: "@vue/cli-plugin-pwa"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 22:44:53 +00:00
GM
a64742e69f
Merge pull request #39 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue/cli-plugin-eslint-4.5.13
Bump @vue/cli-plugin-eslint from 4.5.9 to 4.5.13 in /frontend
2021-06-17 20:52:56 +02:00
dependabot[bot]
5b0878323f
Bump @vue/cli-plugin-eslint from 4.5.9 to 4.5.13 in /frontend
Bumps [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-eslint) from 4.5.9 to 4.5.13.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.13/packages/@vue/cli-plugin-eslint)

---
updated-dependencies:
- dependency-name: "@vue/cli-plugin-eslint"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 18:45:46 +00:00
GM
6566453bb0
Merge pull request #38 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue-and-vue-template-compiler-2.6.14
Bump vue and vue-template-compiler in /frontend
2021-06-17 20:43:34 +02:00
dependabot[bot]
784bc57b66
Bump vue and vue-template-compiler in /frontend
Bumps [vue](https://github.com/vuejs/vue) and [vue-template-compiler](https://github.com/vuejs/vue). These dependencies needed to be updated together.

Updates `vue` from 2.6.12 to 2.6.14
- [Release notes](https://github.com/vuejs/vue/releases)
- [Commits](https://github.com/vuejs/vue/compare/v2.6.12...v2.6.14)

Updates `vue-template-compiler` from 2.6.12 to 2.6.14
- [Release notes](https://github.com/vuejs/vue/releases)
- [Commits](https://github.com/vuejs/vue/compare/v2.6.12...v2.6.14)

---
updated-dependencies:
- dependency-name: vue
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: vue-template-compiler
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 18:42:00 +00:00
GM
3cb2aef51c
Merge pull request #36 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue/cli-plugin-babel-4.5.13
Bump @vue/cli-plugin-babel from 4.5.9 to 4.5.13 in /frontend
2021-06-17 20:41:07 +02:00
GM
c32663a808
Merge pull request #37 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/core-js-3.14.0
Bump core-js from 3.7.0 to 3.14.0 in /frontend
2021-06-17 20:36:50 +02:00
Giulio
2a60e40501 Merge branch 'main' into dev 2021-06-17 19:43:11 +02:00
GM
089319a5f1
Merge pull request #40 from albertoxamin/dependabot/npm_and_yarn/frontend/y18n-4.0.3
Bump y18n from 4.0.0 to 4.0.3 in /frontend
2021-06-17 19:39:49 +02:00
GM
9ee1c5b3aa
Merge pull request #35 from albertoxamin/dependabot/npm_and_yarn/frontend/dev/vue-i18n-8.24.4
Bump vue-i18n from 8.22.2 to 8.24.4 in /frontend
2021-06-17 19:39:28 +02:00
GM
1f73ec17eb
Merge pull request #33 from albertoxamin/dependabot/pip/backend/dev/python-socketio-5.3.0
Bump python-socketio from 4.6.0 to 5.3.0 in /backend
2021-06-17 19:39:08 +02:00
dependabot[bot]
923325a356
Bump python-socketio from 4.6.0 to 5.3.0 in /backend
Bumps [python-socketio](https://github.com/miguelgrinberg/python-socketio) from 4.6.0 to 5.3.0.
- [Release notes](https://github.com/miguelgrinberg/python-socketio/releases)
- [Changelog](https://github.com/miguelgrinberg/python-socketio/blob/main/CHANGES.md)
- [Commits](https://github.com/miguelgrinberg/python-socketio/compare/v4.6.0...v5.3.0)

---
updated-dependencies:
- dependency-name: python-socketio
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 17:33:48 +00:00
GM
b88ed670e1
Merge pull request #27 from albertoxamin/dependabot/pip/dev/python-engineio-4.2.0
Bump python-engineio from 3.13.2 to 4.2.0
2021-06-17 19:33:21 +02:00
GM
612c05273a
Merge pull request #28 from albertoxamin/dependabot/pip/dev/certifi-2021.5.30
Bump certifi from 2020.11.8 to 2021.5.30
2021-06-17 19:33:01 +02:00
dependabot[bot]
4428b2d51d
Bump python-engineio from 3.13.2 to 4.2.0
Bumps [python-engineio](https://github.com/miguelgrinberg/python-engineio) from 3.13.2 to 4.2.0.
- [Release notes](https://github.com/miguelgrinberg/python-engineio/releases)
- [Changelog](https://github.com/miguelgrinberg/python-engineio/blob/main/CHANGES.md)
- [Commits](https://github.com/miguelgrinberg/python-engineio/compare/v3.13.2...v4.2.0)

---
updated-dependencies:
- dependency-name: python-engineio
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 17:29:28 +00:00
dependabot[bot]
245ffa2191
Bump certifi from 2020.11.8 to 2021.5.30
Bumps [certifi](https://github.com/certifi/python-certifi) from 2020.11.8 to 2021.5.30.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2020.11.08...2021.05.30)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 17:29:26 +00:00
GM
f7c0298832
Merge pull request #26 from albertoxamin/dependabot/pip/dev/six-1.16.0
Bump six from 1.15.0 to 1.16.0
2021-06-17 19:29:15 +02:00
GM
e301cd9169
Merge pull request #25 from albertoxamin/dependabot/pip/dev/eventlet-0.31.0
Bump eventlet from 0.29.1 to 0.31.0
2021-06-17 19:28:50 +02:00
dependabot[bot]
11d4b4e6e9
Bump elliptic from 6.5.3 to 6.5.4 in /frontend
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4)

---
updated-dependencies:
- dependency-name: elliptic
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 17:27:35 +00:00
dependabot[bot]
33040204b3
Bump y18n from 4.0.0 to 4.0.3 in /frontend
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.3.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/y18n-v4.0.3/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/compare/v4.0.0...y18n-v4.0.3)

---
updated-dependencies:
- dependency-name: y18n
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 17:27:17 +00:00
GM
a4bd427bc9
Merge pull request #24 from albertoxamin/dependabot/npm_and_yarn/frontend/url-parse-1.5.1
Bump url-parse from 1.4.7 to 1.5.1 in /frontend
2021-06-17 19:26:57 +02:00
GM
03418da608
Merge pull request #23 from albertoxamin/dependabot/npm_and_yarn/frontend/lodash-4.17.21
Bump lodash from 4.17.20 to 4.17.21 in /frontend
2021-06-17 19:26:39 +02:00
dependabot[bot]
14b6a9057c
Bump core-js from 3.7.0 to 3.14.0 in /frontend
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.7.0 to 3.14.0.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/commits/v3.14.0/packages/core-js)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 17:26:30 +00:00
dependabot[bot]
2a47f402aa
Bump @vue/cli-plugin-babel from 4.5.9 to 4.5.13 in /frontend
Bumps [@vue/cli-plugin-babel](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-babel) from 4.5.9 to 4.5.13.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.13/packages/@vue/cli-plugin-babel)

---
updated-dependencies:
- dependency-name: "@vue/cli-plugin-babel"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 17:26:10 +00:00
dependabot[bot]
0c2930ec36
Bump vue-i18n from 8.22.2 to 8.24.4 in /frontend
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.22.2 to 8.24.4.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/v8.x/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.22.2...v8.24.4)

---
updated-dependencies:
- dependency-name: vue-i18n
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 17:25:43 +00:00
GM
162e11fc79 Update dependabot.yml 2021-06-17 19:21:45 +02:00
dependabot[bot]
09bc06ac1f
Bump six from 1.15.0 to 1.16.0
Bumps [six](https://github.com/benjaminp/six) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/benjaminp/six/releases)
- [Changelog](https://github.com/benjaminp/six/blob/master/CHANGES)
- [Commits](https://github.com/benjaminp/six/compare/1.15.0...1.16.0)

---
updated-dependencies:
- dependency-name: six
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 17:17:28 +00:00
dependabot[bot]
e281979ca4
Bump eventlet from 0.29.1 to 0.31.0
Bumps [eventlet](https://github.com/eventlet/eventlet) from 0.29.1 to 0.31.0.
- [Release notes](https://github.com/eventlet/eventlet/releases)
- [Changelog](https://github.com/eventlet/eventlet/blob/master/NEWS)
- [Commits](https://github.com/eventlet/eventlet/compare/v0.29.1...v0.31.0)

---
updated-dependencies:
- dependency-name: eventlet
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 17:17:24 +00:00
GM
9efbdb2c8a
edit dependabot.yml 2021-06-17 19:02:00 +02:00
dependabot[bot]
c9fd9193c6
Bump url-parse from 1.4.7 to 1.5.1 in /frontend
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.1.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.1)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 16:54:40 +00:00
dependabot[bot]
2a9e737a63
Bump lodash from 4.17.20 to 4.17.21 in /frontend
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

---
updated-dependencies:
- dependency-name: lodash
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 16:54:22 +00:00
Alberto Xamin
d4ac6f7b2a
Merge pull request #18 from albertoxamin/dependabot/npm_and_yarn/frontend/hosted-git-info-2.8.9 2021-06-17 18:54:16 +02:00
Alberto Xamin
fd65ea5f86
Merge pull request #19 from albertoxamin/dependabot/npm_and_yarn/frontend/postcss-7.0.36 2021-06-17 18:54:05 +02:00
Alberto Xamin
22c040dc72
Merge pull request #20 from albertoxamin/dependabot/npm_and_yarn/frontend/ssri-6.0.2 2021-06-17 18:53:44 +02:00
Alberto Xamin
a16ce4c55b
Merge pull request #21 from albertoxamin/dependabot/npm_and_yarn/frontend/browserslist-4.16.6 2021-06-17 18:53:36 +02:00
Alberto Xamin
d55d7effe3
Merge pull request #22 from albertoxamin/dependabot/npm_and_yarn/frontend/dns-packet-1.3.4 2021-06-17 18:53:24 +02:00
dependabot[bot]
1fb77e6dfb
Bump dns-packet from 1.3.1 to 1.3.4 in /frontend
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v1.3.1...v1.3.4)

---
updated-dependencies:
- dependency-name: dns-packet
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 16:49:42 +00:00
dependabot[bot]
a5aca2bf34
Bump ssri from 6.0.1 to 6.0.2 in /frontend
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

---
updated-dependencies:
- dependency-name: ssri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 16:49:41 +00:00
dependabot[bot]
ccbbfb0e7b
Bump browserslist from 4.14.7 to 4.16.6 in /frontend
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.14.7 to 4.16.6.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.14.7...4.16.6)

---
updated-dependencies:
- dependency-name: browserslist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 16:49:41 +00:00
dependabot[bot]
14cac2d41f
Bump postcss from 7.0.35 to 7.0.36 in /frontend
Bumps [postcss](https://github.com/postcss/postcss) from 7.0.35 to 7.0.36.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/7.0.35...7.0.36)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 16:49:40 +00:00
dependabot[bot]
fc91740bd7
Bump hosted-git-info from 2.8.8 to 2.8.9 in /frontend
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

---
updated-dependencies:
- dependency-name: hosted-git-info
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 16:49:39 +00:00
Alberto Xamin
a6174fee95
fix password bug 2021-06-17 18:32:55 +02:00
Alberto Xamin
a3d33827a7
dual birra 2021-06-17 18:02:48 +02:00
Alberto Xamin
d03afcbf0c
fix bottiglia bang 2021-06-17 17:49:55 +02:00
Giulio
7874446d40 Merge branch 'dev' into main 2021-06-17 17:48:52 +02:00
Alberto Xamin
9d6cf7a5fa
snake special 2021-06-17 17:45:25 +02:00
Alberto Xamin
2978da9e94
cloud special 2021-06-17 17:41:34 +02:00
Giulio
000cd93cb1 minor error while closing or destroying game 2021-06-17 17:37:34 +02:00
Alberto Xamin
a88d3ad802
Jacky Murieta special 2021-06-17 17:32:11 +02:00
Alberto Xamin
5fe7de3be7
SimeonPicos 2021-06-17 17:07:47 +02:00
Alberto Xamin
15bb99996c
Madam Yto 2021-06-17 15:51:45 +02:00
Alberto Xamin
28555509a3
Dutch Will 2021-06-17 15:45:20 +02:00
Alberto Xamin
e86de193c7
don bell 2021-06-17 15:37:04 +02:00
Alberto Xamin
ac438ec190
add characters 2021-06-17 15:32:05 +02:00
Giulio
09579b2239 Merge branch 'dev' into main 2021-06-17 10:23:39 +02:00
Alberto Xamin
8002a1e71b
getnuggets suggestion 2021-06-16 23:04:09 +02:00
Alberto
abdc6fe290
Merge branch 'dev' into gold-rush 2021-06-16 23:03:34 +02:00
Alberto Xamin
38b8a40655
bottiglia e complice 2021-06-16 22:58:55 +02:00
Alberto Xamin
374e963cec
Bicchierino working 2021-06-16 21:52:29 +02:00
Alberto Xamin
7e644cd456
all black cards working 2021-06-16 21:19:26 +02:00
Alberto Xamin
dab5718eab
command suggestion 2021-06-16 20:27:39 +02:00
Alberto
f65ffbd5d5
Merge branch 'dev' into gold-rush 2021-06-16 18:15:54 +02:00
Alberto Xamin
86656c4942
wait to close and other quality of life fixes 2021-06-16 18:15:08 +02:00
Alberto Xamin
7a1a2c64d5
gold rush equipment 2021-06-16 18:14:01 +02:00
Alberto Xamin
3e9e1d5d35
open and close shop 2021-06-16 17:38:11 +02:00
Alberto
849aaabb79
Merge branch 'dev' into gold-rush 2021-06-16 16:49:35 +02:00
Alberto
a4a5c61eba
working on usable black cards 2021-06-16 16:47:06 +02:00
Alberto Xamin
7f0f8bb5c1
fix doc holyday 2021-06-16 16:43:38 +02:00
Alberto Xamin
0e9c8ad028
easy debug room 2021-06-16 16:34:03 +02:00
Giulio
8cf1d536ca disable google translate 2021-06-16 13:11:33 +02:00
Alberto Xamin
b5ded346fb
Talismano e stivali 2021-06-15 23:13:37 +02:00
Alberto Xamin
a139a310fe
Piccone 2021-06-15 23:06:32 +02:00
Alberto Xamin
860d6ce3ca
Ferro di Cavallo 2021-06-15 23:04:19 +02:00
Alberto Xamin
8c57e87532
Cinturone 2021-06-15 23:01:39 +02:00
Alberto Xamin
f030808343
calumet 2021-06-15 22:34:15 +02:00
Alberto Xamin
682a9ed463
add some of the cards logic 2021-06-15 22:26:34 +02:00
Giulio
40e4d1df83 fix Cecchino 2021-06-15 22:13:38 +02:00
Alberto Xamin
445399d7b3
buy cards and earn nuggets on other player damage 2021-06-15 18:52:30 +02:00
Alberto Xamin
46456ed433
show cards in frontend 2021-06-15 18:10:48 +02:00
Alberto Xamin
8b9f095e4b
add black cards 2021-06-15 16:57:35 +02:00
Alberto Xamin
03557557b1
add brown cards in backend 2021-06-15 16:43:52 +02:00
Giulio
572ce3bc4c fix bot usable cards 2021-06-15 14:45:06 +02:00
Giulio
343af0a437 modify postMessage text 2021-06-13 00:35:47 +02:00
Giulio
2101e42661 Merge branch 'dev' into main 2021-06-12 23:35:22 +02:00
Giulio
19a8dcc17c add event on Help
Co-authored-by: Alberto Xamin <alberto@xamin.it>
2021-06-12 16:31:01 +02:00
Giulio
b779cb21d0 add manette card event
Co-authored-by: Alberto Xamin <alberto@xamin.it>
2021-06-12 16:02:09 +02:00
Giulio
3bb7db8e33 fixing bot, Whisky & Rissa
Co-authored-by: Alberto Xamin <alberto@xamin.it>
2021-06-12 13:10:38 +02:00
Giulio
f7a527fcaf simplifying init
Co-authored-by: Alberto Xamin <alberto@xamin.it>
2021-06-12 13:09:12 +02:00
Giulio
3aa786395a fix lang
Co-authored-by: Alberto Xamin <alberto@xamin.it>
2021-06-12 13:07:46 +02:00
Giulio
01f0992363 fix setevent
Co-authored-by: Alberto Xamin <alberto@xamin.it>
2021-06-12 13:07:11 +02:00
Giulio
cc01daa6e2 Merge branch 'dev' into main 2021-06-12 11:12:03 +02:00
Giulio
e636ee513e change the language of the HTML document dynamically 2021-06-12 11:11:48 +02:00
Giulio
1783fe5774 Merge branch 'dev' into main 2021-06-12 10:30:01 +02:00
Giulio
a506e0245d fix Elena Fuente & green cards 2021-06-12 10:27:18 +02:00
Giulio
bbd676e9bc managing touch to search 2021-06-12 10:17:50 +02:00
Giulio
b1b1456429 Merge branch 'dev' into main 2021-06-12 00:07:12 +02:00
Giulio
41dceb8e1e fix flip event with 3 players 2021-06-11 15:56:03 +02:00
Giulio
c446a02aac Merge branch 'dev' into main 2021-06-08 12:25:04 +02:00
Giulio
7ed97d5bc0 bug mezzogiorno di fuoco attacker 2021-06-08 12:24:51 +02:00
Giulio
5979221478 show the right icon when playing with three players 2021-06-08 12:24:19 +02:00
Giulio
069236286c unused function 2021-06-08 12:22:31 +02:00
Giulio
38d5048496 fix some bug 2021-06-08 11:03:01 +02:00
Giulio
5210638275 fix bot speed
Co-authored-by: Alberto Xamin <alberto@xamin.it>
2021-06-07 23:52:14 +02:00
Giulio
e3e8316e85 fix miniera eng desc
Co-authored-by: Alberto Xamin <alberto@xamin.it>
2021-06-07 23:51:57 +02:00
Giulio
baa31a8892 added nuova identità event
Co-authored-by: Alberto Xamin <alberto@xamin.it>
2021-06-07 23:50:44 +02:00
Alberto Xamin
104daf2e4d
change vue logos and pictures 2021-06-07 22:18:56 +02:00
Alberto Xamin
7ff3895433
avoid bots taking over the server 2021-06-07 21:47:12 +02:00
Alberto Xamin
5f8b23e8f4
fix a bug with dark mode 2021-06-07 21:39:38 +02:00
Alberto Xamin
eecb42f337
fix dockerfile 2021-06-07 21:25:30 +02:00
Alberto Xamin
e37ab81206
fix build error 2021-06-07 20:40:24 +02:00
Alberto Xamin
6a23a1212a
trying to fix service worker 2021-06-07 20:08:02 +02:00
Alberto Xamin
98d64800fc
try adding update button again 2021-06-07 19:46:14 +02:00
Alberto Xamin
b7096d8646
tests on service worker 2021-06-07 18:40:05 +02:00
Alberto Xamin
ae6b6fbae4
server worker fix
Co-authored-by: GM <giulio.migani@studenti.unitn.it>
2021-06-07 18:28:04 +02:00
Alberto Xamin
4f4007873a
add discord btn 2021-06-07 17:35:14 +02:00
Giulio
b54956f672 respond fix 2021-06-06 19:24:44 +02:00
Giulio
74e4900dfa fix molly stark 2021-06-05 12:44:27 +02:00
Giulio
a8c1816c36 fix name and description of José 2021-05-30 12:11:54 +02:00
Alberto Xamin
ec2da4892a
add version to main menu 2021-05-28 12:24:05 +02:00
Alberto Xamin
8103a532cf
show legge del west card 2021-05-28 11:58:32 +02:00
Alberto Xamin
7dfcdc9e7d
fix not resetting cards 2021-05-28 11:25:52 +02:00
Giulio
cae194aa6d Merge branch 'dev' into main 2021-05-25 15:30:35 +02:00
Giulio
f68c9b2cec minor fix on reset 2021-05-25 15:21:10 +02:00
Giulio
20f09a2559 fix belle star ability with barile and visibility
Co-authored-by: Alberto Xamin <alberto@xamin.it>
2021-05-25 14:57:42 +02:00
Giulio
8119ff2e45 fix molly stark with Slab The Killer 2021-05-24 00:47:08 +02:00
Giulio
b7195004f0 Merge branch 'dev' into main 2021-05-23 15:53:30 +02:00
Giulio
63db5d6bb9 fix belle star 2021-05-23 15:52:32 +02:00
Giulio
80e641ffed fix gold rush desc 2021-05-23 15:14:16 +02:00
Alberto Xamin
4f8b5ea0c8
visual fixes 2021-05-22 20:05:12 +02:00
Alberto Xamin
cae7f2dfcb
add themese 2021-05-22 18:41:59 +02:00
Alberto Xamin
7a6d8b31d6
add debug mode 2021-05-22 17:59:30 +02:00
Alberto Xamin
5354986f63
put back per un pugno di carte 2021-05-22 17:23:24 +02:00
Giulio
5cb11555b2 Merge branch 'dev' into main 2021-05-22 17:12:45 +02:00
Alberto Xamin
5b394a2b86
fix missing mezzogiorno di fuoco 2021-05-22 17:08:55 +02:00
Alberto Xamin
9853719ea3
fix hidden cards for spectators
Co-authored-by: GM <giulio.migani@studenti.unitn.it>
2021-05-22 17:01:54 +02:00
Giulio
16800e6079 fix desc card on chooser one more time 2021-05-22 16:27:39 +02:00
Alberto Xamin
50b6269b35
fix broken service worker 2021-05-22 16:25:28 +02:00
Alberto Xamin
2ee0eabc72
change service worker registration 2021-05-22 16:05:41 +02:00
Alberto Xamin
8dd4e8d5e2
card events as i18n 2021-05-22 15:35:18 +02:00
Giulio
e681957581 Merge branch 'dev' into main 2021-05-21 19:48:00 +02:00
Giulio
0f86409859 announce event in chat 2021-05-21 19:47:26 +02:00
Giulio
ef052d7012 made a function for announce winners 2021-05-21 18:49:53 +02:00
Giulio
41b6f388f6 fix lazo frontend 2021-05-21 17:44:45 +02:00
Giulio
c375924f31 Merge branch 'dev' into main 2021-05-19 16:04:04 +02:00
Giulio
af1b0b6978 fix spectator 2021-05-19 15:58:17 +02:00
Giulio
821c2bed11 visual fix lobby
add draw click player
2021-05-19 15:58:04 +02:00
Giulio
11e94c8302 comment 2021-05-19 15:56:45 +02:00
Giulio
a59be2e6b8 Merge branch 'dev' into main 2021-05-19 12:14:35 +02:00
Giulio
b83b3d21a3 better fix for calamity janet 2021-05-19 12:13:42 +02:00
Giulio
9f71b00952 fix Dinamite attacker 2021-05-19 12:09:12 +02:00
Giulio
8a4eec5002 fix lazo and calamity janet's ability 2021-05-19 11:30:57 +02:00
Giulio
02ef834c98 fix event
per un pugno di carte
2021-05-19 00:21:03 +02:00
Giulio
4223badeb6 Merge branch 'dev' into main 2021-05-18 23:15:32 +02:00
Giulio
98a6d10873 fix elena fuente
elena fuente's ability only applies to the cards she has in her hand
2021-05-18 23:06:21 +02:00
Giulio
1b90fc5a0c revision help text 2021-05-18 18:37:45 +02:00
Giulio
3011a5a029 Merge branch 'dev' into main 2021-05-18 00:10:20 +02:00
Giulio
3348276128 only one 'you died' 2021-05-18 00:10:14 +02:00
Giulio
7b7bc5503c Merge branch 'dev' into main 2021-05-17 23:05:02 +02:00
Giulio
3bf11c506a lobby name in document title 2021-05-17 23:04:56 +02:00
Giulio
4da5fbf444 Merge branch 'dev' into main 2021-05-17 21:22:55 +02:00
Giulio
82b261c8e5 better 2021-05-17 21:22:45 +02:00
Giulio
65d247123f Merge branch 'dev' into main 2021-05-17 19:30:56 +02:00
Giulio
8d94778d42 fix reset on win 2021-05-17 19:29:35 +02:00
Giulio
d5676c70ca check win after a multiple attack 2021-05-17 19:29:02 +02:00
Giulio
f7aa404e0b comments 2021-05-17 19:21:23 +02:00
Giulio
2190afc8dd Merge branch 'main' into dev 2021-05-16 01:53:26 +02:00
Giulio
e186e7d5f3 sorry 2021-05-16 01:51:50 +02:00
Giulio
21dd22a863 Merge branch 'dev' into main 2021-05-16 01:46:55 +02:00
Giulio
ba150ede07 fix fratelli di sangue
the start of a game turn was printed twice in the chat
2021-05-16 01:42:48 +02:00
Giulio
36d3ace0cc wrong order 2021-05-16 01:34:01 +02:00
Giulio
670fbdf282 explained in a better way how to use the ability of a character 2021-05-16 01:22:54 +02:00
Giulio
2f31fa2bd5 fix belle star and lazo 2021-05-16 01:12:03 +02:00
Giulio
e435159a01 using the real variable 2021-05-16 00:50:15 +02:00
Giulio
ee935e1969 cancel game sudo 2021-05-16 00:49:26 +02:00
Giulio
52ebc4ebba Merge branch 'dev' into main 2021-05-15 20:26:58 +02:00
Giulio
e615d9b34c temporary fix 2021-05-15 20:26:33 +02:00
Giulio
2213bdd000 revert commit 'check win when everyone has died' 2021-05-13 17:47:50 +02:00
Giulio
6c3d2f9763 Merge branch 'dev' into main 2021-05-13 12:26:52 +02:00
Giulio
a169a8382c fix noStar 3 2021-05-13 12:26:46 +02:00
Giulio
eaf8fde0b1 Merge branch 'dev' into main 2021-05-13 11:40:33 +02:00
Giulio
259b4e92b3 fix noStar 2
if vice dead
2021-05-13 11:23:06 +02:00
Giulio
6cf24fcff7 fix sbornia and Sean Mallory 2021-05-10 15:08:52 +02:00
Giulio
a1edf476d5 Merge branch 'dev' into main 2021-05-10 12:24:54 +02:00
Giulio
09ddd89d80 fix noStar 2021-05-10 12:21:05 +02:00
Giulio
f2a3646876 fix invite url encode 2021-05-10 12:19:23 +02:00
Giulio
c4d767f4c4 event cards without sheriff 2021-05-10 12:03:22 +02:00
Giulio
de9a623e7e fix bot repeated names 2021-05-10 12:02:39 +02:00
Giulio
111aad0d44 fix to be precise 2021-05-06 11:12:19 +02:00
Giulio
5746a67941 Merge branch 'dev' into main 2021-05-04 15:30:17 +02:00
Giulio
ffa3ffdcd9 fix chooser one more time 2021-05-04 15:28:47 +02:00
Giulio
fd539d7e0e fix again allrules 2021-05-04 14:57:09 +02:00
Giulio
2eb94c2d98 it doesn't work well with touch-to-search 2021-05-04 14:35:22 +02:00
Giulio
e31a81b818 fix PixiePete and Sete 2021-05-04 13:40:13 +02:00
Giulio
357d2a184b fix desc 2021-05-04 13:39:36 +02:00
Giulio
8fdd9f29cd fix chooser again 2021-04-24 18:11:59 +02:00
Giulio
91172426e2 Merge branch 'dev' into main 2021-04-24 15:27:24 +02:00
Giulio
84c9c5516e fix chooser desc 2021-04-24 15:10:07 +02:00
Giulio
01e2ad7bd8 fix allroles 2021-04-24 12:14:45 +02:00
Giulio
7c2047e98c Merge branch 'dev' into main 2021-04-12 22:25:25 +02:00
Giulio
0c23be93c0 only owner can stop the game 2021-04-12 22:24:29 +02:00
Giulio
a5b4df6efe wrong verb 2021-04-12 00:39:07 +02:00
Alberto Xamin
c27660de61 fix game not ending on sheriff death 2021-03-01 17:10:54 +01:00
Alberto Xamin
72cd2295b3
check win when everyone has died 2021-02-10 14:33:36 +01:00
Alberto Xamin
4f78811c32
small visual improvements 2021-02-10 13:53:01 +01:00
Alberto
17a86fc2b9
Merge branch 'dev' into main
added the new translation and help page
2021-02-01 17:00:43 +01:00
Alberto Xamin
e6f3440298
fix small quirks 2021-02-01 16:58:33 +01:00
Alberto Xamin
b90749ebf6
button for getting help and animated chat 2021-02-01 15:30:28 +01:00
Alberto
4bd71f76e4
more work on help page
also adds the extension_icon badge to cards and moves character descriptions to the localization file
2021-02-01 14:26:44 +01:00
Alberto Xamin
f580403e96
add cards and translation to help page 2021-02-01 12:13:09 +01:00
Alberto Xamin
2e218763a7
more help info 2021-01-31 17:18:29 +01:00
Alberto Xamin
6913832c97
started working on help 2021-01-31 16:49:38 +01:00
Alberto Xamin
beeabac342
should fix death disconnect and also bots not playing some cards 2021-01-30 22:22:19 +01:00
Alberto Xamin
c126006198
fix spectate without password 2021-01-29 20:50:37 +01:00
Alberto Xamin
c28e9b2429
spectate rooms 2021-01-29 12:10:14 +01:00
Alberto Xamin
9e5adbc02f
better equipment display and fix for safari 2021-01-25 12:57:34 +01:00
Alberto Xamin
50fa4f0ab5
more descriptive status above players 2021-01-25 12:01:19 +01:00
Alberto Xamin
62a72717cf
play sound when user has to respond 2021-01-25 11:33:09 +01:00
Alberto
563ab7e7d5
Merge branch 'dev' into main 2021-01-24 15:21:07 +01:00
Alberto Xamin
56a456b58e
new service worker 2021-01-24 15:19:59 +01:00
Alberto Xamin
1c61d8f1eb
fix chat for new localization 2021-01-24 15:06:49 +01:00
Alberto Xamin
1201433343
fix can't end turn forced 2021-01-24 14:36:08 +01:00
Alberto Xamin
dac5139ad5
add build date 2021-01-24 14:28:06 +01:00
Alberto
72d5900898
started work on better localization
will save data
2021-01-24 12:27:49 +01:00
Alberto Xamin
7400315235
rename media files 2021-01-24 11:12:22 +01:00
Alberto Xamin
4c50559144
minor improvements 2021-01-23 21:39:06 +01:00
Alberto Xamin
4dc8d4b1e8
fix crazy peyote 2021-01-22 15:11:54 +01:00
Alberto Xamin
3074780c81
this should fix the sounds 2021-01-22 14:49:04 +01:00
Alberto Xamin
cd9d422f44
tutti vedono emporio 2021-01-22 14:12:45 +01:00
Alberto Xamin
f628ab75dc
add sounds for turn and death 2021-01-21 21:28:36 +01:00
Alberto Xamin
4081d805f0
action sounds 2021-01-21 18:21:55 +01:00
Alberto Xamin
9ffe44f477
ui fixes 2021-01-21 17:54:37 +01:00
Alberto
826dfab195
add bot commands in lobby
and also a description on why it can't start the game
2021-01-21 17:46:56 +01:00
Alberto Xamin
294e3c928d
new animations 2021-01-20 12:29:13 +01:00
Alberto Xamin
7f6912f07e
show spectator count 2021-01-20 11:53:51 +01:00
Alberto Xamin
fabd7a3af0
fix broken player count and empty open lobbies 2021-01-20 10:40:09 +01:00
Alberto Xamin
35e4f5fa0a
fix citta fantasma 2021-01-20 10:39:31 +01:00
Alberto
59f0d1e96d
Merge branch 'dev' into main 2021-01-10 20:25:17 +01:00
Alberto Xamin
2b94517df6
possible fix 2021-01-10 10:58:20 +01:00
Alberto
30d8fa20bd
Merge branch 'dev' into main 2021-01-01 14:07:59 +01:00
Alberto Xamin
acbcb0b2b0
prigione in chat 2021-01-01 14:01:53 +01:00
Alberto Xamin
3b310751f7
some fixes 2021-01-01 13:52:44 +01:00
Alberto Xamin
2165579939
Merge pull request #17 from albertoxamin/dev
add high noon
2020-12-27 22:09:36 +01:00
Alberto Xamin
3a6077b910
fix can't play springfield after prigione 2020-12-27 22:04:01 +01:00
Alberto Xamin
ee953c660d
fix disconnect bug and treno for more cases 2020-12-27 21:52:03 +01:00
Alberto Xamin
b3daa8d958
show no players in range message 2020-12-27 18:09:47 +01:00
Alberto Xamin
9659e3574a
fix tequila 2020-12-27 18:02:48 +01:00
Alberto Xamin
ee07abeae5
fix beer save reverendo 2020-12-27 17:50:37 +01:00
Alberto Xamin
6495d09b59
fix space in character name 2020-12-27 17:20:22 +01:00
Alberto Xamin
19bf28bfcd
fix cards with 2020-12-27 17:08:28 +01:00
Alberto Xamin
7a89731213
fix annoying card refresh 2020-12-27 17:03:44 +01:00
Alberto Xamin
ed14d34f4b
change brightness of unusable cards 2020-12-27 14:42:23 +01:00
Alberto Xamin
8261112b52
show who is a bot 2020-12-27 13:52:36 +01:00
Alberto Xamin
7e8d7dfd6a
fix alt_text 2020-12-27 11:22:17 +01:00
Alberto Xamin
01039df374
alt_text on more cards 2020-12-27 11:04:29 +01:00
Giulio
230031bce8 mistake 2020-12-27 00:20:42 +01:00
Giulio
b204943539 fix removecard 2020-12-26 12:31:04 +01:00
Alberto Xamin
effdca0c98
fix dead man 2020-12-26 11:06:15 +01:00
Alberto Xamin
637f05e37f
fix disconnect on character selection 2020-12-26 10:48:59 +01:00
Alberto Xamin
07f30c36e6
chat change name and countdown 2020-12-26 10:41:52 +01:00
Giulio
bbd25cb605 fixed Calamity Janet playing Mancato 2020-12-26 02:06:19 +01:00
Alberto Xamin
1000b149cc
add the ability to add multiple bots with the new logic 2020-12-25 21:15:21 +01:00
Alberto Xamin
632635e464
suppress some errors 2020-12-25 21:04:47 +01:00
Alberto Xamin
1bfa6ab2b6
new bot logic 2020-12-25 21:00:22 +01:00
Alberto Xamin
9781770577
fix dalton 2020-12-25 19:00:40 +01:00
Alberto Xamin
9777742e08
add descriptions and wait handle death 2020-12-25 17:13:20 +01:00
Alberto Xamin
ab25d38a99
hide wait if dead 2020-12-25 16:47:35 +01:00
Alberto Xamin
ba13b085f1
fix russian roulette 2020-12-25 16:45:21 +01:00
Alberto Xamin
f94719cbbe
whoops fix 2020-12-25 00:14:56 +01:00
Alberto Xamin
c9e9ec045d
fix belle star and other stuff 2020-12-25 00:07:36 +01:00
Alberto Xamin
14d5e24631
just 12 events 2020-12-24 23:00:19 +01:00
Alberto Xamin
3ea4fe090d
fix birra, di nuovo 2020-12-24 22:49:37 +01:00
Alberto Xamin
79d995f8e6
fix pat bugs + duello 2020-12-24 22:47:59 +01:00
Alberto Xamin
6ed4a8e3f5
fix event cards 2020-12-24 22:41:09 +01:00
Alberto Xamin
bcebde2795
fix birre e saloon 2020-12-24 22:39:14 +01:00
Alberto Xamin
36adf83039
write response to chat 2020-12-24 22:37:08 +01:00
Alberto Xamin
cbb3c965ff
fix play bang 2020-12-24 19:59:27 +01:00
Alberto
fcfb27e5de
Merge branch 'high_noon' into dev 2020-12-24 18:45:09 +01:00
Alberto Xamin
0c6827b378
mix fistful and high noon 2020-12-24 18:44:42 +01:00
Alberto Xamin
64da96a0db
fix città fantasma 2020-12-24 14:13:06 +01:00
Alberto Xamin
5762306ab1
fix emporio, sermone 2020-12-24 14:05:48 +01:00
Alberto
96b71ed35e
Merge branch 'citta-fantasma' into high_noon 2020-12-24 13:30:05 +01:00
Alberto Xamin
ce1c1ec62b
change spectator logic 2020-12-24 13:29:17 +01:00
Alberto Xamin
49987b2c5a
città fantasma should work 2020-12-24 13:10:01 +01:00
Alberto Xamin
579501e01c
ghosts 2020-12-24 12:01:31 +01:00
Alberto Xamin
3394b10896
update dead man 2020-12-24 11:01:59 +01:00
Alberto Xamin
d0595b9cf5
Merge branch 'dev'
Conflicts:
	backend/bang/players.py
2020-12-24 10:31:04 +01:00
Alberto Xamin
60f421eb93
Merge branch 'high_noon'
Conflicts:
	backend/bang/expansions/high_noon/card_events.py
	backend/bang/game.py
2020-12-24 10:28:50 +01:00
Alberto Xamin
6de8c8e84d
fix rissa 2020-12-24 10:23:27 +01:00
Giulio
3a98542116 edit descriptions 2020-12-23 19:04:48 +01:00
Alberto Xamin
0e2edb7a24
fix logiche 2020-12-23 18:38:26 +01:00
Alberto Xamin
7da9e47696
wip-rewrite dead logic 2020-12-23 18:22:23 +01:00
Alberto Xamin
57b9520eed
i dalton 2020-12-23 16:37:18 +01:00
Alberto Xamin
2b5e2dd128
corsa all'oro 2020-12-23 16:14:38 +01:00
Alberto Xamin
d6a84bbb88
mezzogiorno di fuoco 2020-12-23 15:50:22 +01:00
Alberto Xamin
39377bbb31
sparatoria 2020-12-23 15:41:10 +01:00
Alberto Xamin
76641f08d5
sermone 2020-12-23 15:28:51 +01:00
Alberto Xamin
60b5c7699e
il dottore 2020-12-23 15:14:21 +01:00
Alberto Xamin
8f18bee200
il reverendo 2020-12-23 14:57:33 +01:00
Alberto Xamin
c0a2481b00
Il treno 2020-12-23 14:50:12 +01:00
Alberto Xamin
95b6f016d2
add sete 2020-12-23 14:41:13 +01:00
Alberto Xamin
0ac0a66c06
sbornia 2020-12-23 14:25:23 +01:00
Alberto Xamin
a7fe148ff9
benedizione, maledizione 2020-12-23 14:06:07 +01:00
Alberto Xamin
f3631232d1
Merge pull request #16 from albertoxamin/dev
add fistful of cards
2020-12-23 13:11:50 +01:00
Alberto Xamin
25bf088c3e
text for card choose 2020-12-22 23:28:57 +01:00
Alberto Xamin
2a7ffcbf43
fix apache indiani 2020-12-22 21:56:09 +01:00
Alberto Xamin
2beb1563ae
fix rimbalzo 2020-12-22 21:52:06 +01:00
Giulio
f15102ad10 fix bot: Pony Express - Giudice 2020-12-22 19:17:51 +01:00
Giulio
e045bacc52 fix bot: Prigione - Giudice 2020-12-22 17:46:07 +01:00
Alberto Xamin
09c98fc09a
add rimbalzo 2020-12-22 17:36:45 +01:00
Alberto Xamin
2b1691fc3f
start fistful of cards on the second round 2020-12-22 16:15:34 +01:00
Alberto Xamin
c57f101b83
fix doc holyday 2020-12-22 15:50:38 +01:00
Alberto Xamin
363293a76b
healing on boom 2020-12-22 15:37:08 +01:00
Alberto Xamin
ea5be9b535
fix peyote 2020-12-22 15:21:01 +01:00
Alberto Xamin
c772577ee8
show lives when shooting and stuff 2020-12-22 15:18:34 +01:00
Alberto Xamin
db2173beea
easier to read 2020-12-22 15:11:47 +01:00
Alberto Xamin
83359eb497
fix stuff 2020-12-22 14:40:55 +01:00
Giulio
c9efd63ef2 fix mine 2020-12-22 01:55:27 +01:00
Giulio
623afcc201 fix for green cards and equipment
the cards could be overwritten before
2020-12-22 00:29:49 +01:00
Giulio
79d75374f2 fix Vulture Sam sheriff killing his deputy 2020-12-21 01:17:01 +01:00
Giulio
9e24b8ff71 fix Suzy Lafayette 2020-12-21 00:39:47 +01:00
Giulio
0a2d5ac2d1 added control of two Vulture Sam 2020-12-21 00:37:58 +01:00
Giulio
e2a5147dc6 fix getcard 2020-12-21 00:35:05 +01:00
Alberto Xamin
174d037d8c
debug stuff 2020-12-20 23:10:44 +01:00
Alberto Xamin
48f4605b0b
add cecchino 2020-12-20 22:58:17 +01:00
Alberto Xamin
ee26ff5d01
ranch 2020-12-20 22:21:58 +01:00
Giulio
2589bf20c9 updated descriptions 2020-12-20 21:33:00 +01:00
Alberto Xamin
323bd80179
fix logica per un pugno di carte 2020-12-20 21:13:54 +01:00
Alberto Xamin
ea74a7f910
fix some bot errors 2020-12-20 20:48:46 +01:00
Giulio
93c090ef58 revenge description updated 2020-12-20 20:38:48 +01:00
Giulio
b94b7655c0 ignore vscode stuff 2020-12-20 20:24:49 +01:00
Alberto Xamin
8db9cac4e6
fix calamity array reference 2020-12-20 17:52:41 +01:00
Alberto Xamin
c1c88f5f64
vendetta fix 2020-12-20 17:22:00 +01:00
Alberto Xamin
fda0508f0a
also update real character 2020-12-20 16:19:14 +01:00
Alberto Xamin
bba253f7ef
fix for everyone calamity janet? 2020-12-20 16:10:06 +01:00
Alberto Xamin
9313419bf5
debug change character 2020-12-20 15:57:51 +01:00
Alberto Xamin
52bdd01cf3
change bot speed 2020-12-20 15:18:53 +01:00
Alberto Xamin
9eafeb4569
bot recursion fix and bot lazo fix 2020-12-20 15:03:33 +01:00
Alberto Xamin
2e73b96499
fratelli di sangue 2020-12-20 14:51:23 +01:00
Alberto Xamin
622d8d7330
roulette russa 2020-12-20 14:19:50 +01:00
Alberto Xamin
f47c8fb053
per un pugno di carte 2020-12-20 13:32:09 +01:00
Alberto Xamin
6aafd48e16
Miniera abbandonata 2020-12-20 13:06:10 +01:00
Alberto Xamin
20e4ea5196
add peyote 2020-12-20 12:55:56 +01:00
Alberto Xamin
37f5ddd755
add liquore forte 2020-12-19 19:59:54 +01:00
Alberto Xamin
f29be68425
service worker stuff 2020-12-19 19:46:35 +01:00
Alberto Xamin
b2ba24906e
routing improvements 2020-12-19 19:31:59 +01:00
Alberto Xamin
374e7828cc
fix sync checkbox 2020-12-19 18:39:57 +01:00
Alberto Xamin
7b1ff4cedf
Merge pull request #15 from albertoxamin/dev
completed the implementation of dodge city
2020-12-19 17:15:32 +01:00
Alberto Xamin
8d6f94fd01
fix sid scrap 2020-12-19 17:03:49 +01:00
Alberto Xamin
ecd3857963
add doc holyday 2020-12-19 15:40:10 +01:00
Alberto Xamin
f864dc03bf
fix volcanic and dead man bug 2020-12-18 20:48:40 +01:00
Alberto Xamin
c937a322fe
jose delgrado 2020-12-18 18:59:44 +01:00
Alberto Xamin
03febf9887
pat brennan 2020-12-18 18:36:40 +01:00
Alberto Xamin
add2ce9da6
dead man legge del west 2020-12-18 18:13:13 +01:00
Alberto Xamin
7f4fc29196
some event cards 2020-12-17 22:21:52 +01:00
Alberto Xamin
f4aee7ad60
events emoji 2020-12-17 20:36:57 +01:00
Alberto Xamin
c0776e576c
add events descriptions 2020-12-17 20:21:28 +01:00
Alberto Xamin
6562f5c1e8
event cards 2020-12-17 15:34:12 +01:00
Alberto Xamin
9f15925bf1
fix vera after pick and disconnect notify 2020-12-17 14:02:11 +01:00
Alberto Xamin
e94c1b634a
base for fistful of cards 2020-12-16 21:42:00 +01:00
Alberto Xamin
996b4608ca
modular expansion adding 2020-12-16 21:10:53 +01:00
Alberto Xamin
d3bf18c9a2
fix reveal role 2020-12-16 20:29:25 +01:00
Alberto Xamin
d4bee9c3f2
use again old socketio version 2020-12-16 20:07:03 +01:00
Alberto Xamin
cb3723febd
notify all roles on start 2020-12-16 19:59:06 +01:00
Alberto Xamin
950d588b66
chuck wengam 2020-12-16 19:49:03 +01:00
Alberto Xamin
de303b7eb5
vera custer 2020-12-16 19:34:03 +01:00
Alberto Xamin
88f452df8f
fun and debug stuff 2020-12-14 18:43:24 +01:00
Alberto
da997cc8ab
Merge branch 'dev' into main 2020-12-13 21:40:28 +01:00
Alberto Xamin
2b3928cffa
fix reshuflle 2020-12-13 21:27:11 +01:00
Alberto Xamin
485b169fb1
Merge pull request #14 from albertoxamin/dev
fix service worker and accessibility warnings
2020-12-13 18:44:11 +01:00
Alberto Xamin
4708620384
fix service worker and accessibility warnings 2020-12-13 18:38:31 +01:00
Alberto Xamin
5d52911c7c
Merge pull request #13 from albertoxamin/dev
work on webapp + seo
2020-12-13 17:46:16 +01:00
Alberto Xamin
19221dba07
work on webapp + seo 2020-12-13 17:37:44 +01:00
Alberto Xamin
89b241e083
Merge pull request #12 from albertoxamin/dev
general fixes and 2 new characters
2020-12-13 17:02:35 +01:00
Alberto Xamin
70d16bdc0e
add belle star 2020-12-13 16:47:44 +01:00
Alberto Xamin
54ffc93565
add sean mallory 2020-12-13 16:39:14 +01:00
Alberto Xamin
0ccaa3751d
fix molly stark 2020-12-13 16:12:33 +01:00
Alberto Xamin
dd044f5062
window title notification 2020-12-13 16:04:14 +01:00
Alberto Xamin
6309a9c8ff
ui enhancements 2020-12-13 15:21:07 +01:00
Alberto Xamin
08287b4818
chat improvements 2020-12-13 12:29:28 +01:00
Alberto Xamin
b6b8dd7dbf
copy invite and tests 2020-12-13 11:43:03 +01:00
Alberto Xamin
baa9723536
Merge pull request #11 from albertoxamin/dev
gameplay and localization fixes
2020-12-13 11:36:44 +01:00
Alberto Xamin
c9e63f1fdd
localization improvements 2020-12-13 11:29:57 +01:00
Alberto Xamin
8157727972
join games that you disconnected and spectate 2020-12-13 11:21:18 +01:00
Alberto Xamin
e48236727c
save language and keep username 2020-12-13 10:51:27 +01:00
Alberto Xamin
a6a5f95a5b
gameplay modifiers 2020-12-13 10:31:16 +01:00
Alberto Xamin
90b6aad809
fix double death 2020-12-13 00:19:51 +01:00
Alberto Xamin
5557924934
fix sheriff death 2020-12-13 00:08:22 +01:00
Alberto Xamin
b0179afa3d
fix calamity localization 2020-12-08 23:34:47 +01:00
Alberto Xamin
929024a717
fix private toggle 2020-12-08 23:31:55 +01:00
Alberto Xamin
da26eae24c
temporary fix cat balou 2020-12-08 23:24:01 +01:00
Alberto Xamin
e4ca4d7b64
Merge pull request #10 from albertoxamin/dev
fix dynamite and herb, add bots and commands
2020-12-07 15:07:41 +01:00
Alberto Xamin
c356917ec2
fix bot wait and add commands 2020-12-06 19:29:40 +01:00
Alberto Xamin
6abd3bfffe
fix herb notify 2020-12-06 18:46:03 +01:00
Alberto Xamin
153a5177e1
fix death and room still playing with bots 2020-12-06 15:40:28 +01:00
Alberto Xamin
66c99574c9
fix multi-dynamite error 2020-12-06 15:20:44 +01:00
Alberto Xamin
46239f9b30
bot improvements 2020-12-05 21:57:53 +01:00
Alberto Xamin
0ed906fc39
bots 2020-12-05 17:11:27 +01:00
Alberto Xamin
e0954b53b1
Merge pull request #9 from albertoxamin/dev
add wait to death notification
2020-12-05 10:15:38 +01:00
Alberto Xamin
4e41ceb343
fix description 2020-12-05 00:49:39 +01:00
Alberto Xamin
cdbf337885
fix death notify 2020-12-05 00:42:52 +01:00
Alberto Xamin
4abb725892
Merge pull request #8 from albertoxamin/dev
fix death
2020-12-05 00:29:02 +01:00
Alberto Xamin
1c26f61fc6
fix death 2020-12-05 00:14:29 +01:00
Alberto Xamin
ffba8597dd
Merge pull request #7 from albertoxamin/dev
added chat localization
2020-12-04 11:47:38 +01:00
Alberto Xamin
98a6d225b7
chat localized 2020-12-04 11:42:46 +01:00
Alberto Xamin
9ba0905822
started localizing the chat 2020-12-04 11:15:06 +01:00
Alberto Xamin
52590b9abb
Merge pull request #6 from albertoxamin/dev
lobbies and new characters
2020-12-02 23:29:25 +01:00
Alberto Xamin
fce9fd6c02
fix disconnect bug 2020-12-02 23:28:43 +01:00
Alberto Xamin
f4ce7d1f7b
reset on win 2020-12-02 23:25:13 +01:00
Alberto Xamin
eb1569d5b5
copy link 2020-12-02 23:08:14 +01:00
Alberto Xamin
b80d626a1c
fix dependency 2020-12-02 22:11:40 +01:00
Alberto Xamin
fac1596c54
fix tiny equipment 2020-12-02 22:06:27 +01:00
Alberto Xamin
3ba7f60fdb
fix empty name for lobby 2020-12-02 21:56:07 +01:00
Alberto Xamin
76e74fbd43
fix name duplication 2020-11-30 19:42:12 +01:00
Alberto Xamin
ab6bd9af93
get username from local storage 2020-11-30 16:33:24 +01:00
Alberto Xamin
ec8e9e16de
choose name on join via link 2020-11-30 15:00:31 +01:00
Alberto Xamin
6685ac2ce2
add game to server 2020-11-30 13:31:48 +01:00
Alberto Xamin
90959bcc62
join by url 2020-11-30 12:48:43 +01:00
Giulio
2fd7dbb516 better 2020-11-29 22:39:42 +01:00
Giulio
0f645e9646 fix dynamite in bart cassidy 2020-11-29 22:33:53 +01:00
Alberto Xamin
11ea738f64
show wait 2020-11-29 22:05:16 +01:00
Alberto Xamin
a10dee0bfd
molly stark duel 2020-11-29 21:58:34 +01:00
Alberto Xamin
dc0c6230ea
fix for smaller screen devices 2020-11-29 21:32:51 +01:00
Alberto Xamin
e8f97df249
fix translations 2020-11-29 21:05:17 +01:00
Alberto Xamin
7cd84a51d3
pwa 2020-11-29 17:33:10 +01:00
Alberto Xamin
b0ac3149f1
add meta tags 2020-11-29 17:06:10 +01:00
Alberto Xamin
d866cf13b8
add desc_eng 2020-11-29 16:55:14 +01:00
Alberto Xamin
a069dcbcaf
add desc on borraccia, fix apache logic 2020-11-29 16:08:46 +01:00
Alberto Xamin
5eacffeb5c
fix slab the killer 2020-11-29 15:56:50 +01:00
Alberto Xamin
174f4d7f86
apache kid 2020-11-29 15:50:19 +01:00
Alberto Xamin
795dcf82a7
molly stark 2020-11-29 15:42:29 +01:00
Giulio
fd3334b012 little help 2020-11-28 22:57:37 +01:00
Giulio
ce77bfef22 clarifications 2020-11-28 22:15:32 +01:00
Alberto Xamin
c05c79ee5b
implemented new characters 2020-11-28 21:33:45 +01:00
Giulio
400631a5a2 Merge branch 'dev' into main 2020-11-28 21:33:20 +01:00
Alberto Xamin
d4a7d3752e
fix green 2020-11-28 20:28:20 +01:00
Giulio
40c54cc0ee adjusted the color of green cards 2020-11-28 20:09:06 +01:00
Giulio
d9e2a93e1c fix GUI: selfcard and lang-select 2020-11-28 19:55:20 +01:00
Alberto Xamin
004b1d17ca
Merge pull request #5 from albertoxamin/dev
update from dev with dodge city green cards
2020-11-28 17:40:13 +01:00
Alberto Xamin
834d1896ed
fix pepperbox 2020-11-28 17:39:18 +01:00
Alberto Xamin
28a43b57b8
fix language position 2020-11-28 17:24:33 +01:00
Alberto Xamin
1d56ffbcca
fix play outside turn 2020-11-28 17:13:35 +01:00
Alberto Xamin
674d284ab1
fix rissa and dark mode 2020-11-28 17:03:33 +01:00
Alberto Xamin
b2a0c108d0
fix duello 2020-11-28 16:26:25 +01:00
Alberto Xamin
535c56533d
fix show ready 2020-11-28 16:11:23 +01:00
Alberto Xamin
fbf5d6a859
fix pepperbox range 2020-11-28 15:42:59 +01:00
Alberto Xamin
7ee4eb4c70
reset usable green cards 2020-11-28 15:37:53 +01:00
Alberto Xamin
08f2fd79b9
add the other dodge_city cards 2020-11-28 15:34:29 +01:00
Alberto Xamin
c69e599554
pugnale 2020-11-28 15:04:22 +01:00
Alberto Xamin
0a50379447
add mancato verdi 2020-11-28 14:37:16 +01:00
Alberto Xamin
b1fdc440db
Merge pull request #4 from albertoxamin/dev
merge Dev
2020-11-28 11:43:14 +01:00
Alberto Xamin
1370efc98a
show hint for scrapped card 2020-11-28 11:41:11 +01:00
Alberto Xamin
7444fba0d3
fix errori giulio 2020-11-28 11:25:57 +01:00
Alberto Xamin
5907379db8
distribute roles before available characters 2020-11-28 11:20:19 +01:00
Giulio
5f91829907 fix birra e rissa 2020-11-28 01:44:23 +01:00
Alberto Xamin
0c39a20b77
fix stuff 2020-11-28 00:38:23 +01:00
Alberto Xamin
7ed10dee67
fix balance 2020-11-28 00:32:12 +01:00
Alberto Xamin
8b33fc0f45
fix max players 2020-11-27 23:05:09 +01:00
Alberto Xamin
f4bc8d1142
fix problems 2020-11-27 21:52:13 +01:00
Alberto Xamin
07f4f5b92d
fix dinamite, prigione lucky duke 2020-11-27 19:59:18 +01:00
Alberto Xamin
e48fd93bb8
one more conditions for rissa 2020-11-27 18:09:48 +01:00
Alberto Xamin
6c9dc746fd
fix rissa causing bugs 2020-11-27 18:07:30 +01:00
Alberto Xamin
8351bff0d8
fix errors 2020-11-27 18:04:29 +01:00
Alberto Xamin
3062bce6ca
localization 2020-11-27 17:59:33 +01:00
Alberto Xamin
c6e0f957da
show name of player whom you are stealing/discarding 2020-11-27 14:10:26 +01:00
Alberto Xamin
04715b2332
tequila self 2020-11-27 13:50:03 +01:00
Alberto Xamin
a4e3825ab1
fix cards with scrap 2020-11-27 13:24:42 +01:00
Giulio
18fdce103f updated descriptions
and fix
2020-11-27 12:52:49 +01:00
Alberto Xamin
0e0f3271bb
room limit to 10 2020-11-27 12:30:20 +01:00
Alberto Xamin
5bfa749423
rissa 2020-11-27 12:19:54 +01:00
Alberto Xamin
ae8ee20fd5
cards with scrap alt-text 2020-11-26 23:28:22 +01:00
Alberto Xamin
67abec99ba
add all cards with scrap 2020-11-26 23:19:53 +01:00
Alberto Xamin
3772d3cbf9
cardAgainst, ragTime 2020-11-26 22:48:58 +01:00
Giulio
031cc91082 Merge branch 'dev' into main 2020-11-26 21:30:54 +01:00
Giulio
a141e985da fix error 2020-11-26 18:09:48 +01:00
Giulio
bf5af1d025 use card 2020-11-26 17:45:12 +01:00
Alberto Xamin
41ca3b2747
fix player leaving in his turn with empty lobby 2020-11-26 17:23:03 +01:00
Alberto Xamin
bb98b4493b
Merge pull request #3 from albertoxamin/dev
Dev
2020-11-26 17:08:38 +01:00
Giulio
ce506e90ed add some card 2020-11-26 17:08:37 +01:00
Alberto Xamin
739c7bec5e
Update Lobby.vue 2020-11-26 17:08:06 +01:00
Alberto Xamin
7ba1b0c7b9
toggle espansione 2020-11-26 16:58:27 +01:00
Alberto Xamin
24f7a68024
ready status and expansion 2020-11-26 16:26:48 +01:00
Giulio
d01b6421a0 Merge branch 'HEAD' into main 2020-11-26 15:56:57 +01:00
Alberto Xamin
3d88fdeb12
fix bug and new structure 2020-11-26 15:53:27 +01:00
Alberto Xamin
57ce8a3ebb
avviso quando servono più mancato 2020-11-26 10:30:43 +01:00
Giulio
ed6610176e Merge branch 'dev' into main 2020-11-26 00:38:58 +01:00
Giulio
91e20c8e38 fix prigione 2020-11-26 00:36:40 +01:00
Alberto Xamin
40e4afda7d
fix join started lobby 2020-11-26 00:21:24 +01:00
Alberto Xamin
7936fdf649
fix lobby error 2020-11-26 00:19:27 +01:00
Alberto Xamin
b06d7efa40
fix mancato, cat balou, renegade 2020-11-25 23:45:34 +01:00
Alberto Xamin
e6119394cd
fix jesse jones 2020-11-25 23:33:54 +01:00
Alberto Xamin
904956a46f
fix slab the killer killing an outlaw 2020-11-25 22:35:40 +01:00
Alberto Xamin
e0a23340ca
fix chat message 2020-11-25 22:27:07 +01:00
Alberto Xamin
7cd89837b8
fix favicon serve error 2020-11-25 21:52:35 +01:00
Giulio
92f948719e fix dancing div 2020-11-25 21:36:27 +01:00
Alberto Xamin
1575f8756a
Merge pull request #2 from albertoxamin/dev
selectable lobby passwords
2020-11-25 21:19:28 +01:00
Alberto Xamin
1f3412a410
minor style 2020-11-25 21:16:41 +01:00
Alberto Xamin
973816ca1a
selectable room password 2020-11-25 21:08:28 +01:00
Alberto Xamin
172a480c92
Merge pull request #1 from albertoxamin/dev
add lobby password logic
2020-11-25 20:54:02 +01:00
Alberto Xamin
8f35e86196
stanza privata 2020-11-25 20:48:05 +01:00
Alberto Xamin
0a0cc6600e
new images actions 2020-11-25 19:50:47 +01:00
Giulio
32658c741c part of the private lobby 2020-11-25 19:43:00 +01:00
Giulio
12b3f0b5eb fix notifycard
ch. Black Jack
2020-11-25 17:24:48 +01:00
Giulio
2f5344c802 risarcimento 2020-11-25 15:00:00 +01:00
Alberto Xamin
98ddaf519d
save username 2020-11-25 14:44:01 +01:00
Alberto Xamin
e525b83cfb
bartcassidy chat message 2020-11-25 14:37:59 +01:00
Alberto Xamin
6e1534d73a
fix panico, cat balou dopo bang 2020-11-25 14:08:34 +01:00
139 changed files with 25349 additions and 9842 deletions

View File

@ -0,0 +1,45 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
{
"name": "BangCodespace",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/javascript-node:0-18",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/python:1": {
"version": "3.11.1"
}
},
// Use 'settings' to set *default* container specific settings.json values on container create.
// You can edit these settings after create using File > Preferences > Settings > Remote.
"settings": {
"python.testing.pytestArgs": [
"--rootdir=backend",
"backend/tests/"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.linting.enabled": true
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [5001, 8080],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "cd frontend;npm i;cd ../backend;pip install -r requirements.txt",
// Configure tool-specific properties.
// "customizations": {},
// Add the IDs of extensions you want installed when the container is created in the array below.
"extensions": [
"Vue.volar",
"ms-python.python",
"Gruntfuggly.todo-tree"
]
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

25
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,25 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
target-branch: "dev"
- package-ecosystem: "npm"
directory: "/frontend"
schedule:
interval: "daily"
target-branch: "dev"
- package-ecosystem: "pip"
directory: "/backend"
schedule:
interval: "daily"
target-branch: "dev"

72
.github/workflows/dev-image.yml vendored Normal file
View File

@ -0,0 +1,72 @@
name: Docker Images CI
on:
push:
branches: dev
jobs:
buildx:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Docker Buildx
uses: crazy-max/ghaction-docker-buildx@v3
-
name: Cache Docker layers
uses: actions/cache@v3
id: cache
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
-
name: Docker Buildx (build amd64)
run: |
docker buildx build \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--cache-to "type=local,dest=/tmp/.buildx-cache" \
--platform linux/amd64 \
--output "type=image,push=false" \
--tag albertoxamin/bang:dev \
--file ./Dockerfile ./
-
name: Docker Buildx (build armv-7)
run: |
docker buildx build \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--cache-to "type=local,dest=/tmp/.buildx-cache" \
--platform linux/arm/v7 \
--output "type=image,push=false" \
--tag albertoxamin/bang:dev \
--file ./Dockerfile ./
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Docker Buildx (push)
run: |
docker buildx build \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--platform linux/amd64,linux/arm/v7 \
--output "type=image,push=true" \
--tag albertoxamin/bang:dev \
--file ./Dockerfile ./
-
name: Inspect image
run: |
docker buildx imagetools inspect albertoxamin/bang:dev
- name: Notify discord
uses: th0th/notify-discord@v0.4.1
if: ${{ always() }}
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_JOB_NAME: "Docker image :dev"
GITHUB_JOB_STATUS: ${{ job.status }}

View File

@ -1,20 +1,71 @@
name: Docker Images CI
on:
push:
branches: [ main ]
branches: main
jobs:
build:
build-platform:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [linux/amd64, linux/arm/v7, linux/arm64/v8]
steps:
- uses: actions/checkout@v2
- name: Build the Unified Docker image
run: docker build . --file Dockerfile --tag albertoxamin/bang:latest
- name: Build the Backend Docker image
run: cd backend;docker build . --file Dockerfile --tag albertoxamin/bang-backend:latest
- uses: actions/checkout@v2
- name: Build the Frontend Docker image
run: cd frontend;docker build . --file Dockerfile --tag albertoxamin/bang-frontend:latest
- name: Log into registry
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Push images
run: docker push albertoxamin/bang:latest; docker push albertoxamin/bang-backend:latest; docker push albertoxamin/bang-frontend:latest
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
id: cache
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Prepare Platform Tag
id: platform_tag
run: echo "platform_tag=$(echo ${{ matrix.platform }} | sed 's|/|-|g')" >> $GITHUB_ENV
- name: Build and push platform-specific image
uses: docker/build-push-action@v5
with:
context: .
platforms: ${{ matrix.platform }}
push: true
tags: albertoxamin/bang:${{ env.platform_tag }}
cache-from: type=registry,ref=albertoxamin/bang:${{ env.platform_tag }}
cache-to: type=inline
create-manifest:
runs-on: ubuntu-latest
needs: build-platform
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Create and push multi-arch manifest
run: |
docker buildx imagetools create \
--tag albertoxamin/bang:latest \
albertoxamin/bang:linux-amd64 \
albertoxamin/bang:linux-arm-v7 \
albertoxamin/bang:linux-arm64-v8

25
.github/workflows/pylint.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: Pylint
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
cd backend
pip install --user -r requirements.txt
pip install pylint
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py') -E

28
.github/workflows/test-backend.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Python package
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11]
defaults:
run:
working-directory: ./backend
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
python -m pytest -p no:warnings

89
.github/workflows/tests.yaml vendored Normal file
View File

@ -0,0 +1,89 @@
name: Test Pull requests
on:
pull_request:
jobs:
build-amd64:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Docker Buildx
uses: crazy-max/ghaction-docker-buildx@v3
-
name: Cache Docker layers
uses: actions/cache@v3
id: cache
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
-
name: Docker Buildx (test build amd64)
run: |
docker buildx build \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--cache-to "type=local,dest=/tmp/.buildx-cache" \
--platform linux/amd64 \
--output "type=image,push=false" \
--tag albertoxamin/bang:test \
--file ./Dockerfile ./
# build-arm64:
# runs-on: ubuntu-latest
# steps:
# -
# name: Checkout
# uses: actions/checkout@v3
# -
# name: Set up Docker Buildx
# uses: crazy-max/ghaction-docker-buildx@v3
# -
# name: Cache Docker layers
# uses: actions/cache@v3
# id: cache
# with:
# path: /tmp/.buildx-cache
# key: ${{ runner.os }}-buildx-${{ github.sha }}
# restore-keys: |
# ${{ runner.os }}-buildx-
# -
# name: Docker Buildx (test build arm64)
# run: |
# docker buildx build \
# --cache-from "type=local,src=/tmp/.buildx-cache" \
# --cache-to "type=local,dest=/tmp/.buildx-cache" \
# --platform linux/arm64 \
# --output "type=image,push=false" \
# --tag albertoxamin/bang:test \
# --file ./Dockerfile ./
build-armv-7:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Docker Buildx
uses: crazy-max/ghaction-docker-buildx@v3
-
name: Cache Docker layers
uses: actions/cache@v3
id: cache
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
-
name: Docker Buildx (test build armv-7)
run: |
docker buildx build \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--cache-to "type=local,dest=/tmp/.buildx-cache" \
--platform linux/arm/v7 \
--output "type=image,push=false" \
--tag albertoxamin/bang:test \
--file ./Dockerfile ./

7
.gitignore vendored
View File

@ -136,3 +136,10 @@ dmypy.json
# Cython debug symbols
cython_debug/
frontend/package-lock.json
bang-workspace.code-workspace
.vscode/
backend/save/*
save/

View File

@ -1,11 +1,30 @@
FROM node:lts-alpine as builder
# build Vue frontend
FROM node:18 as builder
COPY ./frontend .
RUN npm install
RUN npm run build
FROM python:3.7-slim-stretch
# now we should have a dist folder containing the static website
FROM python:3.11.1-bullseye as pybuilder
WORKDIR /code
COPY ./backend /code/
RUN pip install --user -r requirements.txt
# We get the dependencies with the full python image so we can compile the one with missing binaries
ENV UseRobots=false
FROM python:3.11.1-slim-bullseye as app
# copy the dependencies from the pybuilder
COPY --from=pybuilder /root/.local /root/.local
# copy the backend python files from the pybuilder
COPY --from=pybuilder /code /dist
# copy the frontend static files from the builder
COPY --from=builder ./dist /dist/
COPY ./backend /dist/
WORKDIR /dist
RUN pip install -r requirements.txt
# create dir for save
RUN mkdir save
EXPOSE 5001
ENTRYPOINT ["python", "/dist/__init__.py"]
ENV PATH=/root/.local/bin:${PATH}
VOLUME /dist/save
ENTRYPOINT ["python", "/dist/server.py"]

View File

@ -1 +1,14 @@
# bang
This is the repo for the PewPew! game, which is a replica of BANG!.
BANG! is a trademark owned by DVGiochi.
[Frontend Readme](./frontend/README.md)
[Backend Readme](./backend/Readme.md)
<img width="1326" alt="bang-lobby" src="https://github.com/albertoxamin/bang/assets/6067659/853a4182-aace-4f5d-92c3-ad63f309c37a">
<img width="1316" alt="bang-in-game" src="https://github.com/albertoxamin/bang/assets/6067659/fa4ad9f3-2012-4a38-b3eb-97fd0b4b8f2b">

View File

@ -2,6 +2,9 @@ FROM python:3.7-slim-stretch
WORKDIR /code
COPY * /code/
RUN RUN apt-get update && apt-get install -y \
libevent-dev \
python-all-dev
RUN pip install -r requirements.txt
EXPOSE 5001

25
backend/Readme.md Normal file
View File

@ -0,0 +1,25 @@
# Bang Backend
How to get started
## Development
Create a virtual env
```bash
python3 -m venv PATHTOENV
```
activate the new environment
```bash
souce PATHTOENV/bin/activate
```
now with the current directory in the backend folder install the dependencies
```bash
pip install -r requirements.txt
```
then you can start the python file `__init__.py`, I recommend you use *nodemon* for that, as it will automatically reload the server on new changes. If you don't already have it, you can install nodemon with
```
npm i -g nodemon
```
then you will be able to start the server with
```
nodemon __init__.py
```

View File

@ -1,131 +0,0 @@
import json
from typing import List
import eventlet
import socketio
from game import Game
from players import Player
sio = socketio.Server(cors_allowed_origins="*")
app = socketio.WSGIApp(sio, static_files={
'/': {'content_type': 'text/html', 'filename': 'index.html'},
'/css': './css',
'/js': './js',
})
games: List[Game] = []
online_players = 0
def advertise_lobbies():
sio.emit('lobbies', room='lobby', data=[{'name': g.name, 'players': len(g.players)} for g in games if not g.started and len(g.players) < 7])
@sio.event
def connect(sid, environ):
print('connect ', sid)
sio.enter_room(sid, 'lobby')
sio.emit('players', room='lobby', data=online_players)
@sio.event
def set_username(sid, username):
global online_players
online_players += 1
sio.save_session(sid, Player(username, sid, sio))
print(f'{sid} is now {username}')
advertise_lobbies()
@sio.event
def my_message(sid, data):
print('message ', data)
@sio.event
def disconnect(sid):
global online_players
if sio.get_session(sid):
online_players -= 1
sio.emit('players', room='lobby', data=online_players)
if sio.get_session(sid).game and sio.get_session(sid).disconnect():
sio.close_room(sio.get_session(sid).game.name)
games.pop(games.index(sio.get_session(sid).game))
print('disconnect ', sid)
advertise_lobbies()
@sio.event
def create_room(sid, room_name):
while len([g for g in games if g.name == room_name]):
room_name += '_1'
sio.leave_room(sid, 'lobby')
sio.enter_room(sid, room_name)
g = Game(room_name, sio)
g.add_player(sio.get_session(sid))
games.append(g)
print(f'{sid} created a room named {room_name}')
advertise_lobbies()
@sio.event
def join_room(sid, room_name):
print(f'{sid} joined a room named {room_name}')
sio.leave_room(sid, 'lobby')
sio.enter_room(sid, room_name)
i = [g.name for g in games].index(room_name)
while len([p for p in games[i].players if p.name == sio.get_session(sid).name]):
sio.get_session(sid).name += '_1'
games[i].add_player(sio.get_session(sid))
advertise_lobbies()
@sio.event
def chat_message(sid, msg):
ses = sio.get_session(sid)
sio.emit('chat_message', room=ses.game.name, data=f'[{ses.name}]: {msg}')
@sio.event
def start_game(sid):
ses = sio.get_session(sid)
ses.game.start_game()
@sio.event
def set_character(sid, name):
ses = sio.get_session(sid)
ses.set_character(name)
@sio.event
def refresh(sid):
ses = sio.get_session(sid)
ses.notify_self()
@sio.event
def draw(sid, pile):
ses = sio.get_session(sid)
ses.draw(pile)
@sio.event
def pick(sid):
ses = sio.get_session(sid)
ses.pick()
@sio.event
def end_turn(sid):
ses = sio.get_session(sid)
ses.end_turn()
@sio.event
def play_card(sid, data):
ses = sio.get_session(sid)
ses.play_card(data['index'], data['against'])
@sio.event
def respond(sid, data):
ses = sio.get_session(sid)
ses.respond(data)
@sio.event
def choose(sid, card_index):
ses = sio.get_session(sid)
ses.choose(card_index)
@sio.event
def scrap(sid, card_index):
ses = sio.get_session(sid)
ses.scrap(card_index)
if __name__ == '__main__':
eventlet.wsgi.server(eventlet.listen(('', 5001)), app)

741
backend/bang/cards.py Normal file
View File

@ -0,0 +1,741 @@
from __future__ import annotations
from typing import List, Set, Dict, Tuple, Optional, TYPE_CHECKING
import bang.expansions.fistful_of_cards.card_events as ce
import bang.expansions.high_noon.card_events as ceh
from abc import ABC, abstractmethod
from enum import IntEnum
import bang.roles as r
from globals import G
if TYPE_CHECKING:
from bang.players import Player
from bang.game import Game
class Suit(IntEnum):
"""Enum for card suits"""
DIAMONDS = 0 # ♦
CLUBS = 1 # ♣
HEARTS = 2 # ♥
SPADES = 3 # ♠
GOLD = 4 # 🤑
TRAIN = 5 # 🚂
class Card(ABC):
"""Base class for all cards"""
sym = {"A": 1, "J": 11, "Q": 12, "K": 13}
def __init__(
self,
suit: Suit,
name: str,
number,
is_equipment: bool = False,
is_weapon: bool = False,
vis_mod: int = 0,
sight_mod: int = 0,
range: int = 99,
desc: str = "",
):
super().__init__()
self.name = name
self.suit = suit
if isinstance(number, int):
self.number = number
else:
self.number = self.sym[number]
self.is_equipment = is_equipment
self.is_weapon = is_weapon
self.vis_mod = vis_mod
self.sight_mod = sight_mod
self.range = range
if self.range != 0 and self.range != 99:
self.alt_text = f"{self.range} 🔍"
self.desc = desc # deprecated, has been replaced by the card's description in the localization files (see i18n folder)
self.need_target = False # Cards that need a target like Bang
self.can_target_self = False # for example Panico and CatBalou
self.can_be_used_now = True # to check wether the green card can be used now
self.usable_next_turn = False # it will be True for Green Cards
self.need_with = (
False # it will be true for cards that require a card to be discarded with
)
self.need_with_only = "" # names of the cards allowed to be discarded with
self.must_be_used = False # used by LeggeDelWest
def __str__(self) -> str:
if str(self.suit).isnumeric():
char = ["♦️", "♣️", "♥️", "♠️", "🤑", "🚋"][int(self.suit)]
else:
char = self.suit
return f"{self.name} {char}{self.number}"
def num_suit(self) -> str:
"""Returns the card's number and suit as a string"""
return f"{['♦️', '♣️', '♥️', '♠️', '🤑'][int(self.suit)]}{self.number}"
def reset_card(self) -> None:
"""Resets the card's attributes"""
if self.usable_next_turn:
self.can_be_used_now = False
else:
self.can_be_used_now = True
if self.must_be_used:
self.must_be_used = False
def play_card(
self, player: Player, against: str = None, _with: Card = None
) -> bool:
"""Plays the card and returns True if the card was played successfully, False otherwise"""
if (
(player.game.check_event(ce.IlGiudice))
and self.usable_next_turn
and not self.can_be_used_now
):
return False
if self.is_equipment:
if (player.game.check_event(ce.IlGiudice)) or not self.can_be_used_now:
return False
if self.is_weapon:
has_weapon = False
for i, card in enumerate(player.equipment):
if card.is_weapon:
player.game.deck.scrap(card, player=player)
player.equipment[i] = self
has_weapon = True
break
if not has_weapon:
player.equipment.append(self)
elif self.name in [
c.name for c in player.equipment if not isinstance(c, Dinamite)
]:
return False
else:
player.equipment.append(self)
self.must_be_used = False
self.can_be_used_now = False
if against:
G.sio.emit(
"card_against",
room=player.game.name,
data={"player": player.name, "target": against, "card": self.__dict__},
)
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card_against{'_with' if _with else ''}|{player.name}|{self.name}|{against}|{_with.name if _with else ''}",
)
else:
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card{'_with' if _with else ''}|{player.name}|{self.name}|{_with.name if _with else ''}",
)
return True
def use_card(self, player):
pass
def is_duplicate_card(self, player: Player):
"""Checks if the card is already in the player's equipment"""
return any(c.name == self.name for c in player.equipment) or any(
c.name == self.name for c in player.gold_rush_equipment
)
def check_suit(self, game: Game, accepted: List[Suit]):
"""Checks if the card's suit is in the list of accepted suits
(also checks for the events Benedizione and Maledizione)
returns True if it is, False otherwise"""
if game.check_event(ceh.Benedizione):
return Suit.HEARTS in accepted
elif game.check_event(ceh.Maledizione):
return Suit.SPADES in accepted
return self.suit in accepted
class Barile(Card):
"""Quando sei bersagliato da un Bang puoi estrarre la prima carta dalla cima del mazzo, se la carta estratta è del seme Cuori allora vale come un Mancato
When someone plays a Bang against you. You can flip the first card from the deck, if the suit is Hearts then it counts as a Missed card
"""
def __init__(self, suit, number):
super().__init__(suit, "Barile", number, is_equipment=True)
self.icon = "🛢"
self.alt_text = "♥️=😅"
class Dinamite(Card):
"""Giocando la Dinamite, posizionala davanti a te, resterà innocua per un intero giro. All'inizio del prossimo turno prima di pescare e prima di una eventuale estrazione (es. Prigione), estrai una carta dalla cima del mazzo. Se esce una carta tra il 2 il 9 di picche (compresi) allora la dinamite esplode: perdi 3 vite e scarta la carta, altrimenti passa la dinamite al giocatore successivo, il quale estrarà a sua volta dopo che tu avrai passato il tuo turno
When playing Dynamite, place it in front of you, it will remain harmless for a whole round. At the beginning of the next turn before drawing and before any card flip (eg Prison), flip a card from the top of the deck. If a card is between 2 and 9 of spades (inclusive) then the dynamite explodes: you lose 3 lives and discard the card, otherwise pass the dynamite to the next player, who will draw in turn after you have ended your turn
"""
def __init__(self, suit, number):
super().__init__(suit, "Dinamite", number, is_equipment=True)
self.icon = "🧨"
self.alt_text = "2-9♠ = 🤯"
class Mirino(Card):
"""Tu vedi gli altri giocatori a distanza -1
You see the other players at distance -1"""
def __init__(self, suit, number):
super().__init__(suit, "Mirino", number, is_equipment=True, sight_mod=1)
self.icon = "🔎"
self.alt_text = "-1"
class Mustang(Card):
"""Gli altri giocatori ti vedono a distanza +1
The other players see you at distance +1"""
def __init__(self, suit, number):
super().__init__(suit, "Mustang", number, is_equipment=True, vis_mod=1)
self.icon = "🐎"
self.alt_text = "+1"
class Prigione(Card):
"""Equipaggia questa carta a un altro giocatore, tranne lo Sceriffo. Il giocatore scelto all'inizio del suo turno, prima di pescare dovrà estrarre: se esce Cuori scarta questa carta e gioca normalmente il turno, altrimenti scarta questa carta e salta il turno
Equip this card to another player, except the Sheriff. The player chosen at the beginning of his turn, must flip a card before drawing: if it's Hearts, discard this card and play the turn normally, otherwise discard this card and skip the turn
"""
def __init__(self, suit, number):
super().__init__(suit, "Prigione", number, is_equipment=True)
self.icon = ""
self.need_target = True
self.alt_text = "♥️= 🆓"
def play_card(
self, player: Player, against: str = None, _with: Card = None
) -> bool:
if player.game.check_event(ce.IlGiudice):
return False
if (
against is not None
and not isinstance(player.game.get_player_named(against).role, r.Sheriff)
and not self.is_duplicate_card(player.game.get_player_named(against))
):
self.can_be_used_now = False
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card_against|{player.name}|{self.name}|{against}",
)
player.game.get_player_named(against).equipment.append(self)
player.game.get_player_named(against).notify_self()
return True
return False
class Remington(Card):
"""Puoi sparare a un giocatore che sia distante 3 o meno
You can shoot another player at distance 3 or less"""
def __init__(self, suit, number):
super().__init__(
suit, "Remington", number, is_equipment=True, is_weapon=True, range=3
)
self.icon = "🔫"
class RevCarabine(Card):
"""Puoi sparare a un giocatore che sia distante 4 o meno
You can shoot another player at distance 4 or less"""
def __init__(self, suit, number):
super().__init__(
suit, "Rev Carabine", number, is_equipment=True, is_weapon=True, range=4
)
self.icon = "🔫"
class Schofield(Card):
"""Puoi sparare a un giocatore che sia distante 2 o meno
You can shoot another player at distance 2 or less"""
def __init__(self, suit, number):
super().__init__(
suit, "Schofield", number, is_equipment=True, is_weapon=True, range=2
)
self.icon = "🔫"
class Volcanic(Card):
"""Puoi sparare a un giocatore che sia distante 1 o meno, tuttavia puoi giocare quanti bang vuoi
You can shoot another player at distance 1 or less, however you no longer have the limit of 1 Bang
"""
def __init__(self, suit, number):
super().__init__(
suit, "Volcanic", number, is_equipment=True, is_weapon=True, range=1
)
self.icon = "🔫"
class Winchester(Card):
"""Puoi sparare a un giocatore che sia distante 5 o meno
You can shoot another player at distance 5 or less"""
def __init__(self, suit, number):
super().__init__(
suit, "Winchester", number, is_equipment=True, is_weapon=True, range=5
)
self.icon = "🔫"
class Bang(Card):
"""Spara a un giocatore a distanza raggiungibile. Se non hai armi la distanza di default è 1
Shoot a player in sight. If you do not have weapons, your is sight is 1"""
def __init__(self, suit, number):
super().__init__(suit, "Bang!", number)
self.icon = "💥"
self.need_target = True
def play_card(
self, player: Player, against: str = None, _with: Card = None
) -> bool:
if (
player.game.check_event(ceh.Sermone) and not self.number == 42
): # 42 gold rush
return False
if (
(player.has_played_bang and not self.number == 42)
and (
not any((isinstance(c, Volcanic) for c in player.equipment))
or player.game.check_event(ce.Lazo)
)
and against is not None
): # 42 gold rush:
return False
elif against is not None:
import bang.characters as chars
super().play_card(player, against=against)
if not (self.number == 42 and self.suit == Suit.GOLD): # 42 gold rush
player.bang_used += 1
player.has_played_bang = (
True
if not player.game.check_event(ceh.Sparatoria)
else player.bang_used > 1
)
if player.character.check(player.game, chars.WillyTheKid):
player.has_played_bang = False
player.game.attack(
player,
against,
double=player.character.check(player.game, chars.SlabTheKiller),
card_name=self.name,
)
return True
return False
class Birra(Card):
"""Gioca questa carta per recuperare un punto vita. Non puoi andare oltre al limite massimo del tuo personaggio. Se stai per perdere l'ultimo punto vita puoi giocare questa carta anche nel turno dell'avversario. La birra non ha più effetto se ci sono solo due giocatori
Play this card to regain a life point. You cannot heal more than your character's maximum limit. If you are about to lose your last life point, you can also play this card on your opponent's turn. Beer no longer takes effect if there are only two players
"""
def __init__(self, suit, number):
super().__init__(suit, "Birra", number)
self.icon = "🍺"
def play_card(self, player, against=None, _with=None, skipChecks=False):
if player.game.check_event(ceh.IlReverendo):
return False
if not skipChecks:
import bang.expansions.gold_rush.characters as grch
madamYto = [
p
for p in player.game.get_alive_players()
if p.character.check(player.game, grch.MadamYto) and self.number != 42
]
for p in madamYto:
player.game.deck.draw(True, player=p)
p.notify_self()
if "gold_rush" in player.game.expansions and self.number != 42:
player.set_choose_action(
"choose_birra_function",
[
{
"name": "Pepita",
"icon": "💵️",
"alt_text": "1",
"noDesc": True,
},
self,
],
)
player.notify_self()
return True
if (
len(player.game.get_alive_players()) != 2 or self.number == 42
) and player.lives < player.max_lives:
super().play_card(player, against=against)
player.lives = min(player.lives + 1, player.max_lives)
import bang.expansions.dodge_city.characters as chd
if player.character.check(player.game, chd.TequilaJoe):
player.lives = min(player.lives + 1, player.max_lives)
return True
elif (
len(player.game.get_alive_players()) == 2
or player.lives == player.max_lives
):
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_spilled_beer|{player.name}|{self.name}",
)
return True
return False
class CatBalou(Card):
"""Fai scartare una carta a un qualsiasi giocatore, scegli a caso dalla mano, oppure fra quelle che ha in gioco
Choose and discard a card from any other player."""
def __init__(self, suit, number):
super().__init__(suit, "Cat Balou", number)
self.icon = "💃"
self.need_target = True
self.can_target_self = True
def play_card(
self, player: Player, against: str = None, _with: Card = None
) -> bool:
if (
against is not None
and (
len(player.game.get_player_named(against).hand)
+ len(player.game.get_player_named(against).equipment)
)
> 0
and (player.name != against or len(player.equipment) > 0)
):
super().play_card(player, against=against)
player.game.steal_discard(player, against, self)
return True
return False
class Diligenza(Card):
"""Pesca 2 carte dalla cima del mazzo
Draw 2 cards from the deck."""
def __init__(self, suit, number):
super().__init__(suit, "Diligenza", number)
self.icon = "🚡"
self.alt_text = "🎴🎴"
def play_card(
self, player: Player, against: str = None, _with: Card = None
) -> bool:
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_diligenza|{player.name}|{self.name}",
)
for i in range(2):
player.game.deck.draw(True, player)
player.game.deck.flip_wildwestshow()
return True
class Duello(Card):
def __init__(self, suit, number):
super().__init__(suit, "Duello", number)
self.need_target = True
self.icon = "⚔️"
# self.desc = "Gioca questa carta contro un qualsiasi giocatore. A turno, cominciando dal tuo avversario, potete scartare una carta Bang!, il primo giocatore che non lo fa perde 1 vita"
# self.desc_eng = "Play this card against any player. In turn, starting with your opponent, you can discard a Bang! Card, the first player who does not do so loses 1 life."
def play_card(
self, player: Player, against: str = None, _with: Card = None
) -> bool:
if against is not None:
super().play_card(player, against=against)
player.game.duel(player, against)
return True
return False
class Emporio(Card):
"""Scopri dal mazzo tante carte quanto il numero di giocatori vivi, a turno, partendo da te, scegliete una carta e aggiungetela alla vostra mano
Put on the table N cards from the deck, where N is the number of alive players, in turn, starting with you, choose a card and add it to your hand
"""
def __init__(self, suit, number):
super().__init__(suit, "Emporio", number)
self.icon = "🏪"
def play_card(
self, player: Player, against: str = None, _with: Card = None
) -> bool:
super().play_card(player, against=against)
player.game.emporio()
return True
class Gatling(Card):
"""Spara a tutti gli altri giocatori
Shoot all the other players"""
def __init__(self, suit, number):
super().__init__(suit, "Gatling", number)
self.icon = "🛰"
self.alt_text = "👥💥"
def play_card(
self, player: Player, against: str = None, _with: Card = None
) -> bool:
super().play_card(player, against=against)
player.game.attack_others(player, card_name=self.name)
return True
class Indiani(Card):
"""Tutti gli altri giocatori devono scartare un Bang! o perdere una vita
All the other players must discard a Bang! or lose 1 Health Point"""
def __init__(self, suit, number):
super().__init__(suit, "Indiani!", number)
self.icon = "🏹"
def play_card(
self, player: Player, against: str = None, _with: Card = None
) -> bool:
super().play_card(player, against=against)
player.game.indian_others(player)
return True
class Mancato(Card):
"""Usa questa carta per annullare un bang
Use this card to cancel the effect of a bang"""
def __init__(self, suit, number):
super().__init__(suit, "Mancato!", number)
self.icon = "😅"
def play_card(
self, player: Player, against: str = None, _with: Card = None
) -> bool:
import bang.characters as chars
if against is not None and player.character.check(
player.game, chars.CalamityJanet
):
if player.has_played_bang and (
not any((isinstance(c, Volcanic) for c in player.equipment))
or player.game.check_event(ce.Lazo)
):
return False
if player.game.check_event(ceh.Sermone):
return False
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_special_calamity|{player.name}|{self.name}|{against}",
)
player.bang_used += 1
player.has_played_bang = (
True
if not player.game.check_event(ceh.Sparatoria)
else player.bang_used > 1
)
player.game.attack(player, against, card_name=self.name)
return True
return False
class Panico(Card):
"""Pesca una carta da un giocatore a distanza 1, scegli a caso dalla mano, oppure fra quelle che ha in gioco
Steal a card from a player at distance 1"""
def __init__(self, suit, number):
super().__init__(suit, "Panico!", number, range=1)
self.icon = "😱"
self.need_target = True
self.can_target_self = True
def play_card(
self, player: Player, against: str = None, _with: Card = None
) -> bool:
if (
against is not None
and (
len(player.game.get_player_named(against).hand)
+ len(player.game.get_player_named(against).equipment)
)
> 0
and (player.name != against or len(player.equipment) > 0)
):
super().play_card(player, against=against)
player.game.steal_discard(player, against, self)
return True
return False
class Saloon(Card):
"""Tutti i giocatori recuperano un punto vita compreso chi gioca la carta
Everyone heals 1 Health point"""
def __init__(self, suit, number):
super().__init__(suit, "Saloon", number)
self.icon = "🍻"
self.alt_text = "👥🍺"
def play_card(
self, player: Player, against: str = None, _with: Card = None
) -> bool:
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_saloon|{player.name}|{self.name}",
)
for p in player.game.get_alive_players():
p.lives = min(p.lives + 1, p.max_lives)
p.notify_self()
return True
class WellsFargo(Card):
"""Pesca 3 carte dalla cima del mazzo
Draw 3 cards from the deck"""
def __init__(self, suit, number):
super().__init__(suit, "WellsFargo", number)
self.icon = "💸"
self.alt_text = "🎴🎴🎴"
def play_card(
self, player: Player, against: str = None, _with: Card = None
) -> bool:
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_wellsfargo|{player.name}|{self.name}",
)
for _ in range(3):
player.game.deck.draw(True, player)
player.game.deck.flip_wildwestshow()
return True
def get_starting_deck(expansions: List[str]) -> List[Card]:
from bang.expansions import DodgeCity, TheValleyOfShadows
base_cards = [
Barile(Suit.SPADES, "Q"),
Barile(Suit.SPADES, "K"),
Dinamite(Suit.HEARTS, 2),
Mirino(Suit.SPADES, "A"),
Mustang(Suit.HEARTS, 8),
Mustang(Suit.HEARTS, 9),
Prigione(Suit.SPADES, "J"),
Prigione(Suit.HEARTS, 4),
Prigione(Suit.SPADES, 10),
Remington(Suit.CLUBS, "K"),
RevCarabine(Suit.CLUBS, "A"),
Schofield(Suit.CLUBS, "J"),
Schofield(Suit.CLUBS, "Q"),
Schofield(Suit.SPADES, "K"),
Volcanic(Suit.SPADES, 10),
Volcanic(Suit.CLUBS, 10),
Winchester(Suit.SPADES, 8),
Bang(Suit.SPADES, "A"),
Bang(Suit.DIAMONDS, 2),
Bang(Suit.DIAMONDS, 3),
Bang(Suit.DIAMONDS, 4),
Bang(Suit.DIAMONDS, 5),
Bang(Suit.DIAMONDS, 6),
Bang(Suit.DIAMONDS, 7),
Bang(Suit.DIAMONDS, 8),
Bang(Suit.DIAMONDS, 9),
Bang(Suit.DIAMONDS, 10),
Bang(Suit.DIAMONDS, "J"),
Bang(Suit.DIAMONDS, "Q"),
Bang(Suit.DIAMONDS, "K"),
Bang(Suit.DIAMONDS, "A"),
Bang(Suit.CLUBS, 2),
Bang(Suit.CLUBS, 3),
Bang(Suit.CLUBS, 4),
Bang(Suit.CLUBS, 5),
Bang(Suit.CLUBS, 6),
Bang(Suit.CLUBS, 7),
Bang(Suit.CLUBS, 8),
Bang(Suit.CLUBS, 9),
Bang(Suit.HEARTS, "Q"),
Bang(Suit.HEARTS, "K"),
Bang(Suit.HEARTS, "A"),
Birra(Suit.HEARTS, 6),
Birra(Suit.HEARTS, 7),
Birra(Suit.HEARTS, 8),
Birra(Suit.HEARTS, 9),
Birra(Suit.HEARTS, 10),
Birra(Suit.HEARTS, "J"),
CatBalou(Suit.HEARTS, "K"),
CatBalou(Suit.DIAMONDS, 9),
CatBalou(Suit.DIAMONDS, 10),
CatBalou(Suit.DIAMONDS, "J"),
Diligenza(Suit.SPADES, 9),
Diligenza(Suit.SPADES, 9),
Duello(Suit.DIAMONDS, "Q"),
Duello(Suit.SPADES, "J"),
Duello(Suit.CLUBS, 8),
Emporio(Suit.CLUBS, 9),
Emporio(Suit.SPADES, "Q"),
Gatling(Suit.HEARTS, 10),
Indiani(Suit.DIAMONDS, "K"),
Indiani(Suit.DIAMONDS, "A"),
Mancato(Suit.CLUBS, 10),
Mancato(Suit.CLUBS, "J"),
Mancato(Suit.CLUBS, "Q"),
Mancato(Suit.CLUBS, "K"),
Mancato(Suit.CLUBS, "A"),
Mancato(Suit.SPADES, 2),
Mancato(Suit.SPADES, 3),
Mancato(Suit.SPADES, 4),
Mancato(Suit.SPADES, 5),
Mancato(Suit.SPADES, 6),
Mancato(Suit.SPADES, 7),
Mancato(Suit.SPADES, 8),
Panico(Suit.HEARTS, "J"),
Panico(Suit.HEARTS, "Q"),
Panico(Suit.HEARTS, "A"),
Panico(Suit.DIAMONDS, 8),
Saloon(Suit.HEARTS, 5),
WellsFargo(Suit.HEARTS, 3),
]
if "dodge_city" in expansions:
base_cards.extend(DodgeCity.get_cards())
if "the_valley_of_shadows" in expansions:
base_cards.extend(TheValleyOfShadows.get_cards())
return base_cards

252
backend/bang/characters.py Normal file
View File

@ -0,0 +1,252 @@
from __future__ import annotations
from abc import ABC
from bang.expansions import *
from typing import List, TYPE_CHECKING
from globals import G
if TYPE_CHECKING:
from bang.players import Player
from bang.game import Game
class Character(ABC):
"""Base class for all characters"""
def __init__(
self,
name: str,
max_lives: int,
sight_mod: int = 0,
visibility_mod: int = 0,
pick_mod: int = 0,
desc: str = "",
):
super().__init__()
self.name = name
self.max_lives = max_lives
self.sight_mod = sight_mod
self.visibility_mod = visibility_mod
self.is_character = True
self.pick_mod = pick_mod
self.desc = desc
self.icon = "🤷‍♂️"
self.number = "".join(["❤️"] * self.max_lives)
def check(self, game: Game, character: Character):
"""Check character type and if Sbornia is active"""
import bang.expansions.high_noon.card_events as ceh
if game.check_event(ceh.Sbornia):
return False
return isinstance(self, character)
def special(self, player: Player, data):
"""Base for special actions that can be performed by a character"""
import bang.expansions.high_noon.card_events as ceh
if player.game.check_event(ceh.Sbornia):
return False
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_use_special|{player.name}|{self.name}",
)
return True
class BartCassidy(Character):
"""Ogni volta che viene ferito, pesca una carta
Each time he is hurt, he draws a card"""
def __init__(self):
super().__init__("Bart Cassidy", max_lives=4)
self.icon = "💔"
class BlackJack(Character):
"""All'inizio del suo turno, quando deve pescare, mostra a tutti la seconda carta, se è Cuori o Quadri pesca una terza carta senza farla vedere
At the beginning of his turn, when he has to draw, he shows everyone the second card, if it is Hearts or Diamonds he draws a third card without showing it
"""
def __init__(self):
super().__init__("Black Jack", max_lives=4)
self.icon = "🎰"
class CalamityJanet(Character):
"""Può usare i Mancato! come Bang! e viceversa
She can use the Missed! as Bang! and the other way around"""
def __init__(self):
super().__init__("Calamity Janet", max_lives=4)
self.icon = "🔀"
class ElGringo(Character):
"""Ogni volta che perde un punto vita pesca una carta dalla mano del giocatore responsabile ma solo se il giocatore in questione ha carte in mano (una carta per ogni punto vita)
Each time he is hurt, he draws a card from the hand of the attacking player"""
def __init__(self):
super().__init__("El Gringo", max_lives=3)
self.icon = "🤕"
# ovviamente la dinamite non è considerata danno inferto da un giocatore
class JesseJones(Character):
"""All'inizio del suo turno, quando deve pescare, può prendere la prima carta a caso dalla mano di un giocatore e la seconda dal mazzo
When he has to draw his cards, he may draw the first card from the hand of another player
"""
def __init__(self):
super().__init__("Jesse Jones", max_lives=4)
self.icon = "😜"
class Jourdonnais(Character):
"""Gioca come se avesse un Barile sempre attivo, nel caso in cui metta in gioco un Barile 'Reale' può estrarre due volte
He plays as he had a Barrel always active, if he equips another Barrel, he can flip 2 cards
"""
def __init__(self):
super().__init__("Jourdonnais", max_lives=4)
self.icon = "🛢"
class KitCarlson(Character):
"""All'inizio del suo turno, quando deve pescare, pesca tre carte, ne sceglie due da tenere in mano e la rimanente la rimette in cima la mazzo
When he has to draw, he peeks 3 cards and chooses 2, putting the other card on the top of the deck
"""
def __init__(self):
super().__init__("Kit Carlson", max_lives=4)
self.icon = "🤔"
class LuckyDuke(Character):
"""Ogni volta che deve estrarre, prende due carte dal mazzo, sceglie una delle due carte per l'estrazione, infine le scarta entrambe
Every time he has to flip a card, he can flip 2 times"""
def __init__(self):
super().__init__("Lucky Duke", max_lives=4, pick_mod=1)
self.icon = "🍀"
class PaulRegret(Character):
"""Gioca come se avesse una Mustang sempre attiva, nel caso in cui metta in gioco una Mustang 'Reale' l'effetto si somma tranquillamente
The other players see him at distance +1"""
def __init__(self):
super().__init__("Paul Regret", max_lives=3, visibility_mod=1)
self.icon = "🏇"
class PedroRamirez(Character):
"""All'inizio del suo turno, quando deve pescare, può prendere la prima carta dalla cima degli scarti e la seconda dal mazzo
When he has to draw, he may pick the first card from the discarded cards"""
def __init__(self):
super().__init__("Pedro Ramirez", max_lives=4)
self.icon = "🚮"
class RoseDoolan(Character):
"""Gioca come se avesse un Mirino sempre attivo, nel caso in cui metta in gioco una Mirino 'Reale' l'effetto si somma tranquillamente
She sees the other players at distance -1"""
def __init__(self):
super().__init__("Rose Doolan", max_lives=4, sight_mod=1)
self.icon = "🕵️‍♀️"
class SidKetchum(Character):
"""Può scartare due carte per recuperare un punto vita anche più volte di seguito a patto di avere carte da scartare, può farlo anche nel turno dell'avversario se stesse per morire
He can discard 2 cards to regain 1HP"""
def __init__(self):
super().__init__("Sid Ketchum", max_lives=4)
self.icon = "🤤"
class SlabTheKiller(Character):
"""Per evitare i suoi Bang servono due Mancato, un eventuale barile vale solo come un Mancato
To dodge his Bang! cards other players need 2 Missed!"""
def __init__(self):
super().__init__("Slab The Killer", max_lives=4)
self.icon = "🔪"
# vale per tutte le carte bang non solo per la carta che si chiama Bang!
class SuzyLafayette(Character):
"""Appena rimane senza carte in mano pesca immediatamente una carta dal mazzo
Whenever she has an empty hand, she draws a card"""
def __init__(self):
super().__init__("Suzy Lafayette", max_lives=4)
self.icon = "🔂"
class VultureSam(Character):
"""Quando un personaggio viene eliminato prendi tutte le carte di quel giocatore e aggiungile alla tua mano, sia le carte in mano che quelle in gioco
When a player dies, he gets all the cards in the dead's hand and equipments"""
def __init__(self):
super().__init__("Vulture Sam", max_lives=4)
self.icon = "🦉"
class WillyTheKid(Character):
"""Questo personaggio può giocare quanti bang vuole nel suo turno
He doesn't have limits to the amounts of bang he can use"""
def __init__(self):
super().__init__("Willy The Kid", max_lives=4)
self.icon = "🎉"
def all_characters(expansions: List[str]):
from bang.expansions import DodgeCity, TheValleyOfShadows, WildWestShow, GoldRush
base_chars = [
BartCassidy(),
BlackJack(),
CalamityJanet(),
ElGringo(),
JesseJones(),
Jourdonnais(),
KitCarlson(),
LuckyDuke(),
PaulRegret(),
PedroRamirez(),
RoseDoolan(),
SidKetchum(),
SlabTheKiller(),
SuzyLafayette(),
VultureSam(),
WillyTheKid(),
]
if "dodge_city" in expansions:
base_chars.extend(DodgeCity.get_characters())
if "gold_rush" in expansions:
base_chars.extend(GoldRush.get_characters())
if "the_valley_of_shadows" in expansions:
base_chars.extend(TheValleyOfShadows.get_characters())
if "wild_west_show" in expansions:
base_chars.extend(WildWestShow.get_characters())
return base_chars

220
backend/bang/deck.py Normal file
View File

@ -0,0 +1,220 @@
from typing import List, Set, Dict, Tuple, Optional, TYPE_CHECKING
import bang.cards as cs
import bang.expansions.fistful_of_cards.card_events as ce
import bang.expansions.high_noon.card_events as ceh
import bang.expansions.wild_west_show.card_events as cew
import bang.expansions.wild_west_show.characters as chw
import bang.expansions.gold_rush.shop_cards as grc
import bang.expansions.train_robbery.stations as trs
import bang.expansions.train_robbery.trains as trt
from globals import G
if TYPE_CHECKING:
from bang.game import Game
from bang.players import Player
class Deck:
"""Class that handles all deck dealing information"""
def __init__(self, game: "Game"):
super().__init__()
self.cards: List[cs.Card] = cs.get_starting_deck(game.expansions)
self.mancato_cards: List[str] = []
self.mancato_cards_not_green_or_blue: List[str] = []
self.green_cards: Set[str] = set()
for c in self.cards:
if isinstance(c, cs.Mancato) and c.name not in self.mancato_cards:
self.mancato_cards.append(c.name)
if not (c.usable_next_turn or c.is_equipment):
self.mancato_cards_not_green_or_blue.append(c.name)
elif c.usable_next_turn:
self.green_cards.add(c.name)
self.all_cards_str: List[str] = []
for c in self.cards:
if c.name not in self.all_cards_str:
self.all_cards_str.append(c.name)
self.game = game
self.event_cards: List[ce.CardEvent] = []
self.event_cards_wildwestshow: List[ce.CardEvent] = []
self.stations: List[trs.StationCard] = []
self.train_pile: List[trt.TrainCard] = []
self.current_train: List[trt.TrainCard] = []
endgame_cards: List[ce.CardEvent] = []
if "fistful_of_cards" in game.expansions:
self.event_cards.extend(ce.get_all_events(game.rng))
endgame_cards.append(ce.get_endgame_card())
if "high_noon" in game.expansions:
self.event_cards.extend(ceh.get_all_events(game.rng))
endgame_cards.append(ceh.get_endgame_card())
if "wild_west_show" in game.expansions:
self.event_cards_wildwestshow.extend(cew.get_all_events(game.rng))
game.rng.shuffle(self.event_cards_wildwestshow)
self.event_cards_wildwestshow.insert(0, None)
self.event_cards_wildwestshow.append(cew.get_endgame_card())
if "train_robbery" in game.expansions:
self.stations = game.rng.sample(trs.get_all_stations(), len(game.players))
self.train_pile = trt.get_all_cards(game.rng)
self.current_train = [trt.get_locomotives(game.rng)[0]] + self.train_pile[
:3
]
if len(self.event_cards) > 0:
game.rng.shuffle(self.event_cards)
self.event_cards = self.event_cards[:12]
self.event_cards.insert(0, None)
self.event_cards.insert(
0, None
) # 2 perchè iniziale, e primo flip dallo sceriffo
self.event_cards.append(game.rng.choice(endgame_cards))
game.rng.shuffle(self.cards)
self.shop_deck: List[grc.ShopCard] = []
self.shop_cards: List[grc.ShopCard] = []
if "gold_rush" in game.expansions:
self.shop_cards = [None, None, None]
self.shop_deck = grc.get_cards()
game.rng.shuffle(self.shop_deck)
self.fill_gold_rush_shop()
self.scrap_pile: List[cs.Card] = []
print(f"Deck initialized with {len(self.cards)} cards")
def flip_event(self):
"""Flip event for regular Sheriff turn (High Noon, Fistful of Cards)"""
if len(self.event_cards) > 0 and not (
isinstance(self.event_cards[0], ce.PerUnPugnoDiCarte)
or isinstance(self.event_cards[0], ceh.MezzogiornoDiFuoco)
):
self.event_cards.append(self.event_cards.pop(0))
if len(self.event_cards) > 0 and self.event_cards[0] is not None:
self.event_cards[0].on_flipped(self.game)
self.game.notify_event_card()
self.game.notify_all()
def flip_wildwestshow(self):
"""Flip event for Wild West Show only"""
if len(self.event_cards_wildwestshow) > 0 and not isinstance(
self.event_cards_wildwestshow[0], cew.WildWestShow
):
self.event_cards_wildwestshow.append(self.event_cards_wildwestshow.pop(0))
if (
len(self.event_cards_wildwestshow) > 0
and self.event_cards_wildwestshow[0] is not None
):
self.event_cards_wildwestshow[0].on_flipped(self.game)
self.game.notify_event_card_wildwestshow()
self.game.notify_all()
def fill_gold_rush_shop(self):
"""
As gold_rush shop cards are stored in a fixed 3 space array,
this function replaces the None values with new cards.
"""
if not any((c is None for c in self.shop_cards)):
return
for i in range(3):
if self.shop_cards[i] is None:
print(f"replacing gr-card {i}")
self.shop_cards[i] = self.shop_deck.pop(0)
self.shop_cards[i].reset_card()
self.game.notify_gold_rush_shop()
def move_train_forward(self):
if len(self.stations) == 0:
return
if len(self.current_train) == len(self.stations) + 4:
return
if len(self.current_train) > 0:
self.current_train.append(None)
self.game.notify_stations()
def peek(self, n_cards: int) -> list:
return self.cards[:n_cards]
def peek_scrap_pile(self, n_cards: int=1) -> List[cs.Card]:
if len(self.scrap_pile) > 0:
return self.scrap_pile[-n_cards:]
else:
return None
def pick_and_scrap(self) -> cs.Card:
card = self.cards.pop(0)
jpain = None
for p in self.game.players:
if p.character.check(self.game, chw.JohnPain) and len(p.hand) < 6:
jpain = p
break
if jpain:
jpain.hand.append(card)
jpain.notify_self()
else:
self.scrap_pile.append(card)
if len(self.cards) == 0:
self.reshuffle()
self.game.notify_scrap_pile()
return card
def put_on_top(self, card: cs.Card):
self.cards.insert(0, card)
def draw(self, ignore_event=False, player=None) -> cs.Card:
if (
self.game.check_event(ce.MinieraAbbandonata)
and len(self.scrap_pile) > 0
and not ignore_event
):
card = self.draw_from_scrap_pile()
if player is not None and self.game.replay_speed > 0:
G.sio.emit(
"card_drawn",
room=self.game.name,
data={"player": player.name, "pile": "scrap"},
)
player.hand.append(card)
return card
card = self.cards.pop(0)
if len(self.cards) == 0:
self.reshuffle()
if player is not None and self.game.replay_speed > 0:
G.sio.emit(
"card_drawn",
room=self.game.name,
data={"player": player.name, "pile": "deck"},
)
player.hand.append(card)
return card
def reshuffle(self):
self.cards = self.scrap_pile[:-1].copy()
self.game.rng.shuffle(self.cards)
self.scrap_pile = self.scrap_pile[-1:]
def draw_from_scrap_pile(self) -> cs.Card:
if len(self.scrap_pile) > 0:
card = self.scrap_pile.pop(-1)
self.game.notify_scrap_pile()
card.reset_card()
return card
else:
return self.draw()
def scrap(self, card: cs.Card, ignore_event:bool=False, player:'Player'=None):
if card.number == 42:
return
card.reset_card()
if self.game.check_event(ce.MinieraAbbandonata) and not ignore_event:
self.put_on_top(card)
else:
self.scrap_pile.append(card)
if player is not None and self.game.replay_speed > 0:
G.sio.emit(
"card_scrapped",
room=self.game.name,
data={
"player": player.name,
"card": card.__dict__,
"pile": "scrap",
},
)
G.sio.sleep(0.6)
self.game.notify_scrap_pile()
else:
self.game.notify_scrap_pile()

View File

@ -0,0 +1,146 @@
# pylint: skip-file
class DodgeCity():
def get_characters():
from bang.expansions.dodge_city import characters
return characters.all_characters()
def get_cards():
from bang.expansions.dodge_city import cards
return cards.get_starting_deck()
def get_expansion_info(self):
return {
"id": "dodge_city",
"name": "Dodge City",
"cards": [
{"type": "characters", "cards": DodgeCity.get_characters()},
{"type": "cards", "cards": DodgeCity.get_cards()}
]
}
class HighNoon():
def get_events():
from bang.expansions.high_noon import card_events
return card_events.get_all_events() + [card_events.get_endgame_card()]
def get_expansion_info(self):
return {
"id": "high_noon",
"name": "High Noon",
"cards": [
{"type": "events", "cards": HighNoon.get_events()}
]
}
class FistfulOfCards():
def get_events():
from bang.expansions.fistful_of_cards import card_events
return card_events.get_all_events() + [card_events.get_endgame_card()]
def get_expansion_info(self):
return {
"id": "fistful_of_cards",
"name": "Fistful of Cards",
"cards": [
{"type": "events", "cards": FistfulOfCards.get_events()}
]
}
class GoldRush():
def get_characters():
from bang.expansions.gold_rush import characters
return characters.all_characters()
def get_shop_cards():
from bang.expansions.gold_rush import shop_cards
return shop_cards.get_cards()
def get_expansion_info(self):
return {
"id": "gold_rush",
"name": "Gold Rush",
"cards": [
{"type": "characters", "cards": GoldRush.get_characters()},
{"type": "cards", "cards": GoldRush.get_shop_cards()}
]
}
class TheValleyOfShadows():
def get_characters():
from bang.expansions.the_valley_of_shadows import characters
return characters.all_characters()
def get_cards():
from bang.expansions.the_valley_of_shadows import cards
return cards.get_starting_deck()
def get_expansion_info(self):
return {
"id": "the_valley_of_shadows",
"name": "The Valley of Shadows",
"cards": [
{"type": "characters", "cards": TheValleyOfShadows.get_characters()},
{"type": "cards", "cards": TheValleyOfShadows.get_cards()}
]
}
class WildWestShow():
def get_characters():
from bang.expansions.wild_west_show import characters
return characters.all_characters()
def get_events():
from bang.expansions.wild_west_show import card_events
return card_events.get_all_events() + [card_events.get_endgame_card()]
def get_expansion_info(self):
return {
"id": "wild_west_show",
"name": "Wild West Show",
"cards": [
{"type": "characters", "cards": WildWestShow.get_characters()},
{"type": "events", "cards": WildWestShow.get_events()}
]
}
class TrainRobbery():
def get_stations():
from bang.expansions.train_robbery import stations
return stations.get_all_stations()
def get_trains():
from bang.expansions.train_robbery import trains
return trains.get_all_cards() + trains.get_locomotives()
def get_expansion_info(self):
return {
"id": "train_robbery",
"name": "Train Robbery",
"cards": [
{"type": "stations", "cards": TrainRobbery.get_stations()},
{"type": "trains", "cards": TrainRobbery.get_trains()}
]
}
def get_expansion_info(expansion_id):
expansion_map = {
"dodge_city": DodgeCity(),
"high_noon": HighNoon(),
"fistful_of_cards": FistfulOfCards(),
"gold_rush": GoldRush(),
"the_valley_of_shadows": TheValleyOfShadows(),
"wild_west_show": WildWestShow(),
"train_robbery": TrainRobbery()
}
expansion_info = expansion_map[expansion_id].get_expansion_info()
for section in expansion_info["cards"]:
unique_cards = []
seen_card = set()
for card in section["cards"]:
if card.name not in seen_card:
unique_cards.append(card)
seen_card.add(card.name)
section["cards"] = unique_cards
return expansion_info

View File

@ -0,0 +1,571 @@
from bang.cards import *
import bang.expansions.fistful_of_cards.card_events as ce
from globals import G
class Binocolo(Mirino):
def __init__(self, suit, number):
super().__init__(suit, number)
self.name = "Binocolo"
self.icon = "🔍"
class Riparo(Mustang):
def __init__(self, suit, number):
super().__init__(suit, number)
self.name = "Riparo"
self.icon = ""
class Pugno(Card):
def __init__(self, suit, number):
super().__init__(suit, "Pugno!", number, range=1)
self.icon = "👊"
self.alt_text = "1🔎 💥"
# self.desc = "Spara a un giocatore a distanza 1"
# self.desc_eng = "Shoot a player at distance 1"
self.need_target = True
def play_card(self, player, against, _with=None):
if against is not None:
super().play_card(player, against=against)
player.game.attack(player, against, card_name=self.name)
return True
return False
class Schivata(Mancato):
def __init__(self, suit, number):
super().__init__(suit, number)
self.name = "Schivata"
self.icon = "🙅‍♂️"
# self.desc += " e poi pesca una carta"
# self.desc_eng += " and then draw a card."
self.alt_text = "😅 | 🎴"
def play_card(self, player, against, _with=None):
return False
def use_card(self, player):
player.game.deck.draw(True, player=player)
player.notify_self()
class RagTime(Panico):
def __init__(self, suit, number):
Card.__init__(self, suit, "Rag Time", number)
self.icon = "🎹"
# self.desc = "Ruba 1 carta da un giocatore a prescindere dalla distanza"
# self.desc_eng = "Steal a card from another player at any distance"
self.need_target = True
self.need_with = True
self.alt_text = "2🃏 | 👤😱"
def play_card(self, player, against, _with):
if against is not None and _with is not None:
player.game.deck.scrap(_with)
super().play_card(player, against=against, _with=_with)
return True
return False
class Rissa(CatBalou):
def __init__(self, suit, number):
super().__init__(suit, number)
self.name = "Rissa"
self.icon = "🥊"
# self.desc = "Fai scartare una carta a tutti gli altri giocatori, scegli a caso dalla mano, oppure fra quelle che hanno in gioco"
# self.desc_eng = "Choose a card to discard from the hand/equipment of all the other players"
self.need_with = True
self.need_target = False
self.alt_text = "2🃏 | 👤💃"
def play_card(self, player, against, _with):
if _with is not None:
if not any(
(
p != player and (len(p.hand) + len(p.equipment)) > 0
for p in player.game.players
)
):
return False
# se sono qui vuol dire che ci sono giocatori con carte in mano oltre a me
player.rissa_targets = []
target = player.game.get_player_named(player.name, next=True)
while target != player:
if len(target.hand) + len(target.equipment) > 0:
player.rissa_targets.append(target)
target = player.game.get_player_named(target.name, next=True)
player.game.deck.scrap(_with)
player.event_type = "rissa"
print(f"rissa targets: {player.rissa_targets}")
super().play_card(
player, against=player.rissa_targets.pop(0).name, _with=_with
)
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card|{player.name}|{self.name}",
)
return True
return False
class SpringField(Card):
def __init__(self, suit, number):
super().__init__(suit, "Springfield", number)
self.icon = "🌵"
# self.desc = "Spara a un giocatore a prescindere dalla distanza"
# self.desc_eng = "Shoot a player at any distance"
self.need_target = True
self.need_with = True
self.alt_text = "2🃏 | 👤💥"
def play_card(self, player, against, _with=None):
if against is not None and _with is not None:
player.game.deck.scrap(_with)
super().play_card(player, against=against, _with=_with)
player.game.attack(player, against, card_name=self.name)
return True
return False
class Tequila(Card):
def __init__(self, suit, number):
super().__init__(suit, "Tequila", number)
self.icon = "🍹"
# self.desc = "Fai recuperare 1 vita a un giocatore a tua scelta, anche te stesso"
# self.desc_eng = "Heal 1 HP to a player of your choice (can be you)"
self.need_target = True
self.can_target_self = True
self.need_with = True
self.alt_text = "2🃏 | 👤🍺"
def play_card(self, player, against, _with=None):
if against is not None and _with is not None:
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card_for|{player.name}|{self.name}|{against}",
)
player.game.deck.scrap(_with)
player.game.get_player_named(against).lives = min(
player.game.get_player_named(against).lives + 1,
player.game.get_player_named(against).max_lives,
)
player.game.get_player_named(against).notify_self()
return True
return False
class Whisky(Card):
def __init__(self, suit, number):
super().__init__(suit, "Whisky", number)
self.icon = "🥃"
# self.desc = "Gioca questa carta per recuperare fino a 2 punti vita"
# self.desc_eng = "Heal 2 HP"
self.need_with = True
self.alt_text = "2🃏 | 🍺🍺"
def play_card(self, player, against, _with=None):
if _with is not None:
super().play_card(player, against=against, _with=_with)
player.game.deck.scrap(_with)
player.lives = min(player.lives + 2, player.max_lives)
player.notify_self()
return True
return False
class Bibbia(Schivata):
def __init__(self, suit, number):
super().__init__(suit, number)
self.name = "Bibbia"
self.icon = "📖"
self.usable_next_turn = True
self.can_be_used_now = False
def play_card(self, player, against, _with=None):
if self.can_be_used_now:
pass
return False
else:
if not self.is_duplicate_card(player) and not player.game.check_event(
ce.IlGiudice
):
self.reset_card()
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card_green|{player.name}|{self.name}",
)
player.equipment.append(self)
return True
else:
return False
class Cappello(Mancato):
def __init__(self, suit, number):
super().__init__(suit, number)
self.name = "Cappello"
self.icon = "🧢"
self.usable_next_turn = True
self.can_be_used_now = False
self.alt_text = "😅"
def play_card(self, player, against, _with=None):
if self.can_be_used_now:
pass
return False
else:
self.reset_card()
if not self.is_duplicate_card(player) and not player.game.check_event(
ce.IlGiudice
):
self.reset_card()
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card_green|{player.name}|{self.name}",
)
player.equipment.append(self)
return True
else:
return False
class PlaccaDiFerro(Cappello):
def __init__(self, suit, number):
super().__init__(suit, number)
self.name = "Placca Di Ferro"
self.icon = "🛡"
class Sombrero(Cappello):
def __init__(self, suit, number):
super().__init__(suit, number)
self.name = "Sombrero"
self.icon = "👒"
class Pugnale(Pugno):
def __init__(self, suit, number):
super().__init__(suit, number)
self.name = "Pugnale"
self.icon = "🗡"
self.usable_next_turn = True
self.can_be_used_now = False
def play_card(self, player, against, _with=None):
if self.can_be_used_now:
return super().play_card(player, against=against)
else:
self.reset_card()
if not self.is_duplicate_card(player) and not player.game.check_event(
ce.IlGiudice
):
self.reset_card()
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card_green|{player.name}|{self.name}",
)
player.equipment.append(self)
return True
else:
return False
class Derringer(Pugnale):
def __init__(self, suit, number):
super().__init__(suit, number)
self.name = "Derringer"
self.icon = "🚬"
self.alt_text += " 🎴"
# self.desc += ' e poi pesca una carta'
# self.desc_eng += ' and then draw a card.'
def play_card(self, player, against, _with=None):
if self.can_be_used_now:
player.game.deck.draw(True, player=player)
return super().play_card(player, against=against)
else:
if not self.is_duplicate_card(player) and not player.game.check_event(
ce.IlGiudice
):
self.reset_card()
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card_green|{player.name}|{self.name}",
)
player.equipment.append(self)
return True
else:
return False
def use_card(self, player):
player.game.deck.draw(True, player=player)
player.notify_self()
class Borraccia(Card):
def __init__(self, suit, number):
super().__init__(suit, "Borraccia", number)
self.icon = "🍼"
# self.desc = 'Recupera 1 vita'
# self.desc_eng = 'Regain 1 HP'
self.alt_text = "🍺"
self.usable_next_turn = True
self.can_be_used_now = False
def play_card(self, player, against, _with=None):
if self.can_be_used_now:
super().play_card(player, against)
player.lives = min(player.lives + 1, player.max_lives)
player.notify_self()
return True
else:
if not self.is_duplicate_card(player) and not player.game.check_event(
ce.IlGiudice
):
self.reset_card()
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card_green|{player.name}|{self.name}",
)
player.equipment.append(self)
return True
else:
return False
class PonyExpress(WellsFargo):
def __init__(self, suit, number):
super().__init__(suit, number)
self.name = "Pony Express"
self.icon = "🦄"
self.alt_text = "🎴🎴🎴"
self.usable_next_turn = True
self.can_be_used_now = False
def play_card(self, player, against, _with=None):
if self.can_be_used_now:
return super().play_card(player, against)
else:
if not self.is_duplicate_card(player) and not player.game.check_event(
ce.IlGiudice
):
self.reset_card()
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card_green|{player.name}|{self.name}",
)
player.equipment.append(self)
return True
else:
return False
class Howitzer(Gatling):
def __init__(self, suit, number):
super().__init__(suit, number)
self.name = "Howitzer"
self.icon = "📡"
self.alt_text = "👥💥"
self.usable_next_turn = True
self.can_be_used_now = False
def play_card(self, player, against, _with=None):
if self.can_be_used_now:
return super().play_card(player, against)
else:
if not self.is_duplicate_card(player) and not player.game.check_event(
ce.IlGiudice
):
self.reset_card()
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card_green|{player.name}|{self.name}",
)
player.equipment.append(self)
return True
else:
return False
class CanCan(CatBalou):
def __init__(self, suit, number):
super().__init__(suit, number)
self.name = "Can Can"
self.icon = "👯‍♀️"
self.alt_text = "👤💃"
self.usable_next_turn = True
self.can_be_used_now = False
def play_card(self, player, against, _with=None):
if self.can_be_used_now:
return super().play_card(player, against)
else:
if not self.is_duplicate_card(player) and not player.game.check_event(
ce.IlGiudice
):
self.reset_card()
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card_green|{player.name}|{self.name}",
)
player.equipment.append(self)
return True
else:
return False
class Conestoga(Panico):
def __init__(self, suit, number):
Card.__init__(self, suit, "Conestoga", number)
self.icon = "🏕"
# self.desc = "Ruba 1 carta da un giocatore a prescindere dalla distanza"
# self.desc_eng = "Steal a card from another player at any distance"
self.alt_text = "👤😱"
self.need_target = True
self.usable_next_turn = True
self.can_be_used_now = False
def play_card(self, player, against, _with=None):
if self.can_be_used_now:
return super().play_card(player, against)
else:
if not self.is_duplicate_card(player) and not player.game.check_event(
ce.IlGiudice
):
self.reset_card()
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card_green|{player.name}|{self.name}",
)
player.equipment.append(self)
return True
else:
return False
class Pepperbox(Bang):
def __init__(self, suit, number):
super().__init__(suit, number)
self.name = "Pepperbox"
self.icon = "🌶"
self.alt_text = "💥"
self.usable_next_turn = True
self.can_be_used_now = False
def play_card(self, player, against, _with=None):
if self.can_be_used_now:
if against is not None:
Card.play_card(self, player, against=against)
player.game.attack(player, against, card_name=self.name)
return True
return False
else:
if not self.is_duplicate_card(player) and not player.game.check_event(
ce.IlGiudice
):
self.reset_card()
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card_green|{player.name}|{self.name}",
)
player.equipment.append(self)
return True
else:
return False
class FucileDaCaccia(Card):
def __init__(self, suit, number):
super().__init__(suit, "Fucile Da Caccia", number)
self.icon = "🌂"
# self.desc = "Spara a un giocatore a prescindere dalla distanza"
self.alt_text = "👤💥"
self.need_target = True
self.usable_next_turn = True
self.can_be_used_now = False
def play_card(self, player, against, _with=None):
if self.can_be_used_now:
if against is not None:
super().play_card(player, against=against)
player.game.attack(player, against, card_name=self.name)
return True
return False
else:
if not self.is_duplicate_card(player) and not player.game.check_event(
ce.IlGiudice
):
self.reset_card()
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card_green|{player.name}|{self.name}",
)
player.equipment.append(self)
return True
else:
return False
# pylint: disable=function-redefined
def get_starting_deck() -> List[Card]:
cards = [
Barile(Suit.CLUBS, "A"),
Binocolo(Suit.DIAMONDS, 10),
Dinamite(Suit.CLUBS, 10),
Mustang(Suit.HEARTS, 5),
Remington(Suit.DIAMONDS, 6),
RevCarabine(Suit.SPADES, 5),
Riparo(Suit.DIAMONDS, "K"),
Bang(Suit.SPADES, 8),
Bang(Suit.CLUBS, 5),
Bang(Suit.CLUBS, 6),
Bang(Suit.CLUBS, "K"),
Birra(Suit.HEARTS, 6),
Birra(Suit.SPADES, 6),
CatBalou(Suit.CLUBS, 8),
Emporio(Suit.SPADES, "A"),
Indiani(Suit.DIAMONDS, 5),
Mancato(Suit.DIAMONDS, 8),
Panico(Suit.HEARTS, "J"),
Pugno(Suit.SPADES, 10),
RagTime(Suit.HEARTS, 9),
Rissa(Suit.SPADES, "J"),
Schivata(Suit.DIAMONDS, 7),
Schivata(Suit.HEARTS, "K"),
SpringField(Suit.SPADES, "K"),
Tequila(Suit.CLUBS, 9),
Whisky(Suit.HEARTS, "Q"),
Bibbia(Suit.HEARTS, 10),
Cappello(Suit.DIAMONDS, "J"),
PlaccaDiFerro(Suit.DIAMONDS, "A"),
PlaccaDiFerro(Suit.SPADES, "Q"),
Sombrero(Suit.CLUBS, 7),
Pugnale(Suit.HEARTS, 8),
Derringer(Suit.SPADES, 7),
Borraccia(Suit.HEARTS, 7),
CanCan(Suit.CLUBS, "J"),
Conestoga(Suit.DIAMONDS, 9),
FucileDaCaccia(Suit.CLUBS, "Q"),
PonyExpress(Suit.DIAMONDS, "Q"),
Pepperbox(Suit.HEARTS, "A"),
Howitzer(Suit.SPADES, 9),
]
for c in cards:
c.expansion_icon = "🐄️"
c.expansion = "dodge_city"
return cards

View File

@ -0,0 +1,220 @@
from typing import List
from bang.characters import Character
from globals import PendingAction
class PixiePete(Character):
"""All'inizio del turno pesca 3 carte invece che 2
He draws 3 cards instead of 2"""
def __init__(self):
super().__init__("Pixie Pete", max_lives=3)
self.icon = "☘️"
class TequilaJoe(Character):
"""Se gioca la carta Birra recupera 2 vite invece che una sola
When he plays Beer, he regains 2 Health Points"""
def __init__(self):
super().__init__("Tequila Joe", max_lives=4)
self.icon = "🍻"
class GregDigger(Character):
"""Quando un giocatore muore, recupera fino a 2 vite
Whenever a player dies, he regains up to 2 lives"""
def __init__(self):
super().__init__("Greg Digger", max_lives=4)
self.icon = "🦴"
class HerbHunter(Character):
"""Quando un giocatore muore, pesca 2 carte
Whenever a player dies, he draws 2 cards"""
def __init__(self):
super().__init__("Herb Hunter", max_lives=4)
self.icon = "⚰️"
class ElenaFuente(Character):
"""Può usare una carta qualsiasi nella sua mano come mancato
She can use any card of her hand as missed"""
def __init__(self):
super().__init__("Elena Fuente", max_lives=3)
self.icon = "🧘‍♀️"
class BillNoface(Character):
"""All'inizio del turno pesca 1 carta + 1 carta per ogni ferita che ha
Draw 1 card + 1 card for each wound he has"""
def __init__(self):
super().__init__("Bill Noface", max_lives=4)
self.icon = "🙈"
class MollyStark(Character):
"""Quando usa volontariamente una carta che ha in mano, fuori dal suo turno, ne ottiene un'altra dal mazzo
When she uses a card from her hand outside her turn, she draws a card."""
def __init__(self):
super().__init__("Molly Stark", max_lives=4)
self.icon = "🙅‍♀️"
class ApacheKid(Character):
"""Le carte di quadri ♦️ giocate contro di lui non hanno effetto (non vale durante i duelli)
Cards of diamonds played against him, do no have effect (doesn't work in duels).
"""
def __init__(self):
super().__init__("Apache Kid", max_lives=3)
self.icon = "♦️"
class SeanMallory(Character):
"""Quando finisce il suo turno può tenere fino a 10 carte in mano
He can keep up to 10 cards in his hand when ending the turn."""
def __init__(self):
super().__init__("Sean Mallory", max_lives=3)
self.icon = "🍟"
class BelleStar(Character):
"""Nel suo turno le carte verdi degli altri giocatori non hanno effetto.
During her turn the green cards of the other players do not work."""
def __init__(self):
super().__init__("Belle Star", max_lives=4)
self.icon = ""
class VeraCuster(Character):
"""Prima di pescare le sue carte può scegliere l'abilità speciale di un altro giocatore fino al prossimo turno.
Before drawing, she may choose the special ability on another alive player. This ability is used until next turn.
"""
def __init__(self):
super().__init__("Vera Custer", max_lives=3)
self.icon = "🎭"
class ChuckWengam(Character):
"""Durante il suo turno può perdere una vita per pescare 2 carte dal mazzo.
On his turn he may decide to lose 1 HP to draw 2 cards from the deck."""
def __init__(self):
super().__init__("Chuck Wengam", max_lives=4)
self.icon = "💰"
def special(self, player, data):
if super().special(player, data):
if player.lives > 1 and player.is_my_turn:
player.lives -= 1
player.game.deck.draw(True, player=player)
player.game.deck.draw(True, player=player)
player.notify_self()
return True
return False
class PatBrennan(Character):
"""Invece di pescare può prendere una carta dall'equipaggiamento di un altro giocatore.
Instead of drawing he can steal a card from the equipment of another player."""
def __init__(self):
super().__init__("Pat Brennan", max_lives=4)
self.icon = "🤗"
class JoseDelgado(Character):
"""Può scartare una carta blu per pescare 2 carte.
He can discard a blue card to draw 2 cards."""
def __init__(self):
super().__init__("José Delgado", max_lives=4)
self.icon = "🎒"
class DocHolyday(Character):
"""Nel suo turno può scartare 2 carte per fare un bang.
He can discard 2 cards to play a bang."""
def __init__(self):
super().__init__("Doc Holyday", max_lives=4)
self.icon = "✌🏻"
def special(self, player, data):
if super().special(player, data):
if (
player.special_use_count < 1
and player.pending_action == PendingAction.PLAY
):
player.special_use_count += 1
cards = sorted(data["cards"], reverse=True)
for c in cards:
player.game.deck.scrap(player.hand.pop(c), True)
player.notify_self()
player.game.attack(player, data["against"])
return True
return False
# pylint: disable=function-redefined
def all_characters() -> List[Character]:
cards = [
PixiePete(),
TequilaJoe(),
GregDigger(),
HerbHunter(),
ElenaFuente(),
BillNoface(),
MollyStark(),
ApacheKid(),
SeanMallory(),
BelleStar(),
VeraCuster(),
ChuckWengam(),
PatBrennan(),
JoseDelgado(),
DocHolyday(),
]
for card in cards:
card.expansion_icon = "🐄️" # pylint: disable=attribute-defined-outside-init
card.expansion = "dodge_city" # pylint: disable=attribute-defined-outside-init
return cards
# Apache Kid: il suo effetto non conta nei duelli
# belle star: vale solo per le carte blu e verdi
# chuck wengam: può usarlo più volte in un turno, ma non può suicidarsi
# doc holiday: il suo effetto non conta nel limite di un bang per turno,
# se deve sparare a Apache Kid una delle due carte scartate non deve essere di quadri
# molly stark: le carte scartate che valgono sono solo quelle scartate volontariamente,
# carte scartate per colpa di can can, cat balou, rissa, panico non valgono,
# invece carte scartata per indiani, birra(in caso di morte), o un mancato valgono,
# in un duello pesca solo quando il duello è finito (una carta x ogni bang scartato)
# pat brennan: quando pesca con il suo effetto, pesca solo la carta del giocatore non anche dal mazzo
# vera custer: la scelta può essere fatta solo appena prima di pescare,
# quando inizia la partita serve farle scegliere, poi può rimanere quello finchè non decide di cambiarlo
# eventualmente fare una schermata dove vede tutti i personaggi

View File

@ -0,0 +1,222 @@
from typing import TYPE_CHECKING
from abc import ABC, abstractmethod
import random
import bang.players as players
import bang.roles as r
import bang.cards as cs
from globals import G
if TYPE_CHECKING:
from bang.game import Game
class CardEvent(ABC):
"""Base class for all event cards"""
def __init__(self, name, icon):
self.name = name
self.icon = icon
def on_flipped(self, game: "Game"):
"""Default on flipped event
Args:
game (Game): the game object
"""
print(f"{game.name}: flip new event {self.name}")
G.sio.emit(
"chat_message",
room=game.name,
data={
"color": "orange",
"text": f"_flip_event|{self.name}",
},
)
return
def on_clicked(self, game, player):
"""Default on clicked event
Args:
game (Game): the game object
player (Player): the player that clicked the card
"""
print(f"{game.name}: {player.name} clicked event {self.name}")
return
class Agguato(CardEvent):
"""La distanza base tra 2 qualsiasi giocatori è 1
The distance between 2 players is always 1"""
def __init__(self):
super().__init__("Agguato", "🛁")
class Cecchino(CardEvent):
"""Nel proprio turno i giocatori possono
scartare 2 Bang assieme per sparare un bang che necessita 2 mancato (clicca la carta)
In your turn you can discard 2 Bang together to shoot a bang that needs 2 miss (click the card)
"""
def __init__(self):
super().__init__("Cecchino", "👁")
class DeadMan(CardEvent):
"""Al proprio turno il giocatore che è morto per primo torna in vita con 2 vite e 2 carte
The first player that died returns back to life with 2 hp and 2 cards"""
def __init__(self):
super().__init__("Dead Man", "⚰️")
def on_flipped(self, game):
game.did_resuscitate_deadman = False
return super().on_flipped(game)
class FratelliDiSangue(CardEvent):
"""All'inizio del proprio turno, i giocatori possono perdere 1 vita (tranne l'ultimo) per darla a un altro giocatore"""
def __init__(self):
super().__init__("Fratelli Di Sangue", "💉")
class IlGiudice(CardEvent):
"""Non si possono equipaggiare carte a se stessi o agli altri"""
def __init__(self):
super().__init__("Il Giudice", "👨‍⚖️")
class Lazo(CardEvent):
"""Le carte equipaggiate non hanno effetto"""
def __init__(self):
super().__init__("Lazo", "📿")
class LeggeDelWest(CardEvent):
"""I giocatori mostrano la seconda carta che pescano e sono obbligati a usarla in quel turno (se possibile)"""
def __init__(self):
super().__init__("Legge Del West", "⚖️")
class LiquoreForte(CardEvent):
"""I giocatori possono evitare di pescare per recuperare 1 vita (clicca sulla carta evento per farlo)"""
def __init__(self):
super().__init__("Liquore Forte", "🥃")
class MinieraAbbandonata(CardEvent):
"""I giocatori pescano dagli scarti nella loro fase 1 e scartano in cima al mazzo nella loro fase 3 (se gli scarti finiscono, è necessario pescare e scartare in cima al mazzo)"""
def __init__(self):
super().__init__("Miniera Abbandonata", "")
class PerUnPugnoDiCarte(CardEvent):
"""All'inizio del proprio turno, il giocatore subisce tanti bang quante carte ha in mano"""
def __init__(self):
super().__init__("Per Un Pugno Di Carte", "🎴")
class Peyote(CardEvent):
"""Invece che pescare il giocatore prova a indovinare il colore del seme, se lo indovina aggiunge la carta alla mano e continua provando ad indovinare la carta successiva"""
def __init__(self):
super().__init__("Peyote", "🌵")
class Ranch(CardEvent):
"""Dopo aver pescato il giocatore può scartare quante carte vuole dalla mano e pescarne altrettante dal mazzo"""
def __init__(self):
super().__init__("Ranch", "🐮")
class Rimbalzo(CardEvent):
"""Il giocatore di turno può giocare bang contro le carte equipaggiate dagli altri giocatori, se non giocano mancato vengono scartate (clicca la carta evento)"""
def __init__(self):
super().__init__("Rimbalzo", "")
def on_clicked(self, game, player):
super().on_clicked(game, player)
if any((c.name == cs.Bang(0, 0).name for c in player.hand)):
player.available_cards = [
{
"name": p.name,
"icon": p.role.icon
if (game.initial_players == 3)
else "⭐️"
if isinstance(p.role, r.Sheriff)
else "🤠",
"is_character": True,
"avatar": p.avatar,
"is_player": True,
}
for p in game.get_alive_players()
if len(p.equipment) > 0 and p != player
]
player.available_cards.append({"icon": "", "noDesc": True})
player.choose_text = "choose_rimbalzo_player"
player.pending_action = players.PendingAction.CHOOSE
player.using_rimbalzo = 1
player.notify_self()
class RouletteRussa(CardEvent):
"""A partire dallo sceriffo, ogni giocatore scarta 1 mancato, il primo che non lo fa perde 2 vite"""
def __init__(self):
super().__init__("Roulette Russa", "🇷🇺")
# self.desc_eng = "Starting from the sheriff, every player discards 1 missed, the first one that doesn't loses 2 HP"
class Vendetta(CardEvent):
"""Alla fine del proprio turno il giocatore estrae dal mazzo, se esce ♥️ gioca un altro turno (ma non estrae di nuovo)"""
def __init__(self):
super().__init__("Vendetta", "😤")
# self.desc_eng = "When ending the turn, the player flips a card from the deck, if it's ♥️ he plays another turn (but he does not flip another card)"
def get_endgame_card():
end_game = PerUnPugnoDiCarte()
end_game.expansion = ( # pylint: disable=attribute-defined-outside-init
"fistful-of-cards"
)
return end_game
def get_all_events(rng=random):
cards = [
Agguato(),
Cecchino(),
DeadMan(),
FratelliDiSangue(),
IlGiudice(),
Lazo(),
LeggeDelWest(),
LiquoreForte(),
MinieraAbbandonata(),
Peyote(),
Ranch(),
Rimbalzo(),
RouletteRussa(),
Vendetta(),
]
rng.shuffle(cards)
for card in cards:
card.expansion = ( # pylint: disable=attribute-defined-outside-init
"fistful-of-cards"
)
return cards

View File

@ -0,0 +1,113 @@
from typing import List
from bang.characters import Character
class DonBell(Character):
def __init__(self):
super().__init__("Don Bell", max_lives=4)
# A fine turno estrae, ❤️ o ♦️ gioca di nuovo
self.icon = "🔔️"
class DutchWill(Character):
def __init__(self):
super().__init__("Dutch Will", max_lives=4)
# Pesca 2 ne scarta 1 e prende 1 pepita
self.icon = "🧐️"
class JackyMurieta(Character):
def __init__(self):
super().__init__("Jacky Murieta", max_lives=4)
# puo pagare 2 pepite per sparare 1 bang extra
self.icon = "💆‍♂️️"
def special(self, player, data):
if super().special(player, data):
if player.gold_nuggets >= 2 and player.is_my_turn:
player.gold_nuggets -= 2
player.has_played_bang = False
player.bang_used -= 1
player.notify_self()
return True
return False
class JoshMcCloud(Character):
def __init__(self):
super().__init__("Josh McCloud", max_lives=4)
# puo pagare 2 pepite per pescare il primo equipaggiamento dalla pila gold rush
self.icon = "⛅️"
def special(self, player, data):
if super().special(player, data):
if player.gold_nuggets >= 2 and player.is_my_turn:
player.gold_nuggets -= 2
card = player.game.deck.shop_deck.pop(0)
print(
f"{player.name} ha comprato usando la abilità speciale {card.name}"
)
if card.play_card(player):
player.game.deck.shop_deck.append(card)
player.notify_self()
return True
return False
class MadamYto(Character):
def __init__(self):
super().__init__("Madam Yto", max_lives=4)
# quando viene giocata 1 birra pesca 1 carta
self.icon = "💃️"
class PrettyLuzena(Character):
def __init__(self):
super().__init__("Pretty Luzena", max_lives=4)
# una volta per turno ha 1 sconto di 1 pepita sugli equipaggiamenti
self.icon = "👛️"
class RaddieSnake(Character):
def __init__(self):
super().__init__("Raddie Snake", max_lives=4)
# può scartare 1 pepita per pescare 1 carta (2 volte per turno)
self.icon = "🐍️"
def special(self, player, data):
if super().special(player, data):
if (
player.gold_nuggets >= 1
and player.is_my_turn
and player.special_use_count < 2
):
player.gold_nuggets -= 1
player.special_use_count += 1
player.game.deck.draw(True, player=player)
player.notify_self()
return True
return False
class SimeonPicos(Character):
def __init__(self):
super().__init__("Simeon Picos", max_lives=4)
# ottiene 1 pepita ogni volta che perde 1 punto vita
self.icon = "🥲"
def all_characters() -> List[Character]:
cards = [
DonBell(),
DutchWill(),
JackyMurieta(),
JoshMcCloud(),
MadamYto(),
PrettyLuzena(),
RaddieSnake(),
SimeonPicos(),
]
for c in cards:
c.expansion_icon = "🤑️"
c.expansion = "gold_rush"
return cards

View File

@ -0,0 +1,265 @@
from bang.cards import *
import bang.roles as r
import bang.players as pl
from globals import G, PendingAction
class ShopCardKind(IntEnum):
BROWN = 0 # Se lequipaggiamento ha il bordo marrone, applicane subito leffetto e poi scartalo.
BLACK = 1 # Se lequipaggiamento ha il bordo nero, tienilo scoperto di fronte a te.
class ShopCard(Card):
def __init__(self, name:str, cost:int, kind:ShopCardKind):
super().__init__(suit='💵', number=cost, name=name)
self.kind = kind
self.expansion_icon = '🤑️'
self.expansion = 'gold_rush'
self.reset_card()
def play_card(self, player, against, _with=None):
if self.kind == ShopCardKind.BROWN:
G.sio.emit('chat_message', room=player.game.name, data=f'_purchase_card|{player.name}|{self.name}')
return True
elif self.kind == ShopCardKind.BLACK: # equip it
if not self.is_duplicate_card(player):
self.reset_card()
self.can_be_used_now = True
player.gold_rush_equipment.append(self)
G.sio.emit('chat_message', room=player.game.name, data=f'_purchase_card|{player.name}|{self.name}')
return True
else:
return False
def reset_card(self):
if self.kind == ShopCardKind.BLACK:
self.can_be_used_now = False
class Bicchierino(ShopCard):
def __init__(self):
super().__init__('Bicchierino', 1, ShopCardKind.BROWN)
self.icon = '🍸️'
def play_card(self, player, against=None, _with=None):
player.available_cards = [{
'name': p.name,
'icon': p.role.icon if(player.game.initial_players == 3) else '⭐️' if isinstance(p.role, r.Sheriff) else '🤠',
'alt_text': ''.join(['❤️']*p.lives)+''.join(['💀']*(p.max_lives-p.lives)),
'is_character': True,
'is_player': True
} for p in player.game.get_alive_players()]
player.choose_text = 'choose_bicchierino'
player.pending_action = PendingAction.CHOOSE
player.notify_self()
return super().play_card(player, against, _with)
class Bottiglia(ShopCard):
def __init__(self):
super().__init__('Bottiglia', 2, ShopCardKind.BROWN)
self.icon = '🍾️'
def play_card(self, player, against=None, _with=None):
# bang, birra, panico
player.available_cards = [Bang(4,42), Birra(4,42), Panico(4,42)]
if not any((player.get_sight() >= p['dist'] for p in player.game.get_visible_players(player))):
player.available_cards.pop(0)
for i in range(len(player.available_cards)):
player.available_cards[i].must_be_used = True
player.choose_text = 'choose_bottiglia'
player.pending_action = PendingAction.CHOOSE
player.notify_self()
return super().play_card(player, against, _with)
class Complice(ShopCard):
def __init__(self):
super().__init__('Complice', 2, ShopCardKind.BROWN)
self.icon = '😉️'
def play_card(self, player, against=None, _with=None):
# emporio, duello, Cat balou
player.available_cards = [Emporio(4,42), Duello(4,42), CatBalou(4,42)]
for i in range(len(player.available_cards)):
player.available_cards[i].must_be_used = True
player.choose_text = 'choose_complice'
player.pending_action = PendingAction.CHOOSE
player.notify_self()
return super().play_card(player, against, _with)
class CorsaAllOro(ShopCard):
def __init__(self):
super().__init__("Corsa All Oro_gr", 5, ShopCardKind.BROWN)
self.icon = '🤑️'
def play_card(self, player, against=None, _with=None):
player.lives = player.max_lives
player.play_turn()
return super().play_card(player, against, _with)
class Rum(ShopCard):
def __init__(self):
super().__init__("Rum", 3, ShopCardKind.BROWN)
self.icon = '🍷️'
def play_card(self, player, against=None, _with=None):
# Estrai 4 carte e ottieni 1 hp per ogni seme diverso
import bang.characters as c
suits = set()
num = 5 if player.character.check(player.game, c.LuckyDuke) else 4
for i in range(num):
c = player.game.deck.pick_and_scrap()
G.sio.emit('chat_message', room=player.game.name, data=f'_flipped|{player.name}|{c.name}|{c.num_suit()}')
suits.add(c.suit)
player.lives = min(player.lives+len(suits), player.max_lives)
return super().play_card(player, against, _with)
class UnionPacific(ShopCard):
def __init__(self):
super().__init__("Union Pacific", 4, ShopCardKind.BROWN)
self.icon = '🚆️'
def play_card(self, player, against=None, _with=None):
G.sio.emit('chat_message', room=player.game.name,
data=f'_UnionPacific|{player.name}|{self.name}')
for i in range(4):
player.game.deck.draw(True, player=player)
return super().play_card(player, against, _with)
class Calumet(ShopCard):
def __init__(self):
super().__init__("Calumet", 3, ShopCardKind.BLACK)
self.icon = '🚭️'
def play_card(self, player, against=None, _with=None):
return super().play_card(player, against, _with)
# ti rende immuni ai quadri
class Cinturone(ShopCard):
def __init__(self):
super().__init__("Cinturone", 2, ShopCardKind.BLACK)
self.icon = '🥡'
def play_card(self, player, against=None, _with=None):
return super().play_card(player, against, _with)
# max carte a fine turno 8
class FerroDiCavallo(ShopCard):
def __init__(self):
super().__init__("Ferro di Cavallo", 2, ShopCardKind.BLACK)
self.icon = '🎠'
def play_card(self, player, against=None, _with=None):
return super().play_card(player, against, _with)
# estrai come luky duke
class Piccone(ShopCard):
def __init__(self):
super().__init__("Piccone", 4, ShopCardKind.BLACK)
self.icon = '⛏️'
def play_card(self, player, against=None, _with=None):
return super().play_card(player, against, _with)
# peschi una carta in piu a inizio turno
class Ricercato(ShopCard):
def __init__(self):
super().__init__("Ricercato", 2, ShopCardKind.BLACK)
self.icon = '🤠️'
self.can_target_self = True
def play_card(self, player, against=None, _with=None):
G.sio.emit('chat_message', room=player.game.name, data=f'_purchase_card|{player.name}|{self.name}')
player.available_cards = [{
'name': p.name,
'icon': p.role.icon if(player.game.initial_players == 3) else '🤠',
'alt_text': ''.join(['❤️']*p.lives)+''.join(['💀']*(p.max_lives-p.lives)),
'is_character': True,
'is_player': True
} for p in player.game.get_alive_players() if p != player and not isinstance(p.role, r.Sheriff)]
player.available_cards.append({'name': player.name, 'number':0,'icon': 'you', 'is_character': True})
player.choose_text = 'choose_ricercato'
player.pending_action = PendingAction.CHOOSE
player.notify_self()
return True
# la giochi su un altro giocatore, ricompensa di 2 carte e 1 pepita a chi lo uccide
class Setaccio(ShopCard):
def __init__(self):
super().__init__("Setaccio", 3, ShopCardKind.BLACK)
self.icon = '🥘️'
def play_card(self, player, against=None, _with=None):
if not self.can_be_used_now:
return super().play_card(player, against, _with)
else:
if player.gold_nuggets >= 1 and player.setaccio_count < 2:
G.sio.emit('chat_message', room=player.game.name, data=f'_play_card|{player.name}|{self.name}')
player.gold_nuggets -= 1
player.setaccio_count += 1
player.game.deck.draw(True, player=player)
player.notify_self()
return True
return False
# paghi 1 pepita per pescare 1 carta durante il tuo turno (max 2 volte per turno)
class Stivali(ShopCard):
def __init__(self):
super().__init__("Stivali", 3, ShopCardKind.BLACK)
self.icon = '🥾️'
def play_card(self, player, against=None, _with=None):
return super().play_card(player, against, _with)
# peschi una carta ogni volta che vieni ferito
class Talismano(ShopCard):
def __init__(self):
super().__init__("Talismano", 3, ShopCardKind.BLACK)
self.icon = '🧿'
def play_card(self, player, against=None, _with=None):
return super().play_card(player, against, _with)
# ottieni una pepita ogni volta che vieni ferito
class Zaino(ShopCard):
def __init__(self):
super().__init__("Zaino", 3, ShopCardKind.BLACK)
self.icon = '🎒️'
def play_card(self, player, against=None, _with=None):
if not self.can_be_used_now:
return super().play_card(player, against, _with)
else:
if player.gold_nuggets >= 2:
G.sio.emit('chat_message', room=player.game.name, data=f'_play_card|{player.name}|{self.name}')
player.gold_nuggets -= 2
player.lives = min(player.lives + 1, player.max_lives)
player.notify_self()
return True
return False
# paga 2 pepite per recuperare 1 vita
def get_cards() -> List[Card]:
cards = [
Bicchierino(),
Bicchierino(),
Bicchierino(),
Bottiglia(),
Bottiglia(),
Bottiglia(),
Complice(),
Complice(),
Complice(),
CorsaAllOro(),
Rum(),
Rum(),
UnionPacific(),
Calumet(),
Cinturone(),
FerroDiCavallo(),
Piccone(),
Ricercato(),
Ricercato(),
Ricercato(),
Setaccio(),
Stivali(),
Talismano(),
Zaino(),
]
return cards

View File

@ -0,0 +1,184 @@
import random
from globals import G
from bang.expansions.fistful_of_cards.card_events import CardEvent
class Benedizione(CardEvent):
"""Tutte le carte sono considerate di cuori ♥️"""
def __init__(self):
super().__init__("Benedizione", "🙏")
# self.desc_eng = "All cards are of hearts ♥️"
class Maledizione(CardEvent):
"""Tutte le carte sono considerate di picche ♠"""
def __init__(self):
super().__init__("Maledizione", "🤬")
# self.desc_eng = "All cards are of spades ♠"
class Sbornia(CardEvent):
"""I personaggi perdono le loro abilità speciali"""
def __init__(self):
super().__init__("Sbornia", "🥴")
# self.desc_eng = "The characters lose their special abilities"
class Sete(CardEvent):
"""I giocatori pescano 1 carta in meno nella loro fase 1"""
def __init__(self):
super().__init__("Sete", "🥵")
# self.desc_eng = "Players only draw 1 card at the start of their turn"
class IlTreno(CardEvent):
"""I giocatori pescano 1 carta extra nella loro fase 1"""
def __init__(self):
super().__init__("Il Treno", "🚂")
# self.desc_eng = "Players draw 1 extra card"
class IlReverendo(CardEvent):
"""Non si possono giocare le carte Birra"""
def __init__(self):
super().__init__("Il Reverendo", "⛪️")
# self.desc_eng = "Beers can't be played"
class IlDottore(CardEvent):
"""Il/i giocatore/i con meno vite ne recupera/no una"""
def __init__(self):
super().__init__("Il Dottore", "👨‍⚕️")
# self.desc_eng = "The player with the least amount of HP gets healed 1"
def on_flipped(self, game):
super().on_flipped(game)
most_hurt = [
p.lives for p in game.players if p.lives > 0 and p.max_lives > p.lives
]
if len(most_hurt) > 0:
hurt_players = [p for p in game.players if p.lives == min(most_hurt)]
for p in hurt_players:
if p.lives != p.max_lives:
p.lives += 1
G.sio.emit(
"chat_message",
room=game.name,
data=f"_doctor_heal|{p.name}",
)
p.notify_self()
return
class Sermone(CardEvent):
"""I giocatori non possono giocare Bang! durante il loro turno"""
def __init__(self):
super().__init__("Sermone", "✝️")
# self.desc_eng = "Players can't play Bang! during their turn"
class Sparatoria(CardEvent):
"""Il limite di Bang! per turno è 2 invece che 1"""
def __init__(self):
super().__init__("Sparatoria", "🔫🔫")
# self.desc_eng = "The turn Bang! limit is 2"
class CorsaAllOro(CardEvent):
"""Si gioca per un intero giro in senso antiorario, tuttavia gli effetti delle carte rimangono invariati"""
def __init__(self):
super().__init__("Corsa All Oro", "🌟")
# self.desc_eng = "Turns are played counter clockwise"
class IDalton(CardEvent):
"""Chi ha carte blu in gioco ne scarta 1 a sua scelta"""
def __init__(self):
super().__init__("I Dalton", "🙇‍♂️")
# self.desc_eng = "Players that have blue cards equipped, discard 1 of those card of their choice"
def on_flipped(self, game):
game.waiting_for = 0
game.ready_count = 0
game.dalton_on = True
for p in game.players:
if p.get_dalton():
game.waiting_for += 1
p.notify_self()
if game.waiting_for != 0:
return
game.dalton_on = False
return super().on_flipped(game)
class Manette(CardEvent):
"""Dopo aver pescato in fase 1, il giocatore di turno dichiara un seme: potrà usare solamente carte di quel seme nel suo turno"""
def __init__(self):
super().__init__("Manette", "🔗")
# self.desc_eng = "After drawing in phase 1, the player declares a suit. He will be able to use only cards of that suit for that turn"
class NuovaIdentita(CardEvent):
"""All'inizio del proprio turno, ogni giocatore potrà decidere se sostituire il suo personaggio attuale con quello era stato proposto ad inizio partita, se lo fa riparte con 2 punti vita"""
def __init__(self):
super().__init__("Nuova Identita", "🕶")
# self.desc_eng = "At the beginning of their turn, each player can choose to change its character with the other shown at the game start. If he does so he restarts from 2 HP."
class CittaFantasma(CardEvent):
"""Tutti i giocatori morti tornano in vita al proprio turno, non possono morire e pescano 3 carte invece che 2. Quando terminano il turno tornano morti."""
def __init__(self):
super().__init__("Città Fantasma", "👻")
# self.desc_eng = "All dead players come back to life in their turn, they can't die and draw 3 cards instead of 2. When they end their turn the die."
class MezzogiornoDiFuoco(CardEvent):
"""Ogni giocatore perde 1 punto vita all'inizio del turno"""
def __init__(self):
super().__init__("Mezzogiorno di Fuoco", "🔥")
# self.desc_eng = "Every player loses 1 HP when their turn starts"
def get_endgame_card():
end_game = MezzogiornoDiFuoco()
end_game.expansion = "high-noon" # pylint: disable=attribute-defined-outside-init
return end_game
def get_all_events(rng=random):
cards = [
Benedizione(),
Maledizione(),
CittaFantasma(),
CorsaAllOro(),
IDalton(),
IlDottore(),
IlReverendo(),
IlTreno(),
Sbornia(),
Sermone(),
Sete(),
Sparatoria(),
Manette(),
NuovaIdentita(),
]
rng.shuffle(cards)
for c in cards:
c.expansion = "high-noon" # pylint: disable=attribute-defined-outside-init
return cards

View File

@ -0,0 +1,303 @@
from typing import List
import bang.roles as r
import bang.players as pl
from bang.cards import Card, Suit, Bang, Mancato
import bang.expansions.fistful_of_cards.card_events as ce
from globals import G, PendingAction
class Fantasma(Card):
def __init__(self, suit, number):
super().__init__(suit, "Fantasma", number, is_equipment=True)
self.icon = "👻️" # porta in vita i giocatori morti ma non
def play_card(self, player, against, _with=None):
if (player.game.check_event(ce.IlGiudice)) or not self.can_be_used_now:
return False
if len(player.game.get_dead_players(include_ghosts=False)) > 0:
player.pending_action = PendingAction.CHOOSE
player.choose_text = "choose_fantasma"
player.available_cards = [
{
"name": p.name,
"icon": p.role.icon
if (player.game.initial_players == 3)
else "⭐️"
if isinstance(p.role, r.Sheriff)
else "🤠",
"avatar": p.avatar,
"alt_text": "".join(["❤️"] * p.lives)
+ "".join(["💀"] * (p.max_lives - p.lives)),
"is_character": True,
"is_player": True,
}
for p in player.game.get_dead_players(include_ghosts=False)
]
self.can_be_used_now = False
player.game.deck.scrap(self, True)
return True
return False
class Lemat(Card):
def __init__(self, suit, number):
super().__init__(
suit, "Lemat", number, is_equipment=True, is_weapon=True, range=1
)
self.icon = "🔫" # ogni carta può essere usata come bang, conta per il conteggio dei bang per turno
def play_card(self, player, against, _with=None):
if not self.can_be_used_now and player.game.check_event(ce.Lazo):
return False
if self.can_be_used_now:
if not super().play_card(player, against, _with):
return False
self.can_be_used_now = False
return True
elif not player.has_played_bang and any(
(
player.get_sight() >= p["dist"]
for p in player.game.get_visible_players(player)
)
):
player.set_choose_action("choose_play_as_bang", player.hand.copy())
player.notify_self()
return False
class SerpenteASonagli(Card):
def __init__(self, suit, number):
super().__init__(suit, "SerpenteASonagli", number, is_equipment=True)
self.need_target = True
self.icon = "🐍️" # Ogni turno pesca se il seme picche -1hp
self.alt_text = "♠️ =💔"
def play_card(self, player, against, _with=None):
if (player.game.check_event(ce.IlGiudice)) or not self.can_be_used_now:
return False
if against is not None:
self.can_be_used_now = False
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card_against|{player.name}|{self.name}|{against}",
)
player.game.get_player_named(against).equipment.append(self)
player.game.get_player_named(against).notify_self()
return True
return False
class Shotgun(Card):
def __init__(self, suit, number):
super().__init__(
suit, "Shotgun", number, is_equipment=True, is_weapon=True, range=1
)
self.icon = "🔫" # Ogni volta che colpisci un giocatore deve scartare una carta
class Taglia(Card):
def __init__(self, suit, number):
super().__init__(suit, "Taglia", number, is_equipment=True)
self.need_target = True
self.icon = "💰" # chiunque colpisca il giocatore con la taglia pesca una carta dal mazzo, si toglie solo con panico, cat balou, dalton
def play_card(self, player, against, _with=None):
if (player.game.check_event(ce.IlGiudice)) or not self.can_be_used_now:
return False
if against is not None:
self.can_be_used_now = False
G.sio.emit(
"chat_message",
room=player.game.name,
data=f"_play_card_against|{player.name}|{self.name}|{against}",
)
player.game.get_player_named(against).equipment.append(self)
player.game.get_player_named(against).notify_self()
return True
return False
class UltimoGiro(Card):
def __init__(self, suit, number):
super().__init__(suit, "UltimoGiro", number)
self.icon = "🥂"
# self.desc = 'Recupera 1 vita'
# self.desc_eng = 'Regain 1 HP'
self.alt_text = "🍺"
def play_card(self, player, against, _with=None):
super().play_card(player, against)
player.lives = min(player.lives + 1, player.max_lives)
player.notify_self()
return True
class Tomahawk(Card):
def __init__(self, suit, number):
super().__init__(suit, "Tomahawk", number, range=2)
self.icon = "🪓️"
self.alt_text = "2🔎 💥"
# "Spara a un giocatore a distanza 2"
self.need_target = True
def play_card(self, player, against, _with=None):
if against is not None and player.game.can_card_reach(self, player, against):
super().play_card(player, against=against)
player.game.attack(player, against, card_name=self.name)
return True
return False
class Tornado(Card):
def __init__(self, suit, number):
super().__init__(suit, "Tornado", number)
self.icon = "🌪️"
def play_card(self, player, against, _with=None):
super().play_card(player, against=against)
player.game.discard_others(player, card_name=self.name)
return True
class Sventagliata(
Bang
): # : conta come un normale BANG! del turno. Il BANG! secondario è obbligatorio ed è sparato anche se il primo viene annullato, se si può, tu sei escluso come target
def __init__(self, suit, number):
super().__init__(suit, number)
self.name = "Sventagliata"
self.icon = "🎏"
self.alt_text = "💥💥" # spara al target e anche, a uno a distanza 1 dal target
self.need_target = True
def play_card(self, player, against, _with=None):
if against is not None:
if player.has_played_bang:
return False
t = player.game.get_player_named(against)
player.available_cards = [
dict(p, **{"original_target": against})
for p in player.game.get_visible_players(t)
if p["name"] != player.name and p["name"] != t.name and p["dist"]
]
if len(player.available_cards) > 0:
player.pending_action = PendingAction.CHOOSE
player.choose_text = "choose_sventagliata"
else:
player.available_cards = []
super().play_card(player, against=against)
return True
return False
class Salvo(Card): # puoi anche prevenire un danno inferto da te, duello?
def __init__(self, suit, number):
super().__init__(suit, "Salvo", number)
self.icon = "😇️"
self.alt_text = "👤😅"
self.need_target = True
def play_card(self, player, against, _with=None):
if against is not None:
# TODO
# super().play_card(player, against=against)
# player.game.attack(player, against, card_name=self.name)
return True
return False
class Mira(Card):
def __init__(self, suit, number):
super().__init__(suit, "Mira", number)
self.icon = "👌🏻"
self.need_with_only = "Bang"
self.alt_text = "💥🃏💔💔"
self.need_target = True
self.need_with = True
def play_card(self, player, against, _with=None):
if against is not None and _with is not None and _with.name == "Bang!":
super().play_card(player, against=against, _with=_with)
player.game.attack(player, against, card_name=self.name)
return True
return False
class Bandidos(Card):
def __init__(self, suit, number):
super().__init__(suit, "Bandidos", number)
self.icon = "🤠️"
self.alt_text = "👤🃏🃏/💔"
def play_card(self, player, against, _with=None):
super().play_card(player, against=against)
player.game.discard_others(player, card_name=self.name)
return True
class Fuga(
Card
): # comprende indiani gatling etc, ma solo se carte marroni, le carte verdi valgono, attenzione alla classi ereditate
def __init__(self, suit, number):
super().__init__(suit, "Fuga", number)
self.icon = "🏃🏻"
self.alt_text = ""
def play_card(self, player, against, _with=None):
return False
class Poker(Card):
def __init__(self, suit, number):
super().__init__(suit, "Poker", number)
self.icon = "🃏"
self.alt_text = "👤🃏 🃏🃏"
def play_card(self, player, against, _with=None):
super().play_card(player, against=against)
player.game.discard_others(player, card_name=self.name)
return True
class RitornoDiFiamma(Mancato):
def __init__(self, suit, number):
super().__init__(suit, number)
self.name = "RitornoDiFiamma"
self.icon = "🔥"
self.alt_text = "😅 | 💥"
def play_card(self, player, against, _with=None):
return False
def use_card(self, player):
player.notify_self()
def get_starting_deck() -> List[Card]:
cards = [
Fantasma(Suit.SPADES, 9),
Fantasma(Suit.SPADES, 10),
Lemat(Suit.DIAMONDS, 4),
SerpenteASonagli(Suit.HEARTS, 7),
Shotgun(Suit.SPADES, "K"),
Taglia(Suit.CLUBS, 9),
UltimoGiro(Suit.DIAMONDS, 8),
Tomahawk(Suit.DIAMONDS, "A"),
Sventagliata(Suit.SPADES, 2),
# Salvo(Suit.HEARTS, 5),
Bandidos(
Suit.DIAMONDS, "Q"
), # gli altri giocatori scelgono se scartare 2 carte o perdere 1 punto vita
Fuga(
Suit.HEARTS, 3
), # evita l'effetto di carte marroni (tipo panico cat balou) di cui sei bersaglio
Mira(Suit.CLUBS, 6),
Poker(
Suit.HEARTS, "J"
), # tutti gli altri scartano 1 carta a scelta, se non ci sono assi allora pesca 2
RitornoDiFiamma(Suit.CLUBS, "Q"), # un mancato che fa bang
Tornado(Suit.CLUBS, "A"),
]
for c in cards:
c.expansion_icon = "👻️"
return cards

View File

@ -0,0 +1,125 @@
from typing import List
from bang.characters import Character
import bang.cards as cs
class BlackFlower(Character):
"""Una volta nel tuo turno, puoi usare una carta di fiori per sparare un BANG! extra."""
def __init__(self):
super().__init__("Black Flower", max_lives=4)
self.icon = "🥀"
def special(self, player, data): # fiori = suit.Clubs
if player.special_use_count > 0 or not any(
(c.suit == cs.Suit.CLUBS for c in player.hand)
):
return False
if any(
(
player.get_sight() >= p["dist"]
for p in player.game.get_visible_players(player)
)
) and super().special(player, data):
player.special_use_count += 1
player.set_choose_action(
"choose_play_as_bang",
[c for c in player.hand if c.suit == cs.Suit.CLUBS],
)
player.notify_self()
class ColoradoBill(Character):
"""Ogni volta che giochi una carta BANG!, "estrai!": se è Picche, il colpo non può essere evitato.
Whenever you play a BANG! card, "draw!": if it's a Spade, the shot can't be avoided.
"""
def __init__(self):
super().__init__("Colorado Bill", max_lives=4)
self.icon = "♠️"
class DerSpotBurstRinger(Character):
"""Una volta nel tuo turno, puoi usare una carta BANG! come Gatling.
Once per turn, you can use a BANG! card as a Gatling."""
def __init__(self):
super().__init__("Der Spot Burst Ringer", max_lives=4)
self.icon = "🫧"
def special(self, player, data):
if (
player.special_use_count == 0
and any((c.name == "Bang!" for c in player.hand))
and super().special(player, data)
):
player.special_use_count += 1
# get cards from hand of type Bang and sort them by suit
cards = sorted(
[c for c in player.hand if c.name == "Bang!"], key=lambda c: c.suit
)
player.hand.remove(cards[0])
player.game.deck.scrap(cards[0], True, player=player)
player.notify_self()
player.game.attack_others(player, cs.Gatling(0, 0).name)
class EvelynShebang(Character):
"""Puoi rinunciare a pescare carte nella tua fase di pesca. Per ogni carta non pescata, spari un BANG! a distanza raggiungibile, a un diverso bersaglio."""
def __init__(self):
super().__init__("Evelyn Shebang", max_lives=4)
self.icon = "📵"
class HenryBlock(Character):
"""Chiunque peschi o scarti una tua cartain gioco o in mano) è bersaglio di un BANG!"""
def __init__(self):
super().__init__("Henry Block", max_lives=4)
self.icon = "🚯"
class LemonadeJim(Character):
"""Ogni volta che un altro giocatore gioca una Birra, puoi scartare una carta dalla mano per riguadagnare anche tu 1 punto vita."""
def __init__(self):
super().__init__("Lemonade Jim", max_lives=4)
self.icon = "🍋"
class MickDefender(Character):
"""Se sei bersaglio di una carta marrone (non BANG!), puoi usare una carta Mancato! evitarne 1 gli effetti."""
def __init__(self):
super().__init__("Mick Defender", max_lives=4)
self.icon = ""
class TucoFranziskaner(Character):
"""Durante la tua fase di pesca, se non hai carte blu in gioco, pesca 2 carte extra."""
def __init__(self):
super().__init__("Tuco Franziskaner", max_lives=4)
self.icon = "🥬"
def all_characters() -> List[Character]:
cards = [
BlackFlower(),
ColoradoBill(),
DerSpotBurstRinger(),
# EvelynShebang(),
HenryBlock(),
# LemonadeJim(),
MickDefender(),
TucoFranziskaner(),
]
for card in cards:
card.expansion_icon = "👻️" # pylint: disable=attribute-defined-outside-init
card.expansion = ( # pylint: disable=attribute-defined-outside-init
"the_valley_of_shadows"
)
return cards

View File

@ -0,0 +1,315 @@
from typing import TYPE_CHECKING
import bang.cards as cs
from globals import PendingAction
if TYPE_CHECKING:
from bang.players import Player
class StationCard:
def __init__(self, name: str):
self.name = name
self.expansion = "train_robbery"
self.price: list[dict] = []
self.attached_train = None
def discard_and_buy_train(self, player: "Player", card_index: int):
"""Discard the card and buy the train"""
if self.attached_train is None:
return
card = player.available_cards.pop(card_index)
for i, card in enumerate(player.hand):
if card == self:
player.hand.pop(i)
break
else:
player.lives -= 1
card = player.hand.pop(card_index)
player.game.deck.scrap(card, True, player=player)
player.equipment.append(self.attached_train)
self.attached_train = None
player.pending_action = PendingAction.PLAY
def check_price(self, player: "Player") -> bool:
"""Check if the card can be used to rob the train"""
return len(player.hand) > 0
class BoomTown(StationCard):
"""Discard a Bang! to rob the train"""
def __init__(self):
super().__init__("Boom Town")
self.price = [cs.Bang(0, 0).__dict__]
def check_price(self, player: "Player"):
if super().check_price(player) and all(
not isinstance(c, cs.Bang) for c in player.hand
):
return False
player.set_choose_action(
"choose_buy_train",
[c for c in player.hand if isinstance(c, cs.Bang)],
self.discard_and_buy_train,
)
return True
class Caticor(StationCard):
"""Discard a Cat Balou or Panico to rob the train"""
def __init__(self):
super().__init__("Caticor")
self.price = [cs.CatBalou(0, 0).__dict__, cs.Panico(0, 0).__dict__]
def check_price(self, player: "Player"):
if super().check_price(player) and all(
not (isinstance(card, cs.CatBalou) or isinstance(card, cs.Panico))
for card in player.hand
):
return False
player.set_choose_action(
"choose_buy_train",
[
c
for c in player.hand
if isinstance(c, cs.CatBalou) or isinstance(c, cs.Panico)
],
self.discard_and_buy_train,
)
return True
class CreepyCreek(StationCard):
"""Discard a card of spades to rob the train"""
def __init__(self):
super().__init__("Creepy Creek")
self.price = [{"icon": "♠️"}]
def check_price(self, player: "Player"):
if super().check_price(player) and all(
card.suit != cs.Suit.SPADES for card in player.hand
):
return False
player.set_choose_action(
"choose_buy_train",
[c for c in player.hand if c.suit == cs.Suit.SPADES],
self.discard_and_buy_train,
)
return True
class CrownsHole(StationCard):
"""Discard a beer to rob the train"""
def __init__(self):
super().__init__("Crowns Hole")
self.price = [cs.Birra(0, 0).__dict__]
def check_price(self, player: "Player"):
if super().check_price(player) and all(
not isinstance(card, cs.Birra) for card in player.hand
):
return False
player.set_choose_action(
"choose_buy_train",
[c for c in player.hand if isinstance(c, cs.Birra)],
self.discard_and_buy_train,
)
return True
class Deadwood(StationCard):
"""Discard an equipment card to rob the train"""
def __init__(self):
super().__init__("Deadwood")
self.price = [{"is_equipment": True}]
def check_price(self, player: "Player"):
if super().check_price(player) and all(
not card.is_equipment for card in player.hand
):
return False
player.set_choose_action(
"choose_buy_train",
[c for c in player.hand if c.is_equipment],
self.discard_and_buy_train,
)
return True
class Dodgeville(StationCard):
"""Discard a Missed! to rob the train"""
def __init__(self):
super().__init__("Dodgeville")
self.price = [cs.Mancato(0, 0).__dict__]
def check_price(self, player: "Player"):
if super().check_price(player) and all(
not isinstance(card, cs.Mancato) for card in player.hand
):
return False
player.set_choose_action(
"choose_buy_train",
[c for c in player.hand if isinstance(c, cs.Mancato)],
self.discard_and_buy_train,
)
return True
class FortWorth(StationCard):
"""Discard a card with number 10, J, Q, K, A to rob the train"""
def __init__(self):
super().__init__("Fort Worth")
self.price = [{"icon": "10\nJ\nQ\nK\nA"}]
def check_price(self, player: "Player"):
if super().check_price(player) and all(
card.number not in {1, 10, 11, 12, 13} for card in player.hand
):
return False
player.set_choose_action(
"choose_buy_train",
[c for c in player.hand if c.number in {1, 10, 11, 12, 13}],
self.discard_and_buy_train,
)
return True
class Frisco(StationCard):
"""Discard a card of clubs to rob the train"""
def __init__(self):
super().__init__("Frisco")
self.price = [{"icon": "♣️"}]
def check_price(self, player: "Player"):
if super().check_price(player) and all(
card.suit != cs.Suit.CLUBS for card in player.hand
):
return False
player.set_choose_action(
"choose_buy_train",
[c for c in player.hand if c.suit == cs.Suit.CLUBS],
self.discard_and_buy_train,
)
return True
class MinersOath(StationCard):
"""Discard a card of diamonds to rob the train"""
def __init__(self):
super().__init__("Miners Oath")
self.price = [{"icon": "♦️"}]
def check_price(self, player: "Player"):
if super().check_price(player) and all(
card.suit != cs.Suit.DIAMONDS for card in player.hand
):
return False
player.set_choose_action(
"choose_buy_train",
[c for c in player.hand if c.suit == cs.Suit.DIAMONDS],
self.discard_and_buy_train,
)
return True
class SanTafe(StationCard):
"""Discard a card of hearts to rob the train"""
def __init__(self):
super().__init__("San Tafe")
self.price = [{"icon": "♥️"}]
def check_price(self, player: "Player"):
if super().check_price(player) and all(
card.suit != cs.Suit.HEARTS for card in player.hand
):
return False
player.set_choose_action(
"choose_buy_train",
[c for c in player.hand if c.suit == cs.Suit.HEARTS],
self.discard_and_buy_train,
)
return True
class Tombrock(StationCard):
"""Lose 1 life point to rob the train"""
def __init__(self):
super().__init__("Tombrock")
self.price = [{"icon": "💔"}]
def check_price(self, player: "Player"):
if player.lives <= 1:
return False
player.set_choose_action(
"choose_buy_train",
[{"icon": "💔"}],
self.discard_and_buy_train,
)
return True
class Yooma(StationCard):
"""Discard a card with number between 2 and 9 to rob the train"""
def __init__(self):
super().__init__("Yooma")
self.price = [{"icon": "2-9"}]
def check_price(self, player: "Player"):
if super().check_price(player) and all(
not (2 <= card.number <= 9) for card in player.hand
):
return False
player.set_choose_action(
"choose_buy_train",
[c for c in player.hand if 2 <= c.number <= 9],
self.discard_and_buy_train,
)
return True
class VirginiaTown(StationCard):
"""Discard two cards to rob the train"""
def __init__(self):
super().__init__("Virginia Town")
self.price = [{}, {}]
def check_price(self, player: "Player"):
if super().check_price(player) and len(player.hand) < 2:
return False
player.set_choose_action(
"choose_buy_train",
player.hand.copy(),
self.discard_and_buy_train,
)
return True
def get_all_stations():
"""Return a list of all the station cards"""
return [
BoomTown(),
Caticor(),
CreepyCreek(),
CrownsHole(),
Deadwood(),
Dodgeville(),
FortWorth(),
Frisco(),
MinersOath(),
SanTafe(),
Tombrock(),
Yooma(),
VirginiaTown(),
]

View File

@ -0,0 +1,406 @@
import random
from bang.cards import Card, Bang, Panico, CatBalou, Mancato
from typing import TYPE_CHECKING
from globals import G, PendingAction
if TYPE_CHECKING:
from bang.players import Player
class TrainCard(Card):
def __init__(self, name: str, is_locomotive: bool = False):
super().__init__(suit=5, number=0, name=name)
self.expansion_icon = "🚂"
self.is_equipment = True
self.is_locomotive = is_locomotive
self.expansion = "train_robbery"
self.type = "train"
self.implemented = True
# Circus Wagon: gli altri giocatori
# scartano una carta, in senso orario, a
# partire dal giocatore alla tua sinistra.
# Express Car: non puoi svolgere
# un altro turno extra dopo quello
# ottenuto da questo effetto, anche se
# riesci a giocare di nuovo Express Car.
# Ghost Car: giocabile su un
# qualsiasi giocatore, anche se già
# eliminato, te compreso. Non può
# essere giocato sullo Sceriffo.
# Se quel giocatore è/viene eliminato,
# invece ritorna/resta in gioco, senza
# punti vita. Non può guadagnare né
# perdere punti vita, e viene considerato
# un personaggio in gioco per tutti gli
# effetti (condizioni di vittoria, distanza
# tra giocatori, abilità dei personaggi,
# ecc.). Non avendo punti vita, deve
# scartare la sua intera mano alla fine
# del turno, ma può tenere qualsiasi
# carta in gioco di fronte a sé, incluso
# Ghost Car. Tuttavia, è eliminato
# dal gioco non appena Ghost Car
# viene scartato: nessuna ricompensa
# viene assegnata in questo caso se il
# giocatore è un Fuorilegge, e le abilità
# dei personaggi (ad es. Vulture Sam)
# non si attivano
# Lounge Car: i vagoni che peschi
# non contano per il normale limite di
# acquisizione di 1 vagone per turno. Se
# sei lo Sceriffo e peschi Ghost Car, devi
# darlo a un altro giocatore.
# Lumber Flatcar: gioca su un
# qualsiasi giocatore (compreso te).
# Finché questa carta è in gioco, quel
# giocatore vede gli altri giocatori a
# distanza aumentata di 1.
# Private Car: questo effetto non
# ti protegge da Gatling, Knife Revolver,
# labilità di Evan Babbit, e così via.
# Sleeper Car: puoi anche usare
# leffetto una volta per turno con
# Indiani!, Duello, ecc.
class Ironhorse(TrainCard):
"""LOCOMOTIVA:
Ogni giocatore, incluso colui che ha attivato l'effetto, è bersaglio di un BANG!
Nessun giocatore è responsabile dell'eventuale perdita di punti vita.
Se tutti i giocatori vengono eliminati allo stesso tempo, i Fuorilegge vincono.
"""
def __init__(self):
super().__init__("Ironhorse", is_locomotive=True)
self.icon = "🚂"
def play_card(self, player, against=None, _with=None) -> bool:
player.game.attack(player, player.name, card_name=self.name)
player.game.attack_others(player, card_name=self.name)
return True
class Leland(TrainCard):
"""
LOCOMOTIVA: svolgi l'effetto dell'Emporio, cominciando dal giocatore di turno e procedendo in senso orario.
"""
def __init__(self):
super().__init__("Leland", is_locomotive=True)
self.icon = "🚂"
def play_card(self, player, against=None, _with=None) -> bool:
player.game.emporio(player)
return True
class BaggageCar(TrainCard):
"""Scartalo: ottieni l'effetto di un Mancato!, Panico!, Cat Balou o di un BANG! extra.
Discard this for a Missed! Panic!, Cat Balou, or an extra BANG!"""
def __init__(self):
super().__init__("Baggage Car")
self.icon = "🚋🛄"
def choose_callback(self, player: 'Player', card_index):
player.hand.append(player.available_cards[card_index])
player.pending_action = PendingAction.PLAY
def play_card(self, player, against=None, _with=None) -> bool:
player.set_choose_action(
"choose_baggage_car",
[Bang(4, 42), Mancato(4, 42), CatBalou(4, 42), Panico(4, 42)],
self.choose_callback,
)
return True
class Caboose(TrainCard):
"""Puoi scartare un altra tua carta bordo blu incuso un vagone come se fosse un Mancato!"""
def __init__(self):
super().__init__("Caboose")
self.icon = "🚋"
def play_card(self, player, against=None, _with=None) -> bool:
return False
class CattleTruck(TrainCard):
"""Scartalo: guarda le 3 carte in cima agli scarti e pescane I"""
def __init__(self):
super().__init__("Cattle Truck")
self.icon = "🚋🐄"
def choose_card_callback(self, player: 'Player', card_index):
chosen_card = player.available_cards.pop(card_index)
player.game.deck.scrap_pile.pop(-card_index)
player.hand.append(chosen_card)
player.pending_action = PendingAction.PLAY
player.notify_self()
def play_card(self, player, against=None, _with=None) -> bool:
drawn_cards = player.game.deck.peek_scrap_pile(n_cards=3)
player.set_choose_action(
"choose_cattle_truck",
drawn_cards,
self.choose_card_callback,
)
return True
class CircusWagon(TrainCard):
"""Scartalo: ogni altro giocatore deve scartare una carta che ha in gioco."""
def __init__(self):
super().__init__("Circus Wagon", is_locomotive=True)
self.icon = "🚋🎪"
def play_card(self, player, against=None, _with=None) -> bool:
player.game.discard_others(player, card_name=self.name)
return True
@classmethod
def choose_circus_wagon(cls, player: 'Player', card_index):
player.game.deck.scrap(player.hand.pop(card_index), player=player)
player.pending_action = PendingAction.WAIT
player.game.responders_did_respond_resume_turn()
player.notify_self()
class CoalHopper(TrainCard):
"""Scartalo: pesca una carta e scarta un vagone in gioco davanti a un giocatore a tua scelta."""
def __init__(self):
super().__init__("Coal Hopper")
self.icon = "🚋🔥"
self.need_target = True
def play_card(self, player, against=None, _with=None) -> bool:
if against is not None and len(player.game.get_player_named(against).equipment) > 0:
player.game.steal_discard(player, against, self)
return True
class DiningCar(TrainCard):
"""A inizio turno, "estrai!": se è Cuori, recuperi I punto vita."""
def __init__(self):
super().__init__("Dining Car")
self.icon = "🚋🍽"
def play_card(self, player, against=None, _with=None) -> bool:
return False
class ExpressCar(TrainCard):
"""Scarta tutte le carte in mano, poi gioca un altro turno"""
def __init__(self):
super().__init__("Express Car")
self.icon = "🚋⚡"
def play_card(self, player, against=None, _with=None) -> bool:
while len(player.hand) > 0:
player.game.deck.scrap(player.hand.pop(0), player=player)
player.notify_self()
player.play_turn()
return True
class GhostCar(TrainCard):
"""Giocalo su chiunque tranne lo Sceritfo. Se vieni eliminato, invece resta in gioco, ma non puo guadagnare ne perdere punti vita."""
def __init__(self):
super().__init__("Ghost Car")
self.icon = "🚋👻"
self.implemented = False
def play_card(self, player, against=None, _with=None) -> bool:
return False
class LoungeCar(TrainCard):
"""Scartalo: pesca 2 vagoni dal mazzo, mettine I in gioco di fronte a te e 1 di fronte a un altro giocatore."""
def __init__(self):
super().__init__("Lounge Car")
self.icon = "🚋🛋"
self.implemented = False
def play_card(self, player, against=None, _with=None) -> bool:
return True
class LumberFlatcar(TrainCard):
"""Giocalo su un qualsiasi giocatore (compreso te). Finché questa carta è in gioco, quel giocatore vede gli altri giocatori a distanza aumentata di 1."""
def __init__(self):
super().__init__("Lumber Flatcar")
self.icon = "🚋🪵"
self.sight_mod = -1
def play_card(self, player, against=None, _with=None) -> bool:
return False
class MailCar(TrainCard):
"""Scartalo: pesca 3 carte e dai 1 di esse a un altro giocatore a tua scelta."""
def __init__(self):
super().__init__("Mail Car")
self.icon = "🚋📮"
def choose_card_callback(self, player: 'Player', card_index):
chosen_card = player.available_cards.pop(card_index)
player.hand.extend(player.available_cards)
player.set_choose_action(
"choose_other_player",
player.game.get_other_players(player),
lambda p, other_player_index: self.choose_player_callback(p, other_player_index, chosen_card)
)
def choose_player_callback(self, player: 'Player', other_player_index, chosen_card):
pl_name = player.game.get_other_players(player)[other_player_index]["name"]
other_player = player.game.get_player_named(pl_name)
other_player.hand.append(chosen_card)
G.sio.emit(
"card_drawn",
room=player.game.name,
data={"player": pl_name, "pile": player.name},
)
other_player.notify_self()
player.pending_action = PendingAction.PLAY
def play_card(self, player, against=None, _with=None) -> bool:
drawn_cards = [player.game.deck.draw(player=player) for _ in range(3)]
player.set_choose_action(
"choose_mail_car",
drawn_cards,
self.choose_card_callback,
)
return True
class ObservationCar(TrainCard):
"""Tu vedi gli altri a distanza -1. Gli altri a vedono a distanza +1."""
def __init__(self):
super().__init__("Observation Car")
self.icon = "🚋👀"
self.sight_mod = 1
self.vis_mod = 1
def play_card(self, player, against=None, _with=None) -> bool:
return False
class PassengerCar(TrainCard):
"""Scartalo: pesca una carta (o in mano o in gioco) da un altro giocatore"""
def __init__(self):
super().__init__("Passenger Car")
self.icon = "🚋🚶"
self.range = 99
self.need_target = True
def play_card(self, player, against=None, _with=None) -> bool:
if (
against is not None
and (len(player.equipment) > 0 or len(player.equipment) > 0)
):
player.game.steal_discard(player, against, self)
return True
return False
class PrisonerCar(TrainCard):
"""Le carte Duello e Indiani! giocate dagli altri giocatori non hanno effetto su di te."""
def __init__(self):
super().__init__("Prisoner Car")
self.icon = "🚋👮🏻‍♂️"
def play_card(self, player, against=None, _with=None) -> bool:
return False
class PrivateCar(TrainCard):
"""Se non hai carte in mano, non puoi essere bersaglio di carte BANG"""
def __init__(self):
super().__init__("Private Car")
self.icon = "🚋💁🏻"
def play_card(self, player, against=None, _with=None) -> bool:
return False
class SleeperCar(TrainCard):
"""Una volta per turno, puoi scartare un'altra tua carta a bordo blu incluso."""
def __init__(self):
super().__init__("Sleeper Car")
self.icon = "🚋🛌"
def choose_card_callback(self, player: 'Player', card_index):
player.game.deck.scrap(player.equipment.pop(card_index), player=player)
player.pending_action = PendingAction.PLAY
self.usable_next_turn = True
self.can_be_used_now = False
player.notify_self()
def play_card(self, player, against=None, _with=None) -> bool:
if not self.can_be_used_now:
return False
player.set_choose_action(
"choose_sleeper_car",
player.equipment,
self.choose_card_callback,
)
return False
def get_all_cards(rng=random):
"""Return a list of all train cards in the expansion"""
cars = [
BaggageCar(),
Caboose(),
CattleTruck(),
CircusWagon(),
CoalHopper(),
DiningCar(),
ExpressCar(),
GhostCar(),
LoungeCar(),
LumberFlatcar(),
MailCar(),
ObservationCar(),
PassengerCar(),
PrisonerCar(),
PrivateCar(),
SleeperCar(),
]
cars = [c for c in cars if c.implemented]
rng.shuffle(cars)
return cars
def get_locomotives(rng=random):
"""Return a list of all locomotive cards in the expansion"""
locs = [
Ironhorse(),
Leland(),
]
rng.shuffle(locs)
return locs

View File

@ -0,0 +1,178 @@
import random
import bang.cards as cs
import bang.roles as roles
import bang.players as players
from globals import G
from bang.expansions.fistful_of_cards.card_events import CardEvent
class WildWestShowCardEvent(CardEvent):
"""
Base class for all card events in the Wild West Show expansion
"""
def __init__(self, name, icon):
super().__init__(name, icon)
self.expansion = "wild-west-show"
# class Bavaglio(CardEvent):
# def __init__(self):
# super().__init__("Bavaglio", "🤐")
# # I giocatori non possono parlare (ma possono gesticolare, mugugnare...). Chi parla perde 1 punto vita.
# # NOT IMPLEMENTED
class Camposanto(WildWestShowCardEvent):
"""
All'inizio del proprio turno, ogni giocatore eliminato torna in gioco con 1 punto vita. Pesca il ruolo a caso fra quelli dei giocatori eliminati.
"""
def __init__(self):
super().__init__("Camposanto", "")
class DarlingValentine(WildWestShowCardEvent):
"""
All'inizio del proprio turno, ogni giocatore scarta le carte in mano e ne pesca dal mazzo altrettante.
"""
def __init__(self):
super().__init__("Darling Valentine", "💋")
class DorothyRage(WildWestShowCardEvent):
"""
Nel proprio turno, ogni giocatore può obbligarne un altro a giocare una carta.
"""
def __init__(self):
super().__init__("Dorothy Rage", "👩‍⚖️")
class HelenaZontero(WildWestShowCardEvent):
"""
Quando Helena entra in gioco, "estrai!": se esce Cuori o Quadri, rimescola i ruoli attivi tranne lo Sceriffo, e ridistribuiscili a caso.
"""
def __init__(self):
super().__init__("Helena Zontero", "💞")
def on_flipped(self, game):
c = game.deck.pick_and_scrap()
G.sio.emit(
"chat_message",
room=game.name,
data=f"_flipped|Helena Zontero|{c.name}|{c.num_suit()}",
)
if c.check_suit(game, [cs.Suit.HEARTS, cs.Suit.DIAMONDS]):
G.sio.emit(
"chat_message",
room=game.name,
data=f"_swapped_roles|Helena Zontero|{c.name}|{c.num_suit()}",
)
pls = [p for p in game.players if not isinstance(p.role, roles.Sheriff)]
newroles = [p.role for p in pls]
game.rng.shuffle(newroles)
for p in pls:
p.set_role(newroles.pop(game.rng.randint(0, len(newroles) - 1)))
return super().on_flipped(game)
class LadyRosaDelTexas(WildWestShowCardEvent):
"""
Nel proprio turno, ogni giocatore può scambiarsi di posto con quello alla sua destra, il quale salta il prossimo turno.
"""
def __init__(self):
super().__init__("Lady Rosa del Texas", "🩰")
def on_clicked(self, game, player):
super().on_clicked(game, player)
nextp = game.next_player()
i, j = game.players_map[player.name], game.players_map[nextp.name]
game.players[i], game.players[j] = nextp, player
game.players_map[player.name], game.players_map[nextp.name] = j, i
game.turn = j
game.notify_all()
class MissSusanna(WildWestShowCardEvent):
"""
Nel proprio turno ogni giocatore deve giocare almeno 3 carte. Se non lo fa, perde 1 punto vita.
"""
def __init__(self):
super().__init__("Miss Susanna", "👩‍🎤")
class RegolamentoDiConti(WildWestShowCardEvent):
"""
Tutte le carte possono essere giocate come se fossero BANG!. Le carte BANG! come se fossero Mancato!
"""
def __init__(self):
super().__init__("Regolamento di Conti", "🤠")
def on_clicked(self, game, player):
super().on_clicked(game, player)
if (
len(player.hand) > 0
and not player.has_played_bang
and any(
(
player.get_sight() >= p["dist"]
for p in game.get_visible_players(player)
)
)
):
player.available_cards = player.hand.copy()
player.pending_action = players.PendingAction.CHOOSE
player.choose_text = "choose_play_as_bang"
player.notify_self()
class Sacagaway(WildWestShowCardEvent):
"""
Tutti i giocatori giocano a carte scoperte (tranne il ruolo!).
"""
def __init__(self):
super().__init__("Sacagaway", "🌄")
class WildWestShow(WildWestShowCardEvent):
"""
L'obiettivo di ogni giocatore diventa: "Rimani l'ultimo in gioco!"
"""
def __init__(self):
super().__init__("Wild West Show", "🎪")
def on_flipped(self, game):
for player in game.players:
player.set_role(roles.Renegade())
return super().on_flipped(game)
def get_endgame_card():
"""Return the endgame card for this expansion"""
return WildWestShow()
def get_all_events(rng=random):
"""Return all the events for this expansion shuffled, excluding the endgame card"""
cards = [
Camposanto(),
DarlingValentine(),
# DorothyRage(),
HelenaZontero(),
LadyRosaDelTexas(),
MissSusanna(),
RegolamentoDiConti(),
Sacagaway(),
]
rng.shuffle(cards)
return cards

View File

@ -0,0 +1,144 @@
from typing import List
import bang.cards as cs
from bang.characters import Character
class BigSpencer(Character):
"""
Inizia con 5 carte. Non può giocare Mancato!
"""
def __init__(self):
super().__init__("Big Spencer", max_lives=9)
self.icon = "🫘"
class FlintWestwood(Character):
"""
Nel suo turno può scambiare una carta dalla mano con 2 carte a caso dalla mano di un altro giocatore.
> NOTE: La carta dalla tua mano è a scelta, non a caso. Se il giocatore bersaglio ha una sola carta, ne ricevi solo una.
"""
def __init__(self):
super().__init__("Flint Westwood", max_lives=4)
self.icon = "🔫"
def special(self, player, data):
if (
not player.is_my_turn
or not any((len(p.hand) > 0 for p in player.game.get_alive_players()))
or not super().special(player, data)
):
return False
import bang.players as pls
player.available_cards = player.hand.copy()
player.choose_text = "choose_flint_special"
player.pending_action = pls.PendingAction.CHOOSE
player.special_use_count += 1
player.notify_self()
class GaryLooter(Character):
"""
Pesca tutte le carte in eccesso scartate dagli altri giocatori a fine turno.
"""
def __init__(self):
super().__init__("Gary Looter", max_lives=5)
self.icon = "🥲"
class GreygoryDeckard(Character):
"""
All'inizio del suo turno può pescare 2 personaggi a caso. Ha tutte le abilità dei personaggi pescati.
"""
def __init__(self):
super().__init__("Greygory Deckard", max_lives=4)
self.icon = "👨‍🦳"
class JohnPain(Character):
"""
Se ha meno di 6 carte in mano, quando un giocatore "estrae!" John aggiunge alla mano la carta appena estratta.
"""
def __init__(self):
super().__init__("John Pain", max_lives=4)
self.icon = "🤕"
class LeeVanKliff(Character):
"""
Nel suo turno, può scartare un BANG! per ripetere l'effetto di una carta a bordo marrone che ha appena giocato.
"""
def __init__(self):
super().__init__("Lee Van Kliff", max_lives=4)
self.icon = "👨‍🦲"
def special(self, player, data):
if player.last_played_card is None:
return False
if (
player.last_played_card.is_equipment
or player.last_played_card.usable_next_turn
or player.last_played_card.number == 42
or not any(isinstance(c, cs.Bang) for c in player.hand)
or not super().special(player, data)
):
return False
bang_index = next(
(i for i, card in enumerate(player.hand) if isinstance(card, cs.Bang)), -1
)
bang_card = player.hand.pop(bang_index)
print(f"{bang_card=}")
player.game.deck.scrap(bang_card, player=player)
player.last_played_card.must_be_used = True
player.last_played_card.number = 42
player.hand.append(player.last_played_card)
print(f"{player.hand=}")
player.notify_self()
class TerenKill(Character):
"""
Ogni volta che sarebbe eliminato "estrai!": se non è Picche, Teren resta a 1 punto vita e pesca 1 carta.
"""
def __init__(self):
super().__init__("Teren Kill", max_lives=3)
self.icon = "👨‍🦰"
class YoulGrinner(Character):
"""
Prima di pescare, i giocatori con più carte in mano di lui devono dargli una carta a scelta.
"""
def __init__(self):
super().__init__("Youl Grinner", max_lives=4)
self.icon = "🤡"
def all_characters() -> List[Character]:
"""
Returns a list of all characters in this expansion.
"""
cards = [
BigSpencer(),
FlintWestwood(),
GaryLooter(),
# GreygoryDeckard(),
JohnPain(),
LeeVanKliff(),
TerenKill(),
YoulGrinner(),
]
for card in cards:
card.expansion_icon = "🎪" # pylint: disable=attribute-defined-outside-init
card.expansion = ( # pylint: disable=attribute-defined-outside-init
"wild_west_show"
)
return cards

1312
backend/bang/game.py Normal file

File diff suppressed because it is too large Load Diff

2814
backend/bang/players.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -14,68 +14,77 @@ class Role(ABC):
class Sheriff(Role):
def __init__(self):
super().__init__("Sceriffo", "Elimina tutti i Fuorilegge e il Rinnegato!", health_mod=+1)
self.goal_eng = "Kill the Outlaws and the Renegade!"
self.max_players = 1
self.icon = '⭐️'
def on_player_death(self, alive_players: list, initial_players: int, dead_role=None, attacker_role=None):
if initial_players == 3 and len(alive_players) == 1:
return True
elif initial_players != 3 and not any([isinstance(p.role, Outlaw) or isinstance(p.role, Renegade) for p in alive_players]):
elif initial_players != 3 and not any((isinstance(p.role, Outlaw) or isinstance(p.role, Renegade) for p in alive_players)):
print("The Sheriff won!")
return True
return False
class Vice(Role):
def __init__(self, alternative_goal=None):
def __init__(self, alternative_goal=None, alternative_goal_eng=None):
super().__init__("Vice", "Proteggi lo Sceriffo! Elimina tutti i Fuorilegge e il Rinnegato!")
self.goal_eng = "Protect the Sheriff! Kill the Outlaws and the Renegade!"
if alternative_goal:
self.goal = alternative_goal
self.goal_eng = alternative_goal_eng
self.max_players = 2
self.icon = '🎖'
def on_player_death(self, alive_players: list, initial_players: int, dead_role=None, attacker_role=None):
if initial_players == 3 and len(alive_players) == 1:
return True
elif initial_players == 3 and attacker_role != None:
elif initial_players == 3 and attacker_role is not None:
return isinstance(dead_role, Renegade) and isinstance(attacker_role, Vice)
elif initial_players != 3 and not any([isinstance(p.role, Outlaw) or isinstance(p.role, Renegade) for p in alive_players]):
elif initial_players != 3 and not any((isinstance(p.role, Outlaw) or isinstance(p.role, Renegade) for p in alive_players)):
print("The Vice won!")
return True
return False
class Outlaw(Role):
def __init__(self, alternative_goal=None):
def __init__(self, alternative_goal=None, alternative_goal_eng=None):
super().__init__("Fuorilegge", "Elimina lo Sceriffo!")
self.goal_eng = "Kill the Sheriff!"
if alternative_goal:
self.goal = alternative_goal
self.goal_eng = alternative_goal_eng
self.max_players = 3
self.icon = '🐺'
def on_player_death(self, alive_players: list, initial_players: int, dead_role=None, attacker_role=None):
if initial_players == 3 and len(alive_players) == 1:
return True
elif initial_players == 3 and attacker_role != None:
elif initial_players == 3 and attacker_role is not None:
return isinstance(dead_role, Vice) and isinstance(attacker_role, Outlaw)
elif initial_players != 3 and not any([isinstance(p.role, Sheriff) for p in alive_players]):
elif (initial_players != 3 and (not any((isinstance(p.role, Sheriff) for p in alive_players)))
and (any((isinstance(p.role, Outlaw) for p in alive_players))
or any((isinstance(p.role, Renegade) for p in alive_players)) and len(alive_players) > 1)):
print("The Outlaw won!")
return True
return False
class Renegade(Role):
def __init__(self, alternative_goal=None):
def __init__(self, alternative_goal=None, alternative_goal_eng=None):
super().__init__("Rinnegato", "Rimani l'ultimo personaggio in gioco!")
self.goal_eng = "Be the last man standing!"
if alternative_goal:
self.goal = alternative_goal
self.goal_eng = alternative_goal_eng
self.max_players = 1
self.icon = '🦅'
def on_player_death(self, alive_players: list, initial_players: int, dead_role=None, attacker_role=None):
if initial_players == 3 and len(alive_players) == 1:
return True
elif initial_players == 3 and attacker_role != None:
elif initial_players == 3 and attacker_role is not None:
return isinstance(dead_role, Outlaw) and isinstance(attacker_role, Renegade)
elif initial_players != 3 and len(alive_players) == 1 and isinstance(alive_players[0], Renegade):
elif initial_players != 3 and len(alive_players) == 1 and isinstance(alive_players[0].role, Renegade):
print("The Renegade won!")
return True
return False

View File

@ -1,397 +0,0 @@
from typing import List, Set, Dict, Tuple, Optional
from abc import ABC, abstractmethod
from enum import IntEnum
class Suit(IntEnum):
DIAMONDS = 0 # ♦
CLUBS = 1 # ♣
HEARTS = 2 # ♥
SPADES = 3 # ♠
class Card(ABC):
sym = {
'A': 1,
'J': 11,
'Q': 12,
'K': 13
}
def __init__(self, suit: Suit, name: str, number, is_equipment: bool = False, is_weapon: bool = False, vis_mod: int = 0, sight_mod: int = 0, range: int = 99, desc: str = ''):
super().__init__()
self.name = name
self.suit = suit
if type(number) == int:
self.number = number
else:
self.number = self.sym[number]
self.is_equipment = is_equipment
self.is_weapon = is_weapon
self.vis_mod = vis_mod
self.sight_mod = sight_mod
self.range = range
if self.range != 0 and self.range != 99:
self.alt_text = f'{self.range} 🔍'
self.desc = desc
self.need_target = False
def __str__(self):
char = ['♦️', '♣️', '♥️', '♠️'][int(self.suit)]
return f'{self.name} {char}{self.number}'
return super().__str__()
def play_card(self, player, against):
contro = f'contro {against}' if against else ''
player.sio.emit('chat_message', room=player.game.name,
data=f'{player.name} ha giocato {self.name}{contro}.')
return True
class Barile(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Barile', number, is_equipment=True)
self.icon = '🛢'
self.desc = "Quando sei bersagliato da un Bang puoi estrarre la prima carta dalla cima del mazzo, se la carta estratta è del seme Cuori allora vale come un Mancato"
class Dinamite(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Dinamite', number, is_equipment=True)
self.icon = '🧨'
self.desc = "Giocando la Dinamite, posizionala davanti a te, resterà innocua per un intero giro. All'inizio del prossimo turno prima di pescare e prima di una eventuale estrazione (es. Prigione), estrai una carta dalla cima del mazzo. Se esce una carta tra il 2 il 9 di picche (compresi) allora la dinamite esplode: perdi 3 vite e scarta la carta, altrimenti passa la dinamite al giocatore successivo, il quale estrarà a sua volta dopo che tu avrai passato il tuo turno"
class Mirino(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Mirino', number, is_equipment=True, sight_mod=1)
self.icon = '🔎'
self.desc = "Tu vedi gli altri giocatori a distanza -1"
class Mustang(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Mustang', number, is_equipment=True, vis_mod=1)
self.icon = '🐎'
self.desc = "Gli altri giocatori ti vedono a distanza +1"
class Prigione(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Prigione', number, is_equipment=True)
self.icon = ''
self.desc = "Equipaggia questa carta a un altro giocatore, tranne lo Sceriffo. Il giocatore scelto all'inizio del suo turno, prima di pescare dovrà estrarre: se esce Cuori scarta questa carta e gioca normalmente il turno, altrimenti scarta questa carta e salta il turno"
self.need_target = True
class Remington(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Remington', number,
is_equipment=True, is_weapon=True, range=3)
self.icon = '🔫'
self.desc = "Puoi sparare a un giocatore che sia distante 3 o meno"
class RevCarabine(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Rev. Carabine', number,
is_equipment=True, is_weapon=True, range=4)
self.icon = '🔫'
self.desc = "Puoi sparare a un giocatore che sia distante 4 o meno"
class Schofield(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Schofield', number,
is_equipment=True, is_weapon=True, range=2)
self.icon = '🔫'
self.desc = "Puoi sparare a un giocatore che sia distante 2 o meno"
class Volcanic(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Volcanic', number,
is_equipment=True, is_weapon=True, range=1)
self.icon = '🔫'
self.desc = "Puoi sparare a un giocatore che sia distante 1 o meno, tuttavia puoi giocare quanti bang vuoi"
class Winchester(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Winchester', number,
is_equipment=True, is_weapon=True, range=5)
self.icon = '🔫'
self.desc = "Puoi sparare a un giocatore che sia distante 5 o meno"
class Bang(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Bang!', number)
self.icon = '💥'
self.desc = "Spara a un giocatore a distanta raggiungibile. Se non hai armi la distanza di default è 1"
self.need_target = True
def play_card(self, player, against):
if player.has_played_bang and not any([isinstance(c, Volcanic) for c in player.equipment]) and against != None:
return False
elif against != None:
import characters as chars
super().play_card(player, against=against)
player.has_played_bang = not isinstance(
player.character, chars.WillyTheKid)
player.game.attack(player, against)
return True
return False
class Birra(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Birra', number)
self.icon = '🍺'
self.desc = "Gioca questa carta per recuperare un punto vita. Non puoi andare oltre al limite massimo del tuo personaggio. Se stai per perdere l'ultimo punto vita puoi giocare questa carta anche nel turno dell'avversario. La birra non ha più effetto se ci sono solo due giocatori"
def play_card(self, player, against):
if len(player.game.players) != 2 and player.lives != player.max_lives:
super().play_card(player, against=against)
player.lives = min(player.lives+1, player.max_lives)
return True
elif len(player.game.players) == 2:
player.sio.emit('chat_message', room=player.game.name,
data=f'{player.name} ha rovesciato una {self.name}.')
return True
return False
class CatBalou(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Cat Balou', number)
self.icon = '💃'
self.desc = "Fai scartare una carta a un qualsiasi giocatore, scegli a caso dalla mano, oppure fra quelle che ha in gioco"
self.need_target = True
def play_card(self, player, against):
if against != None:
super().play_card(player, against=against)
from players import PendingAction
player.pending_action = PendingAction.CHOOSE
player.choose_action = 'discard'
player.target_p = against
print('choose now')
return True
return False
class Diligenza(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Diligenza', number)
self.icon = '🚡'
self.desc = "Pesca 2 carte dalla cima del mazzo"
def play_card(self, player, against):
super().play_card(player, against=against)
player.sio.emit('chat_message', room=player.game.name,
data=f'{player.name} ha giocato {self.name} e ha pescato 2 carte.')
for i in range(2):
player.hand.append(player.game.deck.draw())
return True
class Duello(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Duello', number)
self.need_target = True
self.icon = '⚔️'
self.desc = "Gioca questa carta contro un qualsiasi giocatore. A turno, cominciando dal tuo avversario, potete scartare una carta Bang!, il primo giocatore che non lo fa perde 1 vita"
def play_card(self, player, against):
if against != None:
super().play_card(player, against=against)
player.game.duel(player, against)
return True
return False
class Emporio(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Emporio', number)
self.icon = '🏪'
self.desc = "Scopri dal mazzo tante carte quanto il numero di giocatori, a turno, partendo da te, scegliete una carta e aggiungetela alla vostra mano"
def play_card(self, player, against):
super().play_card(player, against=against)
player.game.emporio()
return True
class Gatling(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Gatling', number)
self.icon = '🛰'
self.desc = "Spara a tutti gli altri giocatori"
def play_card(self, player, against):
super().play_card(player, against=against)
player.game.attack_others(player)
return True
class Indiani(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Indiani!', number)
self.icon = '🏹'
self.desc = "Tutti gli altri giocatori devono scartare un Bang! o perdere una vita"
def play_card(self, player, against):
super().play_card(player, against=against)
player.game.indian_others(player)
return True
class Mancato(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Mancato!', number)
self.icon = '😅'
self.desc = "Usa questa carta per annullare un bang"
def play_card(self, player, against):
import characters as chars
if (not player.has_played_bang and against != None and isinstance(player.character, chars.CalamityJanet)):
player.sio.emit('chat_message', room=player.game.name,
data=f'{player.name} ha giocato {self.name} come un BANG! contro {against}.')
player.has_played_bang = True
player.game.attack(player, against)
return True
return False
class Panico(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Panico!', number, range=1)
self.icon = '😱'
self.need_target = True
self.desc = "Pesca una carta da un giocatore a distanza 1, scegli a caso dalla mano, oppure fra quelle che ha in gioco"
def play_card(self, player, against):
if against != None:
super().play_card(player, against=against)
from players import PendingAction
player.pending_action = PendingAction.CHOOSE
player.choose_action = 'steal'
player.target_p = against
print('choose now')
return True
return False
class Saloon(Card):
def __init__(self, suit, number):
super().__init__(suit, 'Saloon', number)
self.desc = "Tutti i giocatori recuperano un punto vita compreso chi gioca la carta"
self.icon = '🍻'
def play_card(self, player, against):
player.sio.emit('chat_message', room=player.game.name,
data=f'{player.name} ha giocato {self.name} e ha curato 1 punto vita a tutti.')
for p in player.game.players:
p.lives = min(p.lives+1, p.max_lives)
p.notify_self()
return True
class WellsFargo(Card):
def __init__(self, suit, number):
super().__init__(suit, 'WellsFargo', number)
self.desc = "Pesca 3 carte dalla cima del mazzo"
self.icon = '💸'
def play_card(self, player, against):
player.sio.emit('chat_message', room=player.game.name,
data=f'{player.name} ha giocato {self.name} e ha pescato 3 carte.')
for i in range(3):
player.hand.append(player.game.deck.draw())
return True
def get_starting_deck() -> List[Card]:
return [
Barile(Suit.SPADES, 'Q'),
Barile(Suit.SPADES, 'K'),
Dinamite(Suit.HEARTS, 2),
Mirino(Suit.SPADES, 'A'),
Mustang(Suit.HEARTS, 8),
Mustang(Suit.HEARTS, 9),
Prigione(Suit.SPADES, 'J'),
Prigione(Suit.HEARTS, 4),
Prigione(Suit.SPADES, 10),
Remington(Suit.CLUBS, 'K'),
RevCarabine(Suit.CLUBS, 'A'),
Schofield(Suit.CLUBS, 'J'),
Schofield(Suit.CLUBS, 'Q'),
Schofield(Suit.SPADES, 'K'),
Volcanic(Suit.SPADES, 10),
Volcanic(Suit.CLUBS, 10),
Winchester(Suit.SPADES, 8),
Bang(Suit.SPADES, 'A'),
Bang(Suit.DIAMONDS, 2),
Bang(Suit.DIAMONDS, 3),
Bang(Suit.DIAMONDS, 4),
Bang(Suit.DIAMONDS, 5),
Bang(Suit.DIAMONDS, 6),
Bang(Suit.DIAMONDS, 7),
Bang(Suit.DIAMONDS, 8),
Bang(Suit.DIAMONDS, 9),
Bang(Suit.DIAMONDS, 10),
Bang(Suit.DIAMONDS, 'J'),
Bang(Suit.DIAMONDS, 'Q'),
Bang(Suit.DIAMONDS, 'K'),
Bang(Suit.DIAMONDS, 'A'),
Bang(Suit.CLUBS, 2),
Bang(Suit.CLUBS, 3),
Bang(Suit.CLUBS, 4),
Bang(Suit.CLUBS, 5),
Bang(Suit.CLUBS, 6),
Bang(Suit.CLUBS, 7),
Bang(Suit.CLUBS, 8),
Bang(Suit.CLUBS, 9),
Bang(Suit.HEARTS, 'Q'),
Bang(Suit.HEARTS, 'K'),
Bang(Suit.HEARTS, 'A'),
Birra(Suit.HEARTS, 6),
Birra(Suit.HEARTS, 7),
Birra(Suit.HEARTS, 8),
Birra(Suit.HEARTS, 9),
Birra(Suit.HEARTS, 10),
Birra(Suit.HEARTS, 'J'),
CatBalou(Suit.HEARTS, 'K'),
CatBalou(Suit.DIAMONDS, 9),
CatBalou(Suit.DIAMONDS, 10),
CatBalou(Suit.DIAMONDS, 'J'),
Diligenza(Suit.SPADES, 9),
Diligenza(Suit.SPADES, 9),
Duello(Suit.DIAMONDS, 'Q'),
Duello(Suit.SPADES, 'J'),
Duello(Suit.CLUBS, 8),
Emporio(Suit.CLUBS, 9),
Emporio(Suit.SPADES, 'Q'),
Gatling(Suit.HEARTS, 10),
Indiani(Suit.DIAMONDS, 'K'),
Indiani(Suit.DIAMONDS, 'A'),
Mancato(Suit.CLUBS, 10),
Mancato(Suit.CLUBS, 'J'),
Mancato(Suit.CLUBS, 'Q'),
Mancato(Suit.CLUBS, 'K'),
Mancato(Suit.CLUBS, 'A'),
Mancato(Suit.SPADES, 2),
Mancato(Suit.SPADES, 3),
Mancato(Suit.SPADES, 4),
Mancato(Suit.SPADES, 5),
Mancato(Suit.SPADES, 6),
Mancato(Suit.SPADES, 7),
Mancato(Suit.SPADES, 8),
Panico(Suit.HEARTS, 'J'),
Panico(Suit.HEARTS, 'Q'),
Panico(Suit.HEARTS, 'A'),
Panico(Suit.DIAMONDS, 8),
Saloon(Suit.HEARTS, 5),
WellsFargo(Suit.HEARTS, 3),
]

View File

@ -1,154 +0,0 @@
from abc import ABC, abstractmethod
class Character(ABC):
def __init__(self, name: str, max_lives: int, sight_mod: int = 0, visibility_mod: int = 0, pick_mod: int = 0, desc: str = ''):
super().__init__()
self.name = name
self.max_lives = max_lives
self.sight_mod = sight_mod
self.visibility_mod = visibility_mod
self.pick_mod = pick_mod
self.desc = desc
self.icon = '🤷‍♂️'
self.number = ''.join(['❤️']*self.max_lives)
# @abstractmethod
# def on_hurt(self, dmg: int):
# pass
# @abstractmethod
# def on_pick(self, card): # tipo dinamite e prigione
# pass
# @abstractmethod
# def on_empty_hand(self):
# pass
# @abstractmethod
# def on_empty_hand(self):
# pass
class BartCassidy(Character):
def __init__(self):
super().__init__("Bart Cassidy", max_lives=4)
self.desc = "Ogni volta che viene ferito, pesca una carta"
self.icon = '💔'
#una sola carta per ogni gruppo di danni. es: dinamite -> 1 carta
def on_hurt(self, dmg):
pass
class BlackJack(Character):
def __init__(self):
super().__init__("Black Jack", max_lives=4)
self.desc = "All'inizio del suo turno, quando deve pescare, mostra a tutti la seconda carta, se è Cuori o Quadri pesca una terza carta senza farla vedere"
self.icon = '🎰'
class CalamityJanet(Character):
def __init__(self):
super().__init__("Calamity Janet", max_lives=4)
self.icon = '🔀'
self.desc = "Può usare i Mancato! come Bang! e viceversa"
#TODO: gestire bene la scelta multipla in ogni iterazione con la carta bang e mancato
# vale anche per le carte indiani e duello
# se usa un mancato come bang ovviamente non ne può usare altri lo stesso turno se non ha una volcanic
class ElGringo(Character):
def __init__(self):
super().__init__("El Gringo", max_lives=3)
self.desc = "Ogni volta che perde un punto vita pesca una carta dalla mano del giocatore responsabile ma solo se il giocatore in questione ha carte in mano (una carta per ogni punto vita)"
self.icon = '🤕'
# ovviamente la dinamite non è considerata danno inferto da un giocatore
class JesseJones(Character):
def __init__(self):
super().__init__("Jesse Jones", max_lives=4)
self.desc = "All'inizio del suo turno, quando deve pescare, può prendere la prima carta a caso dalla mano di un giocatore e la seconda dal mazzo"
self.icon = '😜'
class Jourdonnais(Character):
def __init__(self):
super().__init__("Jourdonnais", max_lives=4)
self.desc = "Gioca come se avesse un Barile sempre attivo, nel caso in cui metta in gioco un Barile 'Reale' può estrarre due volte"
self.icon = '🛢'
class KitCarlson(Character):
def __init__(self):
super().__init__("Kit Carlson", max_lives=4)
self.desc = "All'inizio del suo turno, quando deve pescare, pesca tre carte, ne sceglie due da tenere in mano e la rimanente la rimette in cima la mazzo"
self.icon = '🤔'
class LuckyDuke(Character):
def __init__(self):
super().__init__("Lucky Duke", max_lives=4, pick_mod=1)
self.desc = "Ogni volta che deve estrarre, prende due carte dal mazzo, sceglie una delle due carte per l'estrazione, infine le scarta entrambe"
self.icon = '🍀'
class PaulRegret(Character):
def __init__(self):
super().__init__("Paul Regret", max_lives=3, visibility_mod=1)
self.desc = "Gioca come se avesse una Mustang sempre attiva, nel caso in cui metta in gioco una Mustang 'Reale' l'effetto si somma tranquillamente"
self.icon = '🏇'
class PedroRamirez(Character):
def __init__(self):
super().__init__("Pedro Ramirez", max_lives=4)
self.desc = "All'inizio del suo turno, quando deve pescare, può prendere la prima carta dalla cima degli scarti e la seconda dal mazzo"
self.icon = '🚮'
class RoseDoolan(Character):
def __init__(self):
super().__init__("Rose Doolan", max_lives=4, sight_mod=1)
self.icon = '🕵️‍♀️'
self.desc = "Gioca come se avesse un Mirino sempre attivo, nel caso in cui metta in gioco una Mirino 'Reale' l'effetto si somma tranquillamente"
class SidKetchum(Character):
def __init__(self):
super().__init__("Sid Ketchum", max_lives=4)
self.desc = "Può scartare due carte per recuperare un punto vita anche più volte di seguito a patto di avere carte da scartare, può farlo anche nel turno dell'avversario se starebbe per morire"
self.icon = '🤤'
class SlabTheKiller(Character):
def __init__(self):
super().__init__("Slab The Killer", max_lives=4)
self.desc = "Per evitare i suoi Bang servono due Mancato, un eventuale barile vale solo come un Mancato"
self.icon = '🔪'
#vale per tutte le carte bang non solo per la carta che si chiama Bang!
class SuzyLafayette(Character):
def __init__(self):
super().__init__("Suzy Lafayette", max_lives=4)
self.desc = "Appena rimane senza carte in mano pesca immediatamente una carta dal mazzo"
self.icon = '🔂'
class VultureSam(Character):
def __init__(self):
super().__init__("Vulture Sam", max_lives=4)
self.desc = "Quando un personaggio viene eliminato prendi tutte le carte di quel giocatore e aggiungile alla tua mano, sia le carte in mano che quelle in gioco"
self.icon = '💰'
class WillyTheKid(Character):
def __init__(self):
super().__init__("Willy The Kid", max_lives=4)
self.desc = "Questo personaggio può giocare quanti bang vuole nel suo turno"
self.icon = '🎉'
def all_characters():
return [
BartCassidy(),
BlackJack(),
CalamityJanet(),
ElGringo(),
JesseJones(),
Jourdonnais(),
KitCarlson(),
LuckyDuke(),
PaulRegret(),
PedroRamirez(),
RoseDoolan(),
SidKetchum(),
SlabTheKiller(),
SuzyLafayette(),
VultureSam(),
WillyTheKid(),
]

View File

@ -1,50 +0,0 @@
from typing import List, Set, Dict, Tuple, Optional
import random
import cards as cs
class Deck:
def __init__(self, game):
super().__init__()
self.cards: List[cs.Card] = cs.get_starting_deck()
self.game = game
random.shuffle(self.cards)
self.scrap_pile: List[cs.Card] = []
print(f'Deck initialized with {len(self.cards)} cards')
def peek(self, n_cards: int) -> list:
return self.cards[:n_cards]
def peek_scrap_pile(self) -> cs.Card:
if len(self.scrap_pile) > 0:
return self.scrap_pile[-1]
else:
return None
def pick_and_scrap(self) -> cs.Card:
card = self.cards.pop(0)
self.scrap_pile.append(card)
self.game.notify_scrap_pile()
return card
def put_on_top(self, card: cs.Card):
self.cards.insert(0, card)
def draw(self) -> cs.Card:
card = self.cards.pop(0)
if len(self.cards) == 0:
self.cards = self.scrap_pile[:-1].copy()
random.shuffle(self.cards)
self.scrap_pile = self.scrap_pile[-1:]
return card
def draw_from_scrap_pile(self) -> cs.Card:
if len(self.scrap_pile) > 0:
card = self.scrap_pile.pop(-1)
self.game.notify_scrap_pile()
return card
else:
return self.draw()
def scrap(self, card: cs.Card):
self.scrap_pile.append(card)
self.game.notify_scrap_pile()

View File

@ -1,257 +0,0 @@
import cards
from typing import List, Set, Dict, Tuple, Optional
import random
import socketio
from cards import Bang
import characters
import players
from characters import all_characters
from deck import Deck
from players import PendingAction, Player
import roles
class Game:
def __init__(self, name, sio:socketio):
super().__init__()
self.sio = sio
self.name = name
self.players: List[players.Player] = []
self.deck: Deck = None
self.started = False
self.turn = 0
self.readyCount = 0
self.waiting_for = 0
self.initial_players = 0
def add_player(self, player: players.Player):
if player in self.players or len(self.players) >= 7:
return
player.join_game(self)
self.players.append(player)
print(f'Added player {player.name} to game')
self.sio.emit('room', room=self.name, data={'name': self.name, 'started': self.started, 'players': [p.name for p in self.players]})
self.sio.emit('chat_message', room=self.name, data=f'{player.name} è entrato nella lobby.')
def notify_character_selection(self):
self.readyCount += 1
if self.readyCount == len(self.players):
self.distribute_roles()
def choose_characters(self):
char_cards = random.sample(all_characters(), len(self.players)*2)
for i in range(len(self.players)):
self.players[i].set_available_character(char_cards[i * 2 : i * 2 + 2])
def start_game(self):
print('GAME IS STARING')
if self.started:
return
self.players_map = {c.name: i for i, c in enumerate(self.players)}
self.sio.emit('chat_message', room=self.name, data=f'La partita sta iniziando...')
self.sio.emit('start', room=self.name)
self.started = True
self.deck = Deck(self)
self.initial_players = len(self.players)
self.choose_characters()
def distribute_roles(self):
available_roles: List[roles.Role] = []
if len(self.players) == 3:
available_roles = [
roles.Vice('Elimina il Rinnegato 🦅, se non lo elimini tu elimina anche il Fuorilegge'),
roles.Renegade('Elimina il Fuorilegge 🐺, se non lo elimini tu elimina anche il Vice'),
roles.Outlaw('Elimina il Vice 🎖, se non lo elimini tu elimina anche il Rinnegato')
]
elif len(self.players) >= 4:
available_roles = [roles.Sheriff(), roles.Renegade(), roles.Outlaw(), roles.Outlaw(), roles.Vice(), roles.Outlaw(), roles.Vice()]
available_roles = available_roles[:len(self.players)]
random.shuffle(available_roles)
for i in range(len(self.players)):
self.sio.emit('chat_message', room=self.name, data=f'{self.players[i].name} ha come personaggio {self.players[i].character.name}, la sua abilità speciale è: {self.players[i].character.desc}')
self.players[i].set_role(available_roles[i])
if isinstance(available_roles[i], roles.Sheriff) or (len(available_roles) == 3 and isinstance(available_roles[i], roles.Vice)):
if isinstance(available_roles[i], roles.Sheriff):
self.sio.emit('chat_message', room=self.name, data=f'{self.players[i].name} È lo sceriffo')
self.turn = i
self.players[i].prepare()
for k in range(self.players[i].max_lives):
self.players[i].hand.append(self.deck.draw())
self.players[i].notify_self()
self.play_turn()
def attack_others(self, attacker:Player):
attacker.pending_action = players.PendingAction.WAIT
attacker.notify_self()
self.waiting_for = 0
self.readyCount = 0
for p in self.players:
if p != attacker:
if p.get_banged(attacker=attacker):
self.waiting_for += 1
if self.waiting_for == 0:
attacker.pending_action = players.PendingAction.PLAY
attacker.notify_self()
def indian_others(self, attacker:Player):
attacker.pending_action = players.PendingAction.WAIT
attacker.notify_self()
self.waiting_for = 0
self.readyCount = 0
for p in self.players:
if p != attacker:
if p.get_indians(attacker=attacker):
self.waiting_for += 1
if self.waiting_for == 0:
attacker.pending_action = players.PendingAction.PLAY
attacker.notify_self()
def attack(self, attacker:Player, target_username:str):
if self.players[self.players_map[target_username]].get_banged(attacker=attacker, double=isinstance(attacker.character, characters.SlabTheKiller)):
self.readyCount = 0
self.waiting_for = 1
attacker.pending_action = players.PendingAction.WAIT
attacker.notify_self()
def duel(self, attacker:Player, target_username:str):
if self.players[self.players_map[target_username]].get_dueled(attacker=attacker):
self.readyCount = 0
self.waiting_for = 1
attacker.pending_action = players.PendingAction.WAIT
attacker.notify_self()
def emporio(self):
self.available_cards = [self.deck.draw() for i in range(len(self.players))]
self.players[self.turn].pending_action = players.PendingAction.CHOOSE
self.players[self.turn].available_cards = self.available_cards
self.players[self.turn].notify_self()
def respond_emporio(self, player, i):
player.hand.append(self.available_cards.pop(i))
player.available_cards = []
player.pending_action = players.PendingAction.WAIT
player.notify_self()
nextPlayer = self.players[(self.turn + (len(self.players)-len(self.available_cards))) % len(self.players)]
if nextPlayer == self.players[self.turn]:
self.players[self.turn].pending_action = players.PendingAction.PLAY
self.players[self.turn].notify_self()
else:
nextPlayer.pending_action = players.PendingAction.CHOOSE
nextPlayer.available_cards = self.available_cards
nextPlayer.notify_self()
def get_player_named(self, name:str):
return self.players[self.players_map[name]]
def responders_did_respond_resume_turn(self):
self.readyCount += 1
if self.readyCount == self.waiting_for:
self.waiting_for = 0
self.readyCount = 0
self.players[self.turn].pending_action = players.PendingAction.PLAY
self.players[self.turn].notify_self()
def next_player(self):
return self.players[(self.turn + 1) % len(self.players)]
def play_turn(self):
self.players[self.turn].play_turn()
def next_turn(self):
self.turn = (self.turn + 1) % len(self.players)
self.play_turn()
def notify_scrap_pile(self):
print('scrap')
if self.deck.peek_scrap_pile():
self.sio.emit('scrap', room=self.name, data=self.deck.peek_scrap_pile().__dict__)
else:
self.sio.emit('scrap', room=self.name, data=None)
def handle_disconnect(self, player: players.Player):
print(f'player {player.name} left the game {self.name}')
self.player_death(player=player)
if len(self.players) == 0:
print(f'no players left in game {self.name}')
return True
else: return False
def player_death(self, player: players.Player):
print(player.attacker)
if player.attacker and isinstance(player.attacker, roles.Sheriff) and isinstance(player.role, roles.Vice):
for i in range(len(player.attacker.hand)):
self.deck.scrap(player.attacker.hand.pop())
for i in range(len(player.attacker.equipment)):
self.deck.scrap(player.attacker.equipment.pop())
player.attacker.notify_self()
elif player.attacker and (isinstance(player.role, roles.Outlaw) or self.initial_players == 3):
for i in range(3):
player.attacker.hand.append(self.deck.draw())
player.attacker.notify_self()
print(f'player {player.name} died')
if (self.waiting_for > 0):
self.responders_did_respond_resume_turn()
vulture = [p for p in self.players if isinstance(p.character, characters.VultureSam)]
if len(vulture) == 0:
for i in range(len(player.hand)):
self.deck.scrap(player.hand.pop())
for i in range(len(player.equipment)):
self.deck.scrap(player.equipment.pop())
else:
for i in range(len(player.hand)):
vulture[0].hand.append(player.hand.pop())
for i in range(len(player.equipment)):
vulture[0].hand.append(player.equipment.pop())
index = self.players.index(player)
died_in_his_turn = self.started and index == self.turn
if self.started and index <= self.turn:
self.turn -= 1
self.players.pop(index)
self.sio.emit('room', room=self.name, data={'name': self.name, 'started': self.started, 'players': [p.name for p in self.players]})
self.sio.emit('chat_message', room=self.name, data=f'{player.name} è morto.')
if self.started:
self.sio.emit('chat_message', room=self.name, data=f'{player.name} era {player.role.name}!')
for p in self.players:
p.notify_self()
self.players_map = {c.name: i for i, c in enumerate(self.players)}
if self.started:
print('Check win status')
attacker_role = None
if player.attacker:
attacker_role = player.attacker.role
winners = [p for p in self.players if p.role != None and p.role.on_player_death(self.players, initial_players=self.initial_players, dead_role=player.role, attacker_role=attacker_role)]
if len(winners) > 0:
print('WE HAVE A WINNER')
for p in self.players:
p.win_status = p in winners
p.notify_self()
return
if died_in_his_turn:
self.next_turn()
def get_visible_players(self, player:Player):
i = self.players.index(player)
sight = player.get_sight()
return [{
'name': self.players[j].name,
'dist': min(abs(i - j), (i+ abs(j-len(self.players))), (j+ abs(i-len(self.players)))) + self.players[j].get_visibility() - (player.get_sight(countWeapon=False)-1),
'lives': self.players[j].lives,
'max_lives': self.players[j].max_lives,
'is_sheriff': isinstance(self.players[j].role, roles.Sheriff),
} for j in range(len(self.players)) if i != j]
def notify_all(self):
if self.started:
data = [{
'name': p.name,
'ncards': len(p.hand),
'equipment': [e.__dict__ for e in p.equipment],
'lives': p.lives,
'max_lives': p.max_lives,
'is_sheriff': isinstance(p.role, roles.Sheriff),
'is_my_turn': p.is_my_turn,
'pending_action': p.pending_action,
'character': p.character.__dict__ if p.character else None,
'icon': p.role.icon if self.initial_players == 3 and p.role else '🤠'
} for p in self.players]
self.sio.emit('players_update', room=self.name, data=data)

17
backend/globals.py Normal file
View File

@ -0,0 +1,17 @@
from enum import IntEnum
class G:
sio = None
def __init__(self):
pass
class PendingAction(IntEnum):
PICK = 0
DRAW = 1
PLAY = 2
RESPOND = 3
WAIT = 4
CHOOSE = 5

28
backend/metrics.py Normal file
View File

@ -0,0 +1,28 @@
import os
import time
from datadog import initialize, api
class Metrics:
send_metrics = False
@classmethod
def init(cls):
if "DATADOG_API_KEY" in os.environ and "DATADOG_APP_KEY" in os.environ and "HOST" in os.environ:
Metrics.send_metrics = True
initialize()
api.Event.create(title="Backend start", text="", tags=["server:backend", f"host:{os.environ['HOST']}"], alert_type="info")
else:
print("Datadog not configured")
@classmethod
def send_metric(cls, metric_name, **kwargs):
if Metrics.send_metrics:
kwargs['tags'] = ["server:backend", f"host:{os.environ['HOST']}"] + kwargs.get('tags', [])
kwargs['points'][0] = (int(time.time()) , kwargs['points'][0])
api.Metric.send(metric=metric_name, **kwargs)
@classmethod
def send_event(cls, event_name, event_data, **kwargs):
if Metrics.send_metrics:
kwargs['tags'] = ["server:backend", f"host:{os.environ['HOST']}"] + kwargs.get('tags', [])
api.Event.create(title=event_name, text=event_data, tags=kwargs['tags'], alert_type=kwargs.get('alert_type', "info"))

View File

@ -1,469 +0,0 @@
import deck
from enum import IntEnum
import json
from random import randrange
import socketio
import roles as r
import cards as cs
import characters as chars
class PendingAction(IntEnum):
PICK = 0
DRAW = 1
PLAY = 2
RESPOND = 3
WAIT = 4
CHOOSE = 5
class Player:
import game as g
def __init__(self, name, sid, sio):
super().__init__()
self.name = name
self.sid = sid
self.sio = sio
self.hand: cs.Card = []
self.equipment: cs.Card = []
self.role: r.Role = None
self.character: chars.Character = None
self.lives = 0
self.max_lives = 0
self.game: g = None
self.is_my_turn = False
self.is_waiting_for_action = True
self.has_played_bang = False
self.pending_action: PendingAction = None
self.available_characters = []
self.was_shot = False
self.on_pick_cb = None
self.on_failed_response_cb = None
self.event_type: str = None
self.expected_response = None
self.attacker = None
self.target_p: str = None
self.is_drawing = False
self.mancato_needed = 0
def join_game(self, game):
self.game = game
print(f'I {self.name} joined {self.game}')
def disconnect(self):
return self.game.handle_disconnect(self)
def set_role(self, role: r.Role):
self.role = role
print(f'I {self.name} am a {role.name}, my goal is "{role.goal}"')
self.sio.emit('role', room=self.sid, data=json.dumps(
role, default=lambda o: o.__dict__))
def set_character(self, character: str):
print(self.available_characters, character)
self.character = next(
x for x in self.available_characters if x.name == character)
self.available_characters = []
print(f'I {self.name} chose character {self.character.name}')
self.sio.emit('chat_message', room=self.game.name,
data=f'{self.name} ha scelto il personaggio.')
self.game.notify_character_selection()
def prepare(self):
self.max_lives = self.character.max_lives + self.role.health_mod
self.lives = self.max_lives
self.hand = []
self.equipment = []
self.pending_action = PendingAction.WAIT
def set_available_character(self, available):
self.available_characters = available
print(f'I {self.name} have to choose between {available}')
self.sio.emit('characters', room=self.sid, data=json.dumps(
available, default=lambda o: o.__dict__))
def notify_card(self, player, card):
mess = {
'player': player.name,
'card': card.__dict__
}
print('notifying card')
self.sio.emit('notify_card', room=self.sid, data=mess)
def notify_self(self):
if isinstance(self.character, chars.CalamityJanet):
self.expected_response = [
cs.Mancato(0, 0).name, cs.Bang(0, 0).name]
elif isinstance(self.character, chars.SuzyLafayette) and len(self.hand) == 0:
self.hand.append(self.game.deck.draw())
ser = self.__dict__.copy()
ser.pop('game')
ser.pop('sio')
ser.pop('sid')
ser.pop('on_pick_cb')
ser.pop('on_failed_response_cb')
# ser.pop('expected_response')
ser.pop('attacker')
if self.attacker:
ser['attacker'] = self.attacker.name
ser['sight'] = self.get_sight()
ser['lives'] = max(ser['lives'], 0)
self.sio.emit('self', room=self.sid, data=json.dumps(
ser, default=lambda o: o.__dict__))
self.sio.emit('self_vis', room=self.sid, data=json.dumps(
self.game.get_visible_players(self), default=lambda o: o.__dict__))
if self.lives <= 0 and self.max_lives > 0:
print('dying, attacker', self.attacker)
if isinstance(self.character, chars.SidKetchum) and len(self.hand) > 1:
self.lives += 1
self.game.deck.scrap(self.hand.pop(
randrange(0, len(self.hand))))
self.game.deck.scrap(self.hand.pop(
randrange(0, len(self.hand))))
self.game.player_death(self)
self.game.notify_all()
def play_turn(self):
if self.lives == 0:
return self.end_turn(forced=True)
self.scrapped_cards = 0
self.sio.emit('chat_message', room=self.game.name,
data=f'È il turno di {self.name}.')
print(f'I {self.name} was notified that it is my turn')
self.was_shot = False
self.is_my_turn = True
self.is_waiting_for_action = True
self.has_played_bang = False
if any([isinstance(c, cs.Dinamite) or isinstance(c, cs.Prigione) for c in self.equipment]):
self.pending_action = PendingAction.PICK
else:
self.pending_action = PendingAction.DRAW
self.notify_self()
def draw(self, pile):
if self.pending_action != PendingAction.DRAW:
return
if isinstance(self.character, chars.KitCarlson):
self.is_drawing = True
self.available_cards = [self.game.deck.draw() for i in range(3)]
self.pending_action = PendingAction.CHOOSE
self.notify_self()
else:
self.pending_action = PendingAction.PLAY
if pile == 'scrap' and isinstance(self.character, chars.PedroRamirez):
self.hand.append(self.game.deck.draw_from_scrap_pile())
self.hand.append(self.game.deck.draw())
self.sio.emit('chat_message', room=self.game.name, data=f'{self.name} ha ha pescato la prima carta dall pila delle carte scartate.')
elif type(pile) == str and pile != self.name and pile in self.game.players_map and isinstance(self.character, chars.JesseJones) and len(self.game.get_player_named(pile).hand) > 0:
self.hand.append(self.game.get_player_named(pile).hand.pop(
randrange(0, len(self.game.get_player_named(pile).hand))))
self.game.get_player_named(pile).notify_self()
self.sio.emit('chat_message', room=self.game.name, data=f'{self.name} ha pescato la prima carta dalla mano di {self.attacker.name}.')
self.hand.append(self.game.deck.draw())
else:
for i in range(2):
card: cs.Card = self.game.deck.draw()
self.hand.append(card)
if i == 1 and isinstance(self.character, chars.BlackJack):
for p in self.game.players:
if p != self:
p.notify_card(self, card)
if card.suit == cs.Suit.HEARTS or card.suit == cs.Suit.DIAMONDS:
self.hand.append(self.game.deck.draw())
self.notify_self()
def pick(self):
if self.pending_action != PendingAction.PICK:
return
pickable_cards = 1 + self.character.pick_mod
if self.is_my_turn:
for i in range(len(self.equipment)):
if isinstance(self.equipment[i], cs.Dinamite):
while pickable_cards > 0:
pickable_cards -= 1
picked: cs.Card = self.game.deck.pick_and_scrap()
print(f'Did pick {picked}')
self.sio.emit('chat_message', room=self.game.name,
data=f'{self.name} ha estratto {picked}.')
if picked.suit == cs.Suit.SPADES and 2 <= picked.number <= 9 and pickable_cards == 0:
self.lives -= 3
self.game.deck.scrap(self.equipment.pop(i))
if isinstance(self.character, chars.BartCassidy):
self.hand.append(self.game.deck.draw())
self.sio.emit('chat_message', room=self.game.name,
data=f'{self.name} ha fatto esplodere la dinamite.')
print(f'{self.name} Boom, -3 hp')
else:
self.game.next_player().equipment.append(self.equipment.pop(i))
self.game.next_player().notify_self()
if any([isinstance(c, cs.Dinamite) or isinstance(c, cs.Prigione) for c in self.equipment]):
self.notify_self()
return
for i in range(len(self.equipment)):
if isinstance(self.equipment[i], cs.Prigione):
while pickable_cards > 0:
pickable_cards -= 1
picked: cs.Card = self.game.deck.pick_and_scrap()
print(f'Did pick {picked}')
self.sio.emit('chat_message', room=self.game.name,
data=f'{self.name} ha estratto {picked}.')
if picked.suit != cs.Suit.HEARTS and pickable_cards == 0:
self.game.deck.scrap(self.equipment.pop(i))
self.end_turn(forced=True)
return
else:
self.game.deck.scrap(self.equipment.pop(i))
break
break
if any([isinstance(c, cs.Prigione) for c in self.equipment]):
self.notify_self()
return
self.pending_action = PendingAction.DRAW
self.notify_self()
else:
self.pending_action = PendingAction.WAIT
self.on_pick_cb()
def get_playable_cards(self):
playable_cards = []
for i in range(len(self.hand)):
card = self.hand[i]
if isinstance(card, cs.Bang) and self.has_played_bang and not any([isinstance(c, cs.Volcanic) for c in self.equipment]):
continue
elif isinstance(card, cs.Birra) and self.lives >= self.max_lives:
continue
else:
playable_cards.append(i)
return playable_cards
def get_public_description(self):
s = f"{self.name} {'Sheriff ⭐️' if isinstance(self.role, r.Sheriff) else ''} ({self.lives}/{self.max_lives} ⁍) {len(self.hand)} Cards in hand, "
s += f"equipment {[str(c) for c in self.equipment]}"
return s
def play_card(self, hand_index: int, against=None):
if not (0 <= hand_index < len(self.hand)):
print('illegal')
return
card: cs.Card = self.hand.pop(hand_index)
print(self.name, 'is playing ', card, ' against:', against)
if isinstance(card, cs.Prigione) and not isinstance(self.game.get_player_named(against).role, r.Sheriff):
self.sio.emit('chat_message', room=self.game.name,
data=f'{self.name} ha giocato {card.name} contro {against}.')
self.game.get_player_named(against).equipment.append(card)
self.game.get_player_named(against).notify_self()
elif card.is_equipment:
if card.is_weapon:
has_weapon = False
for i in range(len(self.equipment)):
if self.equipment[i].is_weapon:
self.game.deck.scrap(self.equipment[i])
self.equipment[i] = card
has_weapon = True
break
if not has_weapon:
self.equipment.append(card)
elif card.name in [c.name for c in self.equipment if not isinstance(c, cs.Dinamite)]:
for i in range(len(self.equipment)):
if type(self.equipment[i]) == type(card):
self.game.deck.scrap(self.equipment[i])
self.equipment[i] = card
break
else:
self.equipment.append(card)
else:
did_play_card = card.play_card(self, against)
if did_play_card:
self.game.deck.scrap(card)
else:
self.hand.insert(hand_index, card)
self.notify_self()
def choose(self, card_index):
if self.pending_action != PendingAction.CHOOSE:
return
if self.target_p and self.target_p != '': # panico, cat balou
target = self.game.get_player_named(self.target_p)
card = None
if card_index >= len(target.hand):
card = target.equipment.pop(card_index - len(target.hand))
else:
card = target.hand.pop(card_index)
target.notify_self()
if self.choose_action == 'steal':
self.hand.append(card)
else:
self.game.deck.scrap(card)
self.target_p = ''
self.choose_action = ''
self.pending_action = PendingAction.PLAY
self.notify_self()
# specifico per personaggio
elif self.is_drawing and isinstance(self.character, chars.KitCarlson):
self.hand.append(self.available_cards.pop(card_index))
if len(self.available_cards) == 1:
self.game.deck.put_on_top(self.available_cards.pop())
self.is_drawing = False
self.pending_action = PendingAction.PLAY
self.notify_self()
else: # emporio
self.game.respond_emporio(self, card_index)
def barrel_pick(self):
pickable_cards = 1 + self.character.pick_mod
if len([c for c in self.equipment if isinstance(c, cs.Barile)]) > 0 and isinstance(self.character, chars.Jourdonnais):
pickable_cards = 2
while pickable_cards > 0:
pickable_cards -= 1
picked: cs.Card = self.game.deck.pick_and_scrap()
print(f'Did pick {picked}')
self.sio.emit('chat_message', room=self.game.name,
data=f'{self.name} ha estratto {picked}.')
if picked.suit == cs.Suit.HEARTS:
self.mancato_needed -= 1
self.notify_self()
if self.mancato_needed <= 0:
self.game.responders_did_respond_resume_turn()
return
if len([c for c in self.hand if isinstance(c, cs.Mancato) or (isinstance(self.character, chars.CalamityJanet) and isinstance(c, cs.Bang))]) == 0:
self.take_damage_response()
self.game.responders_did_respond_resume_turn()
else:
self.pending_action = PendingAction.RESPOND
self.expected_response = [cs.Mancato(0, 0).name]
self.on_failed_response_cb = self.take_damage_response
self.notify_self()
def get_banged(self, attacker, double=False):
self.attacker = attacker
self.mancato_needed = 1 if not double else 2
if len([c for c in self.hand if isinstance(c, cs.Mancato) or (isinstance(self.character, chars.CalamityJanet) and isinstance(c, cs.Bang))]) == 0 and len([c for c in self.equipment if isinstance(c, cs.Barile)]) == 0 and not isinstance(self.character, chars.Jourdonnais):
print('Cant defend')
self.take_damage_response()
return False
else:
if len([c for c in self.equipment if isinstance(c, cs.Barile)]) > 0 or isinstance(self.character, chars.Jourdonnais):
print('has barrel')
self.pending_action = PendingAction.PICK
self.on_pick_cb = self.barrel_pick
else:
print('has mancato')
self.pending_action = PendingAction.RESPOND
self.expected_response = [cs.Mancato(0, 0).name]
self.on_failed_response_cb = self.take_damage_response
self.notify_self()
return True
def get_indians(self, attacker):
self.attacker = attacker
if len([c for c in self.hand if isinstance(c, cs.Bang) or (isinstance(self.character, chars.CalamityJanet) and isinstance(c, cs.Mancato))]) == 0:
print('Cant defend')
self.take_damage_response()
return False
else:
print('has bang')
self.pending_action = PendingAction.RESPOND
self.expected_response = [cs.Bang(0, 0).name]
self.event_type = 'indians'
self.on_failed_response_cb = self.take_damage_response
self.notify_self()
return True
def get_dueled(self, attacker):
self.attacker = attacker
if len([c for c in self.hand if isinstance(c, cs.Bang) or (isinstance(self.character, chars.CalamityJanet) and isinstance(c, cs.Mancato))]) == 0:
print('Cant defend')
self.take_damage_response()
self.game.responders_did_respond_resume_turn()
return False
else:
self.pending_action = PendingAction.RESPOND
self.expected_response = [cs.Bang(0, 0).name]
self.event_type = 'duel'
self.on_failed_response_cb = self.take_damage_response
self.notify_self()
return True
def take_damage_response(self):
self.lives -= 1
if self.lives > 0:
if isinstance(self.character, chars.BartCassidy):
self.hand.append(self.game.deck.draw())
elif isinstance(self.character, chars.ElGringo) and self.attacker and len(self.attacker.hand) > 0:
self.hand.append(self.attacker.hand.pop(
randrange(0, len(self.attacker.hand))))
self.sio.emit('chat_message', room=self.game.name, data=f'{self.name} ha rubato una carta a {self.attacker.name} mentre veniva colpito.')
self.attacker.notify_self()
while self.lives <= 0 and len(self.game.players) > 2 and len([c for c in self.hand if isinstance(c, cs.Birra)]) > 0:
for i in range(len(self.hand)):
if isinstance(self.hand[i], cs.Birra):
self.lives += 1
self.game.deck.scrap(self.hand.pop(i))
self.sio.emit('chat_message', room=self.game.name,
data=f'{self.name} ha usato una birra per recuperare una vita.')
break
self.mancato_needed = 0
self.notify_self()
self.attacker = None
def respond(self, hand_index):
self.pending_action = PendingAction.WAIT
if hand_index != -1 and self.hand[hand_index].name in self.expected_response:
self.game.deck.scrap(self.hand.pop(hand_index))
self.notify_self()
self.mancato_needed -= 1
if self.mancato_needed <= 0:
if self.event_type == 'duel':
self.game.duel(self, self.attacker.name)
else:
self.game.responders_did_respond_resume_turn()
self.event_type = ''
else:
self.pending_action = PendingAction.RESPOND
self.notify_self()
else:
self.on_failed_response_cb()
self.game.responders_did_respond_resume_turn()
self.attacker = None
def get_sight(self, countWeapon=True):
if not self.character:
return 0
aim = 0
range = 0
for card in self.equipment:
if card.is_weapon and countWeapon:
range += card.range
else:
aim += card.sight_mod
return max(1, range) + aim + self.character.sight_mod
def get_visibility(self):
if not self.character:
return 0
covers = 0
for card in self.equipment:
covers += card.vis_mod
return self.character.visibility_mod + covers
def scrap(self, card_index):
if self.is_my_turn or isinstance(self.character, chars.SidKetchum):
self.scrapped_cards += 1
if isinstance(self.character, chars.SidKetchum) and self.scrapped_cards == 2:
self.scrapped_cards = 0
self.lives = min(self.lives+1, self.max_lives)
self.game.deck.scrap(self.hand.pop(card_index))
self.notify_self()
def end_turn(self, forced=False):
if not self.is_my_turn:
return
if len(self.hand) > self.max_lives and not forced:
print(
f"I {self.name} have to many cards in my hand and I can't end the turn")
else:
self.is_my_turn = False
self.pending_action = PendingAction.WAIT
self.notify_self()
self.game.next_turn()

View File

@ -1,7 +1,10 @@
certifi==2020.11.8
dnspython==2.0.0
eventlet==0.29.1
greenlet==0.4.17
python-engineio==3.13.2
python-socketio==4.6.0
six==1.15.0
certifi==2022.12.7
dnspython==2.3.0
eventlet==0.35.2
python-engineio==4.3.4
python-socketio==5.8.0
six==1.16.0
pytest==7.2.2
requests==2.32.0
discord-webhook==1.1.0
datadog==0.45.0

1421
backend/server.py Normal file

File diff suppressed because it is too large Load Diff

43
backend/tests/__init__.py Normal file
View File

@ -0,0 +1,43 @@
from typing import Any, List
import pytest
from bang.characters import Character
from bang.game import Game
from bang.players import Player
from tests.dummy_socket import DummySocket
from globals import G
G.sio = DummySocket()
def started_game(expansions=[], players=4, character=Character("test_char", 4)) -> Game:
g = Game("test")
g.expansions = expansions
ps = [Player(f"p{i}", f"p{i}") for i in range(players)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [character]
if "high_noon" in expansions:
p.available_characters.append(Character("test_char2", 4))
p.set_character(p.available_characters[0].name)
return g
def set_events(g: Game, event_cards) -> None:
g.deck.event_cards = event_cards
def current_player(g: Game) -> Player:
return g.players[g.turn]
def next_player(g: Game) -> Player:
return g.players[(g.turn + 1) % len(g.players)]
def current_player_with_cards(g: Game, cards: List[Any]) -> Player:
p = current_player(g)
p.draw("")
p.hand = cards
return p

495
backend/tests/cards_test.py Normal file
View File

@ -0,0 +1,495 @@
from random import randint
from bang.characters import Character
from bang.cards import *
from bang.deck import Deck
from bang.game import Game
from bang.players import Player
from globals import PendingAction
# test card Barile
def test_barile():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(3)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 2)]
p.set_character(p.available_characters[0].name)
barrel_guy = g.players[g.turn]
barrel_guy.draw('')
barrel_guy.hand = [Barile(0,0)]
barrel_guy.play_card(0)
assert isinstance(barrel_guy.equipment[0], Barile)
barrel_guy.end_turn()
g.players[g.turn].draw('')
g.players[g.turn].hand = [Volcanic(0,0), Bang(0,0), Bang(0,0)]
g.players[g.turn].play_card(0)
g.players[g.turn].play_card(0, barrel_guy.name)
assert g.players[g.turn].pending_action == PendingAction.WAIT
assert barrel_guy.pending_action == PendingAction.PICK
g.deck.cards[0] = Bang(Suit.HEARTS, 5)
barrel_guy.pick()
assert barrel_guy.pending_action == PendingAction.WAIT
assert barrel_guy.lives == barrel_guy.max_lives
assert g.players[g.turn].pending_action == PendingAction.PLAY
g.players[g.turn].play_card(0, barrel_guy.name)
g.deck.cards[0] = Bang(Suit.SPADES, 5)
barrel_guy.pick()
assert barrel_guy.pending_action == PendingAction.WAIT
assert barrel_guy.lives == barrel_guy.max_lives - 1
assert g.players[g.turn].pending_action == PendingAction.PLAY
#test card Volcanic
def test_volcanic():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(3)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 3)]
p.set_character(p.available_characters[0].name)
for p in ps:
p.hand = []
volcanic_guy = g.players[g.turn]
volcanic_guy.draw('')
volcanic_guy.hand = [Volcanic(0,0), Bang(0,0), Bang(0,0)]
volcanic_guy.play_card(0)
assert isinstance(volcanic_guy.equipment[0], Volcanic)
assert volcanic_guy.get_sight() == 1
volcanic_guy.play_card(0, g.players[(g.turn+1)%3].name)
assert len(volcanic_guy.hand) == 1
volcanic_guy.play_card(0, g.players[(g.turn+1)%3].name)
assert len(volcanic_guy.hand) == 0
# test card Dinamite
def test_dinamite():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(3)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
for p in ps:
p.hand = []
dinamite_guy = g.players[g.turn]
dinamite_guy.draw('')
dinamite_guy.hand = [Dinamite(0,0)]
dinamite_guy.play_card(0)
assert isinstance(dinamite_guy.equipment[0], Dinamite)
dinamite_guy.end_turn()
g.players[g.turn].draw('')
g.players[g.turn].hand = []
g.players[g.turn].end_turn()
g.players[g.turn].draw('')
g.players[g.turn].hand = []
g.players[g.turn].end_turn()
g.deck.cards.insert(0, Dinamite(Suit.HEARTS, 5))
dinamite_guy.pick()
assert len(dinamite_guy.equipment) == 0
dinamite_guy.draw('')
dinamite_guy.end_turn()
assert len(g.players[g.turn].equipment) == 1
g.deck.cards.insert(0, Dinamite(Suit.SPADES, 5))
g.players[g.turn].pick()
assert len(g.players[g.turn].equipment) == 0
assert g.players[g.turn].lives == 1
# test mirino
def test_mirino():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(4)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
mirino_guy = g.players[g.turn]
mirino_guy.draw('')
mirino_guy.hand = [Mirino(0,0)]
assert mirino_guy.get_sight(countWeapon=False) == 1
mirino_guy.play_card(0)
assert mirino_guy.get_sight(countWeapon=False) == 2
# test mustang
def test_mustang():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(3)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
mustang_guy = g.players[g.turn]
mustang_guy.draw('')
mustang_guy.hand = [Mustang(0,0)]
assert mustang_guy.get_visibility() == 0
mustang_guy.play_card(0)
assert mustang_guy.get_visibility() == 1
# test Prigione
def test_prigione():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(4)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
sheriff = g.players[g.turn]
sheriff.draw('')
sheriff.hand = [Prigione(0,0)]
sheriff.play_card(0, g.players[(g.turn+1)%4].name)
assert len(sheriff.hand) == 0
sheriff.end_turn()
g.deck.cards.insert(0, Prigione(Suit.CLUBS, 5))
skip_check = g.turn
g.players[g.turn].pick()
assert g.turn != skip_check
g.players[g.turn].draw('')
g.players[g.turn].hand = [Prigione(0,0)]
g.players[g.turn].play_card(0, sheriff.name)
assert len(g.players[g.turn].hand) == 1
g.players[g.turn].play_card(0, g.players[(g.turn+1)%4].name)
g.players[g.turn].end_turn()
g.deck.cards.insert(0, Prigione(Suit.HEARTS, 5))
skip_check = g.turn
g.players[g.turn].pick()
assert g.turn == skip_check
# test all weapons ranges
def test_all_weapons():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(4)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
g.players[g.turn].draw('')
g.players[g.turn].hand = [Volcanic(0,0), Schofield(0,0), Remington(0,0), RevCarabine(0,0), Winchester(0,0)]
g.players[g.turn].play_card(0)
assert g.players[g.turn].get_sight() == 1
g.players[g.turn].play_card(0)
assert g.players[g.turn].get_sight() == 2
g.players[g.turn].play_card(0)
assert g.players[g.turn].get_sight() == 3
g.players[g.turn].play_card(0)
assert g.players[g.turn].get_sight() == 4
g.players[g.turn].play_card(0)
assert g.players[g.turn].get_sight() == 5
# test bang
def test_bang():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
g.players[g.turn].draw('')
g.players[g.turn].hand = [Bang(0,0), Bang(0,0)]
assert len(g.players[g.turn].hand) == 2
g.players[g.turn].play_card(0, g.players[(g.turn+1)%2].name)
assert len(g.players[g.turn].hand) == 1
g.players[g.turn].play_card(0, g.players[(g.turn+1)%2].name)
assert len(g.players[g.turn].hand) == 1
# test birra
def test_birra_2p():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
g.players[g.turn].draw('')
g.players[g.turn].hand = [Birra(0,0)]
g.players[g.turn].lives = 1
g.players[g.turn].play_card(0)
assert g.players[g.turn].lives == 1
# test birra
def test_birra_3p():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(3)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
initial_p = g.players[g.turn]
g.players[g.turn].draw('')
g.players[g.turn].hand = [Birra(0,0)]
g.players[g.turn].lives = 1
g.players[g.turn].play_card(0)
assert g.players[g.turn].lives == 2
# test beer save
g.players[g.turn].hand = [Birra(0,0)]
g.players[g.turn].lives = 1
g.players[g.turn].end_turn()
g.players[g.turn].draw('')
g.players[g.turn].hand = [Bang(0,0)]
g.players[g.turn].play_card(0, initial_p.name)
assert initial_p.lives == 1
# test non overflow
g.players[g.turn].lives = g.players[g.turn].max_lives
g.players[g.turn].hand = [Birra(0,0)]
g.players[g.turn].play_card(0)
assert g.players[g.turn].lives == g.players[g.turn].max_lives
# test CatBalou
def test_catbalou():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
g.players[g.turn].draw('')
g.players[g.turn].hand = [CatBalou(0,0)]
g.players[g.turn].play_card(0, g.players[(g.turn+1)%2].name)
g.players[g.turn].choose(0)
assert len(g.players[g.turn].hand) == 0
assert len(g.deck.scrap_pile) == 2
assert len(g.players[(g.turn+1)%2].hand) == 3
# test Diligenza
def test_diligenza():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(4)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
g.players[g.turn].draw('')
g.players[g.turn].hand = [Diligenza(0,0)]
g.players[g.turn].play_card(0)
assert len(g.players[g.turn].hand) == 2
# test Duello
def test_duello():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
for p in ps:
p.hand = []
g.players[g.turn].draw('')
# winning duello
g.players[g.turn].hand = [Duello(0,0), Duello(0,0)]
g.players[g.turn].play_card(0, g.players[(g.turn+1)%2].name)
assert len(g.players[g.turn].hand) == 1
assert g.players[(g.turn+1)%2].lives == g.players[(g.turn+1)%2].max_lives - 1
# losing duello
g.players[(g.turn+1)%2].hand = [Bang(0,0)]
g.players[g.turn].play_card(0, g.players[(g.turn+1)%2].name)
assert g.players[g.turn].pending_action == PendingAction.WAIT
assert g.players[(g.turn+1)%2].pending_action == PendingAction.RESPOND
g.players[(g.turn+1)%2].respond(0)
assert g.players[(g.turn+1)%2].pending_action == PendingAction.WAIT
assert g.players[g.turn].lives == g.players[g.turn].max_lives - 1
# test Emporio
def test_emporio():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(7)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
for p in ps:
p.hand = []
g.players[g.turn].draw('')
g.players[g.turn].hand = [Emporio(0,0)]
g.players[g.turn].play_card(0)
assert g.players[g.turn].pending_action == PendingAction.CHOOSE
g.players[g.turn].choose(0)
print(g.players[g.turn].name)
for i in range(1, len(g.players)-1):
assert g.players[(g.turn+i)%7].pending_action == PendingAction.CHOOSE
g.players[(g.turn+i)%7].choose(0)
for p in ps:
assert len(p.hand) == 1
assert g.players[g.turn].pending_action == PendingAction.PLAY
# test Gatling
def test_gatling():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(7)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
# test lose gatling
for p in ps:
p.hand = []
g.players[g.turn].draw('')
g.players[g.turn].hand = [Gatling(0,0), Gatling(0,0)]
g.players[g.turn].play_card(0)
for p in ps:
if p != g.players[g.turn]:
assert p.lives == p.max_lives - 1
# test win gatling
for p in ps:
if p != g.players[g.turn]:
p.hand = [Mancato(0,0)]
g.players[g.turn].play_card(0)
assert g.players[g.turn].pending_action == PendingAction.WAIT
for p in ps:
if p != g.players[g.turn]:
p.respond(0)
assert g.players[g.turn].pending_action == PendingAction.PLAY
for p in ps:
if p != g.players[g.turn]:
assert p.lives == p.max_lives - 1
# test Indiani
def test_indiani():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(7)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
# test lose indiani
for p in ps:
p.hand = []
g.players[g.turn].draw('')
g.players[g.turn].hand = [Indiani(0,0), Indiani(0,0)]
g.players[g.turn].play_card(0)
for p in ps:
if p != g.players[g.turn]:
assert p.lives == p.max_lives - 1
# test win indiani
for p in ps:
if p != g.players[g.turn]:
p.hand = [Bang(0,0)]
g.players[g.turn].play_card(0)
assert g.players[g.turn].pending_action == PendingAction.WAIT
for p in ps:
if p != g.players[g.turn]:
p.respond(0)
assert g.players[g.turn].pending_action == PendingAction.PLAY
for p in ps:
if p != g.players[g.turn]:
assert p.lives == p.max_lives - 1
# test Mancato
def test_mancato():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
for p in ps:
p.hand = [Mancato(0,0)]
g.players[g.turn].draw('')
g.players[g.turn].hand = [Bang(0,0)]
g.players[g.turn].play_card(0, g.players[(g.turn+1)%2].name)
assert g.players[(g.turn+1)%2].pending_action == PendingAction.RESPOND
g.players[(g.turn+1)%2].respond(0)
assert g.players[(g.turn+1)%2].lives == g.players[(g.turn+1)%2].max_lives
assert g.players[(g.turn+1)%2].pending_action == PendingAction.WAIT
assert g.players[g.turn].pending_action == PendingAction.PLAY
# test Panico
def test_panico():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
g.players[g.turn].draw('')
g.players[g.turn].hand = [Panico(0,0)]
g.players[g.turn].play_card(0, g.players[(g.turn+1)%2].name)
g.players[g.turn].choose(0)
assert len(g.players[g.turn].hand) == 1
assert len(g.deck.scrap_pile) == 1
assert len(g.players[(g.turn+1)%2].hand) == 3
# test Saloon
def test_saloon():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(8)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
for p in ps:
p.lives = randint(p.max_lives-1, p.max_lives)
g.players[g.turn].draw('')
g.players[g.turn].hand = [Saloon(0,0)]
g.players[g.turn].play_card(0)
for p in ps:
assert p.lives == p.max_lives
# test WellsFargo
def test_wells_fargo():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(4)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
g.players[g.turn].draw('')
g.players[g.turn].hand = [WellsFargo(0,0)]
g.players[g.turn].play_card(0)
assert len(g.players[g.turn].hand) == 3

View File

@ -0,0 +1,365 @@
from random import randint
from bang.characters import *
from bang.deck import Deck
from bang.game import Game
from bang.players import Player
from globals import PendingAction
from bang.cards import *
def test_bartcassidy():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
test_chars = [Character('test_char', 2), BartCassidy()]
for p in ps:
p.available_characters = [test_chars.pop(0)]
p.set_character(p.available_characters[0].name)
if isinstance(g.players[g.turn].character, BartCassidy):
g.players[g.turn].draw('')
g.players[g.turn].hand = []
g.players[g.turn].end_turn()
g.players[(g.turn+1)%2].hand = []
g.players[g.turn].draw('')
g.players[g.turn].hand = [Bang(0,0)]
assert len(g.players[(g.turn+1)%2].hand) == 0
g.players[g.turn].play_card(0, g.players[(g.turn+1)%2].name)
assert len(g.players[(g.turn+1)%2].hand) == 1
def test_blackjack():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(1)]
for p in ps:
g.add_player(p)
g.start_game()
test_chars = [BlackJack()]
for p in ps:
p.available_characters = [test_chars.pop(0)]
p.set_character(p.available_characters[0].name)
g.players[g.turn].hand = []
g.deck.cards.insert(1, Bang(Suit.HEARTS, 1))
g.players[g.turn].draw('')
assert len(g.players[g.turn].hand) == 3
g.players[g.turn].hand = []
g.players[g.turn].end_turn()
g.deck.cards.insert(1, Bang(Suit.CLUBS, 1))
g.players[g.turn].draw('')
assert len(g.players[g.turn].hand) == 2
g.players[g.turn].hand = []
g.players[g.turn].end_turn()
g.deck.cards.insert(1, Bang(Suit.DIAMONDS, 1))
g.players[g.turn].draw('')
assert len(g.players[g.turn].hand) == 3
g.players[g.turn].hand = []
g.players[g.turn].end_turn()
g.deck.cards.insert(1, Bang(Suit.SPADES, 1))
g.players[g.turn].draw('')
assert len(g.players[g.turn].hand) == 2
g.players[g.turn].hand = []
g.players[g.turn].end_turn()
def test_calamityjanet():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
test_chars = [Character('test_char', 2), CalamityJanet()]
for p in ps:
p.available_characters = [test_chars.pop(0)]
p.set_character(p.available_characters[0].name)
if isinstance(g.players[g.turn].character, CalamityJanet):
g.players[g.turn].draw('')
g.players[g.turn].hand = []
g.players[g.turn].end_turn()
g.players[(g.turn+1)%2].hand = [Bang(0,0)]
g.players[g.turn].draw('')
g.players[g.turn].hand = [Bang(0,0)]
g.players[g.turn].play_card(0, g.players[(g.turn+1)%2].name)
assert g.players[(g.turn+1)%2].pending_action == PendingAction.RESPOND
g.players[(g.turn+1)%2].respond(0)
g.players[g.turn].end_turn()
g.players[g.turn].draw('')
g.players[g.turn].hand = [Mancato(0,0)]
g.players[g.turn].play_card(0, g.players[(g.turn+1)%2].name)
assert g.players[(g.turn+1)%2].lives == 1
def test_ElGringo():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
test_chars = [Character('test_char', 2), ElGringo()]
for p in ps:
p.available_characters = [test_chars.pop(0)]
p.set_character(p.available_characters[0].name)
if isinstance(g.players[g.turn].character, ElGringo):
g.players[g.turn].draw('')
g.players[g.turn].hand = []
g.players[g.turn].end_turn()
g.players[(g.turn+1)%2].hand = []
g.players[g.turn].draw('')
g.players[g.turn].hand = [Bang(0,0), Bang(0,0)]
assert len(g.players[(g.turn+1)%2].hand) == 0
g.players[g.turn].play_card(0, g.players[(g.turn+1)%2].name)
assert len(g.players[(g.turn+1)%2].hand) == 1
assert len(g.players[g.turn].hand) == 0
def test_JesseJones():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
test_chars = [Character('test_char', 2), JesseJones()]
for p in ps:
p.available_characters = [test_chars.pop(0)]
p.set_character(p.available_characters[0].name)
if not isinstance(g.players[g.turn].character, JesseJones):
g.players[g.turn].draw('')
g.players[g.turn].hand = []
g.players[g.turn].end_turn()
g.players[(g.turn+1)%2].hand = [Bang(0,0)]
g.players[g.turn].draw('p1' if g.turn == 0 else 'p0')
g.players[g.turn].hand = [Bang(0,0), Bang(0,0)]
assert len(g.players[(g.turn+1)%2].hand) == 0
assert len(g.players[g.turn].hand) == 2
def test_Jourdonnais():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
test_chars = [Character('test_char', 2), Jourdonnais()]
for p in ps:
p.available_characters = [test_chars.pop(0)]
p.set_character(p.available_characters[0].name)
if isinstance(g.players[g.turn].character, Jourdonnais):
g.players[g.turn].draw('')
g.players[g.turn].hand = []
g.players[g.turn].end_turn()
g.players[g.turn].draw('')
g.players[g.turn].hand = [Bang(0,0)]
g.players[g.turn].play_card(0, g.players[(g.turn+1)%2].name)
assert g.players[(g.turn+1)%2].pending_action == PendingAction.PICK
def test_KitCarlson():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
test_chars = [Character('test_char', 4), KitCarlson()]
for p in ps:
p.available_characters = [test_chars.pop(0)]
p.set_character(p.available_characters[0].name)
if not isinstance(g.players[g.turn].character, KitCarlson):
g.players[g.turn].draw('')
g.players[g.turn].hand = [Mancato(0,0)]
g.players[g.turn].end_turn()
g.players[g.turn].draw('')
assert g.players[g.turn].pending_action == PendingAction.CHOOSE
assert len(g.players[g.turn].available_cards) == 3
g.players[g.turn].choose(0)
assert len(g.players[g.turn].available_cards) == 2
g.players[g.turn].choose(1)
assert g.players[g.turn].pending_action == PendingAction.PLAY
def test_LuckyDuke():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
test_chars = [LuckyDuke(), LuckyDuke()]
for p in ps:
p.available_characters = [test_chars.pop(0)]
p.set_character(p.available_characters[0].name)
g.players[0].equipment = [Prigione(0,0)]
g.players[1].equipment = [Prigione(0,0)]
g.players[g.turn].draw('')
g.players[g.turn].hand = []
g.players[g.turn].end_turn()
assert g.players[g.turn].pending_action == PendingAction.PICK
g.deck.cards.insert(0, Bang(Suit.SPADES,0))
g.deck.cards.insert(1, Bang(Suit.HEARTS,0))
g.players[g.turn].pick()
assert g.players[g.turn].pending_action == PendingAction.DRAW
def test_PaulRegret():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
test_chars = [Character('test_char', 2), PaulRegret()]
for p in ps:
p.available_characters = [test_chars.pop(0)]
p.set_character(p.available_characters[0].name)
pls = g.get_visible_players(g.players[0])
assert len(pls) == 1
assert pls[0]['name'] == g.players[1].name
assert pls[0]['dist'] > g.players[0].get_sight()
def test_PedroRamirez():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
test_chars = [Character('test_char', 4), PedroRamirez()]
for p in ps:
p.available_characters = [test_chars.pop(0)]
p.set_character(p.available_characters[0].name)
if not isinstance(g.players[g.turn].character, PedroRamirez):
g.players[g.turn].draw('')
g.players[g.turn].hand = []
g.players[g.turn].end_turn()
g.deck.scrap_pile.append(Bang(0,0))
g.players[g.turn].hand = []
g.players[g.turn].draw('scrap')
assert len(g.players[g.turn].hand) == 2
assert g.players[g.turn].hand[0].number == 0
assert g.players[g.turn].hand[0].suit == 0
assert isinstance(g.players[g.turn].hand[0], Bang)
def test_RoseDoolan():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
test_chars = [Character('test_char', 2), RoseDoolan()]
for p in ps:
p.available_characters = [test_chars.pop(0)]
p.set_character(p.available_characters[0].name)
g.players[0].equipment = [Mustang(0,0)]
g.players[0].notify_self()
pls = g.get_visible_players(g.players[1])
print(pls)
assert len(pls) == 1
assert pls[0]['name'] != g.players[1].name
assert pls[0]['dist'] <= g.players[1].get_sight()
def test_SidKetchum():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
test_chars = [Character('test_char', 4), SidKetchum()]
for p in ps:
p.available_characters = [test_chars.pop(0)]
p.set_character(p.available_characters[0].name)
if not isinstance(g.players[g.turn].character, SidKetchum):
g.players[g.turn].draw('')
g.players[g.turn].hand = []
g.players[g.turn].end_turn()
g.players[g.turn].draw('')
g.players[g.turn].lives = 1
g.players[g.turn].scrap(0)
assert g.players[g.turn].lives == 1
g.players[g.turn].scrap(0)
assert g.players[g.turn].lives == 2
def test_SlabTheKiller():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
test_chars = [Character('test_char', 4), SlabTheKiller()]
for p in ps:
p.available_characters = [test_chars.pop(0)]
p.set_character(p.available_characters[0].name)
if not isinstance(g.players[g.turn].character, SlabTheKiller):
g.players[g.turn].draw('')
g.players[g.turn].hand = [Mancato(0,0)]
g.players[g.turn].end_turn()
g.players[g.turn].draw('')
g.players[g.turn].hand = [Bang(0,0)]
g.players[g.turn].play_card(0, g.players[(g.turn+1)%2].name)
assert g.players[(g.turn+1)%2].pending_action == PendingAction.RESPOND
g.players[(g.turn+1)%2].respond(0)
assert g.players[(g.turn+1)%2].pending_action == PendingAction.WAIT
assert g.players[(g.turn+1)%2].lives == 3
def test_SuzyLafayette():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
test_chars = [Character('test_char', 4), SuzyLafayette()]
for p in ps:
p.available_characters = [test_chars.pop(0)]
p.set_character(p.available_characters[0].name)
g.players[1].hand = []
assert len(g.players[1].hand) == 0
g.players[1].notify_self()
assert len(g.players[1].hand) == 1
g.players[g.turn].end_turn()
def test_VultureSam():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(3)]
for p in ps:
g.add_player(p)
g.start_game()
test_chars = [Character('test_char', 4), Character('test_char', 4), VultureSam()]
for p in ps:
p.available_characters = [test_chars.pop(0)]
p.set_character(p.available_characters[0].name)
if isinstance(g.players[g.turn].character, VultureSam):
g.players[g.turn].draw('')
g.players[g.turn].hand = [Bang(0,0), Bang(0,0), Bang(0,0), Bang(0,0)]
g.players[g.turn].end_turn()
while not isinstance(g.players[g.turn].character, VultureSam):
g.players[g.turn].draw('')
g.players[g.turn].hand = [Bang(0,0), Bang(0,0), Bang(0,0), Bang(0,0)]
g.players[g.turn].lives = 0
g.players[g.turn].notify_self()
assert len(g.players[2].hand) == 8
return
def test_WillyTheKid():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
test_chars = [Character('test_char', 4), WillyTheKid()]
for p in ps:
p.available_characters = [test_chars.pop(0)]
p.set_character(p.available_characters[0].name)
if not isinstance(g.players[g.turn].character, WillyTheKid):
g.players[g.turn].draw('')
g.players[g.turn].hand = []
g.players[g.turn].end_turn()
g.players[g.turn].draw('')
g.players[g.turn].hand = [Bang(0,0), Bang(0,0), Bang(0,0)]
g.players[g.turn].play_card(0, g.players[(g.turn+1)%2].name)
assert g.players[(g.turn+1)%2].lives == 3
g.players[g.turn].play_card(0, g.players[(g.turn+1)%2].name)
assert g.players[(g.turn+1)%2].lives == 2
g.players[g.turn].play_card(0, g.players[(g.turn+1)%2].name)
assert g.players[(g.turn+1)%2].lives == 1

View File

@ -0,0 +1,37 @@
from tests.dummy_socket import DummySocket
from bang.deck import Deck
from bang.game import Game
def test_card_flip():
g = Game('test')
g.deck = Deck(g)
l = len(g.deck.cards)
assert g.deck.pick_and_scrap() is not None
assert len(g.deck.cards) == l - 1
assert len(g.deck.scrap_pile) == 1
def test_draw():
g = Game('test')
g.deck = Deck(g)
l = len(g.deck.cards)
assert g.deck.draw(True) is not None
assert len(g.deck.cards) == l - 1
assert len(g.deck.scrap_pile) == 0
def test_reshuffle():
g = Game('test')
g.deck = Deck(g)
l = len(g.deck.cards)
for i in range(80):
assert g.deck.pick_and_scrap() is not None
assert len(g.deck.cards) == 79
assert len(g.deck.scrap_pile) == 1
def test_draw_from_scrap():
g = Game('test')
g.deck = Deck(g)
l = len(g.deck.cards)
assert g.deck.pick_and_scrap() is not None
assert g.deck.draw_from_scrap_pile() is not None
assert len(g.deck.cards) == 79
assert len(g.deck.scrap_pile) == 0

View File

@ -0,0 +1,40 @@
from random import randint
from bang.characters import Character
from bang.expansions.dodge_city.cards import *
from bang.deck import Deck
from bang.game import Game
from bang.players import Player
import bang.cards as cs
# test Borraccia
def test_Borraccia():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
borraccia_guy = g.players[g.turn]
borraccia_guy.draw('')
borraccia_guy.lives = 3
borraccia_guy.hand = [Borraccia(0,0)]
assert len(borraccia_guy.hand) == 1
borraccia_guy.play_card(0)
assert len(borraccia_guy.hand) == 0
assert len(borraccia_guy.equipment) == 1
assert not borraccia_guy.equipment[0].can_be_used_now
borraccia_guy.play_card(0)
assert len(borraccia_guy.hand) == 0
assert len(borraccia_guy.equipment) == 1
borraccia_guy.end_turn()
g.players[g.turn].draw('')
g.players[g.turn].hand = []
g.players[g.turn].end_turn()
borraccia_guy.draw('')
assert borraccia_guy.equipment[0].can_be_used_now
borraccia_guy.hand = []
borraccia_guy.play_card(0)
assert len(borraccia_guy.equipment) == 0
assert borraccia_guy.lives == 4

View File

@ -0,0 +1,16 @@
class DummySocket():
def __init__(self, sio=None):
self.true_sio = sio
def emit(self, event, data=None, to=None, room=None, skip_sid=None, namespace=None, callback=None, **kwargs):
# print(f'event: {event}, data: {data}, to: {to}, room: {room}')
if self.true_sio and event == 'chat_message':
self.true_sio.emit(event, data, to, room, skip_sid, namespace, callback, **kwargs)
elif event == 'chat_message':
print(f'event: {event}, data: {data}, to: {to}, room: {room}')
return True
def sleep(self, seconds):
return seconds
is_fake = True

103
backend/tests/game_test.py Normal file
View File

@ -0,0 +1,103 @@
from bang.deck import Deck
from bang.game import Game
from bang.players import Player
from bang.roles import *
from bang.cards import *
from globals import PendingAction
from tests import started_game
# test that game can start
def test_game_start():
g = Game("test")
p1 = Player("p1", "p1")
g.add_player(p1)
p2 = Player("p2", "p2")
g.add_player(p2)
p3 = Player("p3", "p3")
g.add_player(p3)
assert p1.role is None
assert p2.role is None
assert p3.role is None
assert not g.started
g.start_game()
assert g.started
assert p1.role is not None
assert p2.role is not None
assert p3.role is not None
assert len(p1.available_characters) == g.characters_to_distribute
assert len(p2.available_characters) == g.characters_to_distribute
assert len(p3.available_characters) == g.characters_to_distribute
p1.set_character(p1.available_characters[0].name)
assert p1.character is not None
p2.set_character(p2.available_characters[0].name)
assert p2.character is not None
p3.set_character(p3.available_characters[0].name)
assert p3.character is not None
assert g.players[g.turn].pending_action == PendingAction.DRAW
# test that dodge_city is added to games with more than 8 players
def test_dodge_city():
g = Game("test")
for i in range(9):
p = Player(f"p{i}", f"p{i}")
g.add_player(p)
assert "dodge_city" in g.expansions
# test that a game with 2 players has only renegade as role
def test_renegade_only():
g = Game("test")
p1 = Player("p1", "p1")
g.add_player(p1)
p2 = Player("p2", "p2")
g.add_player(p2)
g.start_game()
assert isinstance(g.players[0].role, Renegade)
assert isinstance(g.players[1].role, Renegade)
# test that a game with 3 player has Renegade, Vice and Outlaw as roles
def test_renegade_vice_outlaw():
g = Game("test")
for i in range(3):
p = Player(f"p{i}", f"p{i}")
g.add_player(p)
g.start_game()
roles = {p.role.name for p in g.players}
assert len(roles) == 3
# test that a game with 4 players has all roles except the deputy
def test_4_players_roles():
g = Game("test")
for i in range(4):
p = Player(f"p{i}", f"p{i}")
g.add_player(p)
g.start_game()
roles = {p.role.name for p in g.players}
assert len(roles) == 3
# test that a game with 5 players has all roles
def test_5_players_roles():
g = Game("test")
for i in range(5):
p = Player(f"p{i}", f"p{i}")
g.add_player(p)
g.start_game()
roles = {p.role.name for p in g.players}
assert len(roles) == 4
def test_expansions():
started_game(
[
"high_noon",
"dodge_city",
"gold_rush",
"the_valley_of_shadows",
"wild_west_show",
]
)

206
backend/tests/roles_test.py Normal file
View File

@ -0,0 +1,206 @@
from bang.characters import Character
from bang.deck import Deck
from bang.game import Game
from bang.players import Player
from globals import PendingAction
from bang.roles import *
from bang.cards import *
# test that a game with 3 player the deputy kills renegade and wins
def test_3p_deputy_win():
g = Game('test')
for i in range(3):
p = Player(f'p{i}', f'p{i}')
g.add_player(p)
g.start_game()
for p in g.players:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
roles = {g.players[i].role.name:i for i in range(len(g.players))}
print(roles)
assert len(roles) == 3
assert isinstance(g.players[g.turn].role, Vice)
for i in range(3):
g.players[i].lives = 1
g.players[i].hand = []
g.players[g.turn].draw('')
g.players[g.turn].hand = [Bang(0,0)]
g.players[g.turn].play_card(0, against=g.players[roles['Rinnegato']].name)
assert (hasattr(g.players[g.turn], 'win_status') and g.players[g.turn].win_status)
assert not (hasattr(g.players[roles['Rinnegato']], 'win_status') and g.players[roles['Rinnegato']].win_status)
assert not (hasattr(g.players[roles['Fuorilegge']], 'win_status') and g.players[roles['Fuorilegge']].win_status)
# test that a game with 3 player the renegade kills the outlaw and wins
def test_3p_renegade_win():
g = Game('test')
for i in range(3):
p = Player(f'p{i}', f'p{i}')
g.add_player(p)
g.start_game()
for p in g.players:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
roles = {g.players[i].role.name:i for i in range(len(g.players))}
print(roles)
assert len(roles) == 3
assert isinstance(g.players[g.turn].role, Vice)
for i in range(3):
g.players[i].lives = 1
g.players[i].hand = []
g.turn = roles['Rinnegato']
g.play_turn()
g.players[g.turn].draw('')
g.players[g.turn].hand = [Bang(0,0)]
g.players[g.turn].play_card(0, against=g.players[roles['Fuorilegge']].name)
assert (hasattr(g.players[g.turn], 'win_status') and g.players[g.turn].win_status)
assert not (hasattr(g.players[roles['Vice']], 'win_status') and g.players[roles['Vice']].win_status)
assert not (hasattr(g.players[roles['Fuorilegge']], 'win_status') and g.players[roles['Fuorilegge']].win_status)
# test that a game with 3 player the outlaw kills the deputy and wins
def test_3p_outlaw_win():
g = Game('test')
for i in range(3):
p = Player(f'p{i}', f'p{i}')
g.add_player(p)
g.start_game()
for p in g.players:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
roles = {g.players[i].role.name:i for i in range(len(g.players))}
print(roles)
assert len(roles) == 3
assert isinstance(g.players[g.turn].role, Vice)
for i in range(3):
g.players[i].lives = 1
g.players[i].hand = []
g.turn = roles['Fuorilegge']
g.play_turn()
g.players[g.turn].draw('')
g.players[g.turn].hand = [Bang(0,0)]
g.players[g.turn].play_card(0, against=g.players[roles['Vice']].name)
assert (hasattr(g.players[g.turn], 'win_status') and g.players[g.turn].win_status)
assert not (hasattr(g.players[roles['Vice']], 'win_status') and g.players[roles['Vice']].win_status)
assert not (hasattr(g.players[roles['Rinnegato']], 'win_status') and g.players[roles['Rinnegato']].win_status)
# test that a game with 4 player the outlaw kills the sheriff and win
def test_4p_outlaw_win():
g = Game('test')
for i in range(4):
p = Player(f'p{i}', f'p{i}')
g.add_player(p)
g.start_game()
for p in g.players:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
roles = {g.players[i].role.name:i for i in range(len(g.players))}
print(roles)
assert len(roles) == 3
assert isinstance(g.players[g.turn].role, Sheriff)
for i in range(4):
g.players[i].lives = 1
g.players[i].hand = []
g.turn = roles['Fuorilegge']
g.play_turn()
g.players[g.turn].draw('')
g.players[g.turn].hand = [Bang(0,0)]
g.players[g.turn].play_card(0, against=g.players[roles['Sceriffo']].name)
for i in range(4):
if isinstance(g.players[i].role, Outlaw):
assert (hasattr(g.players[i], 'win_status') and g.players[i].win_status)
else:
assert not (hasattr(g.players[i], 'win_status') and g.players[i].win_status)
# test that a game with 5 player the renegade kills all the other players and wins
def test_5p_renegade_gatling_win():
g = Game('test')
for i in range(5):
p = Player(f'p{i}', f'p{i}')
g.add_player(p)
g.start_game()
for p in g.players:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
roles = {g.players[i].role.name:i for i in range(len(g.players))}
print(roles)
assert len(roles) == 4
assert isinstance(g.players[g.turn].role, Sheriff)
g.players[g.turn].is_my_turn = False
for i in range(len(g.players)):
g.players[i].lives = 1
g.players[i].hand = []
g.turn = roles['Rinnegato']
g.play_turn()
g.players[g.turn].draw('')
g.players[g.turn].hand = [Gatling(0,0)]
g.players[g.turn].play_card(0)
for i in range(len(g.players)):
if isinstance(g.players[i].role, Renegade):
print (g.players[i].role.name, 'win_status:', hasattr(g.players[i], 'win_status') and g.players[i].win_status)
assert (hasattr(g.players[i], 'win_status') and g.players[i].win_status)
else:
print(g.players[i].role.name, 'win_status:', (hasattr(g.players[i], 'win_status') and g.players[i].win_status))
assert not (hasattr(g.players[i], 'win_status') and g.players[i].win_status)
# test that a game with 5 player the renegade kills all the other players and wins
def test_5p_renegade_indiani_win():
g = Game('test')
for i in range(5):
p = Player(f'p{i}', f'p{i}')
g.add_player(p)
g.start_game()
for p in g.players:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
roles = {g.players[i].role.name:i for i in range(len(g.players))}
print(roles)
assert len(roles) == 4
assert isinstance(g.players[g.turn].role, Sheriff)
g.players[g.turn].is_my_turn = False
for i in range(len(g.players)):
g.players[i].lives = 1
g.players[i].hand = []
g.turn = roles['Rinnegato']
g.play_turn()
g.players[g.turn].draw('')
g.players[g.turn].hand = [Indiani(0,0)]
g.players[g.turn].play_card(0)
for i in range(len(g.players)):
if isinstance(g.players[i].role, Renegade):
print (g.players[i].role.name, 'win_status:', hasattr(g.players[i], 'win_status') and g.players[i].win_status)
assert (hasattr(g.players[i], 'win_status') and g.players[i].win_status)
else:
print(g.players[i].role.name, 'win_status:', (hasattr(g.players[i], 'win_status') and g.players[i].win_status))
assert not (hasattr(g.players[i], 'win_status') and g.players[i].win_status)
# test that a game with 5 player the renegade kills the sheriff but it isn't the last alive player and the outlaws wins
def test_5p_outlaw_death_win():
g = Game('test')
for i in range(5):
p = Player(f'p{i}', f'p{i}')
g.add_player(p)
g.start_game()
for p in g.players:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
roles = {g.players[i].role.name:i for i in range(len(g.players))}
print(roles)
assert len(roles) == 4
assert isinstance(g.players[g.turn].role, Sheriff)
g.players[g.turn].is_my_turn = False
for i in range(len(g.players)):
g.players[i].lives = 1
g.players[i].hand = []
g.players[roles['Vice']].lives = 2
g.turn = roles['Rinnegato']
g.play_turn()
g.players[g.turn].draw('')
g.players[g.turn].hand = [Gatling(0,0)]
g.players[g.turn].play_card(0)
for i in range(len(g.players)):
if isinstance(g.players[i].role, Outlaw):
print (g.players[i].role.name, 'win_status:', hasattr(g.players[i], 'win_status') and g.players[i].win_status)
assert (hasattr(g.players[i], 'win_status') and g.players[i].win_status)
assert (hasattr(g.players[i], 'is_dead') and g.players[i].is_dead)
else:
print(g.players[i].role.name, 'win_status:', (hasattr(g.players[i], 'win_status') and g.players[i].win_status))
assert not (hasattr(g.players[i], 'win_status') and g.players[i].win_status)

View File

@ -0,0 +1,24 @@
from tests import started_game, set_events, current_player, next_player, current_player_with_cards
from bang.expansions.fistful_of_cards.card_events import *
import bang.cards as cs
def test_miniera_abbandonata():
g = started_game(['fistful_of_cards'])
set_events(g, [MinieraAbbandonata()])
p = current_player(g)
starting_cards = len(p.hand)
g.deck.scrap_pile = [
cs.Bang(0, 0),
cs.Bang(0, 1),
cs.Bang(0, 2),
cs.Bang(0, 3),
]
p.draw("")
assert len(p.hand) == starting_cards + 2
# check the last two cards are the ones from the scrap pile
assert p.hand[-2].name == cs.Bang(0, 0).name
assert p.hand[-2].number == 3
assert p.hand[-1].name == cs.Bang(0, 0).name
assert p.hand[-1].number == 2

View File

@ -0,0 +1,24 @@
from random import randint
from bang.characters import Character
from bang.expansions.train_robbery.trains import *
from bang.deck import Deck
from bang.game import Game
from bang.players import Player
import bang.cards as cs
from globals import PendingAction
from tests import started_game, set_events, current_player, next_player, current_player_with_cards
def test_cattle_truck():
g = started_game()
g.deck.scrap_pile = [cs.CatBalou(0,1), cs.CatBalou(0,2), cs.CatBalou(0,3)]
p = current_player_with_cards(g, [CattleTruck()])
p.play_card(0)
assert p.pending_action == PendingAction.CHOOSE
p.choose(0)
assert p.pending_action == PendingAction.PLAY
assert len(p.hand) == 1
assert len(g.deck.scrap_pile) == 2

View File

@ -0,0 +1,72 @@
from random import randint
from bang.characters import Character
from bang.expansions.the_valley_of_shadows.characters import *
from bang.deck import Deck
from bang.game import Game
from bang.players import Player
import bang.cards as cs
from globals import PendingAction
# test TucoFranziskaner
def test_TucoFranziskaner():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [TucoFranziskaner()]
p.set_character(p.available_characters[0].name)
p = g.players[g.turn]
p.hand = []
p.draw('')
assert len(p.hand) == 4
p.end_turn()
p = g.players[g.turn]
p.hand = []
p.equipment = [cs.Barile(0,0)]
p.draw('')
assert len(p.hand) == 2
# test ColoradoBill
def test_ColoradoBill():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [ColoradoBill()]
p.set_character(p.available_characters[0].name)
p = g.players[g.turn]
p1 = g.players[(g.turn+1)%2]
p.draw('')
p.hand = [cs.Volcanic(0,0), cs.Bang(0,0), cs.Bang(0,0)]
p.play_card(0)
g.deck.cards.insert(0, cs.Bang(cs.Suit.SPADES,0))
g.deck.cards.insert(1, cs.Bang(cs.Suit.HEARTS,0))
p1.hand = [cs.Mancato(0,0)]
p.play_card(0, p1.name)
assert len(p1.hand) == 1
assert p1.lives == 3
p.play_card(0, p1.name)
assert p1.pending_action == PendingAction.RESPOND
# test BlackFlower
def test_BlackFlower():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [BlackFlower()]
p.set_character(p.available_characters[0].name)
p = g.players[g.turn]
p.draw('')
p.hand = [cs.Volcanic(cs.Suit.DIAMONDS,0)]
p.special('')
assert p.pending_action == PendingAction.PLAY
p.hand = [cs.Volcanic(cs.Suit.CLUBS,0)]
p.special('')
assert p.pending_action == PendingAction.CHOOSE

View File

@ -0,0 +1,366 @@
from random import randint
from bang.characters import Character
from bang.expansions.the_valley_of_shadows.cards import *
from bang.deck import Deck
from bang.game import Game
from bang.players import Player
import bang.cards as cs
from globals import PendingAction
from tests import started_game, set_events, current_player, next_player, current_player_with_cards
# test UltimoGiro
def test_ultimo_giro():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(3)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
ultimo_giro_guy = g.players[g.turn]
ultimo_giro_guy.draw('')
ultimo_giro_guy.lives = 3
ultimo_giro_guy.hand = [UltimoGiro(0,0)]
assert ultimo_giro_guy.lives == 3
ultimo_giro_guy.play_card(0)
assert ultimo_giro_guy.lives == 4
# test Tomahawk
def test_tomahawk():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(6)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
tomahawk_guy = g.players[g.turn]
tomahawk_guy.draw('')
tomahawk_guy.hand = [Tomahawk(0,0)]
assert len(tomahawk_guy.hand) == 1
tomahawk_guy.play_card(0, g.players[(g.turn+3)%6].name)
assert len(tomahawk_guy.hand) == 1
tomahawk_guy.play_card(0, g.players[(g.turn+1)%6].name)
assert len(tomahawk_guy.hand) == 0
# test Fantasma
def test_fantasma():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(3)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
fantasma_guy = g.players[g.turn]
fantasma_guy.lives = 0
fantasma_guy.notify_self()
pl = g.players[g.turn]
pl.draw('')
pl.hand = [Fantasma(0,0)]
pl.play_card(0)
assert pl.pending_action == PendingAction.CHOOSE
assert pl.available_cards[0]['name'] == fantasma_guy.name
pl.choose(0)
assert pl.pending_action == PendingAction.PLAY
assert len(fantasma_guy.equipment) == 1 and isinstance(fantasma_guy.equipment[0], Fantasma)
# test SerpenteASonagli
def test_serpente_a_sonagli():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(3)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
p = g.players[g.turn]
serp = g.players[(g.turn+1)%3]
p.draw('')
p.hand = [SerpenteASonagli(0,0)]
assert len(p.hand) == 1
p.play_card(0, serp.name)
assert len(p.hand) == 0
assert len(serp.equipment) == 1 and isinstance(serp.equipment[0], SerpenteASonagli)
p.end_turn()
assert serp.pending_action == PendingAction.PICK
g.deck.cards[0] = Bang(Suit.SPADES, 5)
serp.pick()
assert serp.lives == 3
serp.draw('')
serp.hand = [SerpenteASonagli(0,0)]
serp.play_card(0, g.players[(g.turn+1)%3].name)
assert len(serp.hand) == 0
serp.end_turn()
assert g.players[g.turn].pending_action == PendingAction.PICK
g.deck.cards[0] = Bang(Suit.HEARTS, 5)
g.players[g.turn].pick()
assert g.players[g.turn].lives == 4
# test RitornoDiFiamma
def test_ritorno_di_fiamma():
g = Game('test')
g.expansions = ['the_valley_of_shadows']
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
p = g.players[g.turn]
p1 = g.players[(g.turn+1)%3]
p.draw('')
p.hand = [Bang(1, 1)]
p1.hand = [RitornoDiFiamma(0,0)]
p.play_card(0, p1.name)
assert len(p.hand) == 0
assert len(p1.hand) == 1
p1.respond(0)
assert len(p1.hand) == 0
assert p.lives == 3
p.end_turn()
assert p1.is_my_turn
p1.draw('')
p1.hand = [Bang(1, 1)]
p.equipment = [cs.Barile(0,0)]
p.hand = [RitornoDiFiamma(0,0)]
p1.play_card(0, p.name)
assert p.pending_action == PendingAction.PICK
g.deck.cards[0] = Bang(Suit.SPADES, 5)
p.pick()
assert p.pending_action == PendingAction.RESPOND
p.respond(0)
assert p1.lives == 3
# test RitornoDiFiamma with gatling
def test_ritorno_di_fiamma_gatling():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(3)]
g.expansions = ['the_valley_of_shadows']
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
p = g.players[g.turn]
p1 = g.players[(g.turn+1)%3]
p2 = g.players[(g.turn+2)%3]
p.draw('')
p.hand = [cs.Gatling(1, 1), Mancato(0,0)]
p1.hand = [RitornoDiFiamma(0,0)]
p2.hand = [Mancato(0,0)]
p.play_card(0)
assert len(p.hand) == 1
assert p1.pending_action == PendingAction.RESPOND
assert p2.pending_action == PendingAction.RESPOND
p1.respond(0)
assert p2.pending_action == PendingAction.RESPOND
assert p.pending_action == PendingAction.WAIT
p2.respond(0)
# end of gatling
assert p.pending_action == PendingAction.RESPOND
p.respond(0)
assert len(p.hand) == 0
assert p.pending_action == PendingAction.PLAY
# test Taglia
def test_taglia():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(3)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
p = g.players[g.turn]
p1 = g.players[(g.turn+1)%3]
p.draw('')
p.hand = [Taglia(0,0), Bang(1, 1)]
p1.hand = []
p.play_card(0, p1.name)
assert len(p.hand) == 1
assert len(p1.equipment) == 1
assert len(p1.hand) == 0
p.play_card(0, p1.name)
assert p1.lives == 3
assert len(p.hand) == 1
# test Bandidos
def test_bandidos():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
p = g.players[g.turn]
p1 = g.players[(g.turn+1)%3]
p.draw('')
p.hand = [Bandidos(0,0), Bandidos(0,0)]
p.play_card(0)
assert len(p.hand) == 1
assert p.pending_action == PendingAction.WAIT
assert p1.pending_action == PendingAction.CHOOSE
p1.choose(len(p1.hand))
assert p1.lives == 3
assert p.pending_action == PendingAction.PLAY
p.play_card(0)
assert len(p.hand) == 0
assert p.pending_action == PendingAction.WAIT
assert p1.pending_action == PendingAction.CHOOSE
p1.choose(0)
assert p1.pending_action == PendingAction.CHOOSE
p1.choose(0)
assert p1.pending_action == PendingAction.WAIT
assert p.pending_action == PendingAction.PLAY
def test_bandidos_with_gold_rush():
g = Game('test')
g.expansions = ['gold_rush']
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
p = g.players[g.turn]
p1 = g.players[(g.turn+1)%3]
p.draw('')
p.hand = [Bandidos(0,0), Bandidos(0,0)]
p.play_card(0)
assert len(p.hand) == 1
assert p.pending_action == PendingAction.WAIT
assert p1.pending_action == PendingAction.CHOOSE
p1.choose(len(p1.hand))
assert p1.lives == 3
assert p.pending_action == PendingAction.PLAY
assert p.gold_nuggets == 1
# test Poker
def test_poker():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
p = g.players[g.turn]
p1 = g.players[(g.turn+1)%3]
p.draw('')
p.hand = [Poker(0,0), Poker(0,0)]
p1.hand = [Bang(1, 1), Bang(2, 2)]
p.play_card(0)
assert len(p.hand) == 1
assert p.pending_action == PendingAction.WAIT
assert p1.pending_action == PendingAction.CHOOSE
p1.choose(0)
assert p.pending_action == PendingAction.PLAY
p.play_card(0)
assert p.pending_action == PendingAction.WAIT
assert p1.pending_action == PendingAction.CHOOSE
p1.choose(0)
assert p.pending_action == PendingAction.CHOOSE
p.choose(0)
assert p1.pending_action == PendingAction.WAIT
assert p.pending_action == PendingAction.PLAY
assert len(p.hand) == 1
# test Tornado
def test_tornado():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(2)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
p = g.players[g.turn]
p1 = g.players[(g.turn+1)%3]
p.draw('')
p.hand = [Tornado(0,0), Bang(1, 1)]
p1.hand = [Bang(2, 2)]
p.play_card(0)
assert len(p.hand) == 1
assert p.pending_action == PendingAction.CHOOSE
assert p1.pending_action == PendingAction.CHOOSE
p.choose(0)
p1.choose(0)
assert p.pending_action == PendingAction.PLAY
assert len(p.hand) == 2
assert len(p1.hand) == 2
def test_sventagliata():
g = Game('test')
ps = [Player(f'p{i}', f'p{i}') for i in range(3)]
for p in ps:
g.add_player(p)
g.start_game()
for p in ps:
p.available_characters = [Character('test_char', 4)]
p.set_character(p.available_characters[0].name)
p = g.players[g.turn]
p1 = g.players[(g.turn + 1) % 3]
p2 = g.players[(g.turn + 2) % 3]
p.draw('')
p.hand = [Sventagliata('Hearts', 10), Bang('Hearts', 10)]
p1.hand = [Mancato('Spades', 2)]
p2.hand = [Mancato('Clubs', 5)]
# Play Sventagliata
p.play_card(0, against=p1.name)
assert p.pending_action == PendingAction.CHOOSE
assert len(p.available_cards) > 0 # Ensure there are available targets
# Simulate choosing a secondary target
secondary_target = p.available_cards[0]['name']
assert secondary_target != p.name and secondary_target != p1.name # Ensure the secondary target is correct
p.choose(0) # Choose the first available target
assert p.pending_action == PendingAction.WAIT
assert p1.pending_action == PendingAction.RESPOND
# Simulate p1 responding to the Bang
p1.respond(0) # Assuming p1 plays a Mancato card in response
assert p1.pending_action == PendingAction.WAIT
assert p.pending_action == PendingAction.WAIT
p2.respond(0) # Assuming p2 plays a Mancato card in response
assert p2.pending_action == PendingAction.WAIT
assert p.pending_action == PendingAction.PLAY
# check bang cannot be played
assert len(p.hand) == 1
p.play_card(0, against=p2.name)
assert p.pending_action == PendingAction.PLAY
assert len(p.hand) == 1
def test_mira():
g = started_game(['the_valley_of_shadows'])
p = current_player(g)
p.draw('')
p.hand = [Mira(0, 0), Bang(0, 0)]
target = next_player(g)
target.hand = []
target_health = target.lives
p.play_card(0, against=target.name, _with=1)
assert target.lives == target_health - 2

View File

@ -0,0 +1,34 @@
from tests import started_game, set_events, current_player, next_player, current_player_with_cards
from bang.expansions.wild_west_show.characters import *
from bang.cards import Card, Suit
import bang.roles as roles
from globals import PendingAction
# test TerenKill
def test_TerenKill():
g = started_game(['wild_west_show'], 4, TerenKill())
p = current_player_with_cards(g, [])
p.lives = 0
g.deck.cards = [Card(Suit.HEARTS, 'card', 0), Card(Suit.HEARTS, 'card', 0)]
p.notify_self()
assert p.lives == 1
assert len(p.hand) == 1
p.lives = 0
g.deck.cards = [Card(Suit.SPADES, 'card', 0), Card(Suit.HEARTS, 'card', 0)]
p.notify_self()
assert p.lives == 0
# test YoulGrinner
def test_YoulGrinner():
g = started_game(['wild_west_show'], 4, YoulGrinner())
p = current_player(g)
p.hand = []
p.draw('')
assert len(p.hand) == 5
for pl in g.players:
if pl != p:
assert len(pl.hand) == 3

View File

@ -0,0 +1,98 @@
from tests import started_game, set_events, current_player, next_player, current_player_with_cards
from bang.expansions.wild_west_show.card_events import *
from bang.cards import Card, Suit
import bang.roles as roles
from globals import PendingAction
# test Camposanto
def test_camposanto():
g = started_game(['wild_west_show'], 4)
set_events(g, [Camposanto()])
current_player_with_cards(g, []).end_turn()
p = current_player_with_cards(g, [])
p.lives = 0
p.notify_self()
p1 = current_player_with_cards(g, [])
p1.lives = 0
p1.notify_self()
current_player_with_cards(g, []).end_turn()
current_player_with_cards(g, []).end_turn()
assert p.is_my_turn
assert p.lives == 1
current_player_with_cards(g, []).end_turn()
assert p1.is_my_turn
assert p1.lives == 1
# test DarlingValentine
def test_darling_valentine():
g = started_game(['wild_west_show'], 4)
set_events(g, [DarlingValentine()])
p = next_player(g)
hand = p.hand.copy()
current_player_with_cards(g, []).end_turn()
assert hand != current_player(g).hand
# test DorothyRage
# test HelenaZontero
def test_helena_zontero():
g = started_game(['wild_west_show'], 8)
set_events(g, [None, HelenaZontero()])
roles = [p.role.name for p in g.players]
for i in range(len(g.players)-1):
current_player_with_cards(g, []).end_turn()
g.deck.cards = [Card(Suit.HEARTS, 'card', 0)]*5
current_player_with_cards(g, []).end_turn()
roles2 = [p.role.name for p in g.players]
assert roles != roles2
# test LadyRosaDelTexas
def test_LadyRosaDelTexas():
g = started_game(['wild_west_show'], 4)
set_events(g, [LadyRosaDelTexas()])
p = current_player_with_cards(g, [Card(0,'card',0)]*4)
t = g.turn
p.draw('event')
assert g.turn == (t+1)%len(g.players)
# test MissSusanna
def test_miss_suzanna():
g = started_game(['wild_west_show'], 4)
set_events(g, [MissSusanna()])
p = current_player_with_cards(g, [])
p.end_turn()
assert p.lives == 4 # sceriffo 5-1
p = current_player_with_cards(g, [Card(0,'card',0)]*4)
p.play_card(0)
p.play_card(0)
p.play_card(0)
p.end_turn()
assert p.lives == 4
p = current_player_with_cards(g, [])
p.end_turn()
assert p.lives == 3
# test RegolamentoDiConti
def test_RegolamentoDiConti():
g = started_game(['wild_west_show'], 4)
set_events(g, [RegolamentoDiConti()])
p = current_player_with_cards(g, [Card(0,'card',0)]*4)
p.draw('event')
assert p.pending_action == PendingAction.CHOOSE
p.choose(0)
# test WildWestShow
def test_WildWestShow():
g = started_game(['wild_west_show'], 8)
set_events(g, [None, WildWestShow()])
for i in range(len(g.players)):
current_player_with_cards(g, []).end_turn()
for p in g.players:
assert isinstance(p.role, roles.Renegade)

View File

@ -1,4 +1,4 @@
# frontend
# Bang Frontend
## Project setup
```

View File

@ -1,5 +0,0 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

35
frontend/index.html Normal file
View File

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en" translate="no" class="notranslate" data-build-timestamp-utc="<%= new Date().toISOString() %>">
<head>
<meta name="google" content="notranslate" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta name="keywords" content="bang, bang online, bang game, bang multiplayer, bang card game, bang card game online, Bang! card game rules online, play Bang! online, bang online with friends, high noon, dodge city, gold rush"/>
<link rel="icon" href="/favicon.ico">
<meta name="theme-color" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="PewPew!">
<meta name="description" content="Wanna play Bang with your friends but you cannot meet in person? Play Bang! the online multiplayer card game. It includes expansion like Gold Rush, Dodge City, Fistful of Cards and High Noon">
<title>PewPew! The online Bang card game!</title>
<!-- Twitter Card data -->
<meta name="twitter:card" value="Wanna play Bang with your friends but you cannot meet in person? Play Bang! the online multiplayer card game. It includes expansion like Gold Rush, Dodge City, Fistful of Cards and High Noon">
<!-- Open Graph data -->
<meta property="og:title" content="PewPew! The online bang card game!" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://bang.xamin.it/" />
<!-- <meta property="og:image" content="http://example.com/image.jpg" /> -->
<meta property="og:description" content="Wanna play Bang with your friends but you cannot meet in person? Play Bang! the online multiplayer card game. It includes expansion like Gold Rush, Dodge City, Fistful of Cards and High Noon" />
<script type="module" src="/src/main.js"></script>
</head>
<body>
<noscript>
<strong>We're sorry but to play Bang! you need JavaScript enabqled. Please enable it to play.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

View File

@ -1,26 +1,32 @@
{
"name": "frontend",
"name": "bang-frontend",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
"serve": "vite",
"build": "vite build",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src"
},
"dependencies": {
"core-js": "^3.6.5",
"socket.io-client": "^3.0.3",
"vue": "^2.6.11",
"vue-socket.io": "^3.0.10"
"@datadog/browser-rum": "^4.36.0",
"bang-vue-socket.io": "^4.0.0",
"caniuse-lite": "^1.0.30001470",
"pretty-checkbox-vue": "^1.1.9",
"register-service-worker": "^1.7.2",
"vue": "^2.7.16",
"vue-clipboard2": "^0.3.3",
"vue-i18n": "^8.28.2",
"vue-json-viewer": "^2.2.22",
"vue-router": "^3.6.5"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"vue-template-compiler": "^2.6.11"
"eslint": "^8.36.0",
"eslint-plugin-vue": "^9.10.0",
"vite": "^4.5.3",
"vite-plugin-html": "^3.2.0",
"vite-plugin-pwa": "^0.14.6",
"vite-plugin-vue2": "^2.0.3",
"vue-template-compiler": "^2.7.14"
},
"eslintConfig": {
"root": true,
@ -31,9 +37,6 @@
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.00251 14.9297L0 1.07422H6.14651L8.00251 4.27503L9.84583 1.07422H16L8.00251 14.9297Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 215 B

View File

@ -1,18 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<script src="https://twemoji.maxcdn.com/v/latest/twemoji.min.js" crossorigin="anonymous"></script>
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

View File

@ -0,0 +1,2 @@
User-agent: *
Allow: /

View File

@ -1,134 +1,216 @@
<template>
<div id="app" class="dark-mode">
<div v-if="!isInLobby" id="logo" class="center-stuff" style="margin-bottom:10pt;">
<h1 style="margin-bottom:0pt;">PewPew!</h1>
<i style="font-size: x-small;">Bang! è un marchio registrato DVGiochi</i>
</div>
<div id="app">
<div v-if="isConnected">
<div v-if="!didSetUsername">
<p>Scegli un username:</p>
<form @submit="setUsername">
<input v-model="username" />
<input type="submit"/>
</form>
<p>Giocatori online: {{onlinePlayers}}</p>
</div>
<div v-else>
<div v-if="!isInLobby" >
<p>Giocatori online: {{onlinePlayers}}</p>
<Card :card="getSelfCard" style="position:absolute; bottom:10pt; right: 10pt;"/>
<h2>Lobby disponibili:</h2>
<div style="display: flex">
<Card v-for="lobby in openLobbies" v-bind:key="lobby.name" :card="getLobbyCard(lobby)" @click.native="joinLobby(lobby)"/>
<p v-if="noLobbyAvailable">Nessuna lobby disponibile</p>
</div>
<form @submit="createLobby">
<h2>Crea una lobby:</h2>
<p>Nome:</p>
<input v-model="lobbyName"/>
<input type="submit" />
</form>
</div>
<Lobby v-show="isInLobby" :username="username" />
</div>
<router-view></router-view>
</div>
<div v-else class="center-stuff">
<h2>Attenzione!</h2>
<p>Connessione al server assente.</p>
<h2>{{$t("warning")}}</h2>
<p>{{$t("connection_error")}}</p>
<ul v-if="shouldShowBackendSuggestions">
Connect to one of these backends:
<li v-for="suggestion in backendSuggestions" :key="suggestion.name" @click="changeBackend(suggestion)">
{{suggestion.name}}
</li>
</ul>
</div>
<help :inGame="true" v-if="showHelp"/>
<div style="position:fixed;bottom:4pt;right:4pt;display:flex;z-index:10">
<input v-if="connect_dev" type=button class="btn" style="min-width:28pt;cursor:pointer;" @click="resetConnection" :value="'💚'+connect_dev" />
<input type=button class="btn" style="min-width:28pt;cursor:pointer;" @click="()=>{sending_report = true}" :value=" $t('report') " />
<input type="button" class="btn" value="" style="min-width:28pt;cursor:pointer;background-position:center;background-image:url('https://img.icons8.com/color/48/discord-logo.png');background-size:1.5em;background-repeat: no-repeat;" @click="joinDiscord"/>
<input type="button" class="btn" :value="(showHelp?'X':'?')" style="min-width:28pt;border-radius:100%;cursor:pointer;" @click="getHelp"/>
<select id="theme" class="btn" v-model="theme">
<option
v-for="(theme, i) in ['light.☀️', 'dark.🌙️', 'sepia.🌇️', 'grayscale.📰️', 'black.⬛']"
:key="`theme-${i}`"
:value="theme.split('.')[0]">
{{theme.split('.')[1]}} {{$t(`theme.${theme.split('.')[0]}`)}}
</option>
</select>
<select id="lang" class="btn" v-model="$i18n.locale" @change="storeLangPref">
<option
v-for="(lang, i) in ['it.🇮🇹.Italiano', 'en.🇬🇧.English', 'cs.🇨🇿.Čeština', 'fr.🇫🇷.Français', 'es.🇪🇸.Español', 'ru.🇷🇺.Русский']"
:key="`lang-${i}`"
:value="lang.split('.')[0]">
{{lang.split('.')[1]}} {{lang.split('.')[2]}}
</option>
</select>
</div>
<label for="lang" style="opacity:0" >Language</label>
<div v-if="showUpdateUI" style="position: fixed;bottom: 0;z-index: 1;background: rgba(0,0,0,0.5);padding: 20pt;" class="center-stuff">
<p class="update-dialog__content">
A new version is available. Refresh to load it?
</p>
<div class="update-dialog__actions">
<button @click="update">Update</button>
<button @click="showUpdateUI = false">Cancel</button>
</div>
</div>
<transition name="bounce">
<full-screen-input v-if="sending_report" :defaultValue="''" :text="$t('report_bug')" :val="report" :cancel="cancelReport" :send="sendReport" :canCancel="true"/>
</transition>
</div>
</template>
<script>
import FullScreenInput from './components/FullScreenInput.vue'
import Help from './components/Help.vue';
import Vue from 'vue'
import Card from './components/Card.vue'
import Lobby from './components/Lobby.vue'
import { datadogRum } from '@datadog/browser-rum';
export default {
components: { Help, FullScreenInput },
name: 'App',
components: {
Card,
Lobby,
},
data: () => ({
isConnected: false,
didSetUsername: false,
username: '',
openLobbies: [],
lobbyName: '',
isInLobby: false,
onlinePlayers: 0,
c: false,
registration: null,
showUpdateUI: false,
showHelp:false,
theme: 'light',
report: '',
sending_report: false,
connect_dev: undefined,
backendSuggestions: [
{ name: 'Bang Xamin', url: 'https://bang.xamin.it' },
{ name: 'Bang Miga', url: 'https://bang.migani.synology.me/' },
{ name: 'Localhost', url: 'http://localhost:5001' },
],
}),
computed: {
noLobbyAvailable() {
return this.openLobbies && this.openLobbies.length == 0
},
getSelfCard() {
return {
name: this.username,
number: 'YOU',
icon: '🤠',
is_character: true,
}
shouldShowBackendSuggestions() {
return window.location.origin.indexOf('vercel') !== -1 || window.location.origin.indexOf('localhost') !== -1
},
},
sockets: {
connect() {
this.isConnected = true;
document.title = 'PewPew!'
if (Vue.config.devtools) {
setTimeout(function(){
this.username =(1+Math.random() * 100 % 100).toFixed(2).toString();
this.setUsername();
}.bind(this), 1000)
}
},
disconnect() {
this.isConnected = false;
},
lobbies(data) {
this.openLobbies = data;
},
room() {
room(data) {
this.isInLobby = true;
if (data.password)
this.$router.replace({path:'game', query: { code: data.name, pwd: data.password }}).catch(()=>{});
else
this.$router.replace({path:'game', query: { code: data.name }}).catch(()=>{});
},
players(num) {
this.onlinePlayers = num;
}
},
methods: {
setUsername(e){
if (this.username.trim().length > 0){
this.didSetUsername = true
this.$socket.emit('set_username', this.username)
e.preventDefault();
getHelp() {
this.showHelp = !this.showHelp
// window.open(`${window.location.origin}/help`, '_blank')
},
storeLangPref() {
localStorage.setItem('lang', this.$i18n.locale);
document.documentElement.lang = this.$i18n.locale;
},
update() {
this.showUpdateUI = false;
// Make sure we only send a 'skip waiting' message if the SW is waiting
if (!this.registration || !this.registration.waiting) return
// Send message to SW to skip the waiting and activate the new SW
this.registration.waiting.postMessage({ type: 'SKIP_WAITING' })
},
changeBackend(suggestion) {
this.$socket.disconnect();
window.localStorage.setItem('connect-dev', suggestion.url);
window.location.reload();
},
resetConnection() {
this.$socket.disconnect();
window.localStorage.removeItem('connect-dev');
window.navigation.reload();
},
detectColorScheme() {
if(localStorage.getItem("theme")){
this.theme = localStorage.getItem("theme")
console.log("Found theme preference: " + this.theme)
} else if(!window.matchMedia) {
console.log("Auto theme not supported")
} else if(window.matchMedia("(prefers-color-scheme: dark)").matches) {
console.log("Prefers dark mode")
this.theme = "dark";
}
var style = getComputedStyle(document.body);
document.querySelector("meta[name='theme-color']").setAttribute("content", style.getPropertyValue('--bg-color'));
},
joinDiscord() {
window.open('https://discord.gg/Dr58dZ2na8', '_blank');
},
cancelReport(){
this.sending_report = false
},
sendReport(text){
if (text.trim().length > 0){
this.sending_report = false
this.$socket.emit('report', text)
}
},
getLobbyCard(lobby) {
return {
name: lobby.name,
icon: "💥",
number: `${lobby.players}🤠`,
is_equipment: true,
}
},
createLobby(e) {
if (this.lobbyName.trim().length > 0) {
this.$socket.emit('create_room', this.lobbyName)
}
e.preventDefault();
},
joinLobby(lobby) {
this.$socket.emit('join_room', lobby.name)
},
init() {
location.reload();
},
updateAvailable(event) {
this.registration = event.detail
this.showUpdateUI = true
}
},
watch: {
theme() {
document.documentElement.setAttribute("data-theme", this.theme);
localStorage.setItem('theme', this.theme);
var style = getComputedStyle(document.body);
document.querySelector("meta[name='theme-color']").setAttribute("content", style.getPropertyValue('--bg-color'));
}
},
mounted() {
if (localStorage.getItem('lang')) {
this.$i18n.locale = localStorage.getItem('lang');
document.documentElement.lang = this.$i18n.locale;
} else {
let userLang = navigator.language || navigator.userLanguage;
if (['it', 'en'].indexOf(userLang) == -1)
userLang = 'en';
this.$i18n.locale = userLang.split('-')[0]
}
if (window.localStorage.getItem('connect-dev')) {
this.connect_dev = window.localStorage.getItem('connect-dev')
}
this.detectColorScheme()
if (window.location.origin.indexOf('localhost') !== -1) return;
datadogRum.init({
applicationId: '076b1a5e-16a9-44eb-b320-27afd32c57a5',
clientToken: 'pub1cc4d0d6ea0a7235aa1eab86e7a192d4',
site: 'datadoghq.com',
version: document.getElementsByTagName("html")[0].getAttribute("data-build-timestamp-utc").replace(/[-|:|T]/g,'.').substring(0,16),
service:'bang-frontend',
sessionSampleRate: 100,
sessionReplaySampleRate: 100,
trackUserInteractions: true,
trackResources: true, //non so cosa faccia, proviamo
trackLongTasks: true, //non so cosa faccia, proviamo
defaultPrivacyLevel: 'allow',
enableExperimentalFeatures: ['clickmap'],
proxyUrl: (Vue.config.devtools ? `http://${window.location.hostname}:5001` : window.location.origin) + '/ddproxy',
});
datadogRum.setUser({name: localStorage.getItem('username')})
datadogRum.startSessionReplayRecording();
},
created() {
document.addEventListener('swUpdated', this.updateAvailable, { once: true })
if (this.$workbox) {
this.$workbox.addEventListener("waiting", () => {
this.showUpdateUI = true;
});
}
}
}
</script>
<style>
@import '../node_modules/pretty-checkbox/dist/pretty-checkbox.css';
html {
scroll-behavior: smooth;
}
#app {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
@ -139,6 +221,12 @@ export default {
-ms-user-select: none; /* Internet Explorer 10 and later */
user-select: none; /* Likely future */
}
.selectable {
-webkit-user-select: text !important; /* Chrome all and Safari all */
-moz-user-select: text !important; /* Firefox all */
-ms-user-select: text !important; /* Internet Explorer 10 and later */
user-select: text !important; /* Likely future */
}
#logo {
margin-top: 60pt;
margin-bottom: 60pt !important;
@ -147,10 +235,17 @@ export default {
#app {
margin: 4pt;
margin-top: -16pt;
zoom: 0.8;
zoom: 0.75;
}
#lang,#theme{
max-width: 26pt;
min-width: 0;
padding: 0;
padding-left: 4px;
word-spacing: 20pt;
}
}
h1,h2,h3,h4,p,span{
h1,h2,h3,h4,p,span,b,label{
font-family: Avenir, Helvetica, Arial, sans-serif;
}
.center-stuff {
@ -161,62 +256,105 @@ h1,h2,h3,h4,p,span{
text-align: center;
}
.list-enter-active, .list-leave-active {
transition: all 0.5s;
transition: all 0.5s;
}
.list-enter, .list-leave-to /* .list-leave-active below version 2.1.8 */ {
opacity: 0;
transform: translateY(30px);
opacity: 0;
transform: translateY(30px);
}
.fade-enter-active, .fade-leave-active {
transition: opacity 0.25s ease-out;
transition: opacity 0.25s ease-out;
}
.fade-enter, .fade-leave-to {
opacity: 0;
opacity: 0;
}
.bounce-enter-active, .bounce-leave-active {
animation: bounce-in .5s;
animation: bounce-in .5s;
}
.fade-enter, .bounce-leave-to {
animation: bounce-out .5s;
animation: bounce-out .5s;
}
@keyframes bounce-in {
0% {
transform: scale(0);
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(1);
}
0% {
transform: scale(0);
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(1);
}
}
@keyframes bounce-out {
0% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(0);
}
0% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(0);
}
}
input {
border: 2px solid;
border-radius: 4px;
font-size: 1rem;
margin: 0.25rem;
min-width: 125px;
padding: 0.5rem;
transition: border-color 0.5s ease-out;
input, select {
border: 2px solid;
border-radius: 4px;
font-size: 1rem;
margin: 0.25rem;
min-width: 125px;
padding: 0.5rem;
transition: border-color 0.5s ease-out;
}
@media (prefers-color-scheme: dark) {
:root, #app, input {
background-color: #181a1b;
color: rgb(174, 194, 211);
}
input:disabled {
opacity: 0.5;
}
:root {
--font-color: #2c3e50;
--bg-color: white;
--muted-color: #ccc;
}
[data-theme="dark"] {
--font-color: rgb(174, 194, 211);
--bg-color: #181a1b;
}
[data-theme="black"] {
--font-color: rgb(174, 194, 211);
--bg-color: #000000;
}
[data-theme="sepia"] {
--font-color: rgb(54, 43, 33);
--bg-color: #e7d6bb;
--muted-color: rgba(54, 43, 33, 0.5);
}
[data-theme="grayscale"] {
--font-color: rgb(66, 66, 66);
--bg-color: #e2e0e0;
--muted-color: rgba(66, 66, 66, 0.5);
}
html, #app, input, select {
background-color: var(--bg-color);
color: var(--font-color);
}
.btn {
background-color: var(--bg-color);
color: var(--font-color);
border: 2px solid var(--font-color);
border-radius: 12pt;
cursor: pointer;
transition: all 0.13s ease-in-out;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
.btn:hover:not([disabled]) {
background-color: var(--font-color); /* Green */
color: var(--bg-color);
}
.btn:disabled {
cursor: not-allowed;
}
</style>

Some files were not shown because too many files have changed in this diff Show More