Skip to content

Commit

Permalink
deploy: cec8db0
Browse files Browse the repository at this point in the history
  • Loading branch information
Askaholic committed Feb 8, 2025
1 parent 4951698 commit 3430a14
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 32 deletions.
14 changes: 10 additions & 4 deletions db/typedefs.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,11 @@ <h3>Class variables</h3>
</summary>
<pre><code class="python">@unique
class Victory(Enum):
DEMORALIZATION = 0
DOMINATION = 1
ERADICATION = 2
SANDBOX = 3</code></pre>
DEMORALIZATION = &#34;DEMORALIZATION&#34;
DOMINATION = &#34;DOMINATION&#34;
ERADICATION = &#34;ERADICATION&#34;
SANDBOX = &#34;SANDBOX&#34;
DECAPITATION = &#34;DECAPITATION&#34;</code></pre>
</details>
<div class="desc"><p>An enumeration.</p></div>
<h3>Ancestors</h3>
Expand All @@ -110,6 +111,10 @@ <h3>Ancestors</h3>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="server.db.typedefs.Victory.DECAPITATION"><code class="name">var <span class="ident">DECAPITATION</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="server.db.typedefs.Victory.DEMORALIZATION"><code class="name">var <span class="ident">DEMORALIZATION</span></code></dt>
<dd>
<div class="desc"></div>
Expand Down Expand Up @@ -155,6 +160,7 @@ <h4><code><a title="server.db.typedefs.GameOutcome" href="#server.db.typedefs.Ga
<li>
<h4><code><a title="server.db.typedefs.Victory" href="#server.db.typedefs.Victory">Victory</a></code></h4>
<ul class="">
<li><code><a title="server.db.typedefs.Victory.DECAPITATION" href="#server.db.typedefs.Victory.DECAPITATION">DECAPITATION</a></code></li>
<li><code><a title="server.db.typedefs.Victory.DEMORALIZATION" href="#server.db.typedefs.Victory.DEMORALIZATION">DEMORALIZATION</a></code></li>
<li><code><a title="server.db.typedefs.Victory.DOMINATION" href="#server.db.typedefs.Victory.DOMINATION">DOMINATION</a></code></li>
<li><code><a title="server.db.typedefs.Victory.ERADICATION" href="#server.db.typedefs.Victory.ERADICATION">ERADICATION</a></code></li>
Expand Down
24 changes: 14 additions & 10 deletions games/game.html
Original file line number Diff line number Diff line change
Expand Up @@ -696,10 +696,12 @@ <h2 class="section-title" id="header-classes">Classes</h2>
await self.mark_invalid(ValidityState.UNEVEN_TEAMS_NOT_RANKED)
return

valid_options = {
&#34;Victory&#34;: (Victory.DEMORALIZATION, ValidityState.WRONG_VICTORY_CONDITION)
}
await self._validate_game_options(valid_options)
if self.game_options.get(&#34;Victory&#34;) not in (
Victory.DEMORALIZATION,
Victory.DECAPITATION,
):
await self.mark_invalid(ValidityState.WRONG_VICTORY_CONDITION)
return

