From 67e40bc2778e23a535467e8b147294f44e28640b Mon Sep 17 00:00:00 2001 From: Monkey-bored Date: Thu, 1 Feb 2024 18:08:29 +0200 Subject: [PATCH] [#24] Made it so the game restarts after a win --- development/code/Game.ts | 1 + development/code/logic/rules/CoupRule.ts | 2 +- development/code/logic/rules/EmptyPocketsRule.ts | 2 +- development/code/logic/rules/ExperienceOnKillRule.ts | 2 +- development/code/logic/rules/FirstBloodRule.ts | 2 +- development/code/logic/rules/FriendlyFireRule.ts | 2 +- development/code/logic/rules/PiecesCanFallOffTheBoardRule.ts | 2 +- development/code/logic/rules/WithAgeComesWisdomRule.ts | 2 +- 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/development/code/Game.ts b/development/code/Game.ts index 166eac88..f629db21 100644 --- a/development/code/Game.ts +++ b/development/code/Game.ts @@ -88,6 +88,7 @@ function endTurn() { setTimeout(() => { if (winner !== '') { showWinningAlert(winner); + window.location.reload(); } }, 10); } diff --git a/development/code/logic/rules/CoupRule.ts b/development/code/logic/rules/CoupRule.ts index 7c74c3ca..ba6f46a4 100644 --- a/development/code/logic/rules/CoupRule.ts +++ b/development/code/logic/rules/CoupRule.ts @@ -41,4 +41,4 @@ export class CoupRule extends BaseRule { super(description, isRevealed, condition, onTrigger); } -} \ No newline at end of file +} diff --git a/development/code/logic/rules/EmptyPocketsRule.ts b/development/code/logic/rules/EmptyPocketsRule.ts index f46ba5e7..24dad598 100644 --- a/development/code/logic/rules/EmptyPocketsRule.ts +++ b/development/code/logic/rules/EmptyPocketsRule.ts @@ -26,4 +26,4 @@ export class EmptyPocketsRule extends BaseRule { super(description, isRevealed, condition, onTrigger); } -} \ No newline at end of file +} diff --git a/development/code/logic/rules/ExperienceOnKillRule.ts b/development/code/logic/rules/ExperienceOnKillRule.ts index 59c64e6d..4459f636 100644 --- a/development/code/logic/rules/ExperienceOnKillRule.ts +++ b/development/code/logic/rules/ExperienceOnKillRule.ts @@ -14,4 +14,4 @@ export class ExperienceOnKillRule extends BaseRule { super(description, isRevealed, condition, onTrigger); } -} \ No newline at end of file +} diff --git a/development/code/logic/rules/FirstBloodRule.ts b/development/code/logic/rules/FirstBloodRule.ts index c1842079..331b2eae 100644 --- a/development/code/logic/rules/FirstBloodRule.ts +++ b/development/code/logic/rules/FirstBloodRule.ts @@ -14,4 +14,4 @@ export class FirstBloodRule extends BaseRule { super(description, isRevealed, condition, onTrigger); } -} \ No newline at end of file +} diff --git a/development/code/logic/rules/FriendlyFireRule.ts b/development/code/logic/rules/FriendlyFireRule.ts index c790677f..29289827 100644 --- a/development/code/logic/rules/FriendlyFireRule.ts +++ b/development/code/logic/rules/FriendlyFireRule.ts @@ -14,4 +14,4 @@ export class FriendlyFireRule extends BaseRule { super(description, isRevealed, condition, onTrigger); } -} \ No newline at end of file +} diff --git a/development/code/logic/rules/PiecesCanFallOffTheBoardRule.ts b/development/code/logic/rules/PiecesCanFallOffTheBoardRule.ts index 2340fde0..2404e360 100644 --- a/development/code/logic/rules/PiecesCanFallOffTheBoardRule.ts +++ b/development/code/logic/rules/PiecesCanFallOffTheBoardRule.ts @@ -14,4 +14,4 @@ export class PiecesCanFallOffTheBoardRule extends BaseRule { super(description, isRevealed, condition, onTrigger); } -} \ No newline at end of file +} diff --git a/development/code/logic/rules/WithAgeComesWisdomRule.ts b/development/code/logic/rules/WithAgeComesWisdomRule.ts index a3fbcc2f..5f6b545e 100644 --- a/development/code/logic/rules/WithAgeComesWisdomRule.ts +++ b/development/code/logic/rules/WithAgeComesWisdomRule.ts @@ -16,4 +16,4 @@ export class WithAgeComesWisdomRule extends BaseRule { super(description, isRevealed, condition, onTrigger); } -} \ No newline at end of file +}