-
-
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(interactable-players): interactable players with interactions fo…
…r current game play (#631)
- Loading branch information
1 parent
b4b530e
commit e230b3a
Showing
61 changed files
with
65,642 additions
and
55,051 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
12 changes: 12 additions & 0 deletions
12
...ts/game-play-eligible-targets-boundaries/game-play-eligible-targets-boundaries.factory.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,12 @@ | ||
import { plainToInstance } from "class-transformer"; | ||
|
||
import { GamePlayEligibleTargetsBoundaries } from "@/modules/game/schemas/game-play/game-play-eligible-targets/game-play-eligible-targets-boundaries/game-play-eligible-targets-boundaries.schema"; | ||
|
||
import { toJSON } from "@/shared/misc/helpers/object.helper"; | ||
import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; | ||
|
||
function createGamePlayEligibleTargetsBoundaries(gamePlayEligibleTargetsBoundaries: GamePlayEligibleTargetsBoundaries): GamePlayEligibleTargetsBoundaries { | ||
return plainToInstance(GamePlayEligibleTargetsBoundaries, toJSON(gamePlayEligibleTargetsBoundaries), PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); | ||
} | ||
|
||
export { createGamePlayEligibleTargetsBoundaries }; |
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
12 changes: 12 additions & 0 deletions
12
...s/game-play/game-play-eligible-targets/interactable-player/interactable-player.factory.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,12 @@ | ||
import { plainToInstance } from "class-transformer"; | ||
|
||
import { InteractablePlayer } from "@/modules/game/schemas/game-play/game-play-eligible-targets/interactable-player/interactable-player.schema"; | ||
|
||
import { toJSON } from "@/shared/misc/helpers/object.helper"; | ||
import { PLAIN_TO_INSTANCE_DEFAULT_OPTIONS } from "@/shared/validation/constants/validation.constant"; | ||
|
||
function createInteractablePlayer(interactablePlayer: InteractablePlayer): InteractablePlayer { | ||
return plainToInstance(InteractablePlayer, toJSON(interactablePlayer), PLAIN_TO_INSTANCE_DEFAULT_OPTIONS); | ||
} | ||
|
||
export { createInteractablePlayer }; |
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.