Set scopa targets to their traditional defaults
CI / Build and push docker image (push) Successful in 2m6s
CI / Build and push docker image (push) Successful in 2m6s
Partnership games go to 21: scopone scientifico (the tournament target) and scopa a quattro, while two-player scopa keeps its usual 11. The scopa package resolves the default from the player count and exposes a per variant options_schema default, so the lobby creation form shows the right value without frontend changes.
This commit is contained in:
13 files changed
+94
-30
No files matched your search
@@ -316,6 +316,10 @@ class GameTypesRouteTest(unittest.TestCase):
|
||||
self.assertEqual(4, scopone["min_players"])
|
||||
self.assertEqual(4, scopone["max_players"])
|
||||
self.assertIn("target_score", scopone["options_schema"]["properties"])
|
||||
self.assertEqual(
|
||||
21,
|
||||
scopone["options_schema"]["properties"]["target_score"]["default"],
|
||||
)
|
||||
self.assertIn("napola", scopone["options_schema"]["properties"])
|
||||
self.assertIn(
|
||||
"asso_pigliatutto", scopone["options_schema"]["properties"]
|
||||
@@ -326,6 +330,9 @@ class GameTypesRouteTest(unittest.TestCase):
|
||||
self.assertEqual(2, scopa["min_players"])
|
||||
self.assertEqual(2, scopa["max_players"])
|
||||
self.assertIn("target_score", scopa["options_schema"]["properties"])
|
||||
self.assertEqual(
|
||||
11, scopa["options_schema"]["properties"]["target_score"]["default"]
|
||||
)
|
||||
self.assertIn(
|
||||
"asso_pigliatutto", scopa["options_schema"]["properties"]
|
||||
)
|
||||
@@ -337,6 +344,12 @@ class GameTypesRouteTest(unittest.TestCase):
|
||||
self.assertIn(
|
||||
"target_score", scopa_quattro["options_schema"]["properties"]
|
||||
)
|
||||
self.assertEqual(
|
||||
21,
|
||||
scopa_quattro["options_schema"]["properties"]["target_score"][
|
||||
"default"
|
||||
],
|
||||
)
|
||||
self.assertIn(
|
||||
"asso_pigliatutto", scopa_quattro["options_schema"]["properties"]
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user