From a43a6f9700f6aa40e3b8856e5aa6d535e16cf5f9 Mon Sep 17 00:00:00 2001 From: Askaholic Date: Mon, 1 Jan 2024 22:07:43 +0000 Subject: [PATCH] deploy: cbf1ce16df208bb2952d25b781a91d982d522396 --- games/game.html | 30 ++++++++++++------------------ games/index.html | 20 ++++++++------------ 2 files changed, 20 insertions(+), 30 deletions(-) diff --git a/games/game.html b/games/game.html index 1bc333da8..c1bee0ac5 100644 --- a/games/game.html +++ b/games/game.html @@ -703,16 +703,14 @@

Module server.games.game

""" A subset of checks that need to be overridden in coop games. """ - if None in self.teams or not self.is_even: - await self.mark_invalid(ValidityState.UNEVEN_TEAMS_NOT_RANKED) - return - - # TODO: This validity state seems to be impossible to get because it is - # already covered by UNEVEN_TEAMS_NOT_RANKED above. if len(self.players) < 2: await self.mark_invalid(ValidityState.SINGLE_PLAYER) return + if None in self.teams or not self.is_even: + await self.mark_invalid(ValidityState.UNEVEN_TEAMS_NOT_RANKED) + return + valid_options = { "Victory": (Victory.DEMORALIZATION, ValidityState.WRONG_VICTORY_CONDITION) } @@ -1722,16 +1720,14 @@

Classes

""" A subset of checks that need to be overridden in coop games. """ - if None in self.teams or not self.is_even: - await self.mark_invalid(ValidityState.UNEVEN_TEAMS_NOT_RANKED) - return - - # TODO: This validity state seems to be impossible to get because it is - # already covered by UNEVEN_TEAMS_NOT_RANKED above. if len(self.players) < 2: await self.mark_invalid(ValidityState.SINGLE_PLAYER) return + if None in self.teams or not self.is_even: + await self.mark_invalid(ValidityState.UNEVEN_TEAMS_NOT_RANKED) + return + valid_options = { "Victory": (Victory.DEMORALIZATION, ValidityState.WRONG_VICTORY_CONDITION) } @@ -3160,16 +3156,14 @@

Params

""" A subset of checks that need to be overridden in coop games. """ - if None in self.teams or not self.is_even: - await self.mark_invalid(ValidityState.UNEVEN_TEAMS_NOT_RANKED) - return - - # TODO: This validity state seems to be impossible to get because it is - # already covered by UNEVEN_TEAMS_NOT_RANKED above. if len(self.players) < 2: await self.mark_invalid(ValidityState.SINGLE_PLAYER) return + if None in self.teams or not self.is_even: + await self.mark_invalid(ValidityState.UNEVEN_TEAMS_NOT_RANKED) + return + valid_options = { "Victory": (Victory.DEMORALIZATION, ValidityState.WRONG_VICTORY_CONDITION) } diff --git a/games/index.html b/games/index.html index 0e4904818..308c19c1c 100644 --- a/games/index.html +++ b/games/index.html @@ -1041,16 +1041,14 @@

Class variables

""" A subset of checks that need to be overridden in coop games. """ - if None in self.teams or not self.is_even: - await self.mark_invalid(ValidityState.UNEVEN_TEAMS_NOT_RANKED) - return - - # TODO: This validity state seems to be impossible to get because it is - # already covered by UNEVEN_TEAMS_NOT_RANKED above. if len(self.players) < 2: await self.mark_invalid(ValidityState.SINGLE_PLAYER) return + if None in self.teams or not self.is_even: + await self.mark_invalid(ValidityState.UNEVEN_TEAMS_NOT_RANKED) + return + valid_options = { "Victory": (Victory.DEMORALIZATION, ValidityState.WRONG_VICTORY_CONDITION) } @@ -2479,16 +2477,14 @@

Params

""" A subset of checks that need to be overridden in coop games. """ - if None in self.teams or not self.is_even: - await self.mark_invalid(ValidityState.UNEVEN_TEAMS_NOT_RANKED) - return - - # TODO: This validity state seems to be impossible to get because it is - # already covered by UNEVEN_TEAMS_NOT_RANKED above. if len(self.players) < 2: await self.mark_invalid(ValidityState.SINGLE_PLAYER) return + if None in self.teams or not self.is_even: + await self.mark_invalid(ValidityState.UNEVEN_TEAMS_NOT_RANKED) + return + valid_options = { "Victory": (Victory.DEMORALIZATION, ValidityState.WRONG_VICTORY_CONDITION) }