async def _validate_game_options(
self,
Expand Down Expand Up @@ -761,7 +763,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
# In some cases, games can be invalidated while running: we check for
# those cases when the game ends and update this record as appropriate.

game_type = str(self.game_options.get(&#34;Victory&#34;).value)
game_type = self.game_options.get(&#34;Victory&#34;)

async with self._db.acquire() as conn:
await conn.execute(
Expand Down Expand Up @@ -2103,7 +2105,7 @@ <h1 id="params">Params</h1>
# In some cases, games can be invalidated while running: we check for
# those cases when the game ends and update this record as appropriate.

game_type = str(self.game_options.get(&#34;Victory&#34;).value)
game_type = self.game_options.get(&#34;Victory&#34;)

async with self._db.acquire() as conn:
await conn.execute(
Expand Down Expand Up @@ -2153,10 +2155,12 @@ <h1 id="params">Params</h1>
await self.mark_invalid(ValidityState.UNEVEN_TEAMS_NOT_RANKED)
return

valid_options = {
&#34;Victory&#34;: (Victory.DEMORALIZATION, ValidityState.WRONG_VICTORY_CONDITION)
}
await self._validate_game_options(valid_options)</code></pre>
if self.game_options.get(&#34;Victory&#34;) not in (
Victory.DEMORALIZATION,
Victory.DECAPITATION,
):
await self.mark_invalid(ValidityState.WRONG_VICTORY_CONDITION)
return</code></pre>
</details>
<div class="desc"><p>A subset of checks that need to be overridden in coop games.</p></div>
</dd>
Expand Down
38 changes: 24 additions & 14 deletions games/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1091,10 +1091,12 @@ <h3>Class variables</h3>
await self.mark_invalid(ValidityState.UNEVEN_TEAMS_NOT_RANKED)
return

valid_options = {
&#34;Victory&#34;: (Victory.DEMORALIZATION, ValidityState.WRONG_VICTORY_CONDITION)
}
await self._validate_game_options(valid_options)
if self.game_options.get(&#34;Victory&#34;) not in (
Victory.DEMORALIZATION,
Victory.DECAPITATION,
):
await self.mark_invalid(ValidityState.WRONG_VICTORY_CONDITION)
return

async def _validate_game_options(
self,
Expand Down Expand Up @@ -1156,7 +1158,7 @@ <h3>Class variables</h3>
# In some cases, games can be invalidated while running: we check for
# those cases when the game ends and update this record as appropriate.

game_type = str(self.game_options.get(&#34;Victory&#34;).value)
game_type = self.game_options.get(&#34;Victory&#34;)

async with self._db.acquire() as conn:
await conn.execute(
Expand Down Expand Up @@ -2498,7 +2500,7 @@ <h1 id="params">Params</h1>
# In some cases, games can be invalidated while running: we check for
# those cases when the game ends and update this record as appropriate.

game_type = str(self.game_options.get(&#34;Victory&#34;).value)
game_type = self.game_options.get(&#34;Victory&#34;)

async with self._db.acquire() as conn:
await conn.execute(
Expand Down Expand Up @@ -2548,10 +2550,12 @@ <h1 id="params">Params</h1>
await self.mark_invalid(ValidityState.UNEVEN_TEAMS_NOT_RANKED)
return

valid_options = {
&#34;Victory&#34;: (Victory.DEMORALIZATION, ValidityState.WRONG_VICTORY_CONDITION)
}
await self._validate_game_options(valid_options)</code></pre>
if self.game_options.get(&#34;Victory&#34;) not in (
Victory.DEMORALIZATION,
Victory.DECAPITATION,
):
await self.mark_invalid(ValidityState.WRONG_VICTORY_CONDITION)
return</code></pre>
</details>
<div class="desc"><p>A subset of checks that need to be overridden in coop games.</p></div>
</dd>
Expand Down Expand Up @@ -3312,10 +3316,11 @@ <h3>Class variables</h3>
</summary>
<pre><code class="python">@unique
class Victory(Enum):
DEMORALIZATION = 0
DOMINATION = 1
ERADICATION = 2
SANDBOX = 3</code></pre>
DEMORALIZATION = &#34;DEMORALIZATION&#34;
DOMINATION = &#34;DOMINATION&#34;
ERADICATION = &#34;ERADICATION&#34;
SANDBOX = &#34;SANDBOX&#34;
DECAPITATION = &#34;DECAPITATION&#34;</code></pre>
</details>
<div class="desc"><p>An enumeration.</p></div>
<h3>Ancestors</h3>
Expand All @@ -3324,6 +3329,10 @@ <h3>Ancestors</h3>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="server.games.Victory.DECAPITATION"><code class="name">var <span class="ident">DECAPITATION</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="server.games.Victory.DEMORALIZATION"><code class="name">var <span class="ident">DEMORALIZATION</span></code></dt>
<dd>
<div class="desc"></div>
Expand Down Expand Up @@ -3577,6 +3586,7 @@ <h4><code><a title="server.games.ValidityState" href="#server.games.ValidityStat
<li>
<h4><code><a title="server.games.Victory" href="#server.games.Victory">Victory</a></code></h4>
<ul class="">
<li><code><a title="server.games.Victory.DECAPITATION" href="#server.games.Victory.DECAPITATION">DECAPITATION</a></code></li>
<li><code><a title="server.games.Victory.DEMORALIZATION" href="#server.games.Victory.DEMORALIZATION">DEMORALIZATION</a></code></li>
<li><code><a title="server.games.Victory.DOMINATION" href="#server.games.Victory.DOMINATION">DOMINATION</a></code></li>
<li><code><a title="server.games.Victory.ERADICATION" href="#server.games.Victory.ERADICATION">ERADICATION</a></code></li>
Expand Down
14 changes: 10 additions & 4 deletions games/typedefs.html
Original file line number Diff line number Diff line change
Expand Up @@ -1525,10 +1525,11 @@ <h3>Class variables</h3>
</summary>
<pre><code class="python">@unique
class Victory(Enum):
DEMORALIZATION = 0
DOMINATION = 1
ERADICATION = 2
SANDBOX = 3</code></pre>
DEMORALIZATION = &#34;DEMORALIZATION&#34;
DOMINATION = &#34;DOMINATION&#34;
ERADICATION = &#34;ERADICATION&#34;
SANDBOX = &#34;SANDBOX&#34;
DECAPITATION = &#34;DECAPITATION&#34;</code></pre>
</details>
<div class="desc"><p>An enumeration.</p></div>
<h3>Ancestors</h3>
Expand All @@ -1537,6 +1538,10 @@ <h3>Ancestors</h3>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="server.games.typedefs.Victory.DECAPITATION"><code class="name">var <span class="ident">DECAPITATION</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="server.games.typedefs.Victory.DEMORALIZATION"><code class="name">var <span class="ident">DEMORALIZATION</span></code></dt>
<dd>
<div class="desc"></div>
Expand Down Expand Up @@ -1718,6 +1723,7 @@ <h4><code><a title="server.games.typedefs.ValidityState" href="#server.games.typ
<li>
<h4><code><a title="server.games.typedefs.Victory" href="#server.games.typedefs.Victory">Victory</a></code></h4>
<ul class="">
<li><code><a title="server.games.typedefs.Victory.DECAPITATION" href="#server.games.typedefs.Victory.DECAPITATION">DECAPITATION</a></code></li>
<li><code><a title="server.games.typedefs.Victory.DEMORALIZATION" href="#server.games.typedefs.Victory.DEMORALIZATION">DEMORALIZATION</a></code></li>
<li><code><a title="server.games.typedefs.Victory.DOMINATION" href="#server.games.typedefs.Victory.DOMINATION">DOMINATION</a></code></li>
<li><code><a title="server.games.typedefs.Victory.ERADICATION" href="#server.games.typedefs.Victory.ERADICATION">ERADICATION</a></code></li>
Expand Down

0 comments on commit 3430a14

Please sign in to comment.