-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(game-queue): game initial upcoming night plays (#70)
- Loading branch information
1 parent
4df092f
commit d457b02
Showing
114 changed files
with
22,575 additions
and
8,836 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ants/composition-game-options.constant.ts → ...ions/composition-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ptions/constants/game-options.constant.ts → ...nts/game-options/game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...-options/ancient-game-options.constant.ts → ...-options/ancient-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tions/bear-tamer-game-options.constant.ts → ...tions/bear-tamer-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ons/big-bad-wolf-game-options.constant.ts → ...ons/big-bad-wolf-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...options/dog-wolf-game-options.constant.ts → ...options/dog-wolf-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...game-options/fox-game-options.constant.ts → ...game-options/fox-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...me-options/guard-game-options.constant.ts → ...me-options/guard-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...me-options/idiot-game-options.constant.ts → ...me-options/idiot-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ions/little-girl-game-options.constant.ts → ...ions/little-girl-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tions/pied-piper-game-options.constant.ts → ...tions/pied-piper-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...me-options/raven-game-options.constant.ts → ...me-options/raven-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...me-options/roles-game-options.constant.ts → ...me-options/roles-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ame-options/seer-game-options.constant.ts → ...ame-options/seer-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...sheriff-election-game-options.constant.ts → ...sheriff-election-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...-options/sheriff-game-options.constant.ts → ...-options/sheriff-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...stuttering-judge-game-options.constant.ts → ...stuttering-judge-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ions/thief-judge-game-options.constant.ts → ...ions/thief-judge-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/three-brothers-game-options.constant.ts → ...s/three-brothers-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ions/two-sisters-game-options.constant.ts → ...ions/two-sisters-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/white-werewolf-game-options.constant.ts → ...s/white-werewolf-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tions/wild-child-game-options.constant.ts → ...tions/wild-child-game-options.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
import type { ApiPropertyOptions } from "@nestjs/swagger"; | ||
import { ROLE_NAMES } from "../../role/enums/role.enum"; | ||
import { GAME_PLAY_ACTIONS } from "../enums/game-play.enum"; | ||
import { PLAYER_GROUPS } from "../enums/player.enum"; | ||
import type { GamePlay } from "../schemas/game-play.schema"; | ||
import { gameSourceValues } from "./game.constant"; | ||
|
||
const gamePlayApiProperties: Record<keyof GamePlay, ApiPropertyOptions> = Object.freeze({ | ||
source: { | ||
description: "Which role or group of people need to perform this action", | ||
enum: gameSourceValues, | ||
}, | ||
action: { | ||
description: "What action need to be performed for this play", | ||
example: GAME_PLAY_ACTIONS.VOTE, | ||
}, | ||
cause: { description: "Why this play needs to be performed" }, | ||
}); | ||
|
||
const gamePlaysNightOrder: readonly (GamePlay & { isFirstNightOnly?: boolean })[] = Object.freeze([ | ||
{ | ||
source: PLAYER_GROUPS.ALL, | ||
action: GAME_PLAY_ACTIONS.VOTE, | ||
isFirstNightOnly: true, | ||
}, | ||
{ | ||
source: ROLE_NAMES.THIEF, | ||
action: GAME_PLAY_ACTIONS.CHOOSE_CARD, | ||
isFirstNightOnly: true, | ||
}, | ||
{ | ||
source: ROLE_NAMES.DOG_WOLF, | ||
action: GAME_PLAY_ACTIONS.CHOOSE_SIDE, | ||
isFirstNightOnly: true, | ||
}, | ||
{ | ||
source: ROLE_NAMES.CUPID, | ||
action: GAME_PLAY_ACTIONS.CHARM, | ||
isFirstNightOnly: true, | ||
}, | ||
{ | ||
source: ROLE_NAMES.SEER, | ||
action: GAME_PLAY_ACTIONS.LOOK, | ||
}, | ||
{ | ||
source: ROLE_NAMES.FOX, | ||
action: GAME_PLAY_ACTIONS.SNIFF, | ||
}, | ||
{ | ||
source: PLAYER_GROUPS.LOVERS, | ||
action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, | ||
isFirstNightOnly: true, | ||
}, | ||
{ | ||
source: ROLE_NAMES.STUTTERING_JUDGE, | ||
action: GAME_PLAY_ACTIONS.CHOOSE_SIGN, | ||
isFirstNightOnly: true, | ||
}, | ||
{ | ||
source: ROLE_NAMES.TWO_SISTERS, | ||
action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, | ||
}, | ||
{ | ||
source: ROLE_NAMES.THREE_BROTHERS, | ||
action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, | ||
}, | ||
{ | ||
source: ROLE_NAMES.WILD_CHILD, | ||
action: GAME_PLAY_ACTIONS.CHOOSE_MODEL, | ||
isFirstNightOnly: true, | ||
}, | ||
{ | ||
source: ROLE_NAMES.RAVEN, | ||
action: GAME_PLAY_ACTIONS.MARK, | ||
}, | ||
{ | ||
source: ROLE_NAMES.GUARD, | ||
action: GAME_PLAY_ACTIONS.PROTECT, | ||
}, | ||
{ | ||
source: PLAYER_GROUPS.WEREWOLVES, | ||
action: GAME_PLAY_ACTIONS.EAT, | ||
}, | ||
{ | ||
source: ROLE_NAMES.WHITE_WEREWOLF, | ||
action: GAME_PLAY_ACTIONS.EAT, | ||
}, | ||
{ | ||
source: ROLE_NAMES.BIG_BAD_WOLF, | ||
action: GAME_PLAY_ACTIONS.EAT, | ||
}, | ||
{ | ||
source: ROLE_NAMES.WITCH, | ||
action: GAME_PLAY_ACTIONS.USE_POTIONS, | ||
}, | ||
{ | ||
source: ROLE_NAMES.PIED_PIPER, | ||
action: GAME_PLAY_ACTIONS.CHARM, | ||
}, | ||
{ | ||
source: PLAYER_GROUPS.CHARMED, | ||
action: GAME_PLAY_ACTIONS.MEET_EACH_OTHER, | ||
}, | ||
]); | ||
|
||
const sheriffElectionPlay: GamePlay = Object.freeze({ | ||
source: PLAYER_GROUPS.ALL, | ||
action: GAME_PLAY_ACTIONS.ELECT_SHERIFF, | ||
}); | ||
|
||
export { gamePlayApiProperties, gamePlaysNightOrder, sheriffElectionPlay }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/player-attribute-activation.constant.ts → ...e/player-attribute-activation.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 3 additions & 5 deletions
8
...te/constants/player-attribute.constant.ts → ...er-attribute/player-attribute.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/modules/game/constants/player/player-death.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import type { ApiPropertyOptions } from "@nestjs/swagger"; | ||
import type { PlayerDeath } from "../../schemas/player/player-death.schema"; | ||
import { gameSourceValues } from "../game.constant"; | ||
|
||
const playerDeathApiProperties: Record<keyof PlayerDeath, ApiPropertyOptions> = Object.freeze({ | ||
source: { | ||
description: "Which entity killed the player", | ||
enum: gameSourceValues, | ||
}, | ||
cause: { description: "Death's cause of the player" }, | ||
}); | ||
|
||
export { playerDeathApiProperties }; |
2 changes: 1 addition & 1 deletion
2
...er-role/constants/player-role.constant.ts → .../constants/player/player-role.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...er-side/constants/player-side.constant.ts → .../constants/player/player-side.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...hemas/player/constants/player.constant.ts → .../game/constants/player/player.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/modules/game/dto/base/game-player/game-player-role/game-player-role.base.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/modules/game/dto/base/game-player/game-player-side/game-player-side.base.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.