@nayan-ui/games 1.18.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -191
- package/lib/module/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/lib/module/assets/models/explorer/explorer.glb +0 -0
- package/lib/module/assets/models/explorer/params.json +51 -0
- package/lib/module/assets/models/explorer/source.json +222 -0
- package/lib/module/assets/models/play-with-tua/play-with-tua.glb +0 -0
- package/lib/module/assets/models/play-with-tua/sources.json +141 -0
- package/lib/module/assets/sfx/balloon_pop.wav +0 -0
- package/lib/module/assets/sfx/blocked.wav +0 -0
- package/lib/module/assets/sfx/boing.wav +0 -0
- package/lib/module/assets/sfx/bonus.wav +0 -0
- package/lib/module/assets/sfx/boom.wav +0 -0
- package/lib/module/assets/sfx/bump.wav +0 -0
- package/lib/module/assets/sfx/cannon.wav +0 -0
- package/lib/module/assets/sfx/capture.wav +0 -0
- package/lib/module/assets/sfx/card_flip.wav +0 -0
- package/lib/module/assets/sfx/card_place.wav +0 -0
- package/lib/module/assets/sfx/catch.wav +0 -0
- package/lib/module/assets/sfx/chime.wav +0 -0
- package/lib/module/assets/sfx/chomp.wav +0 -0
- package/lib/module/assets/sfx/chomp_alt.wav +0 -0
- package/lib/module/assets/sfx/clack.wav +0 -0
- package/lib/module/assets/sfx/clang.wav +0 -0
- package/lib/module/assets/sfx/clash.wav +0 -0
- package/lib/module/assets/sfx/click.wav +0 -0
- package/lib/module/assets/sfx/coin.wav +0 -0
- package/lib/module/assets/sfx/combo.wav +0 -0
- package/lib/module/assets/sfx/crash.wav +0 -0
- package/lib/module/assets/sfx/crunch.wav +0 -0
- package/lib/module/assets/sfx/dance.wav +0 -0
- package/lib/module/assets/sfx/deselect.wav +0 -0
- package/lib/module/assets/sfx/dice_roll.wav +0 -0
- package/lib/module/assets/sfx/die.wav +0 -0
- package/lib/module/assets/sfx/draw.wav +0 -0
- package/lib/module/assets/sfx/drop.wav +0 -0
- package/lib/module/assets/sfx/eat.wav +0 -0
- package/lib/module/assets/sfx/engine.wav +0 -0
- package/lib/module/assets/sfx/error.wav +0 -0
- package/lib/module/assets/sfx/flag.wav +0 -0
- package/lib/module/assets/sfx/flap.wav +0 -0
- package/lib/module/assets/sfx/flip_disc.wav +0 -0
- package/lib/module/assets/sfx/footstep_run.wav +0 -0
- package/lib/module/assets/sfx/footstep_walk.wav +0 -0
- package/lib/module/assets/sfx/game_over.wav +0 -0
- package/lib/module/assets/sfx/gate.wav +0 -0
- package/lib/module/assets/sfx/hit.wav +0 -0
- package/lib/module/assets/sfx/hop.wav +0 -0
- package/lib/module/assets/sfx/hurt.wav +0 -0
- package/lib/module/assets/sfx/invalid.wav +0 -0
- package/lib/module/assets/sfx/jump.wav +0 -0
- package/lib/module/assets/sfx/ladder.wav +0 -0
- package/lib/module/assets/sfx/land.wav +0 -0
- package/lib/module/assets/sfx/laugh.wav +0 -0
- package/lib/module/assets/sfx/lose.wav +0 -0
- package/lib/module/assets/sfx/merge.wav +0 -0
- package/lib/module/assets/sfx/miss.wav +0 -0
- package/lib/module/assets/sfx/nitro.wav +0 -0
- package/lib/module/assets/sfx/pew.wav +0 -0
- package/lib/module/assets/sfx/place.wav +0 -0
- package/lib/module/assets/sfx/pling.wav +0 -0
- package/lib/module/assets/sfx/point.wav +0 -0
- package/lib/module/assets/sfx/pop.wav +0 -0
- package/lib/module/assets/sfx/pop_soft.wav +0 -0
- package/lib/module/assets/sfx/power_up.wav +0 -0
- package/lib/module/assets/sfx/reveal.wav +0 -0
- package/lib/module/assets/sfx/robot.wav +0 -0
- package/lib/module/assets/sfx/rotate.wav +0 -0
- package/lib/module/assets/sfx/run_steps.wav +0 -0
- package/lib/module/assets/sfx/select.wav +0 -0
- package/lib/module/assets/sfx/shuffle.wav +0 -0
- package/lib/module/assets/sfx/six.wav +0 -0
- package/lib/module/assets/sfx/slice.wav +0 -0
- package/lib/module/assets/sfx/slide.wav +0 -0
- package/lib/module/assets/sfx/snake.wav +0 -0
- package/lib/module/assets/sfx/snap.wav +0 -0
- package/lib/module/assets/sfx/splash.wav +0 -0
- package/lib/module/assets/sfx/star.wav +0 -0
- package/lib/module/assets/sfx/start.wav +0 -0
- package/lib/module/assets/sfx/swoosh.wav +0 -0
- package/lib/module/assets/sfx/tap.wav +0 -0
- package/lib/module/assets/sfx/thud.wav +0 -0
- package/lib/module/assets/sfx/thunk.wav +0 -0
- package/lib/module/assets/sfx/tick.wav +0 -0
- package/lib/module/assets/sfx/time_up.wav +0 -0
- package/lib/module/assets/sfx/tock.wav +0 -0
- package/lib/module/assets/sfx/walk_steps.wav +0 -0
- package/lib/module/assets/sfx/warning.wav +0 -0
- package/lib/module/assets/sfx/whack.wav +0 -0
- package/lib/module/assets/sfx/whoosh.wav +0 -0
- package/lib/module/assets/sfx/win.wav +0 -0
- package/lib/module/assets/sfx/zap.wav +0 -0
- package/lib/module/assets/textures/ad_bolt.png +0 -0
- package/lib/module/assets/textures/ad_bubbles.png +0 -0
- package/lib/module/assets/textures/ad_chevrons.png +0 -0
- package/lib/module/assets/textures/asphalt.png +0 -0
- package/lib/module/assets/textures/bark.jpg +0 -0
- package/lib/module/assets/textures/explorer-atlas.png +0 -0
- package/lib/module/assets/textures/facade.png +0 -0
- package/lib/module/assets/textures/grass.png +0 -0
- package/lib/module/assets/textures/leaves.png +0 -0
- package/lib/module/assets/textures/limestone.jpg +0 -0
- package/lib/module/assets/textures/meadow.jpg +0 -0
- package/lib/module/assets/textures/nature-sources.json +87 -0
- package/lib/module/assets/textures/pine.png +0 -0
- package/lib/module/assets/textures/river.jpg +0 -0
- package/lib/module/assets/textures/soft_glow.png +0 -0
- package/lib/module/games/arrows/Arrows.js +1 -1
- package/lib/module/games/arrows/ArrowsConstants.js +1 -1
- package/lib/module/games/arrows/ArrowsGame.js +1 -0
- package/lib/module/games/arrows/ArrowsScene.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterGame.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterPhysics.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterScene.js +1 -0
- package/lib/module/games/bike-racing/BikeMeshes.js +1 -0
- package/lib/module/games/bike-racing/BikeRacing.js +1 -1
- package/lib/module/games/bike-racing/BikeRacingConstants.js +1 -1
- package/lib/module/games/bike-racing/BikeRacingGame.js +1 -0
- package/lib/module/games/bike-racing/BikeRacingScene.js +1 -0
- package/lib/module/games/block-blast/BlockBlast.js +1 -1
- package/lib/module/games/block-blast/BlockBlastConstants.js +1 -1
- package/lib/module/games/block-blast/BlockBlastGame.js +1 -0
- package/lib/module/games/block-blast/BlockBlastScene.js +1 -0
- package/lib/module/games/block-breaker/BlockBreaker.js +1 -1
- package/lib/module/games/block-breaker/BlockBreakerConstants.js +1 -1
- package/lib/module/games/block-breaker/BlockBreakerGame.js +1 -0
- package/lib/module/games/block-breaker/BlockBreakerScene.js +1 -0
- package/lib/module/games/bluk/Bluk.js +1 -1
- package/lib/module/games/bluk/BlukConstants.js +1 -1
- package/lib/module/games/bluk/BlukGame.js +1 -0
- package/lib/module/games/bluk/BlukRules.js +1 -0
- package/lib/module/games/bluk/BlukScene.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooter.js +1 -1
- package/lib/module/games/bubble-shooter/BubbleShooterConstants.js +1 -1
- package/lib/module/games/bubble-shooter/BubbleShooterGame.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterScene.js +1 -0
- package/lib/module/games/candy-crush/CandyCrush.js +1 -1
- package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -1
- package/lib/module/games/candy-crush/CandyCrushGame.js +1 -0
- package/lib/module/games/candy-crush/CandyCrushScene.js +1 -0
- package/lib/module/games/car-racing/CarMeshes.js +1 -0
- package/lib/module/games/car-racing/CarRacing.js +1 -1
- package/lib/module/games/car-racing/CarRacingConstants.js +1 -1
- package/lib/module/games/car-racing/CarRacingFacade.js +1 -0
- package/lib/module/games/car-racing/CarRacingGame.js +1 -0
- package/lib/module/games/car-racing/CarRacingScene.js +1 -0
- package/lib/module/games/car-racing/CarRacingScenery.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRun.js +1 -1
- package/lib/module/games/chameleon-run/ChameleonRunBackdrop.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunConstants.js +1 -1
- package/lib/module/games/chameleon-run/ChameleonRunGame.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunMeshes.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunRules.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunScene.js +1 -0
- package/lib/module/games/checkers/Checkers.js +1 -1
- package/lib/module/games/checkers/CheckersAI.js +1 -0
- package/lib/module/games/checkers/CheckersConstants.js +1 -1
- package/lib/module/games/checkers/CheckersGame.js +1 -0
- package/lib/module/games/checkers/CheckersRules.js +1 -0
- package/lib/module/games/checkers/CheckersScene.js +1 -0
- package/lib/module/games/color-switch/ColorSwitch.js +1 -1
- package/lib/module/games/color-switch/ColorSwitchConstants.js +1 -1
- package/lib/module/games/color-switch/ColorSwitchGame.js +1 -0
- package/lib/module/games/color-switch/ColorSwitchScene.js +1 -0
- package/lib/module/games/colors-sort/ColorsSort.js +1 -1
- package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -1
- package/lib/module/games/colors-sort/ColorsSortGame.js +1 -0
- package/lib/module/games/colors-sort/ColorsSortScene.js +1 -0
- package/lib/module/games/connect-em-all/ConnectEmAll.js +1 -1
- package/lib/module/games/connect-em-all/ConnectEmAllConstants.js +1 -1
- package/lib/module/games/connect-em-all/ConnectEmAllGame.js +1 -0
- package/lib/module/games/connect-em-all/ConnectEmAllScene.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoad.js +1 -1
- package/lib/module/games/crossy-road/CrossyRoadCamera.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadConstants.js +1 -1
- package/lib/module/games/crossy-road/CrossyRoadGame.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadMeshes.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadPerson.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadRules.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadScene.js +1 -0
- package/lib/module/games/dino-jump/DinoJump.js +1 -1
- package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -1
- package/lib/module/games/dino-jump/DinoJumpGame.js +1 -0
- package/lib/module/games/dino-jump/DinoJumpScene.js +1 -0
- package/lib/module/games/dots-and-boxes/DotsAndBoxes.js +1 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesConstants.js +1 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesGame.js +1 -0
- package/lib/module/games/dots-and-boxes/DotsAndBoxesScene.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticks.js +1 -1
- package/lib/module/games/falling-sticks/FallingSticksConstants.js +1 -1
- package/lib/module/games/falling-sticks/FallingSticksGame.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticksRules.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticksScene.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumber.js +1 -1
- package/lib/module/games/find-different-number/FindDifferentNumberConstants.js +1 -1
- package/lib/module/games/find-different-number/FindDifferentNumberGame.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumberRules.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumberScene.js +1 -0
- package/lib/module/games/flappy-bird/FlappyBird.js +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdGame.js +1 -0
- package/lib/module/games/flappy-bird/FlappyBirdScene.js +1 -0
- package/lib/module/games/fruit-merger/FruitMerger.js +1 -1
- package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -1
- package/lib/module/games/fruit-merger/FruitMergerGame.js +1 -0
- package/lib/module/games/fruit-merger/FruitMergerRules.js +1 -0
- package/lib/module/games/fruit-merger/FruitMergerScene.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinja.js +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaGame.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinjaScene.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinjaWorld.js +1 -0
- package/lib/module/games/game-2048/Game2048.js +1 -1
- package/lib/module/games/game-2048/Game2048Constants.js +1 -1
- package/lib/module/games/game-2048/Game2048Game.js +1 -0
- package/lib/module/games/game-2048/Game2048Rules.js +1 -0
- package/lib/module/games/game-2048/Game2048Scene.js +1 -0
- package/lib/module/games/knife-hit/KnifeHit.js +1 -1
- package/lib/module/games/knife-hit/KnifeHitConstants.js +1 -1
- package/lib/module/games/knife-hit/KnifeHitGame.js +1 -0
- package/lib/module/games/knife-hit/KnifeHitScene.js +1 -0
- package/lib/module/games/ludo-king/LudoKing.js +1 -1
- package/lib/module/games/ludo-king/LudoKingConstants.js +1 -1
- package/lib/module/games/ludo-king/LudoKingGame.js +1 -0
- package/lib/module/games/ludo-king/LudoKingRules.js +1 -0
- package/lib/module/games/ludo-king/LudoKingScene.js +1 -0
- package/lib/module/games/maze-runner/MazeRunner.js +1 -1
- package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -1
- package/lib/module/games/maze-runner/MazeRunnerGame.js +1 -0
- package/lib/module/games/maze-runner/MazeRunnerRules.js +1 -0
- package/lib/module/games/maze-runner/MazeRunnerScene.js +1 -0
- package/lib/module/games/memory-match/MemoryMatch.js +1 -1
- package/lib/module/games/memory-match/MemoryMatchConstants.js +1 -1
- package/lib/module/games/memory-match/MemoryMatchGame.js +1 -0
- package/lib/module/games/memory-match/MemoryMatchRules.js +1 -0
- package/lib/module/games/memory-match/MemoryMatchScene.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeper.js +1 -1
- package/lib/module/games/mine-sweeper/MineSweeperConstants.js +1 -1
- package/lib/module/games/mine-sweeper/MineSweeperGame.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeperRules.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeperScene.js +1 -0
- package/lib/module/games/mob-control/MobControl.js +1 -1
- package/lib/module/games/mob-control/MobControlConstants.js +1 -1
- package/lib/module/games/mob-control/MobControlGame.js +1 -0
- package/lib/module/games/mob-control/MobControlMeshes.js +1 -0
- package/lib/module/games/mob-control/MobControlRenderer.js +1 -0
- package/lib/module/games/mob-control/MobControlRules.js +1 -0
- package/lib/module/games/mob-control/MobControlScene.js +1 -0
- package/lib/module/games/number-search/NumberSearch.js +1 -1
- package/lib/module/games/number-search/NumberSearchNumbers.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBolts.js +1 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsConstants.js +1 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsGame.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsRules.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsScene.js +1 -0
- package/lib/module/games/pac-man/PacMan.js +1 -1
- package/lib/module/games/pac-man/PacManConstants.js +1 -1
- package/lib/module/games/pac-man/PacManGame.js +1 -0
- package/lib/module/games/pac-man/PacManRules.js +1 -0
- package/lib/module/games/pac-man/PacManScene.js +1 -0
- package/lib/module/games/paper-io/PaperIo.js +1 -1
- package/lib/module/games/paper-io/PaperIoConstants.js +1 -1
- package/lib/module/games/paper-io/PaperIoGame.js +1 -0
- package/lib/module/games/paper-io/PaperIoMeshes.js +1 -0
- package/lib/module/games/paper-io/PaperIoRules.js +1 -0
- package/lib/module/games/paper-io/PaperIoScene.js +1 -0
- package/lib/module/games/penguin-run/PenguinMeshes.js +1 -0
- package/lib/module/games/penguin-run/PenguinModel.js +1 -0
- package/lib/module/games/penguin-run/PenguinRun.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunConstants.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunGame.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunScene.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircle.js +1 -1
- package/lib/module/games/perfect-circle/PerfectCircleConstants.js +1 -1
- package/lib/module/games/perfect-circle/PerfectCircleGame.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleRules.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleScene.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnect.js +1 -1
- package/lib/module/games/pipe-connect/PipeConnectConstants.js +1 -1
- package/lib/module/games/pipe-connect/PipeConnectGame.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnectRules.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnectScene.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTua.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaConstants.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaGame.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaModel.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaScene.js +1 -0
- package/lib/module/games/popit-fidget/PopitFidget.js +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetGame.js +1 -0
- package/lib/module/games/popit-fidget/PopitFidgetScene.js +1 -0
- package/lib/module/games/reversi/Reversi.js +1 -1
- package/lib/module/games/reversi/ReversiConstants.js +1 -1
- package/lib/module/games/reversi/ReversiGame.js +1 -0
- package/lib/module/games/reversi/ReversiRules.js +1 -0
- package/lib/module/games/reversi/ReversiScene.js +1 -0
- package/lib/module/games/search-grid/SearchGrid.js +1 -0
- package/lib/module/games/search-grid/SearchGridConstants.js +1 -0
- package/lib/module/games/search-grid/SearchGridGame.js +1 -0
- package/lib/module/games/search-grid/SearchGridScene.js +1 -0
- package/lib/module/games/shared/BackdropCard.js +1 -0
- package/lib/module/games/shared/EngineBackdrop.js +1 -0
- package/lib/module/games/shared/EngineBlasts.js +1 -0
- package/lib/module/games/shared/EngineBlocks.js +1 -0
- package/lib/module/games/shared/EngineControlText.js +1 -0
- package/lib/module/games/shared/EngineDice.js +1 -0
- package/lib/module/games/shared/EngineFootprint.js +1 -0
- package/lib/module/games/shared/EngineFruits.js +1 -0
- package/lib/module/games/shared/EngineGameLoader.js +1 -0
- package/lib/module/games/shared/EngineGameScreen.js +1 -0
- package/lib/module/games/shared/EngineGameWidth.js +1 -0
- package/lib/module/games/shared/EngineGameWidth.web.js +1 -0
- package/lib/module/games/shared/EngineGlyphs.js +1 -0
- package/lib/module/games/shared/EngineHud.js +1 -0
- package/lib/module/games/shared/EngineLoading.js +1 -0
- package/lib/module/games/shared/EngineMeadow.js +1 -0
- package/lib/module/games/shared/EngineMeshCache.js +1 -0
- package/lib/module/games/shared/EngineMeshes.js +1 -0
- package/lib/module/games/shared/EngineRacingChase.js +1 -0
- package/lib/module/games/shared/EngineRacingHandling.js +1 -0
- package/lib/module/games/shared/EngineReadyContext.js +1 -0
- package/lib/module/games/shared/EngineTilt.js +1 -0
- package/lib/module/games/shared/EngineTouchSurface.js +1 -0
- package/lib/module/games/shared/EngineUtils.js +1 -0
- package/lib/module/games/shared/GameActivity.js +1 -0
- package/lib/module/games/shared/GameLoading.js +1 -0
- package/lib/module/games/shared/GameLoadingTransition.js +1 -0
- package/lib/module/games/shared/ProceduralCacheVersion.js +1 -0
- package/lib/module/games/shared/useEngineGame.js +1 -0
- package/lib/module/games/shared/useGameResource.js +1 -0
- package/lib/module/games/shared/useLiveState.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersGame.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersRules.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersScene.js +1 -0
- package/lib/module/games/snake-3d/Snake3D.js +1 -1
- package/lib/module/games/snake-3d/Snake3DConstants.js +1 -1
- package/lib/module/games/snake-3d/Snake3DGame.js +1 -0
- package/lib/module/games/snake-3d/Snake3DMotion.js +1 -0
- package/lib/module/games/snake-3d/Snake3DRules.js +1 -0
- package/lib/module/games/snake-3d/Snake3DScene.js +1 -0
- package/lib/module/games/snakes-and-ladders/SnakesAndLadders.js +1 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersConstants.js +1 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersGame.js +1 -0
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersScene.js +1 -0
- package/lib/module/games/space-fighter/SpaceFighter.js +1 -1
- package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -1
- package/lib/module/games/space-fighter/SpaceFighterGame.js +1 -0
- package/lib/module/games/space-fighter/SpaceFighterScene.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaire.js +1 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireConstants.js +1 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireGame.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaireRules.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaireScene.js +1 -0
- package/lib/module/games/stack-tower/StackTower.js +1 -1
- package/lib/module/games/stack-tower/StackTowerConstants.js +1 -1
- package/lib/module/games/stack-tower/StackTowerGame.js +1 -0
- package/lib/module/games/stack-tower/StackTowerScene.js +1 -0
- package/lib/module/games/sudoku/Sudoku.js +1 -1
- package/lib/module/games/sudoku/SudokuConstants.js +1 -1
- package/lib/module/games/sudoku/SudokuGame.js +1 -0
- package/lib/module/games/sudoku/SudokuRules.js +1 -0
- package/lib/module/games/sudoku/SudokuScene.js +1 -0
- package/lib/module/games/tangram/Tangram.js +1 -1
- package/lib/module/games/tangram/TangramConstants.js +1 -1
- package/lib/module/games/tangram/TangramGame.js +1 -0
- package/lib/module/games/tangram/TangramRules.js +1 -0
- package/lib/module/games/tangram/TangramScene.js +1 -0
- package/lib/module/games/tank-1990/Tank1990.js +1 -1
- package/lib/module/games/tank-1990/Tank1990Constants.js +1 -1
- package/lib/module/games/tank-1990/Tank1990Game.js +1 -0
- package/lib/module/games/tank-1990/Tank1990Rules.js +1 -0
- package/lib/module/games/tank-1990/Tank1990Scene.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToe.js +1 -1
- package/lib/module/games/tic-tac-toe/TicTacToeConstants.js +1 -1
- package/lib/module/games/tic-tac-toe/TicTacToeGame.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToeRules.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToeScene.js +1 -0
- package/lib/module/games/tile-home/TileHome.js +1 -1
- package/lib/module/games/tile-home/TileHomeConstants.js +1 -1
- package/lib/module/games/tile-home/TileHomeGame.js +1 -0
- package/lib/module/games/tile-home/TileHomeScene.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHunt.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntConstants.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntControls.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntGame.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntMeshes.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntModel.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntRules.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntScene.js +1 -0
- package/lib/module/games/whack-a-mole/WhackAMole.js +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleGame.js +1 -0
- package/lib/module/games/whack-a-mole/WhackAMoleScene.js +1 -0
- package/lib/module/games/word-search/WordSearch.js +1 -1
- package/lib/module/games/word-search/WordSearchWords.js +1 -0
- package/lib/module/helpers/GamePatternData.js +1 -0
- package/lib/module/helpers/GameSettingsModal.js +1 -1
- package/lib/module/helpers/GameTheme.js +1 -0
- package/lib/module/helpers/IconPaths.js +1 -0
- package/lib/module/helpers/index.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/services/GameAssetLoader.js +1 -0
- package/lib/module/services/GameAssets.js +1 -0
- package/lib/module/services/GameLoaders.js +1 -0
- package/lib/module/services/GamesConstants.js +1 -1
- package/lib/module/services/GamesMetadata.js +1 -1
- package/lib/module/services/GamesService.js +1 -1
- package/lib/module/services/HapticsService.js +1 -1
- package/lib/module/services/ScoringService.js +1 -1
- package/lib/module/services/SfxSources.js +1 -0
- package/lib/module/services/SoundsService.js +1 -1
- package/lib/module/services/ThemeService.js +1 -0
- package/lib/module/services/UtilsService.js +1 -1
- package/lib/module/services/index.js +1 -1
- package/lib/typescript/src/games/arrows/Arrows.d.ts +1 -3
- package/lib/typescript/src/games/arrows/ArrowsConstants.d.ts +48 -32
- package/lib/typescript/src/games/arrows/ArrowsGame.d.ts +60 -0
- package/lib/typescript/src/games/arrows/ArrowsScene.d.ts +67 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +1 -3
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +39 -131
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterGame.d.ts +57 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterPhysics.d.ts +16 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterScene.d.ts +31 -0
- package/lib/typescript/src/games/bike-racing/BikeMeshes.d.ts +14 -0
- package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts +2 -1
- package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts +38 -29
- package/lib/typescript/src/games/bike-racing/BikeRacingGame.d.ts +104 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingScene.d.ts +25 -0
- package/lib/typescript/src/games/block-blast/BlockBlast.d.ts +1 -3
- package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts +48 -30
- package/lib/typescript/src/games/block-blast/BlockBlastGame.d.ts +77 -0
- package/lib/typescript/src/games/block-blast/BlockBlastScene.d.ts +36 -0
- package/lib/typescript/src/games/block-breaker/BlockBreaker.d.ts +1 -3
- package/lib/typescript/src/games/block-breaker/BlockBreakerConstants.d.ts +88 -35
- package/lib/typescript/src/games/block-breaker/BlockBreakerGame.d.ts +82 -0
- package/lib/typescript/src/games/block-breaker/BlockBreakerScene.d.ts +48 -0
- package/lib/typescript/src/games/bluk/Bluk.d.ts +1 -3
- package/lib/typescript/src/games/bluk/BlukConstants.d.ts +65 -54
- package/lib/typescript/src/games/bluk/BlukGame.d.ts +65 -0
- package/lib/typescript/src/games/bluk/BlukRules.d.ts +51 -0
- package/lib/typescript/src/games/bluk/BlukScene.d.ts +54 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts +1 -3
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts +56 -24
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterGame.d.ts +70 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterScene.d.ts +26 -0
- package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts +1 -3
- package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +63 -32
- package/lib/typescript/src/games/candy-crush/CandyCrushGame.d.ts +65 -0
- package/lib/typescript/src/games/candy-crush/CandyCrushScene.d.ts +28 -0
- package/lib/typescript/src/games/car-racing/CarMeshes.d.ts +44 -0
- package/lib/typescript/src/games/car-racing/CarRacing.d.ts +2 -1
- package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts +60 -29
- package/lib/typescript/src/games/car-racing/CarRacingFacade.d.ts +5 -0
- package/lib/typescript/src/games/car-racing/CarRacingGame.d.ts +96 -0
- package/lib/typescript/src/games/car-racing/CarRacingScene.d.ts +97 -0
- package/lib/typescript/src/games/car-racing/CarRacingScenery.d.ts +22 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRun.d.ts +1 -3
- package/lib/typescript/src/games/chameleon-run/ChameleonRunBackdrop.d.ts +14 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunConstants.d.ts +44 -42
- package/lib/typescript/src/games/chameleon-run/ChameleonRunGame.d.ts +60 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunMeshes.d.ts +20 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunRules.d.ts +52 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunScene.d.ts +44 -0
- package/lib/typescript/src/games/checkers/Checkers.d.ts +1 -3
- package/lib/typescript/src/games/checkers/CheckersAI.d.ts +11 -0
- package/lib/typescript/src/games/checkers/CheckersConstants.d.ts +32 -72
- package/lib/typescript/src/games/checkers/CheckersGame.d.ts +56 -0
- package/lib/typescript/src/games/checkers/CheckersRules.d.ts +48 -0
- package/lib/typescript/src/games/checkers/CheckersScene.d.ts +41 -0
- package/lib/typescript/src/games/color-switch/ColorSwitch.d.ts +1 -3
- package/lib/typescript/src/games/color-switch/ColorSwitchConstants.d.ts +27 -31
- package/lib/typescript/src/games/color-switch/ColorSwitchGame.d.ts +61 -0
- package/lib/typescript/src/games/color-switch/ColorSwitchScene.d.ts +43 -0
- package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts +1 -3
- package/lib/typescript/src/games/colors-sort/ColorsSortConstants.d.ts +37 -44
- package/lib/typescript/src/games/colors-sort/ColorsSortGame.d.ts +41 -0
- package/lib/typescript/src/games/colors-sort/ColorsSortScene.d.ts +33 -0
- package/lib/typescript/src/games/connect-em-all/ConnectEmAll.d.ts +1 -3
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllConstants.d.ts +43 -17
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllGame.d.ts +54 -0
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllScene.d.ts +49 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoad.d.ts +1 -3
- package/lib/typescript/src/games/crossy-road/CrossyRoadCamera.d.ts +14 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadConstants.d.ts +82 -50
- package/lib/typescript/src/games/crossy-road/CrossyRoadGame.d.ts +64 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadMeshes.d.ts +16 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadPerson.d.ts +10 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadRules.d.ts +36 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadScene.d.ts +38 -0
- package/lib/typescript/src/games/dino-jump/DinoJump.d.ts +1 -3
- package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts +48 -72
- package/lib/typescript/src/games/dino-jump/DinoJumpGame.d.ts +60 -0
- package/lib/typescript/src/games/dino-jump/DinoJumpScene.d.ts +35 -0
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxes.d.ts +1 -3
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesConstants.d.ts +31 -36
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesGame.d.ts +44 -0
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesScene.d.ts +31 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticks.d.ts +1 -3
- package/lib/typescript/src/games/falling-sticks/FallingSticksConstants.d.ts +31 -43
- package/lib/typescript/src/games/falling-sticks/FallingSticksGame.d.ts +42 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticksRules.d.ts +36 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticksScene.d.ts +26 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumber.d.ts +1 -3
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberConstants.d.ts +33 -29
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberGame.d.ts +43 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberRules.d.ts +8 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberScene.d.ts +31 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts +1 -3
- package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts +39 -35
- package/lib/typescript/src/games/flappy-bird/FlappyBirdGame.d.ts +66 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBirdScene.d.ts +41 -0
- package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts +1 -3
- package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts +71 -44
- package/lib/typescript/src/games/fruit-merger/FruitMergerGame.d.ts +63 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerRules.d.ts +39 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerScene.d.ts +49 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts +1 -3
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts +51 -76
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaGame.d.ts +76 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaScene.d.ts +52 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaWorld.d.ts +8 -0
- package/lib/typescript/src/games/game-2048/Game2048.d.ts +1 -3
- package/lib/typescript/src/games/game-2048/Game2048Constants.d.ts +25 -120
- package/lib/typescript/src/games/game-2048/Game2048Game.d.ts +45 -0
- package/lib/typescript/src/games/game-2048/Game2048Rules.d.ts +32 -0
- package/lib/typescript/src/games/game-2048/Game2048Scene.d.ts +34 -0
- package/lib/typescript/src/games/knife-hit/KnifeHit.d.ts +1 -3
- package/lib/typescript/src/games/knife-hit/KnifeHitConstants.d.ts +41 -49
- package/lib/typescript/src/games/knife-hit/KnifeHitGame.d.ts +49 -0
- package/lib/typescript/src/games/knife-hit/KnifeHitScene.d.ts +37 -0
- package/lib/typescript/src/games/ludo-king/LudoKing.d.ts +1 -3
- package/lib/typescript/src/games/ludo-king/LudoKingConstants.d.ts +50 -28
- package/lib/typescript/src/games/ludo-king/LudoKingGame.d.ts +40 -0
- package/lib/typescript/src/games/ludo-king/LudoKingRules.d.ts +42 -0
- package/lib/typescript/src/games/ludo-king/LudoKingScene.d.ts +53 -0
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +1 -3
- package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.d.ts +34 -10
- package/lib/typescript/src/games/maze-runner/MazeRunnerGame.d.ts +44 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerRules.d.ts +34 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerScene.d.ts +29 -0
- package/lib/typescript/src/games/memory-match/MemoryMatch.d.ts +1 -3
- package/lib/typescript/src/games/memory-match/MemoryMatchConstants.d.ts +42 -42
- package/lib/typescript/src/games/memory-match/MemoryMatchGame.d.ts +53 -0
- package/lib/typescript/src/games/memory-match/MemoryMatchRules.d.ts +14 -0
- package/lib/typescript/src/games/memory-match/MemoryMatchScene.d.ts +35 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeper.d.ts +1 -3
- package/lib/typescript/src/games/mine-sweeper/MineSweeperConstants.d.ts +43 -82
- package/lib/typescript/src/games/mine-sweeper/MineSweeperGame.d.ts +59 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeperRules.d.ts +18 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeperScene.d.ts +23 -0
- package/lib/typescript/src/games/mob-control/MobControl.d.ts +1 -3
- package/lib/typescript/src/games/mob-control/MobControlConstants.d.ts +99 -85
- package/lib/typescript/src/games/mob-control/MobControlGame.d.ts +45 -0
- package/lib/typescript/src/games/mob-control/MobControlMeshes.d.ts +2 -0
- package/lib/typescript/src/games/mob-control/MobControlRenderer.d.ts +20 -0
- package/lib/typescript/src/games/mob-control/MobControlRules.d.ts +68 -0
- package/lib/typescript/src/games/mob-control/MobControlScene.d.ts +58 -0
- package/lib/typescript/src/games/number-search/NumberSearch.d.ts +1 -3
- package/lib/typescript/src/games/number-search/NumberSearchNumbers.d.ts +1 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBolts.d.ts +1 -3
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsConstants.d.ts +27 -79
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsGame.d.ts +56 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsRules.d.ts +65 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsScene.d.ts +48 -0
- package/lib/typescript/src/games/pac-man/PacMan.d.ts +1 -3
- package/lib/typescript/src/games/pac-man/PacManConstants.d.ts +66 -106
- package/lib/typescript/src/games/pac-man/PacManGame.d.ts +48 -0
- package/lib/typescript/src/games/pac-man/PacManRules.d.ts +52 -0
- package/lib/typescript/src/games/pac-man/PacManScene.d.ts +44 -0
- package/lib/typescript/src/games/paper-io/PaperIo.d.ts +1 -3
- package/lib/typescript/src/games/paper-io/PaperIoConstants.d.ts +60 -40
- package/lib/typescript/src/games/paper-io/PaperIoGame.d.ts +49 -0
- package/lib/typescript/src/games/paper-io/PaperIoMeshes.d.ts +13 -0
- package/lib/typescript/src/games/paper-io/PaperIoRules.d.ts +71 -0
- package/lib/typescript/src/games/paper-io/PaperIoScene.d.ts +39 -0
- package/lib/typescript/src/games/penguin-run/PenguinMeshes.d.ts +9 -0
- package/lib/typescript/src/games/penguin-run/PenguinModel.d.ts +42 -0
- package/lib/typescript/src/games/penguin-run/PenguinRun.d.ts +1 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunConstants.d.ts +58 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunGame.d.ts +64 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunScene.d.ts +65 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts +1 -3
- package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts +23 -45
- package/lib/typescript/src/games/perfect-circle/PerfectCircleGame.d.ts +40 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleRules.d.ts +55 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleScene.d.ts +32 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnect.d.ts +1 -3
- package/lib/typescript/src/games/pipe-connect/PipeConnectConstants.d.ts +36 -32
- package/lib/typescript/src/games/pipe-connect/PipeConnectGame.d.ts +40 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnectRules.d.ts +16 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnectScene.d.ts +28 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTua.d.ts +2 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaConstants.d.ts +64 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaGame.d.ts +34 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaModel.d.ts +9 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaScene.d.ts +13 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts +1 -4
- package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts +25 -36
- package/lib/typescript/src/games/popit-fidget/PopitFidgetGame.d.ts +37 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidgetScene.d.ts +19 -0
- package/lib/typescript/src/games/reversi/Reversi.d.ts +1 -3
- package/lib/typescript/src/games/reversi/ReversiConstants.d.ts +31 -62
- package/lib/typescript/src/games/reversi/ReversiGame.d.ts +54 -0
- package/lib/typescript/src/games/reversi/ReversiRules.d.ts +22 -0
- package/lib/typescript/src/games/reversi/ReversiScene.d.ts +27 -0
- package/lib/typescript/src/games/search-grid/SearchGrid.d.ts +20 -0
- package/lib/typescript/src/games/search-grid/SearchGridConstants.d.ts +60 -0
- package/lib/typescript/src/games/search-grid/SearchGridGame.d.ts +52 -0
- package/lib/typescript/src/games/search-grid/SearchGridScene.d.ts +43 -0
- package/lib/typescript/src/games/shared/BackdropCard.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineBackdrop.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineBlasts.d.ts +26 -0
- package/lib/typescript/src/games/shared/EngineBlocks.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineControlText.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineDice.d.ts +24 -0
- package/lib/typescript/src/games/shared/EngineFootprint.d.ts +17 -0
- package/lib/typescript/src/games/shared/EngineFruits.d.ts +27 -0
- package/lib/typescript/src/games/shared/EngineGameLoader.d.ts +4 -0
- package/lib/typescript/src/games/shared/EngineGameScreen.d.ts +48 -0
- package/lib/typescript/src/games/shared/EngineGameWidth.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineGameWidth.web.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineGlyphs.d.ts +15 -0
- package/lib/typescript/src/games/shared/EngineHud.d.ts +138 -0
- package/lib/typescript/src/games/shared/EngineLoading.d.ts +77 -0
- package/lib/typescript/src/games/shared/EngineMeadow.d.ts +90 -0
- package/lib/typescript/src/games/shared/EngineMeshCache.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineMeshes.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineRacingChase.d.ts +11 -0
- package/lib/typescript/src/games/shared/EngineRacingHandling.d.ts +15 -0
- package/lib/typescript/src/games/shared/EngineReadyContext.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineTilt.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineTouchSurface.d.ts +20 -0
- package/lib/typescript/src/games/shared/EngineUtils.d.ts +18 -0
- package/lib/typescript/src/games/shared/GameActivity.d.ts +3 -0
- package/lib/typescript/src/games/shared/GameLoading.d.ts +14 -0
- package/lib/typescript/src/games/shared/GameLoadingTransition.d.ts +9 -0
- package/lib/typescript/src/games/shared/ProceduralCacheVersion.d.ts +1 -0
- package/lib/typescript/src/games/shared/useEngineGame.d.ts +69 -0
- package/lib/typescript/src/games/shared/useGameResource.d.ts +2 -0
- package/lib/typescript/src/games/shared/useLiveState.d.ts +4 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts +1 -3
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersConstants.d.ts +32 -40
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersGame.d.ts +48 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersRules.d.ts +22 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersScene.d.ts +30 -0
- package/lib/typescript/src/games/snake-3d/Snake3D.d.ts +1 -3
- package/lib/typescript/src/games/snake-3d/Snake3DConstants.d.ts +31 -68
- package/lib/typescript/src/games/snake-3d/Snake3DGame.d.ts +42 -0
- package/lib/typescript/src/games/snake-3d/Snake3DMotion.d.ts +3 -0
- package/lib/typescript/src/games/snake-3d/Snake3DRules.d.ts +42 -0
- package/lib/typescript/src/games/snake-3d/Snake3DScene.d.ts +35 -0
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLadders.d.ts +1 -3
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersConstants.d.ts +58 -50
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersGame.d.ts +45 -0
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersScene.d.ts +50 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts +1 -3
- package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts +33 -23
- package/lib/typescript/src/games/space-fighter/SpaceFighterGame.d.ts +58 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighterScene.d.ts +51 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaire.d.ts +1 -3
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireConstants.d.ts +52 -35
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireGame.d.ts +67 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireRules.d.ts +39 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireScene.d.ts +60 -0
- package/lib/typescript/src/games/stack-tower/StackTower.d.ts +1 -3
- package/lib/typescript/src/games/stack-tower/StackTowerConstants.d.ts +31 -23
- package/lib/typescript/src/games/stack-tower/StackTowerGame.d.ts +58 -0
- package/lib/typescript/src/games/stack-tower/StackTowerScene.d.ts +27 -0
- package/lib/typescript/src/games/sudoku/Sudoku.d.ts +1 -3
- package/lib/typescript/src/games/sudoku/SudokuConstants.d.ts +50 -55
- package/lib/typescript/src/games/sudoku/SudokuGame.d.ts +56 -0
- package/lib/typescript/src/games/sudoku/SudokuRules.d.ts +23 -0
- package/lib/typescript/src/games/sudoku/SudokuScene.d.ts +44 -0
- package/lib/typescript/src/games/tangram/Tangram.d.ts +1 -3
- package/lib/typescript/src/games/tangram/TangramConstants.d.ts +33 -52
- package/lib/typescript/src/games/tangram/TangramGame.d.ts +68 -0
- package/lib/typescript/src/games/tangram/TangramRules.d.ts +61 -0
- package/lib/typescript/src/games/tangram/TangramScene.d.ts +42 -0
- package/lib/typescript/src/games/tank-1990/Tank1990.d.ts +1 -3
- package/lib/typescript/src/games/tank-1990/Tank1990Constants.d.ts +44 -127
- package/lib/typescript/src/games/tank-1990/Tank1990Game.d.ts +50 -0
- package/lib/typescript/src/games/tank-1990/Tank1990Rules.d.ts +67 -0
- package/lib/typescript/src/games/tank-1990/Tank1990Scene.d.ts +38 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToe.d.ts +1 -3
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeConstants.d.ts +35 -72
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeGame.d.ts +54 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeRules.d.ts +10 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeScene.d.ts +26 -0
- package/lib/typescript/src/games/tile-home/TileHome.d.ts +1 -3
- package/lib/typescript/src/games/tile-home/TileHomeConstants.d.ts +72 -70
- package/lib/typescript/src/games/tile-home/TileHomeGame.d.ts +72 -0
- package/lib/typescript/src/games/tile-home/TileHomeScene.d.ts +28 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHunt.d.ts +3 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntConstants.d.ts +144 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntControls.d.ts +75 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntGame.d.ts +41 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntMeshes.d.ts +26 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntModel.d.ts +57 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntRules.d.ts +198 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntScene.d.ts +40 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts +1 -3
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +35 -45
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleGame.d.ts +51 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleScene.d.ts +31 -0
- package/lib/typescript/src/games/word-search/WordSearch.d.ts +1 -3
- package/lib/typescript/src/games/word-search/WordSearchWords.d.ts +1 -0
- package/lib/typescript/src/helpers/GamePatternData.d.ts +46 -0
- package/lib/typescript/src/helpers/GameSettingsModal.d.ts +1 -1
- package/lib/typescript/src/helpers/GameTheme.d.ts +18 -0
- package/lib/typescript/src/helpers/IconPaths.d.ts +4 -0
- package/lib/typescript/src/helpers/index.d.ts +1 -19
- package/lib/typescript/src/index.d.ts +3 -0
- package/lib/typescript/src/services/GameAssetLoader.d.ts +32 -0
- package/lib/typescript/src/services/GameAssets.d.ts +11 -0
- package/lib/typescript/src/services/GameLoaders.d.ts +18 -0
- package/lib/typescript/src/services/GamesConstants.d.ts +11 -0
- package/lib/typescript/src/services/GamesMetadata.d.ts +2 -0
- package/lib/typescript/src/services/HapticsService.d.ts +1 -1
- package/lib/typescript/src/services/SfxSources.d.ts +79 -0
- package/lib/typescript/src/services/SoundsService.d.ts +487 -1566
- package/lib/typescript/src/services/ThemeService.d.ts +117 -0
- package/lib/typescript/src/services/UtilsService.d.ts +20 -2
- package/lib/typescript/src/services/index.d.ts +3 -0
- package/lib/web/assets/005ea2045b17-explorer.glb +0 -0
- package/lib/web/assets/01e2f0a0bbf6-hurt.wav +0 -0
- package/lib/web/assets/01fc0ecf658c-explorer-atlas.png +0 -0
- package/lib/web/assets/029329b2c7c0-asphalt.png +0 -0
- package/lib/web/assets/0376bda32be3-robot.wav +0 -0
- package/lib/web/assets/0719fb0bb38e-soft_glow.png +0 -0
- package/lib/web/assets/0b21278bffba-boing.wav +0 -0
- package/lib/web/assets/1333c9d1273c-flip_disc.wav +0 -0
- package/lib/web/assets/15785f62ee5f-time_up.wav +0 -0
- package/lib/web/assets/177f00502e08-bonus.wav +0 -0
- package/lib/web/assets/19e47dcfda1f-pling.wav +0 -0
- package/lib/web/assets/1a677e0f7f6c-laugh.wav +0 -0
- package/lib/web/assets/1ad2914478b1-eat.wav +0 -0
- package/lib/web/assets/1b0d703ddd1a-dance.wav +0 -0
- package/lib/web/assets/1e4330fddd74-chime.wav +0 -0
- package/lib/web/assets/2432a97b0af1-cannon.wav +0 -0
- package/lib/web/assets/2574370d6aa0-blocked.wav +0 -0
- package/lib/web/assets/2699065037ad-select.wav +0 -0
- package/lib/web/assets/28d30f53ad73-ladder.wav +0 -0
- package/lib/web/assets/2c1ec05270b2-point.wav +0 -0
- package/lib/web/assets/2e1dd99a0213-tick.wav +0 -0
- package/lib/web/assets/3084575cecdb-card_flip.wav +0 -0
- package/lib/web/assets/308bc31b6af5-engine.wav +0 -0
- package/lib/web/assets/336d63b739b5-combo.wav +0 -0
- package/lib/web/assets/3a369e2596e4-clash.wav +0 -0
- package/lib/web/assets/3a816e20212f-capture.wav +0 -0
- package/lib/web/assets/40240217810a-nitro.wav +0 -0
- package/lib/web/assets/46edaa54d1ea-crunch.wav +0 -0
- package/lib/web/assets/501994226995-coin.wav +0 -0
- package/lib/web/assets/5525d7f6a4b8-rotate.wav +0 -0
- package/lib/web/assets/5e816e1f0929-dice_roll.wav +0 -0
- package/lib/web/assets/60e2dec3cf41-deselect.wav +0 -0
- package/lib/web/assets/6ab86ea29e5c-six.wav +0 -0
- package/lib/web/assets/6da3b101926d-merge.wav +0 -0
- package/lib/web/assets/6e686dea513c-bark.jpg +0 -0
- package/lib/web/assets/6ff9a6a13714-limestone.jpg +0 -0
- package/lib/web/assets/735c4a1cd22e-invalid.wav +0 -0
- package/lib/web/assets/73f75c35ff5d-snake.wav +0 -0
- package/lib/web/assets/7506e3efe264-catch.wav +0 -0
- package/lib/web/assets/76493a2ada2d-ad_bolt.png +0 -0
- package/lib/web/assets/793abe620201-card_place.wav +0 -0
- package/lib/web/assets/7da09c57f52d-facade.png +0 -0
- package/lib/web/assets/7e1a902176f6-pine.png +0 -0
- package/lib/web/assets/7eb943b85c21-play-with-tua.glb +0 -0
- package/lib/web/assets/837d43c06dba-ad_bubbles.png +0 -0
- package/lib/web/assets/84f1a7dfa368-game_over.wav +0 -0
- package/lib/web/assets/850e26ce3b0a-flap.wav +0 -0
- package/lib/web/assets/854b31683cb2-draw.wav +0 -0
- package/lib/web/assets/8616150393b7-error.wav +0 -0
- package/lib/web/assets/87cc6d503ec6-river.jpg +0 -0
- package/lib/web/assets/88755845922c-hop.wav +0 -0
- package/lib/web/assets/8ec8f469492d-chomp_alt.wav +0 -0
- package/lib/web/assets/8f17f89b138c-pew.wav +0 -0
- package/lib/web/assets/9210a24472d1-place.wav +0 -0
- package/lib/web/assets/930d833ebf89-splash.wav +0 -0
- package/lib/web/assets/970f7c59265d-swoosh.wav +0 -0
- package/lib/web/assets/9900b8d1b6ad-flag.wav +0 -0
- package/lib/web/assets/9ab04403898b-clang.wav +0 -0
- package/lib/web/assets/9d8b97a10d45-drop.wav +0 -0
- package/lib/web/assets/9d9c02ddc7ed-boom.wav +0 -0
- package/lib/web/assets/9e1b5114d56d-pop_soft.wav +0 -0
- package/lib/web/assets/a01f22d6dbb3-thud.wav +0 -0
- package/lib/web/assets/a44a1cf1a1a8-bump.wav +0 -0
- package/lib/web/assets/a76940a48c68-hit.wav +0 -0
- package/lib/web/assets/a98ddb724460-leaves.png +0 -0
- package/lib/web/assets/aa0960e8bee6-footstep_run.wav +0 -0
- package/lib/web/assets/aa570c9d3e15-star.wav +0 -0
- package/lib/web/assets/aacb999f3c49-tock.wav +0 -0
- package/lib/web/assets/aae0c16c5e89-reveal.wav +0 -0
- package/lib/web/assets/ab37cd128509-click.wav +0 -0
- package/lib/web/assets/b0bc66f49005-warning.wav +0 -0
- package/lib/web/assets/b1edd756ac43-zap.wav +0 -0
- package/lib/web/assets/b3894545cf71-slice.wav +0 -0
- package/lib/web/assets/b3c6225d055a-meadow.jpg +0 -0
- package/lib/web/assets/b60ca65cdfcb-gate.wav +0 -0
- package/lib/web/assets/b8900bb2c5c7-win.wav +0 -0
- package/lib/web/assets/baff6feda846-lose.wav +0 -0
- package/lib/web/assets/bed31305d60d-ad_chevrons.png +0 -0
- package/lib/web/assets/c26f4a624e7d-shuffle.wav +0 -0
- package/lib/web/assets/c3a9edfad195-die.wav +0 -0
- package/lib/web/assets/c4aa9d773f2a-footstep_walk.wav +0 -0
- package/lib/web/assets/c5ab3ff0003f-crash.wav +0 -0
- package/lib/web/assets/c5eb07deddd4-start.wav +0 -0
- package/lib/web/assets/c6c58d9ae452-pop.wav +0 -0
- package/lib/web/assets/cea48c3cd9c7-balloon_pop.wav +0 -0
- package/lib/web/assets/d15591767778-tap.wav +0 -0
- package/lib/web/assets/d1781a52234f-slide.wav +0 -0
- package/lib/web/assets/d3bf2d9f793b-snap.wav +0 -0
- package/lib/web/assets/d8f59ebd3537-jump.wav +0 -0
- package/lib/web/assets/dafea2f28854-power_up.wav +0 -0
- package/lib/web/assets/e2e7f5ae2d1b-whoosh.wav +0 -0
- package/lib/web/assets/e2f90a23e1bd-chomp.wav +0 -0
- package/lib/web/assets/e454e56df89a-clack.wav +0 -0
- package/lib/web/assets/e8cbc2b88bc4-Inter-SemiBold.ttf +0 -0
- package/lib/web/assets/ed6496b891fc-land.wav +0 -0
- package/lib/web/assets/f21920200a81-thunk.wav +0 -0
- package/lib/web/assets/f753b43be89d-whack.wav +0 -0
- package/lib/web/assets/f798c4b5cf4d-miss.wav +0 -0
- package/lib/web/assets/fbe299716916-grass.png +0 -0
- package/lib/web/chunk-52ez2s9z.js +15 -0
- package/lib/web/chunk-8675t224.js +1 -0
- package/lib/web/index.js +2 -0
- package/lib/web/package.json +1 -0
- package/lib/web/services.js +2 -0
- package/package.json +94 -73
- package/src/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/src/assets/models/explorer/explorer.glb +0 -0
- package/src/assets/models/explorer/params.json +51 -0
- package/src/assets/models/explorer/source.json +222 -0
- package/src/assets/models/play-with-tua/play-with-tua.glb +0 -0
- package/src/assets/models/play-with-tua/sources.json +141 -0
- package/src/assets/sfx/balloon_pop.wav +0 -0
- package/src/assets/sfx/blocked.wav +0 -0
- package/src/assets/sfx/boing.wav +0 -0
- package/src/assets/sfx/bonus.wav +0 -0
- package/src/assets/sfx/boom.wav +0 -0
- package/src/assets/sfx/bump.wav +0 -0
- package/src/assets/sfx/cannon.wav +0 -0
- package/src/assets/sfx/capture.wav +0 -0
- package/src/assets/sfx/card_flip.wav +0 -0
- package/src/assets/sfx/card_place.wav +0 -0
- package/src/assets/sfx/catch.wav +0 -0
- package/src/assets/sfx/chime.wav +0 -0
- package/src/assets/sfx/chomp.wav +0 -0
- package/src/assets/sfx/chomp_alt.wav +0 -0
- package/src/assets/sfx/clack.wav +0 -0
- package/src/assets/sfx/clang.wav +0 -0
- package/src/assets/sfx/clash.wav +0 -0
- package/src/assets/sfx/click.wav +0 -0
- package/src/assets/sfx/coin.wav +0 -0
- package/src/assets/sfx/combo.wav +0 -0
- package/src/assets/sfx/crash.wav +0 -0
- package/src/assets/sfx/crunch.wav +0 -0
- package/src/assets/sfx/dance.wav +0 -0
- package/src/assets/sfx/deselect.wav +0 -0
- package/src/assets/sfx/dice_roll.wav +0 -0
- package/src/assets/sfx/die.wav +0 -0
- package/src/assets/sfx/draw.wav +0 -0
- package/src/assets/sfx/drop.wav +0 -0
- package/src/assets/sfx/eat.wav +0 -0
- package/src/assets/sfx/engine.wav +0 -0
- package/src/assets/sfx/error.wav +0 -0
- package/src/assets/sfx/flag.wav +0 -0
- package/src/assets/sfx/flap.wav +0 -0
- package/src/assets/sfx/flip_disc.wav +0 -0
- package/src/assets/sfx/footstep_run.wav +0 -0
- package/src/assets/sfx/footstep_walk.wav +0 -0
- package/src/assets/sfx/game_over.wav +0 -0
- package/src/assets/sfx/gate.wav +0 -0
- package/src/assets/sfx/hit.wav +0 -0
- package/src/assets/sfx/hop.wav +0 -0
- package/src/assets/sfx/hurt.wav +0 -0
- package/src/assets/sfx/invalid.wav +0 -0
- package/src/assets/sfx/jump.wav +0 -0
- package/src/assets/sfx/ladder.wav +0 -0
- package/src/assets/sfx/land.wav +0 -0
- package/src/assets/sfx/laugh.wav +0 -0
- package/src/assets/sfx/lose.wav +0 -0
- package/src/assets/sfx/merge.wav +0 -0
- package/src/assets/sfx/miss.wav +0 -0
- package/src/assets/sfx/nitro.wav +0 -0
- package/src/assets/sfx/pew.wav +0 -0
- package/src/assets/sfx/place.wav +0 -0
- package/src/assets/sfx/pling.wav +0 -0
- package/src/assets/sfx/point.wav +0 -0
- package/src/assets/sfx/pop.wav +0 -0
- package/src/assets/sfx/pop_soft.wav +0 -0
- package/src/assets/sfx/power_up.wav +0 -0
- package/src/assets/sfx/reveal.wav +0 -0
- package/src/assets/sfx/robot.wav +0 -0
- package/src/assets/sfx/rotate.wav +0 -0
- package/src/assets/sfx/run_steps.wav +0 -0
- package/src/assets/sfx/select.wav +0 -0
- package/src/assets/sfx/shuffle.wav +0 -0
- package/src/assets/sfx/six.wav +0 -0
- package/src/assets/sfx/slice.wav +0 -0
- package/src/assets/sfx/slide.wav +0 -0
- package/src/assets/sfx/snake.wav +0 -0
- package/src/assets/sfx/snap.wav +0 -0
- package/src/assets/sfx/splash.wav +0 -0
- package/src/assets/sfx/star.wav +0 -0
- package/src/assets/sfx/start.wav +0 -0
- package/src/assets/sfx/swoosh.wav +0 -0
- package/src/assets/sfx/tap.wav +0 -0
- package/src/assets/sfx/thud.wav +0 -0
- package/src/assets/sfx/thunk.wav +0 -0
- package/src/assets/sfx/tick.wav +0 -0
- package/src/assets/sfx/time_up.wav +0 -0
- package/src/assets/sfx/tock.wav +0 -0
- package/src/assets/sfx/walk_steps.wav +0 -0
- package/src/assets/sfx/warning.wav +0 -0
- package/src/assets/sfx/whack.wav +0 -0
- package/src/assets/sfx/whoosh.wav +0 -0
- package/src/assets/sfx/win.wav +0 -0
- package/src/assets/sfx/zap.wav +0 -0
- package/src/assets/textures/ad_bolt.png +0 -0
- package/src/assets/textures/ad_bubbles.png +0 -0
- package/src/assets/textures/ad_chevrons.png +0 -0
- package/src/assets/textures/asphalt.png +0 -0
- package/src/assets/textures/bark.jpg +0 -0
- package/src/assets/textures/explorer-atlas.png +0 -0
- package/src/assets/textures/facade.png +0 -0
- package/src/assets/textures/grass.png +0 -0
- package/src/assets/textures/leaves.png +0 -0
- package/src/assets/textures/limestone.jpg +0 -0
- package/src/assets/textures/meadow.jpg +0 -0
- package/src/assets/textures/nature-sources.json +87 -0
- package/src/assets/textures/pine.png +0 -0
- package/src/assets/textures/river.jpg +0 -0
- package/src/assets/textures/soft_glow.png +0 -0
- package/src/games/arrows/Arrows.tsx +69 -0
- package/src/games/arrows/ArrowsConstants.ts +107 -0
- package/src/games/arrows/ArrowsGame.ts +735 -0
- package/src/games/arrows/ArrowsScene.ts +395 -0
- package/src/games/balloon-blaster/BalloonBlaster.tsx +75 -0
- package/src/games/balloon-blaster/BalloonBlasterConstants.ts +79 -0
- package/src/games/balloon-blaster/BalloonBlasterGame.ts +287 -0
- package/src/games/balloon-blaster/BalloonBlasterPhysics.ts +95 -0
- package/src/games/balloon-blaster/BalloonBlasterScene.ts +225 -0
- package/src/games/bike-racing/BikeMeshes.ts +273 -0
- package/src/games/bike-racing/BikeRacing.tsx +211 -0
- package/src/games/bike-racing/BikeRacingConstants.ts +103 -0
- package/src/games/bike-racing/BikeRacingGame.ts +557 -0
- package/src/games/bike-racing/BikeRacingScene.ts +119 -0
- package/src/games/block-blast/BlockBlast.tsx +73 -0
- package/src/games/block-blast/BlockBlastConstants.ts +179 -0
- package/src/games/block-blast/BlockBlastGame.ts +471 -0
- package/src/games/block-blast/BlockBlastScene.ts +156 -0
- package/src/games/block-breaker/BlockBreaker.tsx +79 -0
- package/src/games/block-breaker/BlockBreakerConstants.ts +139 -0
- package/src/games/block-breaker/BlockBreakerGame.ts +459 -0
- package/src/games/block-breaker/BlockBreakerScene.ts +257 -0
- package/src/games/bluk/Bluk.tsx +82 -0
- package/src/games/bluk/BlukConstants.ts +121 -0
- package/src/games/bluk/BlukGame.ts +323 -0
- package/src/games/bluk/BlukRules.ts +154 -0
- package/src/games/bluk/BlukScene.ts +514 -0
- package/src/games/bubble-shooter/BubbleShooter.tsx +76 -0
- package/src/games/bubble-shooter/BubbleShooterConstants.ts +103 -0
- package/src/games/bubble-shooter/BubbleShooterGame.ts +459 -0
- package/src/games/bubble-shooter/BubbleShooterScene.ts +158 -0
- package/src/games/candy-crush/CandyCrush.tsx +77 -0
- package/src/games/candy-crush/CandyCrushConstants.ts +94 -0
- package/src/games/candy-crush/CandyCrushGame.ts +477 -0
- package/src/games/candy-crush/CandyCrushScene.ts +209 -0
- package/src/games/car-racing/CarMeshes.ts +440 -0
- package/src/games/car-racing/CarRacing.tsx +211 -0
- package/src/games/car-racing/CarRacingConstants.ts +167 -0
- package/src/games/car-racing/CarRacingFacade.ts +40 -0
- package/src/games/car-racing/CarRacingGame.ts +539 -0
- package/src/games/car-racing/CarRacingScene.ts +1026 -0
- package/src/games/car-racing/CarRacingScenery.ts +265 -0
- package/src/games/chameleon-run/ChameleonRun.tsx +96 -0
- package/src/games/chameleon-run/ChameleonRunBackdrop.ts +186 -0
- package/src/games/chameleon-run/ChameleonRunConstants.ts +47 -0
- package/src/games/chameleon-run/ChameleonRunGame.ts +309 -0
- package/src/games/chameleon-run/ChameleonRunMeshes.ts +305 -0
- package/src/games/chameleon-run/ChameleonRunRules.ts +252 -0
- package/src/games/chameleon-run/ChameleonRunScene.ts +310 -0
- package/src/games/checkers/Checkers.tsx +83 -0
- package/src/games/checkers/CheckersAI.ts +255 -0
- package/src/games/checkers/CheckersConstants.ts +68 -0
- package/src/games/checkers/CheckersGame.ts +322 -0
- package/src/games/checkers/CheckersRules.ts +167 -0
- package/src/games/checkers/CheckersScene.ts +308 -0
- package/src/games/color-switch/ColorSwitch.tsx +75 -0
- package/src/games/color-switch/ColorSwitchConstants.ts +61 -0
- package/src/games/color-switch/ColorSwitchGame.ts +329 -0
- package/src/games/color-switch/ColorSwitchScene.ts +220 -0
- package/src/games/colors-sort/ColorsSort.tsx +82 -0
- package/src/games/colors-sort/ColorsSortConstants.ts +119 -0
- package/src/games/colors-sort/ColorsSortGame.ts +246 -0
- package/src/games/colors-sort/ColorsSortScene.ts +315 -0
- package/src/games/connect-em-all/ConnectEmAll.tsx +70 -0
- package/src/games/connect-em-all/ConnectEmAllConstants.ts +77 -0
- package/src/games/connect-em-all/ConnectEmAllGame.ts +401 -0
- package/src/games/connect-em-all/ConnectEmAllScene.ts +235 -0
- package/src/games/crossy-road/CrossyRoad.tsx +74 -0
- package/src/games/crossy-road/CrossyRoadCamera.ts +59 -0
- package/src/games/crossy-road/CrossyRoadConstants.ts +132 -0
- package/src/games/crossy-road/CrossyRoadGame.ts +293 -0
- package/src/games/crossy-road/CrossyRoadMeshes.ts +195 -0
- package/src/games/crossy-road/CrossyRoadPerson.ts +198 -0
- package/src/games/crossy-road/CrossyRoadRules.ts +99 -0
- package/src/games/crossy-road/CrossyRoadScene.ts +355 -0
- package/src/games/dino-jump/DinoJump.tsx +77 -0
- package/src/games/dino-jump/DinoJumpConstants.ts +80 -0
- package/src/games/dino-jump/DinoJumpGame.ts +344 -0
- package/src/games/dino-jump/DinoJumpScene.ts +686 -0
- package/src/games/dots-and-boxes/DotsAndBoxes.tsx +83 -0
- package/src/games/dots-and-boxes/DotsAndBoxesConstants.ts +77 -0
- package/src/games/dots-and-boxes/DotsAndBoxesGame.ts +271 -0
- package/src/games/dots-and-boxes/DotsAndBoxesScene.ts +249 -0
- package/src/games/falling-sticks/FallingSticks.tsx +72 -0
- package/src/games/falling-sticks/FallingSticksConstants.ts +62 -0
- package/src/games/falling-sticks/FallingSticksGame.ts +220 -0
- package/src/games/falling-sticks/FallingSticksRules.ts +145 -0
- package/src/games/falling-sticks/FallingSticksScene.ts +245 -0
- package/src/games/find-different-number/FindDifferentNumber.tsx +74 -0
- package/src/games/find-different-number/FindDifferentNumberConstants.ts +74 -0
- package/src/games/find-different-number/FindDifferentNumberGame.ts +174 -0
- package/src/games/find-different-number/FindDifferentNumberRules.ts +43 -0
- package/src/games/find-different-number/FindDifferentNumberScene.ts +193 -0
- package/src/games/flappy-bird/FlappyBird.tsx +73 -0
- package/src/games/flappy-bird/FlappyBirdConstants.ts +95 -0
- package/src/games/flappy-bird/FlappyBirdGame.ts +375 -0
- package/src/games/flappy-bird/FlappyBirdScene.ts +630 -0
- package/src/games/fruit-merger/FruitMerger.tsx +73 -0
- package/src/games/fruit-merger/FruitMergerConstants.ts +102 -0
- package/src/games/fruit-merger/FruitMergerGame.ts +285 -0
- package/src/games/fruit-merger/FruitMergerRules.ts +286 -0
- package/src/games/fruit-merger/FruitMergerScene.ts +498 -0
- package/src/games/fruit-ninja/FruitNinja.tsx +129 -0
- package/src/games/fruit-ninja/FruitNinjaConstants.ts +107 -0
- package/src/games/fruit-ninja/FruitNinjaGame.ts +391 -0
- package/src/games/fruit-ninja/FruitNinjaScene.ts +319 -0
- package/src/games/fruit-ninja/FruitNinjaWorld.ts +17 -0
- package/src/games/game-2048/Game2048.tsx +84 -0
- package/src/games/game-2048/Game2048Constants.ts +68 -0
- package/src/games/game-2048/Game2048Game.ts +181 -0
- package/src/games/game-2048/Game2048Rules.ts +101 -0
- package/src/games/game-2048/Game2048Scene.ts +206 -0
- package/src/games/knife-hit/KnifeHit.tsx +78 -0
- package/src/games/knife-hit/KnifeHitConstants.ts +89 -0
- package/src/games/knife-hit/KnifeHitGame.ts +264 -0
- package/src/games/knife-hit/KnifeHitScene.ts +360 -0
- package/src/games/ludo-king/LudoKing.tsx +86 -0
- package/src/games/ludo-king/LudoKingConstants.ts +212 -0
- package/src/games/ludo-king/LudoKingGame.ts +326 -0
- package/src/games/ludo-king/LudoKingRules.ts +143 -0
- package/src/games/ludo-king/LudoKingScene.ts +397 -0
- package/src/games/maze-runner/MazeRunner.tsx +88 -0
- package/src/games/maze-runner/MazeRunnerConstants.ts +65 -0
- package/src/games/maze-runner/MazeRunnerGame.ts +176 -0
- package/src/games/maze-runner/MazeRunnerRules.ts +161 -0
- package/src/games/maze-runner/MazeRunnerScene.ts +245 -0
- package/src/games/memory-match/MemoryMatch.tsx +77 -0
- package/src/games/memory-match/MemoryMatchConstants.ts +105 -0
- package/src/games/memory-match/MemoryMatchGame.ts +222 -0
- package/src/games/memory-match/MemoryMatchRules.ts +38 -0
- package/src/games/memory-match/MemoryMatchScene.ts +268 -0
- package/src/games/mine-sweeper/MineSweeper.tsx +77 -0
- package/src/games/mine-sweeper/MineSweeperConstants.ts +94 -0
- package/src/games/mine-sweeper/MineSweeperGame.ts +234 -0
- package/src/games/mine-sweeper/MineSweeperRules.ts +67 -0
- package/src/games/mine-sweeper/MineSweeperScene.ts +262 -0
- package/src/games/mob-control/MobControl.tsx +73 -0
- package/src/games/mob-control/MobControlConstants.ts +106 -0
- package/src/games/mob-control/MobControlGame.ts +176 -0
- package/src/games/mob-control/MobControlMeshes.ts +85 -0
- package/src/games/mob-control/MobControlRenderer.ts +108 -0
- package/src/games/mob-control/MobControlRules.ts +522 -0
- package/src/games/mob-control/MobControlScene.ts +399 -0
- package/src/games/number-search/NumberSearch.tsx +18 -0
- package/src/games/number-search/NumberSearchNumbers.ts +623 -0
- package/src/games/nuts-and-bolts/NutsAndBolts.tsx +85 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsConstants.ts +75 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsGame.ts +298 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsRules.ts +474 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsScene.ts +498 -0
- package/src/games/pac-man/PacMan.tsx +86 -0
- package/src/games/pac-man/PacManConstants.ts +169 -0
- package/src/games/pac-man/PacManGame.ts +406 -0
- package/src/games/pac-man/PacManRules.ts +255 -0
- package/src/games/pac-man/PacManScene.ts +387 -0
- package/src/games/paper-io/PaperIo.tsx +91 -0
- package/src/games/paper-io/PaperIoConstants.ts +86 -0
- package/src/games/paper-io/PaperIoGame.ts +193 -0
- package/src/games/paper-io/PaperIoMeshes.ts +233 -0
- package/src/games/paper-io/PaperIoRules.ts +315 -0
- package/src/games/paper-io/PaperIoScene.ts +310 -0
- package/src/games/penguin-run/PenguinMeshes.ts +269 -0
- package/src/games/penguin-run/PenguinModel.ts +712 -0
- package/src/games/penguin-run/PenguinRun.tsx +77 -0
- package/src/games/penguin-run/PenguinRunConstants.ts +69 -0
- package/src/games/penguin-run/PenguinRunGame.ts +406 -0
- package/src/games/penguin-run/PenguinRunScene.ts +949 -0
- package/src/games/perfect-circle/PerfectCircle.tsx +74 -0
- package/src/games/perfect-circle/PerfectCircleConstants.ts +52 -0
- package/src/games/perfect-circle/PerfectCircleGame.ts +153 -0
- package/src/games/perfect-circle/PerfectCircleRules.ts +111 -0
- package/src/games/perfect-circle/PerfectCircleScene.ts +176 -0
- package/src/games/pipe-connect/PipeConnect.tsx +69 -0
- package/src/games/pipe-connect/PipeConnectConstants.ts +101 -0
- package/src/games/pipe-connect/PipeConnectGame.ts +179 -0
- package/src/games/pipe-connect/PipeConnectRules.ts +326 -0
- package/src/games/pipe-connect/PipeConnectScene.ts +271 -0
- package/src/games/play-with-tua/PlayWithTua.tsx +123 -0
- package/src/games/play-with-tua/PlayWithTuaConstants.ts +70 -0
- package/src/games/play-with-tua/PlayWithTuaGame.ts +167 -0
- package/src/games/play-with-tua/PlayWithTuaModel.ts +42 -0
- package/src/games/play-with-tua/PlayWithTuaScene.ts +36 -0
- package/src/games/popit-fidget/PopitFidget.tsx +72 -0
- package/src/games/popit-fidget/PopitFidgetConstants.ts +71 -0
- package/src/games/popit-fidget/PopitFidgetGame.ts +148 -0
- package/src/games/popit-fidget/PopitFidgetScene.ts +242 -0
- package/src/games/reversi/Reversi.tsx +94 -0
- package/src/games/reversi/ReversiConstants.ts +67 -0
- package/src/games/reversi/ReversiGame.ts +266 -0
- package/src/games/reversi/ReversiRules.ts +176 -0
- package/src/games/reversi/ReversiScene.ts +240 -0
- package/src/games/search-grid/SearchGrid.tsx +92 -0
- package/src/games/search-grid/SearchGridConstants.ts +178 -0
- package/src/games/search-grid/SearchGridGame.ts +209 -0
- package/src/games/search-grid/SearchGridScene.ts +301 -0
- package/src/games/shared/BackdropCard.tsx +54 -0
- package/src/games/shared/EngineBackdrop.ts +300 -0
- package/src/games/shared/EngineBlasts.ts +136 -0
- package/src/games/shared/EngineBlocks.ts +91 -0
- package/src/games/shared/EngineControlText.ts +17 -0
- package/src/games/shared/EngineDice.ts +250 -0
- package/src/games/shared/EngineFootprint.ts +35 -0
- package/src/games/shared/EngineFruits.ts +1435 -0
- package/src/games/shared/EngineGameLoader.tsx +88 -0
- package/src/games/shared/EngineGameScreen.tsx +325 -0
- package/src/games/shared/EngineGameWidth.ts +3 -0
- package/src/games/shared/EngineGameWidth.web.ts +3 -0
- package/src/games/shared/EngineGlyphs.ts +178 -0
- package/src/games/shared/EngineHud.ts +815 -0
- package/src/games/shared/EngineLoading.ts +477 -0
- package/src/games/shared/EngineMeadow.ts +725 -0
- package/src/games/shared/EngineMeshCache.ts +15 -0
- package/src/games/shared/EngineMeshes.ts +10 -0
- package/src/games/shared/EngineRacingChase.ts +21 -0
- package/src/games/shared/EngineRacingHandling.ts +48 -0
- package/src/games/shared/EngineReadyContext.ts +4 -0
- package/src/games/shared/EngineTilt.ts +44 -0
- package/src/games/shared/EngineTouchSurface.tsx +103 -0
- package/src/games/shared/EngineUtils.ts +52 -0
- package/src/games/shared/GameActivity.ts +13 -0
- package/src/games/shared/GameLoading.tsx +202 -0
- package/src/games/shared/GameLoadingTransition.tsx +61 -0
- package/src/games/shared/ProceduralCacheVersion.ts +2 -0
- package/src/games/shared/useEngineGame.ts +240 -0
- package/src/games/shared/useGameResource.ts +21 -0
- package/src/games/shared/useLiveState.ts +58 -0
- package/src/games/sliding-numbers/SlidingNumbers.tsx +71 -0
- package/src/games/sliding-numbers/SlidingNumbersConstants.ts +65 -0
- package/src/games/sliding-numbers/SlidingNumbersGame.ts +192 -0
- package/src/games/sliding-numbers/SlidingNumbersRules.ts +79 -0
- package/src/games/sliding-numbers/SlidingNumbersScene.ts +193 -0
- package/src/games/snake-3d/Snake3D.tsx +76 -0
- package/src/games/snake-3d/Snake3DConstants.ts +61 -0
- package/src/games/snake-3d/Snake3DGame.ts +192 -0
- package/src/games/snake-3d/Snake3DMotion.ts +22 -0
- package/src/games/snake-3d/Snake3DRules.ts +116 -0
- package/src/games/snake-3d/Snake3DScene.ts +322 -0
- package/src/games/snakes-and-ladders/SnakesAndLadders.tsx +87 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersConstants.ts +136 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersGame.ts +310 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersScene.ts +515 -0
- package/src/games/space-fighter/SpaceFighter.tsx +74 -0
- package/src/games/space-fighter/SpaceFighterConstants.ts +86 -0
- package/src/games/space-fighter/SpaceFighterGame.ts +292 -0
- package/src/games/space-fighter/SpaceFighterScene.ts +550 -0
- package/src/games/spider-solitaire/SpiderSolitaire.tsx +80 -0
- package/src/games/spider-solitaire/SpiderSolitaireConstants.ts +107 -0
- package/src/games/spider-solitaire/SpiderSolitaireGame.ts +387 -0
- package/src/games/spider-solitaire/SpiderSolitaireRules.ts +123 -0
- package/src/games/spider-solitaire/SpiderSolitaireScene.ts +352 -0
- package/src/games/stack-tower/StackTower.tsx +76 -0
- package/src/games/stack-tower/StackTowerConstants.ts +74 -0
- package/src/games/stack-tower/StackTowerGame.ts +236 -0
- package/src/games/stack-tower/StackTowerScene.ts +186 -0
- package/src/games/sudoku/Sudoku.tsx +73 -0
- package/src/games/sudoku/SudokuConstants.ts +127 -0
- package/src/games/sudoku/SudokuGame.ts +250 -0
- package/src/games/sudoku/SudokuRules.ts +125 -0
- package/src/games/sudoku/SudokuScene.ts +304 -0
- package/src/games/tangram/Tangram.tsx +79 -0
- package/src/games/tangram/TangramConstants.ts +64 -0
- package/src/games/tangram/TangramGame.ts +356 -0
- package/src/games/tangram/TangramRules.ts +409 -0
- package/src/games/tangram/TangramScene.ts +203 -0
- package/src/games/tank-1990/Tank1990.tsx +78 -0
- package/src/games/tank-1990/Tank1990Constants.ts +81 -0
- package/src/games/tank-1990/Tank1990Game.ts +331 -0
- package/src/games/tank-1990/Tank1990Rules.ts +390 -0
- package/src/games/tank-1990/Tank1990Scene.ts +434 -0
- package/src/games/tic-tac-toe/TicTacToe.tsx +98 -0
- package/src/games/tic-tac-toe/TicTacToeConstants.ts +69 -0
- package/src/games/tic-tac-toe/TicTacToeGame.ts +200 -0
- package/src/games/tic-tac-toe/TicTacToeRules.ts +103 -0
- package/src/games/tic-tac-toe/TicTacToeScene.ts +245 -0
- package/src/games/tile-home/TileHome.tsx +92 -0
- package/src/games/tile-home/TileHomeConstants.ts +139 -0
- package/src/games/tile-home/TileHomeGame.ts +435 -0
- package/src/games/tile-home/TileHomeScene.ts +154 -0
- package/src/games/treasure-hunt/TreasureHunt.tsx +206 -0
- package/src/games/treasure-hunt/TreasureHuntConstants.ts +266 -0
- package/src/games/treasure-hunt/TreasureHuntControls.ts +280 -0
- package/src/games/treasure-hunt/TreasureHuntGame.ts +402 -0
- package/src/games/treasure-hunt/TreasureHuntMeshes.ts +422 -0
- package/src/games/treasure-hunt/TreasureHuntModel.ts +506 -0
- package/src/games/treasure-hunt/TreasureHuntRules.ts +1210 -0
- package/src/games/treasure-hunt/TreasureHuntScene.ts +586 -0
- package/src/games/whack-a-mole/WhackAMole.tsx +79 -0
- package/src/games/whack-a-mole/WhackAMoleConstants.ts +94 -0
- package/src/games/whack-a-mole/WhackAMoleGame.ts +233 -0
- package/src/games/whack-a-mole/WhackAMoleScene.ts +349 -0
- package/src/games/word-search/WordSearch.tsx +18 -0
- package/src/games/word-search/WordSearchWords.ts +1642 -0
- package/src/helpers/GamePatternData.ts +120 -0
- package/src/helpers/GameSettingsModal.tsx +384 -0
- package/src/helpers/GameTheme.tsx +37 -0
- package/src/helpers/IconPaths.ts +6 -0
- package/src/helpers/index.ts +2 -0
- package/src/index.tsx +60 -0
- package/src/services/GameAssetLoader.ts +111 -0
- package/src/services/GameAssets.ts +149 -0
- package/src/services/GameLoaders.ts +93 -0
- package/src/services/GamesConstants.ts +193 -0
- package/src/services/GamesMetadata.ts +711 -0
- package/src/services/GamesService.ts +116 -0
- package/src/services/HapticsService.ts +48 -0
- package/src/services/ScoringService.ts +19 -0
- package/src/services/SfxSources.ts +81 -0
- package/src/services/SoundsService.ts +582 -0
- package/src/services/ThemeService.ts +281 -0
- package/src/services/UtilsService.ts +134 -0
- package/src/services/index.ts +6 -0
- package/lib/module/games/arrows/ArrowsService.js +0 -1
- package/lib/module/games/arrows/ArrowsStore.js +0 -1
- package/lib/module/games/arrows/components/ArrowsGrid.js +0 -1
- package/lib/module/games/arrows/components/ScoreBoard.js +0 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterService.js +0 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +0 -1
- package/lib/module/games/balloon-blaster/components/BalloonComponent.js +0 -1
- package/lib/module/games/balloon-blaster/components/GameArea.js +0 -1
- package/lib/module/games/balloon-blaster/components/GameBackground.js +0 -1
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js +0 -1
- package/lib/module/games/bike-racing/BikeRacingService.js +0 -1
- package/lib/module/games/bike-racing/BikeRacingStore.js +0 -1
- package/lib/module/games/bike-racing/components/BikeComponent.js +0 -1
- package/lib/module/games/bike-racing/components/GameBackground.js +0 -1
- package/lib/module/games/bike-racing/components/ScoreBoard.js +0 -1
- package/lib/module/games/block-blast/BlockBlastService.js +0 -1
- package/lib/module/games/block-blast/BlockBlastStore.js +0 -1
- package/lib/module/games/block-blast/components/BlockPieceComponent.js +0 -1
- package/lib/module/games/block-blast/components/GameArea.js +0 -1
- package/lib/module/games/block-blast/components/GridComponent.js +0 -1
- package/lib/module/games/block-blast/components/ScoreBoard.js +0 -1
- package/lib/module/games/block-breaker/BlockBreakerService.js +0 -1
- package/lib/module/games/block-breaker/BlockBreakerStore.js +0 -1
- package/lib/module/games/block-breaker/components/BlastAnimation.js +0 -1
- package/lib/module/games/block-breaker/components/GameArea.js +0 -1
- package/lib/module/games/block-breaker/components/ScoreBoard.js +0 -1
- package/lib/module/games/bluk/BlukService.js +0 -1
- package/lib/module/games/bluk/BlukStore.js +0 -1
- package/lib/module/games/bluk/components/GameArea.js +0 -1
- package/lib/module/games/bluk/components/GameBackground.js +0 -1
- package/lib/module/games/bluk/components/ScoreBoard.js +0 -1
- package/lib/module/games/bubble-shooter/BubbleShooterService.js +0 -1
- package/lib/module/games/bubble-shooter/BubbleShooterStore.js +0 -1
- package/lib/module/games/bubble-shooter/components/GameArea.js +0 -1
- package/lib/module/games/bubble-shooter/components/ScoreBoard.js +0 -1
- package/lib/module/games/candy-crush/CandyCrushService.js +0 -1
- package/lib/module/games/candy-crush/CandyCrushStore.js +0 -1
- package/lib/module/games/candy-crush/components/CandyItem.js +0 -1
- package/lib/module/games/candy-crush/components/GameGrid.js +0 -1
- package/lib/module/games/candy-crush/components/ScoreBoard.js +0 -1
- package/lib/module/games/car-racing/CarRacingService.js +0 -1
- package/lib/module/games/car-racing/CarRacingStore.js +0 -1
- package/lib/module/games/car-racing/components/CarComponent.js +0 -1
- package/lib/module/games/car-racing/components/GameBackground.js +0 -1
- package/lib/module/games/car-racing/components/ScoreBoard.js +0 -1
- package/lib/module/games/chameleon-run/ChameleonRunService.js +0 -1
- package/lib/module/games/chameleon-run/ChameleonRunStore.js +0 -1
- package/lib/module/games/chameleon-run/components/GameArea.js +0 -1
- package/lib/module/games/chameleon-run/components/GameBackground.js +0 -1
- package/lib/module/games/chameleon-run/components/ScoreBoard.js +0 -1
- package/lib/module/games/checkers/CheckersService.js +0 -1
- package/lib/module/games/checkers/CheckersStore.js +0 -1
- package/lib/module/games/checkers/components/GameBoard.js +0 -1
- package/lib/module/games/checkers/components/ScoreBoard.js +0 -1
- package/lib/module/games/color-switch/ColorSwitchService.js +0 -1
- package/lib/module/games/color-switch/ColorSwitchStore.js +0 -1
- package/lib/module/games/color-switch/components/GameArea.js +0 -1
- package/lib/module/games/color-switch/components/ScoreBoard.js +0 -1
- package/lib/module/games/colors-sort/ColorsSortService.js +0 -1
- package/lib/module/games/colors-sort/ColorsSortStore.js +0 -1
- package/lib/module/games/colors-sort/components/ColorContainer.js +0 -1
- package/lib/module/games/colors-sort/components/ScoreBoard.js +0 -1
- package/lib/module/games/connect-em-all/ConnectEmAllService.js +0 -1
- package/lib/module/games/connect-em-all/ConnectEmAllStore.js +0 -1
- package/lib/module/games/connect-em-all/components/GameBoard.js +0 -1
- package/lib/module/games/connect-em-all/components/ScoreBoard.js +0 -1
- package/lib/module/games/crossy-road/CrossyRoadService.js +0 -1
- package/lib/module/games/crossy-road/CrossyRoadStore.js +0 -1
- package/lib/module/games/crossy-road/components/GameArea.js +0 -1
- package/lib/module/games/crossy-road/components/ScoreBoard.js +0 -1
- package/lib/module/games/dino-jump/DinoJumpService.js +0 -1
- package/lib/module/games/dino-jump/DinoJumpStore.js +0 -1
- package/lib/module/games/dino-jump/components/DinoSprite.js +0 -1
- package/lib/module/games/dino-jump/components/GameArea.js +0 -1
- package/lib/module/games/dino-jump/components/GameBackground.js +0 -1
- package/lib/module/games/dino-jump/components/ObstacleSprite.js +0 -1
- package/lib/module/games/dino-jump/components/ScoreBoard.js +0 -1
- package/lib/module/games/dino-jump/components/StarSprite.js +0 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesService.js +0 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesStore.js +0 -1
- package/lib/module/games/dots-and-boxes/components/GameBoard.js +0 -1
- package/lib/module/games/dots-and-boxes/components/ScoreBoard.js +0 -1
- package/lib/module/games/falling-sticks/FallingSticksService.js +0 -1
- package/lib/module/games/falling-sticks/FallingSticksStore.js +0 -1
- package/lib/module/games/falling-sticks/components/GameArea.js +0 -1
- package/lib/module/games/falling-sticks/components/GameBackground.js +0 -1
- package/lib/module/games/falling-sticks/components/ScoreBoard.js +0 -1
- package/lib/module/games/find-different-number/FindDifferentNumberService.js +0 -1
- package/lib/module/games/find-different-number/FindDifferentNumberStore.js +0 -1
- package/lib/module/games/find-different-number/components/GameGrid.js +0 -1
- package/lib/module/games/find-different-number/components/ScoreBoard.js +0 -1
- package/lib/module/games/flappy-bird/FlappyBirdStore.js +0 -1
- package/lib/module/games/flappy-bird/components/Bird.js +0 -1
- package/lib/module/games/flappy-bird/components/GameArea.js +0 -1
- package/lib/module/games/flappy-bird/components/GameBackground.js +0 -1
- package/lib/module/games/flappy-bird/components/Pipes.js +0 -1
- package/lib/module/games/flappy-bird/components/ScoreBoard.js +0 -1
- package/lib/module/games/fruit-merger/FruitMergerService.js +0 -1
- package/lib/module/games/fruit-merger/FruitMergerStore.js +0 -1
- package/lib/module/games/fruit-merger/components/FruitItem.js +0 -1
- package/lib/module/games/fruit-merger/components/GameArea.js +0 -1
- package/lib/module/games/fruit-merger/components/ScoreBoard.js +0 -1
- package/lib/module/games/fruit-ninja/FruitNinjaService.js +0 -1
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js +0 -1
- package/lib/module/games/fruit-ninja/components/FruitComponent.js +0 -1
- package/lib/module/games/fruit-ninja/components/GameArea.js +0 -1
- package/lib/module/games/fruit-ninja/components/GameBackground.js +0 -1
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js +0 -1
- package/lib/module/games/game-2048/Game2048Service.js +0 -1
- package/lib/module/games/game-2048/Game2048Store.js +0 -1
- package/lib/module/games/game-2048/components/GameGrid.js +0 -1
- package/lib/module/games/game-2048/components/ScoreBoard.js +0 -1
- package/lib/module/games/knife-hit/KnifeHitService.js +0 -1
- package/lib/module/games/knife-hit/KnifeHitStore.js +0 -1
- package/lib/module/games/knife-hit/components/GameArea.js +0 -1
- package/lib/module/games/knife-hit/components/ScoreBoard.js +0 -1
- package/lib/module/games/ludo-king/LudoKingService.js +0 -1
- package/lib/module/games/ludo-king/LudoKingStore.js +0 -1
- package/lib/module/games/ludo-king/components/Dice.js +0 -1
- package/lib/module/games/ludo-king/components/GameBoard.js +0 -1
- package/lib/module/games/ludo-king/components/ScoreBoard.js +0 -1
- package/lib/module/games/maze-runner/MazeRunnerStore.js +0 -1
- package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +0 -1
- package/lib/module/games/maze-runner/components/EnhancedGameArea.js +0 -1
- package/lib/module/games/maze-runner/components/ScoreBoard.js +0 -1
- package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +0 -1
- package/lib/module/games/maze-runner/components/WallComponent.js +0 -1
- package/lib/module/games/memory-match/MemoryMatchService.js +0 -1
- package/lib/module/games/memory-match/MemoryMatchStore.js +0 -1
- package/lib/module/games/memory-match/components/Card.js +0 -1
- package/lib/module/games/memory-match/components/GameBoard.js +0 -1
- package/lib/module/games/memory-match/components/ScoreBoard.js +0 -1
- package/lib/module/games/mine-sweeper/MineSweeperService.js +0 -1
- package/lib/module/games/mine-sweeper/MineSweeperStore.js +0 -1
- package/lib/module/games/mine-sweeper/components/GameArea.js +0 -1
- package/lib/module/games/mine-sweeper/components/ScoreBoard.js +0 -1
- package/lib/module/games/mob-control/MobControlService.js +0 -1
- package/lib/module/games/mob-control/MobControlStore.js +0 -1
- package/lib/module/games/mob-control/components/GameArea.js +0 -1
- package/lib/module/games/mob-control/components/ScoreBoard.js +0 -1
- package/lib/module/games/number-search/NumberSearchConstants.js +0 -1
- package/lib/module/games/number-search/NumberSearchService.js +0 -1
- package/lib/module/games/number-search/NumberSearchStore.js +0 -1
- package/lib/module/games/number-search/components/GameBoard.js +0 -1
- package/lib/module/games/number-search/components/NumberList.js +0 -1
- package/lib/module/games/number-search/components/ScoreBoard.js +0 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsService.js +0 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsStore.js +0 -1
- package/lib/module/games/nuts-and-bolts/components/GameBoard.js +0 -1
- package/lib/module/games/nuts-and-bolts/components/ScoreBoard.js +0 -1
- package/lib/module/games/pac-man/PacManService.js +0 -1
- package/lib/module/games/pac-man/PacManStore.js +0 -1
- package/lib/module/games/pac-man/components/GameCanvas.js +0 -1
- package/lib/module/games/pac-man/components/ScoreBoard.js +0 -1
- package/lib/module/games/paper-io/PaperIoService.js +0 -1
- package/lib/module/games/paper-io/PaperIoStore.js +0 -1
- package/lib/module/games/paper-io/components/GameArea.js +0 -1
- package/lib/module/games/paper-io/components/ScoreBoard.js +0 -1
- package/lib/module/games/perfect-circle/PerfectCircleService.js +0 -1
- package/lib/module/games/perfect-circle/PerfectCircleStore.js +0 -1
- package/lib/module/games/perfect-circle/components/DrawingCanvas.js +0 -1
- package/lib/module/games/perfect-circle/components/ScoreBoard.js +0 -1
- package/lib/module/games/pipe-connect/PipeConnectService.js +0 -1
- package/lib/module/games/pipe-connect/PipeConnectStore.js +0 -1
- package/lib/module/games/pipe-connect/components/GameArea.js +0 -1
- package/lib/module/games/pipe-connect/components/ScoreBoard.js +0 -1
- package/lib/module/games/popit-fidget/PopitFidgetService.js +0 -1
- package/lib/module/games/popit-fidget/PopitFidgetStore.js +0 -1
- package/lib/module/games/popit-fidget/components/BubbleComponent.js +0 -1
- package/lib/module/games/popit-fidget/components/FidgetGrid.js +0 -1
- package/lib/module/games/popit-fidget/components/ScoreBoard.js +0 -1
- package/lib/module/games/reversi/ReversiStore.js +0 -1
- package/lib/module/games/reversi/components/GameBoard.js +0 -1
- package/lib/module/games/reversi/components/ScoreBoard.js +0 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersService.js +0 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +0 -1
- package/lib/module/games/sliding-numbers/components/NumbersGrid.js +0 -1
- package/lib/module/games/sliding-numbers/components/ScoreBoard.js +0 -1
- package/lib/module/games/snake-3d/Snake3DService.js +0 -1
- package/lib/module/games/snake-3d/Snake3DStore.js +0 -1
- package/lib/module/games/snake-3d/components/GameGrid.js +0 -1
- package/lib/module/games/snake-3d/components/ScoreBoard.js +0 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersService.js +0 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersStore.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/Dice.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/GameBoard.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/ScoreBoard.js +0 -1
- package/lib/module/games/space-fighter/SpaceFighterService.js +0 -1
- package/lib/module/games/space-fighter/SpaceFighterStore.js +0 -1
- package/lib/module/games/space-fighter/components/AsteroidComponent.js +0 -1
- package/lib/module/games/space-fighter/components/GameArea.js +0 -1
- package/lib/module/games/space-fighter/components/GameBackground.js +0 -1
- package/lib/module/games/space-fighter/components/ScoreBoard.js +0 -1
- package/lib/module/games/space-fighter/components/Spacecraft3D.js +0 -1
- package/lib/module/games/space-fighter/components/SpacecraftPath.js +0 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireService.js +0 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireStore.js +0 -1
- package/lib/module/games/spider-solitaire/components/Card.js +0 -1
- package/lib/module/games/spider-solitaire/components/CardPile.js +0 -1
- package/lib/module/games/spider-solitaire/components/ScoreBoard.js +0 -1
- package/lib/module/games/stack-tower/StackTowerService.js +0 -1
- package/lib/module/games/stack-tower/StackTowerStore.js +0 -1
- package/lib/module/games/stack-tower/components/GameArea.js +0 -1
- package/lib/module/games/stack-tower/components/ScoreBoard.js +0 -1
- package/lib/module/games/sudoku/SudokuService.js +0 -1
- package/lib/module/games/sudoku/SudokuStore.js +0 -1
- package/lib/module/games/sudoku/components/GameArea.js +0 -1
- package/lib/module/games/sudoku/components/ScoreBoard.js +0 -1
- package/lib/module/games/tangram/TangramService.js +0 -1
- package/lib/module/games/tangram/TangramStore.js +0 -1
- package/lib/module/games/tangram/components/GameBoard.js +0 -1
- package/lib/module/games/tangram/components/ScoreBoard.js +0 -1
- package/lib/module/games/tank-1990/Tank1990Service.js +0 -1
- package/lib/module/games/tank-1990/Tank1990Store.js +0 -1
- package/lib/module/games/tank-1990/components/Controls.js +0 -1
- package/lib/module/games/tank-1990/components/GameBoard.js +0 -1
- package/lib/module/games/tank-1990/components/ScoreBoard.js +0 -1
- package/lib/module/games/tic-tac-toe/TicTacToeService.js +0 -1
- package/lib/module/games/tic-tac-toe/TicTacToeStore.js +0 -1
- package/lib/module/games/tic-tac-toe/components/GameBoard.js +0 -1
- package/lib/module/games/tic-tac-toe/components/ScoreBoard.js +0 -1
- package/lib/module/games/tile-home/TileHomeService.js +0 -1
- package/lib/module/games/tile-home/TileHomeStore.js +0 -1
- package/lib/module/games/tile-home/components/AnimatingTile.js +0 -1
- package/lib/module/games/tile-home/components/FlyingTile.js +0 -1
- package/lib/module/games/tile-home/components/GameBoard.js +0 -1
- package/lib/module/games/tile-home/components/ScoreBoard.js +0 -1
- package/lib/module/games/tile-home/components/TileItem.js +0 -1
- package/lib/module/games/tile-home/components/TileSlot.js +0 -1
- package/lib/module/games/whack-a-mole/WhackAMoleService.js +0 -1
- package/lib/module/games/whack-a-mole/WhackAMoleStore.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameBackground.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameGrid.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameHole.js +0 -1
- package/lib/module/games/whack-a-mole/components/MoleCharacter.js +0 -1
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js +0 -1
- package/lib/module/games/word-search/WordSearchConstants.js +0 -1
- package/lib/module/games/word-search/WordSearchService.js +0 -1
- package/lib/module/games/word-search/WordSearchStore.js +0 -1
- package/lib/module/games/word-search/components/GameBoard.js +0 -1
- package/lib/module/games/word-search/components/ScoreBoard.js +0 -1
- package/lib/module/games/word-search/components/WordList.js +0 -1
- package/lib/module/helpers/AnimatedScore.js +0 -1
- package/lib/module/helpers/AnimationFrame.js +0 -1
- package/lib/module/helpers/AnimationTracker.js +0 -1
- package/lib/module/helpers/BlastAnimation.js +0 -1
- package/lib/module/helpers/ErrorHandler.js +0 -1
- package/lib/module/helpers/GameBackgroundPattern.js +0 -1
- package/lib/module/helpers/GameControlButton.js +0 -1
- package/lib/module/helpers/GameOverModal.js +0 -1
- package/lib/module/helpers/GameTimer.js +0 -1
- package/lib/module/helpers/Icons.js +0 -1
- package/lib/module/helpers/ParticleBlast.js +0 -1
- package/lib/module/helpers/ScoreBoardContainer.js +0 -1
- package/lib/module/helpers/assets/apple-fruit.js +0 -1
- package/lib/module/helpers/assets/avocado-item.js +0 -1
- package/lib/module/helpers/assets/banana-fruit.js +0 -1
- package/lib/module/helpers/assets/bomb-item.js +0 -1
- package/lib/module/helpers/assets/broccoli-item.js +0 -1
- package/lib/module/helpers/assets/cherries-fruit.js +0 -1
- package/lib/module/helpers/assets/donut-item.js +0 -1
- package/lib/module/helpers/assets/dragonfruit-item.js +0 -1
- package/lib/module/helpers/assets/fries-item.js +0 -1
- package/lib/module/helpers/assets/fruit-helpers.js +0 -1
- package/lib/module/helpers/assets/grapes-fruit.js +0 -1
- package/lib/module/helpers/assets/icecream-item.js +0 -1
- package/lib/module/helpers/assets/index.js +0 -1
- package/lib/module/helpers/assets/kiwi-fruit.js +0 -1
- package/lib/module/helpers/assets/mango-fruit.js +0 -1
- package/lib/module/helpers/assets/orange-fruit.js +0 -1
- package/lib/module/helpers/assets/papaya-fruit.js +0 -1
- package/lib/module/helpers/assets/papaya-full-fruit.js +0 -1
- package/lib/module/helpers/assets/peach-fruit.js +0 -1
- package/lib/module/helpers/assets/pineapple-fruit.js +0 -1
- package/lib/module/helpers/assets/pomegranate-fruit.js +0 -1
- package/lib/module/helpers/assets/pumpkin-fruit.js +0 -1
- package/lib/module/helpers/assets/raspberry-item.js +0 -1
- package/lib/module/helpers/assets/star-item.js +0 -1
- package/lib/module/helpers/assets/strawberry-fruit.js +0 -1
- package/lib/module/helpers/assets/watermelon-fruit.js +0 -1
- package/lib/module/types.d.js +0 -1
- package/lib/typescript/src/games/arrows/ArrowsService.d.ts +0 -6
- package/lib/typescript/src/games/arrows/ArrowsStore.d.ts +0 -51
- package/lib/typescript/src/games/arrows/components/ArrowsGrid.d.ts +0 -13
- package/lib/typescript/src/games/arrows/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +0 -80
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +0 -30
- package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts +0 -9
- package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +0 -9
- package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +0 -44
- package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +0 -68
- package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +0 -12
- package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +0 -16
- package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +0 -70
- package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +0 -11
- package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +0 -11
- package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +0 -8
- package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/block-breaker/BlockBreakerService.d.ts +0 -88
- package/lib/typescript/src/games/block-breaker/BlockBreakerStore.d.ts +0 -47
- package/lib/typescript/src/games/block-breaker/components/BlastAnimation.d.ts +0 -15
- package/lib/typescript/src/games/block-breaker/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/block-breaker/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bluk/BlukService.d.ts +0 -71
- package/lib/typescript/src/games/bluk/BlukStore.d.ts +0 -52
- package/lib/typescript/src/games/bluk/components/GameArea.d.ts +0 -17
- package/lib/typescript/src/games/bluk/components/GameBackground.d.ts +0 -9
- package/lib/typescript/src/games/bluk/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +0 -35
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +0 -63
- package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts +0 -37
- package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts +0 -53
- package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts +0 -11
- package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts +0 -5
- package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +0 -44
- package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +0 -68
- package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +0 -12
- package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/chameleon-run/ChameleonRunService.d.ts +0 -76
- package/lib/typescript/src/games/chameleon-run/ChameleonRunStore.d.ts +0 -48
- package/lib/typescript/src/games/chameleon-run/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/chameleon-run/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/chameleon-run/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/checkers/CheckersService.d.ts +0 -6
- package/lib/typescript/src/games/checkers/CheckersStore.d.ts +0 -48
- package/lib/typescript/src/games/checkers/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/checkers/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/color-switch/ColorSwitchService.d.ts +0 -63
- package/lib/typescript/src/games/color-switch/ColorSwitchStore.d.ts +0 -43
- package/lib/typescript/src/games/color-switch/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/color-switch/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/colors-sort/ColorsSortService.d.ts +0 -61
- package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts +0 -56
- package/lib/typescript/src/games/colors-sort/components/ColorContainer.d.ts +0 -7
- package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllService.d.ts +0 -20
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllStore.d.ts +0 -48
- package/lib/typescript/src/games/connect-em-all/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/connect-em-all/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/crossy-road/CrossyRoadService.d.ts +0 -89
- package/lib/typescript/src/games/crossy-road/CrossyRoadStore.d.ts +0 -39
- package/lib/typescript/src/games/crossy-road/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/crossy-road/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts +0 -39
- package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts +0 -97
- package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts +0 -2
- package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts +0 -8
- package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts +0 -2
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesService.d.ts +0 -45
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesStore.d.ts +0 -37
- package/lib/typescript/src/games/dots-and-boxes/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/dots-and-boxes/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/falling-sticks/FallingSticksService.d.ts +0 -38
- package/lib/typescript/src/games/falling-sticks/FallingSticksStore.d.ts +0 -31
- package/lib/typescript/src/games/falling-sticks/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/falling-sticks/components/GameBackground.d.ts +0 -6
- package/lib/typescript/src/games/falling-sticks/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberService.d.ts +0 -6
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberStore.d.ts +0 -36
- package/lib/typescript/src/games/find-different-number/components/GameGrid.d.ts +0 -7
- package/lib/typescript/src/games/find-different-number/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts +0 -68
- package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts +0 -2
- package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts +0 -8
- package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts +0 -3
- package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts +0 -66
- package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts +0 -8
- package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaService.d.ts +0 -73
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaStore.d.ts +0 -38
- package/lib/typescript/src/games/fruit-ninja/components/FruitComponent.d.ts +0 -8
- package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/game-2048/Game2048Service.d.ts +0 -102
- package/lib/typescript/src/games/game-2048/Game2048Store.d.ts +0 -44
- package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/knife-hit/KnifeHitService.d.ts +0 -48
- package/lib/typescript/src/games/knife-hit/KnifeHitStore.d.ts +0 -41
- package/lib/typescript/src/games/knife-hit/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/knife-hit/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/ludo-king/LudoKingService.d.ts +0 -33
- package/lib/typescript/src/games/ludo-king/LudoKingStore.d.ts +0 -34
- package/lib/typescript/src/games/ludo-king/components/Dice.d.ts +0 -7
- package/lib/typescript/src/games/ludo-king/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/ludo-king/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/maze-runner/MazeRunnerStore.d.ts +0 -62
- package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts +0 -10
- package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts +0 -33
- package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +0 -24
- package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts +0 -24
- package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts +0 -9
- package/lib/typescript/src/games/memory-match/MemoryMatchService.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/MemoryMatchStore.d.ts +0 -42
- package/lib/typescript/src/games/memory-match/components/Card.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/mine-sweeper/MineSweeperService.d.ts +0 -22
- package/lib/typescript/src/games/mine-sweeper/MineSweeperStore.d.ts +0 -73
- package/lib/typescript/src/games/mine-sweeper/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/mine-sweeper/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/mob-control/MobControlService.d.ts +0 -74
- package/lib/typescript/src/games/mob-control/MobControlStore.d.ts +0 -66
- package/lib/typescript/src/games/mob-control/components/GameArea.d.ts +0 -11
- package/lib/typescript/src/games/mob-control/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/number-search/NumberSearchConstants.d.ts +0 -63
- package/lib/typescript/src/games/number-search/NumberSearchService.d.ts +0 -34
- package/lib/typescript/src/games/number-search/NumberSearchStore.d.ts +0 -70
- package/lib/typescript/src/games/number-search/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/number-search/components/NumberList.d.ts +0 -2
- package/lib/typescript/src/games/number-search/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsService.d.ts +0 -67
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsStore.d.ts +0 -45
- package/lib/typescript/src/games/nuts-and-bolts/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/nuts-and-bolts/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/pac-man/PacManService.d.ts +0 -73
- package/lib/typescript/src/games/pac-man/PacManStore.d.ts +0 -89
- package/lib/typescript/src/games/pac-man/components/GameCanvas.d.ts +0 -2
- package/lib/typescript/src/games/pac-man/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/paper-io/PaperIoService.d.ts +0 -70
- package/lib/typescript/src/games/paper-io/PaperIoStore.d.ts +0 -51
- package/lib/typescript/src/games/paper-io/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/paper-io/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +0 -15
- package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +0 -55
- package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +0 -8
- package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/pipe-connect/PipeConnectService.d.ts +0 -17
- package/lib/typescript/src/games/pipe-connect/PipeConnectStore.d.ts +0 -31
- package/lib/typescript/src/games/pipe-connect/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/pipe-connect/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts +0 -30
- package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +0 -33
- package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts +0 -10
- package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts +0 -10
- package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/reversi/ReversiStore.d.ts +0 -46
- package/lib/typescript/src/games/reversi/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/reversi/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts +0 -6
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts +0 -38
- package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts +0 -7
- package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/snake-3d/Snake3DService.d.ts +0 -29
- package/lib/typescript/src/games/snake-3d/Snake3DStore.d.ts +0 -49
- package/lib/typescript/src/games/snake-3d/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/snake-3d/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersService.d.ts +0 -22
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersStore.d.ts +0 -40
- package/lib/typescript/src/games/snakes-and-ladders/components/Dice.d.ts +0 -7
- package/lib/typescript/src/games/snakes-and-ladders/components/GameBoard.d.ts +0 -2
- package/lib/typescript/src/games/snakes-and-ladders/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts +0 -117
- package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts +0 -54
- package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts +0 -9
- package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts +0 -9
- package/lib/typescript/src/games/space-fighter/components/GameBackground.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/components/Spacecraft3D.d.ts +0 -11
- package/lib/typescript/src/games/space-fighter/components/SpacecraftPath.d.ts +0 -9
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireService.d.ts +0 -23
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireStore.d.ts +0 -71
- package/lib/typescript/src/games/spider-solitaire/components/Card.d.ts +0 -10
- package/lib/typescript/src/games/spider-solitaire/components/CardPile.d.ts +0 -12
- package/lib/typescript/src/games/spider-solitaire/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/stack-tower/StackTowerService.d.ts +0 -51
- package/lib/typescript/src/games/stack-tower/StackTowerStore.d.ts +0 -52
- package/lib/typescript/src/games/stack-tower/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/stack-tower/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/sudoku/SudokuService.d.ts +0 -24
- package/lib/typescript/src/games/sudoku/SudokuStore.d.ts +0 -65
- package/lib/typescript/src/games/sudoku/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/sudoku/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tangram/TangramService.d.ts +0 -6
- package/lib/typescript/src/games/tangram/TangramStore.d.ts +0 -34
- package/lib/typescript/src/games/tangram/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/tangram/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tank-1990/Tank1990Service.d.ts +0 -80
- package/lib/typescript/src/games/tank-1990/Tank1990Store.d.ts +0 -48
- package/lib/typescript/src/games/tank-1990/components/Controls.d.ts +0 -2
- package/lib/typescript/src/games/tank-1990/components/GameBoard.d.ts +0 -2
- package/lib/typescript/src/games/tank-1990/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeService.d.ts +0 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeStore.d.ts +0 -51
- package/lib/typescript/src/games/tic-tac-toe/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/tic-tac-toe/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tile-home/TileHomeService.d.ts +0 -1
- package/lib/typescript/src/games/tile-home/TileHomeStore.d.ts +0 -57
- package/lib/typescript/src/games/tile-home/components/AnimatingTile.d.ts +0 -9
- package/lib/typescript/src/games/tile-home/components/FlyingTile.d.ts +0 -16
- package/lib/typescript/src/games/tile-home/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/tile-home/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tile-home/components/TileItem.d.ts +0 -11
- package/lib/typescript/src/games/tile-home/components/TileSlot.d.ts +0 -7
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts +0 -32
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts +0 -39
- package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/whack-a-mole/components/GameGrid.d.ts +0 -10
- package/lib/typescript/src/games/whack-a-mole/components/GameHole.d.ts +0 -11
- package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts +0 -6
- package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/word-search/WordSearchConstants.d.ts +0 -63
- package/lib/typescript/src/games/word-search/WordSearchService.d.ts +0 -34
- package/lib/typescript/src/games/word-search/WordSearchStore.d.ts +0 -70
- package/lib/typescript/src/games/word-search/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/word-search/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/word-search/components/WordList.d.ts +0 -2
- package/lib/typescript/src/helpers/AnimatedScore.d.ts +0 -36
- package/lib/typescript/src/helpers/AnimationFrame.d.ts +0 -40
- package/lib/typescript/src/helpers/AnimationTracker.d.ts +0 -44
- package/lib/typescript/src/helpers/BlastAnimation.d.ts +0 -16
- package/lib/typescript/src/helpers/ErrorHandler.d.ts +0 -123
- package/lib/typescript/src/helpers/GameBackgroundPattern.d.ts +0 -7
- package/lib/typescript/src/helpers/GameControlButton.d.ts +0 -11
- package/lib/typescript/src/helpers/GameOverModal.d.ts +0 -15
- package/lib/typescript/src/helpers/GameTimer.d.ts +0 -26
- package/lib/typescript/src/helpers/Icons.d.ts +0 -12
- package/lib/typescript/src/helpers/ParticleBlast.d.ts +0 -11
- package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts +0 -85
- package/lib/typescript/src/helpers/assets/apple-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/avocado-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/banana-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/bomb-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/broccoli-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/cherries-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/donut-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/dragonfruit-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/fries-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/fruit-helpers.d.ts +0 -154
- package/lib/typescript/src/helpers/assets/grapes-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/icecream-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/index.d.ts +0 -31
- package/lib/typescript/src/helpers/assets/kiwi-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/mango-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/orange-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/papaya-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/papaya-full-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/peach-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pineapple-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pomegranate-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pumpkin-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/raspberry-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/star-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/strawberry-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/watermelon-fruit.d.ts +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export const GRID=20;export const INITIAL_LENGTH=3;export const POINTS_PER_FOOD=1e3;export const POINTS_PER_SPECIAL_FOOD=2e3;export const SPECIAL_FOOD_CHANCE=.15;export const SPECIAL_FOOD_DURATION=10;const MAX_FOOD_ATTEMPTS=100;export const VECTORS={UP:[0,-1],DOWN:[0,1],LEFT:[-1,0],RIGHT:[1,0]};const OPPOSITE={UP:"DOWN",DOWN:"UP",LEFT:"RIGHT",RIGHT:"LEFT"};export function initialSnake(){const t=Math.floor(10),n=[];for(let e=0;e<3;e++)n.push(t-e,t);return n}const onSnake=(t,n,e)=>{for(let o=0;o<e.length;o+=2)if(e[o]===t&&e[o+1]===n)return!0;return!1};export function generateFood(t,n,e,o){let r=0,s=0,i=0;do{r=Math.floor(20*Math.random()),s=Math.floor(20*Math.random()),i++}while(i<100&&onSnake(r,s,t));const l={id:e,x:r,y:s,isSpecial:n};return n&&(l.expiresAt=o+10),l}export const freshState=()=>({snake:initialSnake(),direction:"RIGHT",nextDirection:"RIGHT",turns:[],food:null,nextFoodId:1});export function turn(t,n){const e=t.turns[t.turns.length-1]??t.direction;t.turns.length>=2||n===e||OPPOSITE[e]===n||(t.turns.push(n),t.nextDirection=t.turns[0])}export function step(t,n){const e=t.nextDirection;t.turns.shift(),t.nextDirection=t.turns[0]??e;const o=t.snake,[r,s]=VECTORS[e],i=o[0]+r,l=o[1]+s,a=new Array(o.length);a[0]=i,a[1]=l;for(let t=2;t<o.length;t++)a[t]=o[t-2];t.direction=e;const u=i<0||i>=20||l<0||l>=20;let x=!1;if(!u)for(let t=2;t<a.length;t+=2)if(a[t]===i&&a[t+1]===l){x=!0;break}if(u||x)return{crash:!0,ate:null,newFood:null,grew:!1};const d=t.food;let h=a,O=null,p=null;return d&&i===d.x&&l===d.y?(h=a.slice(),h.push(a[a.length-2],a[a.length-1]),p=d,O=generateFood(h,Math.random()<.15,t.nextFoodId++,n)):d&&d.isSpecial&&void 0!==d.expiresAt&&n>d.expiresAt&&(O=generateFood(a,!1,t.nextFoodId++,n)),t.snake=h,O&&(t.food=O),{crash:!1,ate:p,newFood:O,grew:null!==p}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,merge,Path,quat,shapeGeometry}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{getFruits}from"../shared/EngineFruits.js";import{cacheGameAsset,createGameMesh as _0xf60571}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{COLORS,gridPoint}from"./Snake3DConstants.js";import{sampleSnakeMotion}from"./Snake3DMotion.js";import{GRID}from"./Snake3DRules.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("snake-3d/Snake3DScene:"+e,o),meshes.set(e,t)),t},BOARD_DEPTH=10,BACKDROP_DEPTH=30,STAND_UP=quat.x(Math.PI/2),headTurn=[0,0,0,1],HEADING={RIGHT:0,UP:Math.PI/2,LEFT:Math.PI,DOWN:-Math.PI/2},panelMesh=(e,o)=>cached("s3-panel:"+e+":"+o,()=>_0xf60571(extrude((new Path).addRoundedRect(-e/2,-e/2,e,e,o),{depth:10}),{shine:.2})),checkerMesh=()=>cached("s3-checker",()=>{const e=[];for(let o=0;o<GRID;o++)for(let t=0;t<GRID;t++)(t+o)%2&&e.push({geometry:shapeGeometry("cube"),position:[t+.5-GRID/2,GRID/2-o-.5,0],scale:[1,1,.02]});return _0xf60571(merge(e),{center:!1})}),rimMesh=(e,o,t,s)=>cached("s3-rim:"+e.toFixed(1)+":"+o.toFixed(1)+":"+t+":"+s.toFixed(1),()=>{const a=e+2*o;return _0xf60571(extrude((new Path).addRoundedRect(-a/2,-a/2,a,a,t).addRect(-e/2,-e/2,e,e),{depth:s,fillRule:"evenodd"}),{shine:.2})}),starMesh=()=>cached("s3-star",()=>_0xf60571(extrude((new Path).addStar(0,0,.5,.22),{depth:.28}),{shine:.7})),lerp=(e,o,t)=>e+(o-e)*t,mix=(e,o,t)=>[lerp(e[0],o[0],t),lerp(e[1],o[1],t),lerp(e[2],o[2],t),1],beadSize=e=>e<.6?lerp(.8,.72,e/.6):lerp(.72,.3,((e-.6)/.4)**1.3),beadColor=(e,o)=>{const t=e<.5?mix(toColor(COLORS.HEAD),toColor(COLORS.BODY),2*e):mix(toColor(COLORS.BODY),toColor(COLORS.TAIL),2*e-1),s=o%3==0?.68:1;return[t[0]*s,t[1]*s,t[2]*s,1]},FLAT=.72,HEAD_SCALE=e=>[1.25*e,.95*e,.62*e];function spawnBoard(e,o,t){const s=[],a=o=>s.push(e.spawn({pickable:!1,...o})),n="classic"===t.mode,r=.5*o.cell;a({mesh:panelMesh(o.size+2*r,n?12:8),position:[0,0,-5],color:toColor(n?COLORS.CLASSIC_BOARD:t.BOARD.SURFACE)}),a({mesh:checkerMesh(),position:[0,0,.05],scale:o.cell,color:toColor(n?COLORS.CLASSIC_DARK:t.BOARD.CELL_EMPTY)});const l=.55*o.cell,i=toColor(n?COLORS.CLASSIC_RIM:t.BOARD.BORDER);return a({mesh:rimMesh(o.size,r,n?12:8,l),position:[0,0,l/2],color:i}),s}export function buildScene(e,o,t){const s=spawnBackdrop(e,o.width,o.height,-30,t);placeTiltedBackdrop(e,s,o,30);const a=.9*o.cell,n=e.spawn({mesh:"sphere",scale:HEAD_SCALE(a),color:toColor(COLORS.HEAD),pickable:!1});for(const o of[-1,1])e.spawn({mesh:"sphere",parent:n,position:[.12,.3*o,.26],scale:[.24,.2,.22],color:toColor(COLORS.EYE),pickable:!1}),e.spawn({mesh:"sphere",parent:n,position:[.2,.33*o,.33],scale:[.05,.13,.1],color:toColor(COLORS.PUPIL),pickable:!1}),e.spawn({mesh:"sphere",parent:n,position:[.47,.09*o,.22],scale:[.05,.04,.03],color:[.05,.05,.05,1],pickable:!1});const r=e.spawn({mesh:"none",parent:n,position:[.5,0,-.05],scale:[0,1,1],pickable:!1}),l=toColor(COLORS.TONGUE);e.spawn({mesh:"cube",parent:r,position:[.18,0,0],scale:[.36,.05,.03],color:l,pickable:!1});for(const o of[-1,1])e.spawn({mesh:"cube",parent:r,position:[.42,.05*o,0],rotation:quat.z(.5*o),scale:[.16,.04,.03],color:l,pickable:!1});return{backdrop:s,board:spawnBoard(e,o,t),head:n,tongue:r,beads:[],joints:[],food:null,foodId:-1}}export function removeScene(e,o){for(const t of[o.backdrop,...o.board,o.head,...o.beads,...o.joints,o.food])null!=t&&e.despawn(t)}export function setSceneTheme(e,o,t,s){setBackdropTheme(e,t.backdrop,s);for(const o of t.board)e.despawn(o);t.board=spawnBoard(e,o,s)}export function drawSnake(e,o,t,s,a,n){const r=e.transforms,l=a.length/2;for(;t.beads.length<l-1;)t.beads.push(e.spawn({mesh:"sphere",pickable:!1}));for(;t.joints.length<l-1;)t.joints.push(e.spawn({mesh:"sphere",pickable:!1}));for(let e=l-1;e<t.beads.length;e++)r.scale(t.beads[e],0);for(let e=l-1;e<t.joints.length;e++)r.scale(t.joints[e],0);let i=0,p=0,d=0;for(let e=0;e<l;e++){const[h,f,m,u]=sampleSnakeMotion(s,a,e,n),[C,S]=gridPoint(o,h+.5,f+.5),O=l>1?e/(l-1):0,b=(0===e?.45:beadSize(O)/2)*o.cell;if(0===e){if(r.position(t.head,C,S,.75*b),m||u){const e=quat.z(Math.atan2(-u,m),headTurn);r.rotation(t.head,e[0],e[1],e[2],e[3])}}else{const o=t.beads[e-1],s=beadColor(O,e);r.position(o,C,S,.72*b),r.scale(o,2*b,2*b,2*b*.72),r.color(o,s[0],s[1],s[2],s[3]??1);const a=(b+d)/2,n=t.joints[e-1],l=beadColor(O,e+1);r.position(n,(C+i)/2,(S+p)/2,.72*a*.95),r.scale(n,2*a,2*a,2*a*.72*.95),r.color(n,l[0],l[1],l[2],l[3]??1)}i=C,p=S,d=b}r.flush()}export function faceHead(e,o,t){e.set(o.head,{rotation:quat.z(HEADING[t])})}export function flick(e,o){e.animate(o.tongue,[{scale:[1,1,1],at:.35},{scale:[.85,1,1],at:.6},{scale:[0,1,1]}],{duration:.32})}export function resetSnake(e,o,t){const s=.9*o.cell;e.stopAnimation(t.head),e.set(t.head,{scale:HEAD_SCALE(s),color:toColor(COLORS.HEAD),rotation:quat.z(0)})}export function gulp(e,o,t,s){const a=.9*o.cell,[n,r,l]=HEAD_SCALE(a);e.animate(t.head,[{scale:[1.2*n,1.25*r,1.2*l],at:.3},{scale:HEAD_SCALE(a)}],{duration:.3});const[i,p]=gridPoint(o,s.x+.5,s.y+.5),d=[i,p,.5*o.cell];s.isSpecial?effects.sparkle(e,{position:d,count:26,size:.14*o.cell,speed:5*o.cell,lifetime:.6,gravity:6*-o.cell,colors:[toColor("#FFD54F"),toColor(COLORS.SPECIAL),[1,1,1,1]]}):effects.splash(e,{position:d,count:14,size:.14*o.cell,speed:5*o.cell,lifetime:.5,gravity:10*-o.cell,colors:[toColor("#E53935"),toColor("#FFCDD2")]})}export function crash(e,o,t,s){const a=toColor(COLORS.CRASH);e.animate(t.head,{color:a},{duration:.2});for(const o of[...t.beads,...t.joints])e.animate(o,{color:a},{duration:.35});e.animate(t.head,{shake:.25*o.cell},{duration:.4}),s.shake=.35*o.cell}export function placeFood(e,o,t,s){if(s&&s.id===t.foodId)return;if(null!=t.food&&e.despawn(t.food),t.food=null,t.foodId=s?s.id:-1,!s)return;const[a,n]=gridPoint(o,s.x+.5,s.y+.5),r=.8*o.cell,l=e.spawn({mesh:"none",position:[a,n,r/2],bob:{amplitude:[0,0,.12*o.cell],speed:4},spin:s.isSpecial?[0,0,2.5]:[0,0,0],pickable:!1});if(s.isSpecial)e.spawn({mesh:starMesh(),parent:l,rotation:STAND_UP,scale:1.15*r,color:toColor(COLORS.SPECIAL),pickable:!1}),e.spawn({mesh:"sphere",parent:l,scale:.55*r,color:[2,1.6,.5,.35],pickable:!1});else{const o=getFruits().apple,t=o.center;e.spawn({mesh:o.whole,parent:l,rotation:STAND_UP,position:[-t[0]*r,t[2]*r,-t[1]*r],scale:r,pickable:!1})}e.set(l,{scale:.01}),e.animate(l,{scale:1},{duration:.25,easing:"back"}),t.food=l}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{textColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{AI_COLOR,getLayout,LIGHT,PLAYER_COLOR,RIM}from"./SnakesAndLaddersConstants.js";import{createGame,dispose,reset,setLayout,setTheme,start,tap,tick}from"./SnakesAndLaddersGame.js";import{jsx as _0x4edadb}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.SNAKES_AND_LADDERS,FEEDBACK={tap:{sound:"TAP",haptic:HapticType.MEDIUM},roll:{sound:"ROLL"},six:{sound:"SIX",haptic:HapticType.SUCCESS},penalty:{sound:"PENALTY",haptic:HapticType.ERROR},cantMove:{sound:"CANT_MOVE",haptic:HapticType.WARNING,youOnly:!0},move:{sound:"MOVE",haptic:HapticType.LIGHT},snake:{sound:"SNAKE",haptic:HapticType.ERROR},ladder:{sound:"LADDER",haptic:HapticType.SUCCESS}};export const SnakesAndLadders=engineGame(GAME_IDS.SNAKES_AND_LADDERS,e=>{const[t,s]=useLiveState([0,0]),[a,n]=useLiveState(0),[i,o]=useLiveState(0),{status:r,screen:S,gameOver:p}=useEngineGame(e,{gameId:GAME_IDS.SNAKES_AND_LADDERS,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,a)=>{const n=getLayout(t,s,a);return setLayout(e,n),n.size*(1+2*RIM)},tap:tap,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.MEDIUM),onOver:(e,t)=>e("win"===t?SOUNDS.WIN:SOUNDS.GAME_OVER,"win"===t?HapticType.SUCCESS:HapticType.HEAVY),wire:(e,t)=>{e.onPositions=(e,t)=>s([e,t]),e.onScore=o,e.onTurn=n,e.onEvent=(e,s)=>{const a=FEEDBACK[e];a.youOnly&&0!==s||t(a.sound?SOUNDS[a.sound]:null,a.haptic)}}});return _0x4edadb(EngineGameScreen,{...S,light:LIGHT,columns:[textColumn("YOU",String(t[0]),PLAYER_COLOR),textColumn(0===a?"YOUR TURN":"AI TURN",i.toLocaleString()),textColumn("AI",String(t[1]),AI_COLOR)],subtext:"Race to 100!",gameOver:p({title:"win"===r?"YOU WON!":"YOU LOST!",message:"win"===r?"You reached 100 first!":"AI reached 100 first!",scoreLabel:"win"===r?"You Won!":"You Lost",score:i,buttonText:"win"===r?"Play Again!":"Try Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const _0x2f0cb8=_0x2856;function _0x2856(x,_){x-=429;const f=_0xab8f();let W=f[x];if(void 0===_0x2856.iuaxxF){const x=function(x,_){let f,W,o=[],t=0,b="";for(x=function(x){let _="",f="";for(let f,W,o=0,t=0;W=x.charAt(t++);~W&&(f=o%4?64*f+W:W,o++%4)?_+=String.fromCharCode(255&f>>(-2*o&6)):0)W="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(W);for(let x=0,W=_.length;x<W;x++)f+="%"+("00"+_.charCodeAt(x).toString(16)).slice(-2);return decodeURIComponent(f)}(x),W=0;W<256;W++)o[W]=W;for(W=0;W<256;W++)t=(t+o[W]+_.charCodeAt(W%_.length))%256,f=o[W],o[W]=o[t],o[t]=f;W=0,t=0;for(let _=0;_<x.length;_++)W=(W+1)%256,t=(t+o[W])%256,f=o[W],o[W]=o[t],o[t]=f,b+=String.fromCharCode(x.charCodeAt(_)^o[(o[W]+o[t])%256]);return b};_0x2856.sIsifH=x,_0x2856.Apbarg={},_0x2856.iuaxxF=!0}const o=f[0];_0x2856.cabWRI!==o&&(_0x2856.Apbarg={},_0x2856.cabWRI=o);const t=_0x2856.Apbarg[x];return void 0===t?(void 0===_0x2856.FdppNq&&(_0x2856.FdppNq=!0),W=_0x2856.sIsifH(W,_),_0x2856.Apbarg[x]=W):W=t,W}!function(){const x=_0x2856,_=_0xab8f();for(;;)try{if(524123==-parseInt(x(432,"(yZ("))/1*(-parseInt(x(526,"v^9@"))/2)+parseInt(x(485,"v^9@"))/3*(parseInt(x(470,"t%x#"))/4)+parseInt(x(454,"Ye&s"))/5+parseInt(x(551,"V3uT"))/6+-parseInt(x(549,"mMqX"))/7+-parseInt(x(513,"gcJ6"))/8*(-parseInt(x(525,"&K8p"))/9)+-parseInt(x(486,"pVS*"))/10)break;_.push(_.shift())}catch(x){_.push(_.shift())}}();import{getGameDimensions}from"../../services/UtilsService.js";export const BOARD_SIZE=10;export const TOTAL_CELLS=100;export const WINNING_POSITION=100;const GAME_WIDTH=getGameDimensions()[_0x2f0cb8(471,"mMqX")];export const BOARD_DIMENSION=GAME_WIDTH;function _0xab8f(){const x=["gSktECohpr7cSq","WPZdIeNcJq","zmk/WRdcQ2LCW4hcKKWgAvGc","WPD2mSoYW7TBxCk/a8kD","WR/cMmkRW7xcU0dcN8o+W7VdLgFdKa","C0mrWPO8WQ4T","ySkcEmku","WPHQn8oCWOCgsq","W6ZcU2XMW4rE","vwOqvSkqAfm","WPHQnSoBWOj3tW","q33dMSoHW4VdVmojW549ja","W7FcPxDeW4O","eK3cHCozuxpdK8k4W6hdLtrpzSk/W4idW6tcLCoD","CmodWRLoWP0","WOVdHKW","bSohW4tdHX47W7hcMMykzvO","W7L3W5/cNCkIC3i","W4vdtSkuW6/dNXi","W4hdPmoywIacBW","f8kXW4pcT25iWQW","W5jFW7awoCkxya","W4hdP8oEj1ihgG","WRXaW5ryWRe","WQFcIbdcVCkHW6G4","W4SoWQS","W7C+W7ldVmohsxC","CZKrWPPlW5GH","WQrzsmkcW6ZdNX5Xt8kymSoq","W7L0W7JcNCorDha","F3P0","W4qJACkPW64","D8oucvtcQLqp","qX3dNSknthFdHW","D8kPEfhdLLej","DmokWRPnWPy","WP/cTSkjW5W","athdQ8krW5K1WRG","WRX7W5vKWPO","e0uyW69qWRLCeSod","kSoYzaJcNY7cKqddVXuZWPK","WONcUw7dO8kTbHe","wmk1b0ijDCkt","ce/cHSoC","eaupW5NdJWm","WOdcGmoart8","tCoioG","xJfOWORcTq","v8kCWP3cNv4","WO/cUKDkwa","W5iVWOevpmkszG","n8o+uaJdOq","zeJdSSoF","W7O7f8kdW4NdGSoH","WO7cHCoiqIfmwhFcIW","feVcJSou","WO1RqCoDW7CYoCkWkmo5","E3zKtSkh","e0/dKq7dUmkAW74","m284W4X9","W5eCASoJWRZdTmkI","omk3qL3cQCo3bq5vWR5GW6hdHG","ESoIrvmd","W48WaG","WOtcICodrJq","zNtdPSocWQ5ZW5q","W4hdOmkTicachW","kCkJkmkZW4pdOCk7","W5BcThtcRmkK","Cmk2oKVdMa","WOVdHKZcJSoG","eZNcMCkuWOenWPOMWP8q","W67dSCkDFhOWvSo6WPNdR8kyWR/cLcG","zSojWQu","W4uPACkQW6u","uCock8oI","yCoNeaO","D8kKEfpcO1qn","pmo0xqm","m2VdMCo3W5RdPCoi","W7C5WOxcGSk5ohC","bKtdKhtcICoRW7xcOmklhSorW70J","W4ZdOCoFW6ZcPeDw","qCkWcuVdHW","trBdMmkApZjkWQFcTG","W4iwumkKW5K","WP3cImo2cqLfiSkt","W5tcLmoAufz2yMuXu8o8dq","D8k2WR3cVNnmW5hcGuSaFG","DCk6WQ7cSwncW5hcGq","o8kcAqNcNIRdIW","eZxdKq7dUmoVW7q","eGpdQCocWP3dOG","au3cNCkrWQTgWR8","W5iPDq","CZerWPS3WQ8G","wb/cHIxdLCk1WQdcHmkl","wSoijSoPFW","gCkwlwHd","auhdMhtcJ8oSWOxcQSkhhmorW4S","WQ4JW5xdHq","n8kDWPmlW5S","W6FcOtRcLmoQ","fSk9WR42W61clqpcICkbW4a","emktWQDyW7K1FComFa","W4ZdPSkOWPhcRdiI","BJddS8kVeXW","wmoSeWFdSG","iwtcRSo1obFcTSoxWP/cPLaQgmoEWQzKWP7dRG","WRxcOSoUyqH6FfRcS8krfbFdTbzn","ea8xW4hdMq","krNdVSoGW4RdTSozW7G","eZZcNCkqW5LdW4ekWQqfW5nvW6m","WOpcSSkbW5q","uHNcLtNdLSkX","v8kNWPZcOxu","WRSHW5/dJmo8na","jftcVCoIW7ze","W5mXWRKYcq","WPHWz8k8W53dPq","nNTIwtu","WPnimmkZW6FcTa","WRWAWQlcOa","w8ooWOudWQfUxW","vIi5cwZcUCkVBCkDWOhcICo/","WQJcKSkSW7ZcQLhcMmoYW73dMgddNmooueWq","WP/cUmkq","fSksmq","W7XrW78YWQNdT8kM","FCoTaq","WPVdJ8kE","WRqyua","W5m2fCkhW54Th8kCnG","m2ZcRCo2W5RcMSoj","WRKTyWq","oI0XcCoDrmo7euhcU8kcW4C","WPRdJKlcGmk6W4hdUu0VW4iEFd3dUKNdQqZcQmky","W57cMXhdMmkIW4BdPYfRWRT8dMK","WOFdICkjWRZdSbL3W69b","uvi/WPVdPvJdQq","n1dcVmoMWRahW5VdJtpcSWbGkW3cS8o4x8k4DSkig8koW6O","WQGLW57dImk6CNuZrCkfxSkGw8kItJ/dTLZcNmoMW6SWkW","WONcUmkuW4tcMNi"];return(_0xab8f=function(){return x})()}export const INNER_BOARD_DIMENSION=BOARD_DIMENSION;export const CELL_SIZE=BOARD_DIMENSION/10;export const TOKEN_RADIUS=.22*CELL_SIZE;const _0x6bf13f={};_0x6bf13f.BOARD_DIMENSION=BOARD_DIMENSION,_0x6bf13f.INNER_BOARD_DIMENSION=INNER_BOARD_DIMENSION,_0x6bf13f[_0x2f0cb8(453,"6jWt")]=CELL_SIZE,_0x6bf13f[_0x2f0cb8(561,"vjD2")]=TOKEN_RADIUS;export const SNL_LAYOUT=_0x6bf13f;const _0x29d659={};_0x29d659[_0x2f0cb8(457,"IfFH")]=16,_0x29d659[_0x2f0cb8(558,"V3uT")]=6,_0x29d659[_0x2f0cb8(511,"8D9J")]=_0x2f0cb8(557,"8D9J"),_0x29d659.accent="#2E7D32",_0x29d659[_0x2f0cb8(571,"!(3E")]=_0x2f0cb8(436,"dXO$");const _0x770f0a={};_0x770f0a[_0x2f0cb8(490,"CL@q")]=47,_0x770f0a[_0x2f0cb8(469,"IfFH")]=26,_0x770f0a[_0x2f0cb8(488,"BipH")]=_0x2f0cb8(566,"K956"),_0x770f0a.accent="#C62828",_0x770f0a[_0x2f0cb8(445,"BipH")]=_0x2f0cb8(542,"W]4@");const _0x10b4e6={};_0x10b4e6[_0x2f0cb8(457,"IfFH")]=49,_0x10b4e6[_0x2f0cb8(514,"BzQG")]=11,_0x10b4e6[_0x2f0cb8(452,"W]4@")]=_0x2f0cb8(451,"v^9@"),_0x10b4e6[_0x2f0cb8(535,"^S(a")]="#6A1B9A",_0x10b4e6[_0x2f0cb8(512,"!(r(")]=_0x2f0cb8(562,"6jWt");const _0x166631={};_0x166631[_0x2f0cb8(527,"vjD2")]=62,_0x166631[_0x2f0cb8(466,"&K8p")]=19,_0x166631[_0x2f0cb8(515,"*KLv")]=_0x2f0cb8(507,"v^9@"),_0x166631[_0x2f0cb8(530,"BzQG")]=_0x2f0cb8(467,"%92A"),_0x166631.belly=_0x2f0cb8(480,"dXO$");const _0x1cc621={head:72,tail:54};_0x1cc621[_0x2f0cb8(465,"7eiM")]="#F4511E",_0x1cc621.accent=_0x2f0cb8(504,"Ye&s"),_0x1cc621.belly="#FFAB91";const _0x40af4a={};_0x40af4a[_0x2f0cb8(492,"7eiM")]=87,_0x40af4a[_0x2f0cb8(450,"vjD2")]=24,_0x40af4a.color=_0x2f0cb8(564,"t%x#"),_0x40af4a[_0x2f0cb8(531,"1cOJ")]="#4527A0",_0x40af4a[_0x2f0cb8(524,"Pv9G")]=_0x2f0cb8(433,"dXO$");const _0x1caf25={};_0x1caf25[_0x2f0cb8(536,"81Mn")]=93,_0x1caf25[_0x2f0cb8(450,"vjD2")]=73,_0x1caf25[_0x2f0cb8(465,"7eiM")]=_0x2f0cb8(505,"gcJ6"),_0x1caf25[_0x2f0cb8(535,"^S(a")]=_0x2f0cb8(441,"6jWt"),_0x1caf25[_0x2f0cb8(478,"AJua")]=_0x2f0cb8(547,"&K8p");const _0x37f24f={};_0x37f24f[_0x2f0cb8(563,"p@aw")]=98,_0x37f24f[_0x2f0cb8(548,"Rz76")]=78,_0x37f24f[_0x2f0cb8(484,"V3uT")]=_0x2f0cb8(509,"6jWt"),_0x37f24f.accent="#1565C0",_0x37f24f.belly=_0x2f0cb8(472,"gcJ6");export const SNAKES=[_0x29d659,_0x770f0a,_0x10b4e6,_0x166631,_0x1cc621,_0x40af4a,_0x1caf25,_0x37f24f];const _0x307507={bottom:1};_0x307507[_0x2f0cb8(543,"CL@q")]=38,_0x307507.color="#6D4C41",_0x307507.highlight="#8D6E63";const _0x4d5310={bottom:4,top:14};_0x4d5310[_0x2f0cb8(516,"6W)v")]=_0x2f0cb8(567,"t%x#"),_0x4d5310.highlight=_0x2f0cb8(447,"IfFH");const _0x38c262={};_0x38c262[_0x2f0cb8(506,"tUQS")]=9,_0x38c262.top=31,_0x38c262[_0x2f0cb8(462,"yjJA")]=_0x2f0cb8(455,"RsVz"),_0x38c262[_0x2f0cb8(552,"tjY^")]="#6D4C41";const _0x2aa906={};_0x2aa906[_0x2f0cb8(556,"vjD2")]=21,_0x2aa906[_0x2f0cb8(544,"tjY^")]=42,_0x2aa906.color=_0x2f0cb8(474,"^S(a"),_0x2aa906[_0x2f0cb8(510,"gcJ6")]=_0x2f0cb8(496,"tjY^");const _0x575f98={bottom:28};_0x575f98[_0x2f0cb8(508,"BipH")]=84,_0x575f98.color=_0x2f0cb8(443,"BzQG"),_0x575f98[_0x2f0cb8(546,"t%x#")]=_0x2f0cb8(553,"Pv9G");const _0x50f28a={};_0x50f28a[_0x2f0cb8(458,"Pv9G")]=36,_0x50f28a[_0x2f0cb8(540,"vjD2")]=44,_0x50f28a.color=_0x2f0cb8(491,"7eiM"),_0x50f28a.highlight="#795548";const _0x2fd081={};_0x2fd081[_0x2f0cb8(520,"r1)n")]=51,_0x2fd081[_0x2f0cb8(460,"8D9J")]=67,_0x2fd081[_0x2f0cb8(516,"6W)v")]=_0x2f0cb8(537,"lrx@"),_0x2fd081[_0x2f0cb8(468,"AJua")]="#6D4C41";const _0x426818={};_0x426818[_0x2f0cb8(565,"[UXZ")]=71,_0x426818[_0x2f0cb8(477,"t%x#")]=91,_0x426818[_0x2f0cb8(473,"6jWt")]="#795548",_0x426818[_0x2f0cb8(518,"lrx@")]=_0x2f0cb8(440,"81Mn");const _0x42057d={};_0x42057d[_0x2f0cb8(565,"[UXZ")]=80,_0x42057d.top=99,_0x42057d.color=_0x2f0cb8(464,"sEqK"),_0x42057d.highlight=_0x2f0cb8(448,"7eiM");export const LADDERS=[_0x307507,_0x4d5310,_0x38c262,_0x2aa906,_0x575f98,_0x50f28a,_0x2fd081,_0x426818,_0x42057d];export const CELL_TRANSITIONS=(()=>{const x=_0x2f0cb8,_=new Map;for(const f of SNAKES)_.set(f[x(489,"8D9J")],f.tail);for(const f of LADDERS)_[x(444,"mMqX")](f.bottom,f[x(487,"!(3E")]);return _})();export const CELL_POSITIONS=(()=>{const x=_0x2f0cb8,_={};_[x(461,"T(Kf")]=function(x,_){return x/_},_[x(532,"8Ulo")]=function(x,_){return x===_},_[x(482,"aU53")]=function(x,_){return x-_},_[x(529,"yjJA")]=function(x,_){return x*_},_.YvXvj=function(x,_){return x+_};const f=_,W=new Array(101),o={};o[x(439,"8Ulo")]=0,o[x(429,"V3uT")]=0,o.x=0,o.y=0,o.cx=0,o.cy=0,W[0]=o;for(let _=1;_<=100;_++){const o=_-1,t=Math[x(459,"AJua")](f[x(521,"CL@q")](o,10)),b=o%10,d=f[x(476,"*Nk[")](t%2,0)?b:9-b,n=f[x(569,"[UXZ")](10,1)-t,e=d*CELL_SIZE,a=f[x(437,"W]4@")](n,CELL_SIZE);W[_]={row:n,col:d,x:e,y:a,cx:e+f[x(534,"57zo")](CELL_SIZE,2),cy:f[x(497,"Ye&s")](a,CELL_SIZE/2)}}return W})();const CELL_COLOR_PALETTE=[_0x2f0cb8(438,"6W)v"),_0x2f0cb8(479,"1cOJ"),_0x2f0cb8(493,"&K8p"),"#F8BBD0",_0x2f0cb8(519,"tjY^"),_0x2f0cb8(481,"p@aw"),_0x2f0cb8(434,"yjJA"),"#FFCCBC","#DCEDC8","#F0F4C3"];export const CELL_COLORS=(()=>{const x=_0x2f0cb8,_={};_[x(499,"BipH")]=function(x,_){return x-_},_.aJXiU=function(x,_){return x%_},_.hpkvu=function(x,_){return x+_};const f=_,W=new Array(101);W[0]=x(494,"81Mn");for(let _=1;_<=100;_++){const o=f[x(463,"wyz^")](_,1),t=Math[x(449,"!(3E")](o/10),b=f.aJXiU(o,10);W[_]=CELL_COLOR_PALETTE[f[x(483,"Ye&s")](t,b)%CELL_COLOR_PALETTE[x(533,"(yZ(")]]}return W})();export const SNAKE_HEAD_SET=new Set(SNAKES[_0x2f0cb8(545,"%92A")](x=>x[_0x2f0cb8(492,"7eiM")]));export const LADDER_BASE_SET=new Set(LADDERS[_0x2f0cb8(541,"!(r(")](x=>x[_0x2f0cb8(528,"gcJ6")]));const _0x46fd48={BOARD_BG:"#FFF8E1"};_0x46fd48[_0x2f0cb8(517,"*KLv")]=_0x2f0cb8(431,"BzQG"),_0x46fd48[_0x2f0cb8(502,"yjJA")]=_0x2f0cb8(550,"V3uT"),_0x46fd48[_0x2f0cb8(442,"(yZ(")]="#1E88E5",_0x46fd48[_0x2f0cb8(559,"yjJA")]="#1565C0",_0x46fd48.PLAYER_DARK="#0D47A1",_0x46fd48[_0x2f0cb8(503,"yjJA")]=_0x2f0cb8(446,"7eiM"),_0x46fd48[_0x2f0cb8(498,"r1)n")]="#C62828",_0x46fd48.AI_DARK="#B71C1C",_0x46fd48.CELL_NUMBER=_0x2f0cb8(570,"IfFH"),_0x46fd48[_0x2f0cb8(539,"vjD2")]=_0x2f0cb8(435,"sEqK"),_0x46fd48[_0x2f0cb8(523,"AJua")]=_0x2f0cb8(555,"BzQG"),_0x46fd48.LADDER_CELL_TINT=_0x2f0cb8(554,"1cOJ"),_0x46fd48[_0x2f0cb8(568,"&K8p")]="#E8F5E9",_0x46fd48.FINISH_CELL=_0x2f0cb8(456,"!(r(");export const SNL_COLORS=_0x46fd48;const _0x100b93={};_0x100b93[_0x2f0cb8(522,"IfFH")]=300,_0x100b93[_0x2f0cb8(500,"pVS*")]=800,_0x100b93.DICE_ROLL_DURATION=500;export const SNL_GAME_CONFIG=_0x100b93;
|
|
1
|
+
"use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{project}from"../shared/EngineTilt.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const BOARD_SIZE=10;export const WINNING_POSITION=100;export const MAX_SIXES=3;export const SNAKES=[{head:16,tail:6,color:"#43A047",accent:"#1B5E20",belly:"#C5E1A5"},{head:47,tail:26,color:"#E53935",accent:"#8E1B1B",belly:"#FFCDD2"},{head:49,tail:11,color:"#8E24AA",accent:"#4A148C",belly:"#E1BEE7"},{head:62,tail:19,color:"#F9A825",accent:"#5D4037",belly:"#FFF59D"},{head:72,tail:54,color:"#F4511E",accent:"#3E2723",belly:"#FFCCBC"},{head:87,tail:24,color:"#5E35B1",accent:"#FBC02D",belly:"#D1C4E9"},{head:93,tail:73,color:"#7CB342",accent:"#33691E",belly:"#F0F4C3"},{head:98,tail:78,color:"#1E88E5",accent:"#0D47A1",belly:"#BBDEFB"}];export const LADDERS=[{bottom:1,top:38,color:"#8D5A2B",highlight:"#C08A52"},{bottom:4,top:14,color:"#7A4A22",highlight:"#B07A45"},{bottom:9,top:31,color:"#8D5A2B",highlight:"#C08A52"},{bottom:21,top:42,color:"#7A4A22",highlight:"#B07A45"},{bottom:28,top:84,color:"#8D5A2B",highlight:"#C08A52"},{bottom:36,top:44,color:"#7A4A22",highlight:"#B07A45"},{bottom:51,top:67,color:"#8D5A2B",highlight:"#C08A52"},{bottom:71,top:91,color:"#7A4A22",highlight:"#B07A45"},{bottom:80,top:99,color:"#8D5A2B",highlight:"#C08A52"}];export const SNAKE_AT=new Map(SNAKES.map(t=>[t.head,t]));export const LADDER_AT=new Map(LADDERS.map(t=>[t.bottom,t]));export function landing(t,o){const e=t+o;return e>100?{step:t,end:t}:{step:e,end:SNAKE_AT.get(e)?.tail??LADDER_AT.get(e)?.top??e}}export function scoreFor(t,o){return 100===t?1e4+Math.round(50*(100-o)):100*t}export const CELL_PALETTE=["#FFF9C4","#C8E6C9","#BBDEFB","#F8BBD0","#FFE0B2","#D1C4E9","#B2EBF2","#FFCCBC","#DCEDC8","#F0F4C3"];export const START_CELL="#E8F5E9";export const FINISH_CELL="#FFF3E0";export const NUMBER_COLOR="#5B4E42";export const STAR_NUMBER_COLOR="#F57F17";export const PLAYER_COLOR="#43A047";export const AI_COLOR="#E53935";export const ROLL_TIME=.9;export const MOVE_DELAY=.4;export const HOP_TIME=.17;export const SLIDE_PAUSE=.15;export const NEXT_TURN_DELAY=.4;export const PENALTY_DELAY=1;export const CANT_MOVE_DELAY=.5;export const AI_DELAY=.8;export const TILT=.35;export const LIGHT=frontLight([-.35,.3,1],.5);export const RIM=.014;export const TILE_TOP=.013;export const DIE_SIZE=.15;export const DIE_Y=-.649;export const START_X=-.33;export const START_Z=.01;export const TOKEN_HEIGHT=.062;const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=110,TOP_EXTENT=.514,BOTTOM_EXTENT=.649+.15*.75;export function getLayout(t,o,e){const r=Math.cos(.35),n=getScoreBoardTop(e)+82,E=Math.max(200,o-n-110);return{width:t,height:o,size:Math.min(gameWidthFor(t)/1.028,E/(2*Math.max(.514,BOTTOM_EXTENT)*r)),centerY:n+E/2}}export function toView(t,o,e,r=0){return project({width:t.width,height:t.height,centerY:t.centerY,tilt:.35},o*t.size,e*t.size,r*t.size)}export function cellCenter(t){const o=t-1,e=Math.floor(o/10),r=o%10;return[((e%2==0?r:9-r)+.5)/10-.5,(e+.5)/10-.5]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{AI_DELAY,CANT_MOVE_DELAY,cellCenter,DIE_SIZE,DIE_Y,HOP_TIME,landing,MAX_SIXES,MOVE_DELAY,NEXT_TURN_DELAY,PENALTY_DELAY,ROLL_TIME,scoreFor,SLIDE_PAUSE,SNAKE_AT,START_X,START_Z,TILE_TOP,toView,WINNING_POSITION}from"./SnakesAndLaddersConstants.js";import{aimCamera,bobToken,buildScene,confetti,moveToken,placeToken,removeScene,rollDie,setSceneTheme,showRollHint,slidePath,snakeBite,sparkle}from"./SnakesAndLaddersScene.js";const WORLD_CAPACITY=600,MAX_STEP=.1,SLIDE_LIFT=.012,HOP_HEIGHT=.035;export function createGame(e){const o=new World(600),n={world:o,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",positions:[0,0],turn:0,sixes:0,busy:!1,rolling:!1,get score(){return o.scoreboard.score},won:!1,onPhase:e=>{},onPositions:(e,o)=>{},onScore:e=>{},onTurn:e=>{},onEvent:(e,o)=>{}};return o.scoreboard.reset(),n}function after(e,o,n){e.world.after(o,n)}export function setLayout(e,o){e.scene&&removeScene(e.world,e.scene),e.layout=o,aimCamera(e.camera,o),e.scene=buildScene(e.world,o,e.theme),arrange(e,!1),idle(e)}export function setTheme(e,o){e.theme=o,e.scene&&setSceneTheme(e.world,e.scene,o)}function spot(e,o,n){const t=0===o?-1:1;if(0===n)return[START_X+.03*t,DIE_Y,START_Z];const[r,s]=cellCenter(n);return[r+(e.positions[1-o]===n?.022*t:0),s,TILE_TOP]}function arrange(e,o){const{layout:n,scene:t}=e;if(n&&t)for(const r of[0,1]){const s=spot(e,r,e.positions[r]);o?moveToken(e.world,n,t,r,[s,s],.15):placeToken(e.world,n,t,r,s)}}function idle(e){const{layout:o,scene:n}=e;if(!o||!n)return;const t="playing"===e.phase;showRollHint(e.world,o,n,t&&!e.busy&&0===e.turn),bobToken(e.world,o,n,t&&!e.rolling?e.turn:null)}export function start(e){"ready"===e.phase&&(e.phase="playing",e.onPhase("playing"),idle(e))}export function reset(e){e.world.cancelTimers(),e.positions=[0,0],e.turn=0,e.sixes=0,e.busy=!1,e.rolling=!1,e.world.scoreboard.reset(),e.won=!1,e.phase="ready",arrange(e,!1),idle(e),e.onPositions(0,0),e.onScore(0),e.onTurn(0),e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function tick(e,o){e.world.isDisposed||e.world.update(Math.min(o,.1))}export function tap(e,o,n){const t=e.layout;if(!t||"playing"!==e.phase||e.busy||0!==e.turn)return;const[r,s]=toView(t,0,DIE_Y,DIE_SIZE/2),i=DIE_SIZE*t.size;(o-r)**2+(n-s)**2>i*i||(e.onEvent("tap",0),roll(e))}function roll(e){const{layout:o,scene:n}=e;if(!o||!n)return;e.busy=!0,e.rolling=!0,idle(e);const t=1+Math.floor(6*Math.random());e.onEvent("roll",e.turn),rollDie(e.world,o,n,t,ROLL_TIME,()=>e.world.isDisposed),after(e,ROLL_TIME,()=>rolled(e,t))}function rolled(e,o){const n=e.turn;return e.sixes=6===o?e.sixes+1:0,e.sixes>=MAX_SIXES?(e.onEvent("penalty",n),void after(e,PENALTY_DELAY,()=>nextTurn(e,!1))):landing(e.positions[n],o).step===e.positions[n]?(e.onEvent("cantMove",n),void after(e,CANT_MOVE_DELAY,()=>nextTurn(e,!1))):(6===o&&e.onEvent("six",n),void after(e,MOVE_DELAY,()=>move(e,o)))}function move(e,o){const n=e.turn,t=e.positions[n],{step:r,end:s}=landing(t,o);if(r===t)return e.onEvent("cantMove",n),void after(e,CANT_MOVE_DELAY,()=>nextTurn(e,!1));e.onEvent("move",n);for(let o=1;o<=r-t;o++)after(e,(o-1)*HOP_TIME,()=>{const{layout:r,scene:s}=e;r&&s&&moveToken(e.world,r,s,n,[spot(e,n,t+o-1),spot(e,n,t+o)],.95*HOP_TIME,.035)});after(e,(r-t)*HOP_TIME,()=>{setPosition(e,n,r),s===r?arrive(e,o):after(e,SLIDE_PAUSE,()=>slide(e,r,s,o))})}function slide(e,o,n,t){const{layout:r,scene:s}=e,i=e.turn,a=SNAKE_AT.has(o);e.onEvent(a?"snake":"ladder",i);const l=(slidePath(o)??[]).map(([e,o,n])=>[e,o,n+.012]),u=spot(e,i,n),[d,p]=cellCenter(o),[E,T]=cellCenter(n),f=(a?.55:.35)+Math.hypot(E-d,T-p)*(a?1.4:1);r&&s&&(a&&snakeBite(e.world,r,s,e.camera,i),moveToken(e.world,r,s,i,[spot(e,i,o),...l,u],f)),after(e,f,()=>{setPosition(e,i,n),!a&&e.layout&&sparkle(e.world,e.layout,u),arrive(e,t)})}function setPosition(e,o,n){e.positions[o]=n,arrange(e,!0),e.onPositions(e.positions[0],e.positions[1])}function arrive(e,o){e.world.scoreboard.set(scoreFor(e.positions[0],e.positions[1])),e.onScore(e.score);const n=e.turn;if(e.positions[n]===WINNING_POSITION)return e.won=0===n,e.phase="over",e.busy=!1,e.rolling=!1,e.layout&&confetti(e.world,e.layout,spot(e,n,WINNING_POSITION)),idle(e),void e.onPhase("over");after(e,NEXT_TURN_DELAY,()=>nextTurn(e,6===o))}function nextTurn(e,o){"playing"===e.phase&&(!o&&(e.turn=0===e.turn?1:0,e.sixes=0,e.onTurn(e.turn)),e.busy=1===e.turn,e.rolling=!1,idle(e),1===e.turn&&after(e,AI_DELAY,()=>roll(e)))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,lathe,merge,Path,quat,shapeGeometry,tube}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{dieMesh,dieRotation as _0xe82750,rollDie as _0x18b3f7}from"../shared/EngineDice.js";import{flatGlyphMesh,GLYPH_ADVANCE,GLYPH_WIDTH}from"../shared/EngineGlyphs.js";import{noise}from"../shared/EngineMeadow.js";import{cacheGameAsset,createGameMesh as _0x2ac545}from"../shared/EngineMeshes.js";import{aimTilted,placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{AI_COLOR,BOARD_SIZE,CELL_PALETTE,cellCenter,DIE_SIZE,DIE_Y,FINISH_CELL,LADDER_AT,LADDERS,NUMBER_COLOR,PLAYER_COLOR,RIM,SNAKE_AT,SNAKES,STAR_NUMBER_COLOR,START_CELL,START_X,START_Z,TILE_TOP,TILT,TOKEN_HEIGHT,WINNING_POSITION}from"./SnakesAndLaddersConstants.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("snakes-and-ladders/SnakesAndLaddersScene:"+e,o),meshes.set(e,t)),t},rgb=e=>{const[o,t,s]=toColor(e);return[o,t,s]},mix=(e,o,t)=>[e[0]+(o[0]-e[0])*t,e[1]+(o[1]-e[1])*t,e[2]+(o[2]-e[2])*t],shade=(e,o)=>[e[0]*o,e[1]*o,e[2]*o],smooth=(e,o,t)=>{const s=Math.min(1,Math.max(0,(t-e)/(o-e)));return s*s*(3-2*s)},sphere=()=>shapeGeometry("sphere"),cube=()=>shapeGeometry("cube"),STAND_UP=quat.x(Math.PI/2),along=(e,o,t)=>[e[0]+(o[0]-e[0])*t,e[1]+(o[1]-e[1])*t],SNAKE_POINTS=30,snakeRadius=e=>.0135*(.8+.2*smooth(0,.15,e))*(1-.85*smooth(.5,1,e));export function snakePath(e,o=!1){const t=cellCenter(e.head),s=cellCenter(e.tail),n=s[0]-t[0],r=s[1]-t[1],a=Math.hypot(n,r),i=[-r/a,n/a],l=Math.max(2,Math.round(a/.15)),h=Math.min(.042,.14*a);return Array.from({length:30},(e,n)=>{const r=n/29,[a,d]=along(t,s,r),p=h*Math.sin(Math.PI*l*r)*(1-.6*r);return[a+i[0]*p,d+i[1]*p,o?.8*snakeRadius(r):TILE_TOP]})}function snakeParts(e){const o=snakePath(e,!0),t=rgb(e.color),s=rgb(e.accent),n=rgb(e.belly),r=Math.hypot(o[0][0]-o[29][0],o[0][1]-o[29][1]),a=Math.max(6,Math.round(55*r)),i=tube(o,{radius:snakeRadius,sides:12,smoothness:4,color:({v:e,normal:o,position:r})=>{const i=.5+.5*Math.cos(2*Math.PI*a*e);let l=mix(t,s,smooth(.62,.86,i));return o[2]>.55&&i<.22&&(l=mix(l,n,.55)),o[2]<-.2&&(l=n),shade(l,.9+.2*noise(160*r[0],160*r[1]))}}),[l,h]=cellCenter(e.head),d=o[2],p=[l-d[0],h-d[1]],m=Math.hypot(p[0],p[1])||1;p[0]/=m,p[1]/=m;const I=[-p[1],p[0]],_=Math.atan2(p[1],p[0]),u=quat.z(_),T=(e,o,t)=>[l+p[0]*e+I[0]*o,h+p[1]*e+I[1]*o,t],E=mix(t,s,.25),A=[{geometry:i},{geometry:sphere(),position:T(.006,0,.011),scale:[.05,.038,.022],rotation:u,color:[...E,1]},{geometry:sphere(),position:T(.022,0,.009),scale:[.03,.027,.017],rotation:u,color:[...E,1]}];for(const e of[1,-1])A.push({geometry:sphere(),position:T(.008,.012*e,.019),scale:.012,color:[1,1,.92,1]},{geometry:sphere(),position:T(.01,.0125*e,.0245),scale:[.004,.008,.004],rotation:u,color:[.05,.05,.05,1]},{geometry:sphere(),position:T(.012,.011*e,.026),scale:.0022,color:[1,1,1,1]},{geometry:sphere(),position:T(.033,.0055*e,.016),scale:.0032,color:[.08,.06,.05,1]});const g=[.85,.08,.12];A.push({geometry:tube([T(.034,0,.007),T(.05,0,.007)],{radius:.0017,sides:6,color:g})});for(const e of[1,-1])A.push({geometry:tube([T(.049,0,.007),T(.058,.0055*e,.007)],{radius:.0014,sides:6,color:g})});return A}const RAIL_GAP=.019,RAIL_Z=.005;function ladderParts(e){const o=cellCenter(e.bottom),t=cellCenter(e.top),s=Math.hypot(t[0]-o[0],t[1]-o[1]),n=[(t[0]-o[0])/s,(t[1]-o[1])/s],r=[-n[1],n[0]],a=rgb(e.color),i=rgb(e.highlight),l=({v:e,normal:o})=>{const t=.5+.5*Math.sin(e*s*260+5*noise(e*s*40,3));return shade(mix(a,i,.45*t+.3*Math.max(0,o[2])),1)},h=.014,d=[1,-1].map(e=>({geometry:tube([[o[0]-n[0]*h+.019*r[0]*e,o[1]-n[1]*h+.019*r[1]*e,.005],[t[0]+n[0]*h+.019*r[0]*e,t[1]+n[1]*h+.019*r[1]*e,.005]],{radius:.0045,sides:8,smoothness:Math.max(8,Math.round(90*s)),color:l})})),p=Math.max(3,Math.floor(s/.045));for(let e=1;e<=p;e++){const[s,n]=along(o,t,e/(p+1));d.push({geometry:tube([[s-.019*r[0],n-.019*r[1],.005+8e-4],[s+.019*r[0],n+.019*r[1],.005+8e-4]],{radius:.0032,sides:8,color:mix(a,i,.6)})})}return d}export function ladderPath(e){const[o,t]=cellCenter(e.bottom),[s,n]=cellCenter(e.top);return[[o,t,TILE_TOP],[s,n,TILE_TOP]]}const CELL=1/BOARD_SIZE;function cellColor(e){const o=e-1;let t=rgb(CELL_PALETTE[(Math.floor(o/BOARD_SIZE)+o%BOARD_SIZE)%CELL_PALETTE.length]);return 1===e?t=rgb(START_CELL):e===WINNING_POSITION&&(t=rgb(FINISH_CELL)),t}const FLAT=.05,SKIN=4e-4,DIGITS_Z=TILE_TOP+.002,ART_Z=TILE_TOP+.004;export const SHADOW_Z=TILE_TOP+.008;const PAWN_LIFT=SHADOW_Z+.001-TILE_TOP,pawnAt=(e,o)=>toWorld(e,o[0],o[1],o[2]+PAWN_LIFT),boardMesh=()=>cached("snl-board",()=>{const e=1+2*RIM,o=rgb("#5C4033"),t=(e,o)=>({position:[0,0,e],scale:o}),s=[{geometry:cube(),...t(TILE_TOP-.006,[e,e,SKIN]),color:[...o,1]},{geometry:cube(),...t(TILE_TOP-.003,[1,1,SKIN]),color:[...rgb("#CBB894"),1]}];for(let e=1;e<=WINNING_POSITION;e++){const[o,t]=cellCenter(e);s.push({geometry:cube(),position:[o,t,TILE_TOP-2e-4],scale:[CELL-.005,CELL-.005,SKIN],color:[...cellColor(e),1]})}const[n,r]=cellCenter(WINNING_POSITION);s.push({geometry:extrude((new Path).addStar(0,0,.5,.22),{depth:.12}),position:[n,r-.012,DIGITS_Z],scale:[.042,.042,.004],color:[...rgb("#FFC107"),1]}),s.push({geometry:extrude((new Path).addCircle(0,0,.08),{depth:SKIN,color:rgb("#A1887F")}),position:[START_X,DIE_Y,START_Z]});const a=merge([...LADDERS.flatMap(ladderParts),...SNAKES.flatMap(snakeParts)]);return s.push({geometry:a,position:[0,0,ART_Z],scale:[1,1,.05]}),_0x2ac545(merge(s),{center:!1,shine:0})}),DIGIT_SCALE=.027;function spawnNumbers(e,o){const t=toColor(NUMBER_COLOR),s=toColor(STAR_NUMBER_COLOR);for(let n=1;n<=WINNING_POSITION;n++){const[r,a]=cellCenter(n),i=String(n),l=i.length*GLYPH_ADVANCE-(GLYPH_ADVANCE-GLYPH_WIDTH);for(let h=0;h<i.length;h++)e.spawn({mesh:flatGlyphMesh(i[h]),parent:o,position:[r+.027*(-l/2+GLYPH_WIDTH/2+h*GLYPH_ADVANCE),a+.24*CELL,DIGITS_Z],scale:.027,color:1===n||n===WINNING_POSITION?s:t,pickable:!1})}}const pawnMesh=()=>cached("snl-pawn",()=>_0x2ac545(merge([{geometry:lathe([[.001,0],[.42,0],[.44,.04],[.42,.1],[.31,.14],[.25,.2],[.19,.42],[.15,.58],[.27,.61],[.27,.66],[.14,.69]],{segments:32})},{geometry:sphere(),position:[0,.84,0],scale:.4}]),{center:!1,shine:.65}));export const dieRotation=(e,o=0)=>_0xe82750(TILT,e,o);const discMesh=()=>cached("snl-disc",()=>_0x2ac545(extrude((new Path).addCircle(0,0,.5),{depth:0}))),ringMesh=()=>cached("snl-ring",()=>_0x2ac545(extrude((new Path).addCircle(0,0,.5).addCircle(0,0,.42),{depth:0,fillRule:"evenodd"}))),SHADOW=[0,0,0,.22],BACKDROP_DEPTH=25;export const toWorld=(e,o,t,s)=>[o*e.size,t*e.size,s*e.size];const tiltView=e=>({width:e.width,height:e.height,centerY:e.centerY,tilt:TILT});export const aimCamera=(e,o)=>aimTilted(e,tiltView(o));export function buildScene(e,o,t){const s=spawnBackdrop(e,o.width,o.height,-25,t);placeTiltedBackdrop(e,s,tiltView(o),25);const n=e.spawn({mesh:boardMesh(),scale:o.size,color:[1,1,1,1],pickable:!1});spawnNumbers(e,n);const r=t=>e.spawn({mesh:pawnMesh(),rotation:STAND_UP,scale:TOKEN_HEIGHT*o.size,color:toColor(t),pickable:!1}),a=()=>e.spawn({mesh:discMesh(),scale:.052*o.size,color:SHADOW,pickable:!1}),i=e.spawn({mesh:discMesh(),position:toWorld(o,.012,DIE_Y-.01,.001),scale:[1.25*DIE_SIZE*o.size,1.1*DIE_SIZE*o.size,1],color:SHADOW,pickable:!1}),l=e.spawn({mesh:ringMesh(),position:toWorld(o,0,DIE_Y,.002),scale:0,color:[1,.78,.15,.85],pickable:!1}),h=e.spawn({mesh:dieMesh(),position:dieRest(o),rotation:dieRotation(1),scale:DIE_SIZE*o.size,pickable:!1});return{backdrop:s,board:n,tokens:[r(PLAYER_COLOR),r(AI_COLOR)],shadows:[a(),a()],die:h,dieShadow:i,ring:l}}export function removeScene(e,o){for(const t of[o.backdrop,o.board,...o.tokens,...o.shadows,o.die,o.dieShadow,o.ring])e.despawn(t)}export function setSceneTheme(e,o,t){setBackdropTheme(e,o.backdrop,t)}export const dieRest=e=>toWorld(e,0,DIE_Y,DIE_SIZE/2);export function rollDie(e,o,t,s,n,r){_0x18b3f7(e,{die:t.die,shadow:t.dieShadow,rest:dieRest(o),shadowAt:toWorld(o,.012,DIE_Y-.01,.001),shadowScale:[1.25*DIE_SIZE*o.size,1.1*DIE_SIZE*o.size,1],size:DIE_SIZE*o.size,tilt:TILT,value:s,duration:n,disposed:r})}export function showRollHint(e,o,t,s){if(e.stopAnimation(t.ring),!s)return void e.set(t.ring,{scale:0});const n=1.55*DIE_SIZE*o.size;e.set(t.ring,{scale:n}),e.animate(t.ring,{scale:1.15*n},{duration:.6,easing:"easeInOut",repeat:"forever",yoyo:!0})}export function placeToken(e,o,t,s,n){e.stopAnimation(t.tokens[s]),e.stopAnimation(t.shadows[s]),e.set(t.tokens[s],{position:pawnAt(o,n)}),e.set(t.shadows[s],{position:toWorld(o,n[0]+.006,n[1]-.006,SHADOW_Z)})}export function moveToken(e,o,t,s,n,r,a=0){const i=t.tokens[s],l=t.shadows[s],h=n[n.length-1],d=a?[{position:pawnAt(o,[(n[0][0]+h[0])/2,(n[0][1]+h[1])/2,Math.max(n[0][2],h[2])+a]),at:.5},{position:pawnAt(o,h),at:1}]:n.slice(1).map((e,t)=>({position:pawnAt(o,e),at:(t+1)/(n.length-1)}));e.stopAnimation(i),e.stopAnimation(l),e.animate(i,d,{duration:r,path:"smooth",easing:a?"linear":"easeInOut"}),e.animate(l,{position:toWorld(o,h[0]+.006,h[1]-.006,SHADOW_Z)},{duration:r,easing:a?"linear":"easeInOut"})}export function bobToken(e,o,t,s){t.tokens.forEach((t,n)=>e.set(t,{bob:n===s?{amplitude:[0,0,.008*o.size],speed:6}:null}))}export function snakeBite(e,o,t,s,n){e.animate(t.tokens[n],{shake:.01*o.size},{duration:.3}),s.shake=.008*o.size}export function sparkle(e,o,t){effects.sparkle(e,{position:toWorld(o,t[0],t[1],t[2]+.03),count:16,size:.009*o.size,speed:.25*o.size,lifetime:.6,colors:[toColor("#FFD54F"),toColor("#FFF59D"),toColor("#FFFFFF")]})}export function confetti(e,o,t){effects.confetti(e,{position:toWorld(o,t[0],t[1],t[2]+.06),count:48,size:.012*o.size,speed:.7*o.size,lifetime:1.3,gravity:-1.2*o.size,colors:["#FF5252","#FFD740","#69F0AE","#448AFF"].map(e=>toColor(e))})}const slidePaths=new Map;export function slidePath(e){if(slidePaths.has(e))return slidePaths.get(e);const o=SNAKE_AT.get(e),t=LADDER_AT.get(e),s=o?snakePath(o).filter((e,o)=>o%3==0||29===o):t?ladderPath(t):null;return(o||t)&&slidePaths.set(e,s),s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const _0x4a6467=_0x387f;function _0x20d3(){const e=["WRFdKmkgw8kjW6eUmqXjWQSSWQm","i8ksWOZcRxvjW586WPlcNG","qSkSCwy9W6NdUq","bahdSmo1DG","W4tcR8onpbZcV8osWQFdIG","W4dcS8ob","WQq0W7VdQSkXg8kE","FL/cGSkWyghcVHaW","bSo7W6Pxj8kW","W5n+W6lcGLpcIg3cQG","WPNdRSoMqrtdU1FdGGP+EGWXwxRcRvZcJM8SWOSqW4O","W6GUW4DRaYdcIJWNy8oi","WRPip8oBadddKutcI04PjW","cmksWPHFWQmhobZdRmkXW5ZcM1xcIrq","W5dcOSkmxMmLW6rms8oJca","ug3cN8kzxLFcGtSf","EsdcUJ4","zCoZW4nxWQNcUCkvEsiI","WQPOWPeVrqNcGt4kCCopWPrRWRi","y11uWORcMSoxx3bPn8o0nYi9gmkWp8o1bmoTFq","W6RdT8oOWO3cG3rSWPxdUSkcyG","WR59WP04FJJcHse","k8kxW4BdQ13cSCkzBNBdNsDgya","W5/cRSkbqmoSWOlcOmkfFG","DfRdOmoWBSowW7NdUq","CCkxnMi","nmoWWQLcWOOwW5b5t8o/yKxdJs7dJ8ooeu/cRSovW6WmWPKW","e8oVmvWDW67dI3a2","y8kzW4ddGJ3dSraKn8kfW51uiJ1M","W4BdNmohWRJdJrZcQ23dNa","lbhdL8oJFCkaDa","m8kMWOa0WOZcImkNwW","r8kuWOBdLWmnWQy","WRzvdSovdsZdQ0xcMq","iSowW6nYka","W6tcISoUddRcKSo9WOZdQdaxWO4R","W5ZcGWhcVq00WRVcHwxdKG","W7fEWQ/cUs8PW6z/nulcNZuWWQJdJw3dHtr4ySoZW40ot8oQWPDq","W7/cK8kyEmoeWRRcHCkIq3NcRaS3WOpcVmknWQ3cIuby","WQXdkSo2cJpdSu7cIG","W4tcTSorb1a","yCkoWPSaWQlcImkC","rSkTp8kYhL9SW5tdRmkiWRpcQa","eSoqWOXGWRSSW5jzBSorx2pdQG","t8oyW4VdVmkqcmo6W6zLW5hdUNeOWP7cIXZcNmo4WRrkWPW/W5e","mSo0WQXrWOO0W7v9ta","WRTaletdJCkHDq","W6xcICoxd8oEWQfS","W7ddNIVcH8oNgaG","tYVdHCk1Fr5P","W7RcQd7cOY4cWOZcS07dPW7dTqa","umkHWO3cI8osjCkZ","FvlcL8ozxCkhrKlcHW","W5DUW6tcO0lcH20","FHZdGCoAibdcOG","W6fyWQVcQI8F","WQPvo8o6dtNdRKNcN0mM","WPX8lK7dJq","W57dHSoeWQVcLu5yWQRdLmkPu3C/","ACoUW6VdQSk2jSohW4C","aCkrnSkriSoI","rLKrgCkjW47cK1uQaM07x8kFW4BcQa","ACorWP/cQXRdG8oyvKtdLqPftmkLw8kReYTNC8kP","y8kuag7cVtX2W6y","WRXtlmolctVdTG","WOBcKCkVW4lcMaBdSq","smkVpCkacf8","WR9qkG","AGddNq","xZ3dMmk1Fq","WQjSrSoJWPq","WPfktuRdTrHmaa","WOvPWPSuWOVdTZeZW7CV","zXnBW6VdHa4b","emoPW6f3i8kWW4ORiWRdMG","W5f6WO/cIb4LW4Hxag/cRYyd","zCkYWQddOdqSWPVcRCo4tqK5WRldUW","mGNcSMro","EcNcQXxdOCkRuSoD","W4qCccVcTKaimSoZnmkPDCoh","WRNdS8kJEYRdOXpcJ8kdkCoBxG","kX7cHe5oEq","FGxdLSojkWVcPG","EubMW49j","WQffWQe","rmk3yNy0W6ldHwKeWPtdS8obW4u","ACkYDHBcGaXQWOVcMd7dUd5L","WRPukLxdGmkDzmk7WOldRWvUWP8vyCo/W47dSCopWQ0","WProv3FdPaT5aq","DfNcOmkUzhBcOW","WQvCWQ4hWQldIq4tW54aDCoSW6K","WRtdUSoIwHBdTfC","FdNcRttdSmkKuG","FcpcStldTmkJsmoDWQK","WR55WOqors/cLdy","x8ogWOjZWPiKlWS","WPtdTKNcObFcS8oU","W4ZcHXVcJGq5","E8k9Cb3dRXrYWPhcJW","W6WPWOKAzX/cMde","qg/dLCoGx8oOW4VdLu9+E1ZcOa","vZJcNaNdMG","WPVdReJcTW","nSokW4v3b8kdW6aabshdPCozWQi","WOFdR8oPhSk+W4JdU8kNtKlcUIGW","W6GPW4vQbxBdLICKA8ofWO9J","W6VcP8oMg2VcTaZcOq","vmkVWRabE8oPWPqnjWddSmoiWPm","vvpdRCkdw8oqW6ZdTwyx","aCkrnSkoiSoPW7i","tKpcP8kUiwVcVXCNWOrzdSkZfCoFcmoRWOhdTuxcPMJdUCo9","WPv5WP02WOldUdW","W6xcICkqFSoz","WRnEWR0lWRu","qmkSl8kGguP9W4m","cCo1W7Dr","CeNcPSkpDxNcOXS","iSokyINdUMnZW4RdNK0ODW","W5dcV8oCoWRcV8oEWPFdGbC3","vmkJWRqfcmk/W44EjIu","WRddQSoKEWFdU1FdGG","W4pcRSk0yCoOWPBcPG","CSkSWQNcJSoV","j8kZWPueWP3cISkHxYC9","fmkZpCkRavHh","WQJdNSoYpbGkW4jQwCoKmSkGWRm2WPNcLwqBwIa","dCofdwNcHtHmWOpcUsa","WOHYC8kvWQC"];return(_0x20d3=function(){return e})()}function _0x387f(e,t){e-=369;const o=_0x20d3();let r=o[e];if(void 0===_0x387f.DvabmY){const e=function(e,t){let o,r,W=[],a=0,n="";for(e=function(e){let t="",o="";for(let o,r,W=0,a=0;r=e.charAt(a++);~r&&(o=W%4?64*o+r:r,W++%4)?t+=String.fromCharCode(255&o>>(-2*W&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let e=0,r=t.length;e<r;e++)o+="%"+("00"+t.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(o)}(e),r=0;r<256;r++)W[r]=r;for(r=0;r<256;r++)a=(a+W[r]+t.charCodeAt(r%t.length))%256,o=W[r],W[r]=W[a],W[a]=o;r=0,a=0;for(let t=0;t<e.length;t++)r=(r+1)%256,a=(a+W[r])%256,o=W[r],W[r]=W[a],W[a]=o,n+=String.fromCharCode(e.charCodeAt(t)^W[(W[r]+W[a])%256]);return n};_0x387f.UMtvbH=e,_0x387f.ppTwza={},_0x387f.DvabmY=!0}const W=o[0];_0x387f.LrLxbo!==W&&(_0x387f.ppTwza={},_0x387f.LrLxbo=W);const a=_0x387f.ppTwza[e];return void 0===a?(void 0===_0x387f.pxmgZY&&(_0x387f.pxmgZY=!0),r=_0x387f.UMtvbH(r,t),_0x387f.ppTwza[e]=r):r=a,r}!function(){const e=_0x387f,t=_0x20d3();for(;;)try{if(216234==parseInt(e(387,"#k35"))/1*(parseInt(e(441,"J!8q"))/2)+parseInt(e(385,"1sxU"))/3*(parseInt(e(493,"2Rl0"))/4)+parseInt(e(430,"Nd5J"))/5*(-parseInt(e(468,"0axW"))/6)+-parseInt(e(494,"f!tY"))/7+parseInt(e(389,"v&$5"))/8+parseInt(e(400,"f!tY"))/9*(-parseInt(e(390,"*[4Z"))/10)+parseInt(e(488,"f!tY"))/11*(parseInt(e(378,"&9#g"))/12))break;t.push(t.shift())}catch(e){t.push(t.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x591df6,{useEffect,useRef}from"react";import{StyleSheet,Dimensions}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{useSpaceFighterStore}from"./SpaceFighterStore.js";import{createSpaceFighterService}from"./SpaceFighterService.js";import{SPACE_FIGHTER_GAME_CONFIG}from"./SpaceFighterConstants.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameArea}from"./components/GameArea.js";import{GameBackground}from"./components/GameBackground.js";import{GameControlButton,GameOverModal,useGameErrorHandler,GameErrorType}from"../../helpers/index.js";import{GameSettingsModal}from"../../helpers/index.js";import{GAME_IDS,DEFAULT_GAME_SETTINGS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{jsx as _0x240825,jsxs as _0x483857}from"react/jsx-runtime";const{width:width,height:height}=Dimensions[_0x4a6467(456,"OH9V")]("window");export const SpaceFighter=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:t,onEndGame:o,onReplayGame:r,onShare:W,onShareScreenshot:a,onShowLeaderboard:n,bannerAd:d})=>{const s="u1p2",S="TXuP",i=_0x4a6467,f={GLgFj:i(376,"*BPZ"),HtCOO:function(e,t,o){return e(t,o)},AxVwX:function(e,t,o){return e(t,o)},AwdTc:function(e,t){return e<=t},hUrBs:function(e,t,o){return e(t,o)},vqPYe:i(446,"OH9V"),VBQUZ:function(e,t,o){return e(t,o)},OJlJT:function(e,t){return e(t)},KeUdn:function(e,t){return e(t)},skWGF:function(e,t,o){return e(t,o)}},p=useSpaceFighterStore(e=>e[i(396,"OP0$")]),m=f[i(388,"Z6qB")](useSpaceFighterStore,e=>e[i(410,"f!tY")]),u=useRef(0),x=useRef(o);x[i(462,"0Ynh")]=o;const k=_0x591df6[i(449,"C@MN")](!1),G=_0x591df6.useCallback(e=>{const t=i;if(x[t(481,"phGL")]&&!k.current){const o=useSpaceFighterStore.getState();x[t(395,"y0X@")]({status:e,score:o[t(459,"ZNiT")][t(452,"&9#g")]()}),k[t(391,"z9rU")]=!0}},[]),_=useRef(e?.[i(401,"ZHSO")]??!0);_[i(421,"M&n1")]=e?.enableSounds??!0;const h=f[i(392,"J!8q")](useRef,e?.[i(474,"z9rU")]??!0);h[i(395,"y0X@")]=e?.enableHaptics??!0;const C=e?.[i(455,"1sxU")]??0;useEffect(()=>{const e=i;useSpaceFighterStore[e(381,"(BzE")]()[e(428,"ZHSO")](C)},[C]);const{wrapFunction:O,safeExecute:R}=useGameErrorHandler(GAME_IDS[i(432,"u1p2")]),l=useRef(null);!l.current&&(l[i(438,"ZhJ!")]=R(()=>createSpaceFighterService(width,height),f.skWGF(createSpaceFighterService,width,height),GameErrorType[i(427,"2Rl0")]));const P=l[i(440,"cH!g")];useEffect(()=>{const e=i;return useSpaceFighterStore[e(393,"%T[S")](t=>t[e(422,"ZHSO")],t=>{P&&P[e(461,"TXuP")](t)})},[P]),useEffect(()=>()=>{const e=_0x387f;P&&P[e(436,"v&$5")](),useSpaceFighterStore.getState()[e(418,"TT*c")]()},[P]),useEffect(()=>()=>{const e=_0x387f;useSpaceFighterStore[e(448,"AT4)")]()[e(412,"2Rl0")]&&!k[e(481,"phGL")]&&G(e(486,"bA53"))},[G]),useEffect(()=>{const e=i;if(m&&!k[e(453,"ZHSO")]){const t=useSpaceFighterStore[e(377,"OP0$")]();u.current=t[e(458,"ZhJ!")];const o=f.AwdTc(t.lives,0),r=o?e(491,"v%MJ"):e(394,"%T[S");o?(f.hUrBs(playSound,GAME_SOUNDS[e(479,S)].GAME_OVER,_[e(480,"(BzE")]),f[e(490,"phGL")](playHaptic,HapticType.ERROR,h[e(478,"OP0$")])):(playSound(GAME_SOUNDS[e(424,"%T[S")][e(473,S)],_[e(454,"d!$J")]),playHaptic(HapticType.SUCCESS,h.current)),G(r)}if(!m)if("DIpxe"===f[e(466,"!CjF")])k[e(485,"v%MJ")]=!1;else{const t=_0x5e9c66[e(448,"AT4)")]();_0x331984[e(478,"OP0$")]=t.score;const o=t.lives<=0,r=o?f[e(423,"*BPZ")]:e(457,"J#0[");o?(_0x174554(_0x2a24c5[e(464,"fEuS")][e(404,"OP0$")],_0x5274a8[e(462,"0Ynh")]),f[e(429,"sxaS")](_0x27c769,_0x3be8db[e(374,"TXuP")],_0xa37db5[e(443,"J#0[")])):(f[e(383,"cH!g")](_0x1b09a0,_0x5adfe2[e(492,"*BPZ")].WIN,_0x8d0e12.current),_0x34f02a(_0x4e7df3[e(437,"(GPo")],_0x34dd8e.current)),_0x4e233f(r)}},[m,G]),useEffect(()=>{if(m&&P){P.cleanup();const e=P.getInitialSpacecraft();P.setSpacecraftPosition(e.x,e.y)}},[m,P]);const g=_0x591df6.useCallback(()=>O(()=>{const e=i;if(k.current=!1,useSpaceFighterStore[e(460,"0axW")]()[e(434,s)](SPACE_FIGHTER_GAME_CONFIG.GAME_DURATION),playSound(GAME_SOUNDS[e(447,"W]7O")][e(373,"2Rl0")],_[e(435,"OH9V")]),playHaptic(HapticType.SUCCESS,h.current),P){P[e(425,"bA53")](!0),P[e(415,s)](SPACE_FIGHTER_GAME_CONFIG[e(465,"M&n1")],SPACE_FIGHTER_GAME_CONFIG[e(433,"AT4)")]);const t=useSpaceFighterStore.getState()[e(384,"Nd5J")];P.syncFromStore(t,[]),P[e(407,"f!tY")](()=>useSpaceFighterStore[e(483,"f!tY")]().decrementTime()),P[e(451,"fZB0")](t=>{const o=e;useSpaceFighterStore[o(467,"phGL")]()[o(431,"1sxU")](t),P.addAsteroidsToPhysics(t)}),P[e(426,"fEuS")](t=>useSpaceFighterStore[e(420,"Nd5J")]()[e(476,"OH9V")](t))}},GameErrorType[i(386,"ygwx")])(),[O,P]),E=_0x591df6[i(463,"*BPZ")](()=>{const e=i;G(e(397,"*BPZ")),f.VBQUZ(O,()=>{const t=e;if(useSpaceFighterStore[t(398,"9Ftl")]().stopGame(),P){P[t(471,"J#0[")]();const e=P.getInitialSpacecraft();P.setSpacecraftPosition(e.x,e.y)}},GameErrorType[e(475,"#k35")])()},[O,G,P]),F=_0x591df6[i(445,"ZHSO")](()=>O(()=>{const e=i;if(r?.(),k[e(419,"J!8q")]=!1,P&&P.cleanup(),useSpaceFighterStore[e(495,"sxaS")]().resetGame(),P){const t=P.getInitialSpacecraft();useSpaceFighterStore[e(375,"1sxU")]()[e(450,"boz7")](t),P[e(408,"&kPw")](t.x,t.y)}},GameErrorType[i(439,"bA53")])(),[O,P,r]),T=_0x591df6[i(370,"C@MN")](()=>({isPlaying:p,gameOver:m,onStartGame:g,onStopGame:E,onShare:W,onShowLeaderboard:n,startButtonSubtext:i(399,"(BzE")}),[p,m,g,E,W,n]);m&&(u[i(442,"9Ftl")]=useSpaceFighterStore[i(413,"(o6D")]().score);const N=_0x591df6.useMemo(()=>({isVisible:m,score:u[i(372,"TXuP")],onPlayAgain:F,buttonText:i(369,"(o6D"),title:i(487,"#k35"),message:i(371,"OP0$")}),[m,F]),I=_0x591df6[i(382,"2Rl0")](()=>({gameId:GAME_IDS[i(489,"(o6D")],settings:e||DEFAULT_GAME_SETTINGS,onSettingsChange:t}),[e,t]),y={};y[i(409,"W]7O")]=P,y[i(417,"nBku")]=_,y.hapticEnabledRef=h;const b={};b[i(470,"!CjF")]=C;const H={...T},v={...N};v.onShare=a,v[i(477,"0axW")]=d;const Q={...I};return _0x240825(GestureHandlerRootView,{style:styles[i(482,"phGL")],children:_0x483857(GameBackground,{children:[_0x240825(GameArea,y),_0x240825(ScoreBoard,b),f[i(472,"B8Gm")](_0x240825,GameControlButton,H),_0x240825(GameOverModal,v),_0x240825(GameSettingsModal,Q)]})})};const _0x34b7e0={};_0x34b7e0[_0x4a6467(414,"&9#g")]=1,_0x34b7e0[_0x4a6467(402,"vQoF")]=BACKGROUND_COLOR;const _0x2aca9e={};_0x2aca9e[_0x4a6467(405,"phGL")]=1;const _0x3fadeb={};_0x3fadeb.container=_0x34b7e0,_0x3fadeb[_0x4a6467(379,"%T[S")]=_0x2aca9e;const styles=StyleSheet[_0x4a6467(444,"fEuS")](_0x3fadeb);
|
|
1
|
+
"use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{livesColumn,scoreColumn,timerColumn}from"../shared/EngineHud.js";import{toRgb}from"../shared/EngineUtils.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{BACKGROUND,DAY_BACKGROUND,getLayout,LIGHT,LIVES,TIME_LIMIT}from"./SpaceFighterConstants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,start,tick}from"./SpaceFighterGame.js";import{jsx as _0x135a8c}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.SPACE_FIGHTER,NIGHT_RGB=toRgb(BACKGROUND),DAY_RGB=toRgb(DAY_BACKGROUND),FEEDBACK={grab:{sound:SOUNDS.GRAB,haptic:HapticType.MEDIUM},release:{sound:SOUNDS.RELEASE,haptic:HapticType.LIGHT},dodge:{sound:SOUNDS.DODGE,haptic:HapticType.LIGHT},hit:{sound:SOUNDS.COLLISION,haptic:HapticType.HEAVY}};export const SpaceFighter=engineGame(GAME_IDS.SPACE_FIGHTER,e=>{const[t,s]=useLiveState(0),[r,i]=useLiveState(LIVES),[a,o]=useLiveState(TIME_LIMIT),{theme:n,status:S,screen:m,gameOver:E}=useEngineGame(e,{gameId:GAME_IDS.SPACE_FIGHTER,create:createGame,setTheme:setTheme,start:start,reset:reset,dispose:dispose,tick:tick,resize:(e,t,s,r)=>setLayout(e,getLayout(t,s,r)),drag:drag,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.SUCCESS),onOver:(e,t)=>e("win"===t?SOUNDS.WIN:SOUNDS.GAME_OVER,"win"===t?HapticType.SUCCESS:HapticType.ERROR),wire:(e,t)=>{e.onScore=s,e.onLives=i,e.onTime=o,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}});return _0x135a8c(EngineGameScreen,{...m,light:LIGHT,background:"dark"===n.mode?NIGHT_RGB:DAY_RGB,columns:[scoreColumn(t),livesColumn(r,LIVES),timerColumn(a,n,0)],subtext:"Navigate through space!",gameOver:E({title:"GAME OVER",message:"win"===S?"You survived the asteroid field!":"Your ship was destroyed!",scoreLabel:"Final Score",score:t,buttonText:"Fly Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";export const TIME_LIMIT=120;export const LIVES=3;export const DODGE_POINTS=500;export const HIT_COOLDOWN=2;const BASE_WIDTH=390,BASE_HEIGHT=844,TABLET_WIDTH=640,SHIP_SIZE={phone:28,tablet:22},BELT_HEIGHT={phone:80,tablet:60},GAP=120,SPAWN_INTERVAL={phone:1.5,tablet:1.8},FALL_SPEED=3.5,GAP_VARIANCE=.15,MIN_EDGE=.08,SPAWN_ABOVE=.3;export const BASE_FRAME=.016;export const MAX_FRAME=.064;export const PLAY_DEPTH=12;export const FOV=.9;export const BACKGROUND="#050311";export const DAY_BACKGROUND="#A8DCF7";export const LIGHT={direction:[-.45,.6,.65],ambient:.38,shadows:!1,color:[1.05,1.02,1.1]};export function getLayout(t,o,e){const n=t>640,r=t/390,a=o/844;return{width:t,height:o,offset:e,k:24*Math.tan(.45)/o,shipSize:Math.round((n?SHIP_SIZE.tablet:SHIP_SIZE.phone)*r),shipY:o*(e>0?.77:.68),beltHeight:Math.round((n?BELT_HEIGHT.tablet:BELT_HEIGHT.phone)*a),gap:Math.round(120*r),spawnInterval:(n?SPAWN_INTERVAL.tablet:SPAWN_INTERVAL.phone)/a,fallSpeed:3.5*a/.016,spawnY:-Math.round(.3*o),scoreboardBottom:getScoreBoardTop(e)+82}}export function gapLeft(t,o=Math.random){const e=t.width/2+2*(o()-.5)*t.width*.15,n=Math.round(.08*t.width);return Math.max(n,Math.min(e-t.gap/2,t.width-t.gap-n))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{DODGE_POINTS,FOV,gapLeft,HIT_COOLDOWN,LIVES,MAX_FRAME,TIME_LIMIT}from"./SpaceFighterConstants.js";import{blinkShip,explode,flicker,launchShip,placeBelts,placeShip,removeAll,setSpaceTheme,spawnBelts,spawnShip,spawnSpace,steadyShip,wrapStars}from"./SpaceFighterScene.js";const WORLD_CAPACITY=1e3,BANK_PER_SPEED=.0016,MAX_BANK=.65,MAX_TICK=.25;export function createGame(e){const s=new World(1e3),a={world:s,camera:{eye:[0,0,0],target:[0,0,-1],fov:FOV},layout:null,space:null,day:"dark"!==e.mode,ship:null,phase:"ready",get score(){return s.scoreboard.score},get lives(){return s.scoreboard.lives},get timeLeft(){return s.scoreboard.shownSeconds},won:!1,shipX:0,bank:0,lastShipX:0,dragging:!1,dragFrom:0,dragStart:0,pairs:[],nextSpawn:0,lastHit:-1/0,clock:0,seed:1,onPhase:e=>{},onScore:e=>{},onLives:e=>{},onTime:e=>{},onEvent:e=>{}};return s.scoreboard.reset(LIVES,TIME_LIMIT),s.scoreboard.handlers={onScore:e=>a.onScore(e),onSecond:e=>a.onTime(e),onTimeUp:()=>"playing"===a.phase&&end(a,!0)},a}export function setTheme(e,s){const a="dark"!==s.mode;a!==e.day&&(e.day=a,e.layout&&e.space&&setSpaceTheme(e.world,e.layout,e.space,a))}export function setLayout(e,s){const a=e.world;e.space&&removeAll(a,e.space.all),e.ship&&a.despawn(e.ship.root);for(const s of e.pairs)s.belts&&a.despawn(s.belts.root);const o=e.layout;e.layout=s,e.shipX=o?e.shipX/o.width*s.width:s.width/2,e.lastShipX=e.shipX,e.space=spawnSpace(a,s,e.clock,e.day),e.ship=spawnShip(a,s,e.shipX),e.dragging&&flicker(a,s,e.ship,!0);for(const o of e.pairs)o.belts=spawnBelts(a,s,o.top,o.gapLeft,o.seed)}export function start(e){const s=e.layout;"ready"===e.phase&&s&&(e.phase="playing",e.world.scoreboard.startCountdown(TIME_LIMIT),e.nextSpawn=e.clock,e.ship&&launchShip(e.world,s,e.ship),e.onPhase("playing"))}export function reset(e){clearPairs(e),e.world.scoreboard.reset(LIVES,TIME_LIMIT),e.won=!1,e.lastHit=-1/0,e.phase="ready",recentre(e),e.ship&&steadyShip(e.world,e.ship),e.onScore(0),e.onLives(LIVES),e.onTime(TIME_LIMIT),e.onPhase("ready")}export function dispose(e){e.world.dispose()}function clearPairs(e){for(const s of e.pairs)s.belts&&e.world.despawn(s.belts.root);e.pairs=[]}function recentre(e){e.layout&&(e.shipX=e.layout.width/2,e.lastShipX=e.shipX)}function end(e,s){e.world.scoreboard.stop(),e.won=s,e.phase="over",e.dragging&&e.layout&&e.ship&&flicker(e.world,e.layout,e.ship,!1),e.dragging=!1,recentre(e),e.onPhase("over")}export function tick(e,s){if(e.world.isDisposed)return;const a=Math.min(s,.25);e.clock+=a;const o=e.layout;if(o&&"playing"===e.phase&&step(e,o,Math.min(a,MAX_FRAME)),o&&e.space&&wrapStars(e.world,e.space,e.clock),o&&e.ship){const s=a>0?(e.shipX-e.lastShipX)/a:0;e.lastShipX=e.shipX;const t=Math.max(-.65,Math.min(.65,.0016*s));e.bank+=(t-e.bank)*Math.min(1,10*a),placeShip(e.world,o,e.ship,e.shipX,e.bank)}e.world.update(a)}function step(e,s,a){e.clock>=e.nextSpawn&&(spawnPair(e,s),e.nextSpawn+=s.spawnInterval);const o=s.fallSpeed*a;let t=0;for(const a of e.pairs)a.top+=o,a.top<=s.height?(a.belts&&placeBelts(e.world,s,a.belts,a.top),e.pairs[t++]=a):a.belts&&e.world.despawn(a.belts.root);e.pairs.length=t;const r=s.shipSize/2,i=e.shipX-r,p=e.shipX+r,n=s.shipY-r,l=s.shipY+r;if(e.pairs.some(e=>!(l<=e.top||n>=e.top+s.beltHeight)&&(i<e.gapLeft||p>e.gapLeft+s.gap))&&e.clock-e.lastHit>HIT_COOLDOWN)hit(e,s);else for(const s of e.pairs)!s.passed&&s.top>l&&(s.passed=!0,e.world.scoreboard.add(DODGE_POINTS),e.onEvent("dodge"))}function spawnPair(e,s){const a=e.seed++,o={top:s.spawnY,gapLeft:gapLeft(s),passed:!1,seed:a,belts:null};o.belts=spawnBelts(e.world,s,o.top,o.gapLeft,a),e.pairs.push(o)}function hit(e,s){e.lastHit=e.clock,explode(e.world,s,e.shipX,s.shipY),e.camera.shake=s.shipSize*s.k*.5,e.onLives(e.world.scoreboard.addLives(-1)),e.onEvent("hit"),recentre(e),e.dragging&&(e.dragFrom=e.shipX,e.dragStart=NaN),e.lives<=0?(e.ship&&steadyShip(e.world,e.ship),end(e,!1)):e.ship&&blinkShip(e.world,e.ship)}export function drag(e,{phase:s,x:a}){const o=e.layout;if(o){if("start"===s){if("playing"!==e.phase)return;return e.dragging=!0,e.dragFrom=e.shipX,e.dragStart=a,e.ship&&flicker(e.world,o,e.ship,!0),void e.onEvent("grab")}if("move"===s){if(!e.dragging||"playing"!==e.phase)return;Number.isNaN(e.dragStart)&&(e.dragStart=a);const s=o.shipSize/2;return void(e.shipX=Math.max(s,Math.min(o.width-s,e.dragFrom+a-e.dragStart)))}release(e)}}function release(e){e.dragging&&(e.dragging=!1,e.layout&&e.ship&&flicker(e.world,e.layout,e.ship,!1),e.onEvent("release"))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,ellipsoid,extrude,lathe,loft,merge,Path,quat,tube}from"@nayan-ui/engine";import{noise,random}from"../shared/EngineMeadow.js";import{cacheGameAsset,createGameMesh as _0x3a51b1}from"../shared/EngineMeshes.js";import{toColor}from"../shared/EngineUtils.js";import{FOV,HIT_COOLDOWN,PLAY_DEPTH}from"./SpaceFighterConstants.js";const meshes=new Map,cached=(o,t)=>{let e=meshes.get(o);return!e&&(e=cacheGameAsset("space-fighter/SpaceFighterScene:"+o,t),meshes.set(o,e)),e},rgb=o=>{const[t,e,s]=toColor(o);return[t,e,s]},mix=(o,t,e)=>[o[0]+(t[0]-o[0])*e,o[1]+(t[1]-o[1])*e,o[2]+(t[2]-o[2])*e],shade=(o,t)=>[o[0]*t,o[1]*t,o[2]*t],smooth=(o,t,e)=>{const s=Math.min(1,Math.max(0,(e-o)/(t-o)));return s*s*(3-2*s)},TAN_HALF=Math.tan(FOV/2);export const toWorld=(o,t,e,s=PLAY_DEPTH)=>{const n=o.k*s/PLAY_DEPTH;return[(t-o.width/2)*n,(o.height/2-e)*n,-s]};const shipMesh=()=>cached("sf-ship",()=>{const o=rgb("#E3EAF3"),t=rgb("#8A97A8"),e=rgb("#00C8FF"),s=rgb("#55606F"),n=rgb("#0B3A5A"),a=loft([{z:-.62,bottom:-.1,top:.12,width:.15,square:3},{z:-.42,bottom:-.14,top:.2,width:.22,square:3.2},{z:-.05,bottom:-.15,top:.24,width:.24,square:3},{z:.22,bottom:-.12,top:.25,width:.19,square:2.6},{z:.46,bottom:-.08,top:.15,width:.11,square:2.4},{z:.64,bottom:-.03,top:.05,width:.04,square:2.2},{z:.73,bottom:-.004,top:.004,width:.004,square:2}],{around:36,smoothness:4,color:([,s,n],a)=>{let i=mix(t,o,smooth(-.5,.4,a[1]));return i=mix(i,e,smooth(.03,0,Math.abs(n-.02)-.035)*smooth(.3,.7,a[1])),n>.6&&(i=mix(i,e,.5)),[...shade(i,.9+.1*smooth(-.1,.15,s)),1]}}),i=ellipsoid([.1,.09,.2],[.07,.16,.32,1],24),r=ellipsoid([.025,.012,.06],[.8,.92,1,1],12),p=t=>{return{geometry:loft((e=t,[{z:.15*e,bottom:-.06,top:.06,width:.32,square:2.4},{z:.55*e,bottom:-.04,top:.04,width:.21,square:2.4},{z:.95*e,bottom:-.025,top:.025,width:.11,square:2.2}].sort((o,t)=>o.z-t.z)),{around:20,smoothness:3,color:[...o,1]}),rotation:quat.y(Math.PI/2),position:[0,0,-.08]};var e},h=o=>tube([[.17*o,.015,.2],[.95*o,.01,-.02]],{radius:.022,sides:8,color:[...n,1]}),l=o=>tube([[.95*o,0,-.18],[.95*o,0,.24]],{radius:o=>.035-.012*o,sides:10,color:[...s,1]}),m=o=>tube([[.3*o,-.02,.08],[.3*o,-.02,-.56]],{radius:o=>.09+.025*o,sides:18,color:[...s,1]}),u=o=>({geometry:lathe([[.08,.02],[.125,-.02],[.13,-.07],[.095,-.07]],{segments:18,color:[...shade(s,.7),1]}),position:[.3*o,-.02,-.56],rotation:quat.x(Math.PI/2)}),d=o=>({geometry:extrude((new Path).moveTo(0,0).lineTo(.2,0).lineTo(.05,-.18).lineTo(-.04,-.18).close(),{depth:.025}),position:[.12*o,.17,-.5],rotation:quat.multiply(quat.z(.35*o),quat.y(Math.PI/2)),color:[...n,1]}),f=merge([{geometry:a},{geometry:i,position:[0,.21,.2]},{geometry:r,position:[-.035,.29,.26]},p(1),p(-1),{geometry:h(1)},{geometry:h(-1)},{geometry:l(1)},{geometry:l(-1)},{geometry:m(1)},{geometry:m(-1)},u(1),u(-1),d(1),d(-1)]);return _0x3a51b1(merge([{geometry:f,rotation:quat.multiply(quat.y(Math.PI),quat.x(-Math.PI/2))}]),{center:!1,shine:.65})}),LIGHT_RED=[2.2,.35,.3,1],LIGHT_GREEN=[.35,2.2,.6,1],FLAME_IDLE=[2.2,1.25,.45,.9],FLAME_BOOST=[1.9,2.2,2.6,.95],LEAN=quat.x(-.32),shipTurn=[0,0,0,1];export const shipRotation=(o,t)=>quat.multiply(LEAN,quat.y(o,t),t);export function spawnShip(o,t,e){const s=t.shipSize*t.k,n=o.spawn({mesh:"none",position:toWorld(t,e,t.shipY),rotation:shipRotation(0),pickable:!1}),a=o.spawn({mesh:shipMesh(),parent:n,scale:s,color:[1,1,1,1],bob:{amplitude:[.02*s,.04*s,0],speed:2.2},pickable:!1}),i=[[.3,.28],[-.3,.28],[0,.16]].map(([t,e])=>o.spawn({mesh:"puff",parent:a,position:[t,-.66,.02],scale:e,color:FLAME_IDLE,pickable:!1}));return[1,-1].forEach((t,e)=>{const s=0===e?LIGHT_GREEN:LIGHT_RED,n=o.spawn({mesh:"sphere",parent:a,position:[.95*t,.24,0],scale:.07,color:s,pickable:!1});o.animate(n,[{color:s,at:.15},{color:[.25*s[0],.25*s[1],.25*s[2],1],at:.3},{color:[.25*s[0],.25*s[1],.25*s[2],1]}],{duration:1.2,delay:.6*e,repeat:"forever",easing:"linear"})}),flicker(o,t,{root:n,body:a,flames:i},!1),{root:n,body:a,flames:i}}export function flicker(o,t,e,s){e.flames.forEach((t,e)=>{const n=(2===e?.16:.28)*(s?1.55:1);o.stopAnimation(t),o.set(t,{scale:n,color:s?FLAME_BOOST:FLAME_IDLE}),o.animate(t,{scale:1.35*n},{duration:.06+.015*e,repeat:"forever",yoyo:!0,easing:"easeInOut"})})}export function launchShip(o,t,e){const s=t.shipSize*t.k;o.set(e.body,{position:[0,4*-s,0]}),o.animate(e.body,{position:[0,0,0]},{spring:{stiffness:140,damping:14}})}export function placeShip(o,t,e,s,n){o.set(e.root,{position:toWorld(t,s,t.shipY),rotation:shipRotation(n,shipTurn)})}export function blinkShip(o,t){const e=Math.round(HIT_COOLDOWN/.1),s=Array.from({length:e},(o,t)=>({color:t%2?[1,1,1,1]:[1,1,1,.3],at:(t+1)/e}));o.stopAnimation(t.body),o.set(t.body,{position:[0,0,0]}),o.animate(t.body,s,{duration:HIT_COOLDOWN,easing:"linear"}),o.animate(t.body,{turn:[0,2*Math.PI,0]},{duration:.55,easing:"easeOut"})}export function steadyShip(o,t){o.stopAnimation(t.body),o.set(t.body,{color:[1,1,1,1],position:[0,0,0],rotation:[0,0,0,1]})}const ROCK_VARIANTS=4,ROCK_KINDS=[["#7A5230","#2A1508"],["#6E6A66","#25221F"],["#3E3B40","#121014"],["#9FB3C4","#3A4A5A"]],rockMesh=o=>cached("sf-rock-"+o,()=>{const t=7.3*o+1,[e,s]=ROCK_KINDS[o%ROCK_KINDS.length],n=rgb(e),a=rgb(s),i=random(40+o),r=Array.from({length:6},()=>({u:i(),v:.2+.6*i(),r:.06+.08*i()})),p=(o,t)=>{let e=0;for(const s of r){const n=Math.min(Math.abs(o-s.u),1-Math.abs(o-s.u))*Math.sin(t*Math.PI)*2,a=Math.hypot(n,t-s.v)/s.r;a<1?e-=.07*(1-a*a):a<1.35&&(e+=.025*(1-(a-1)/.35))}return e},h=Array.from({length:19},(o,t)=>{const e=-Math.PI/2+t/18*Math.PI;return[Math.max(.001,.5*Math.cos(e)),.5*Math.sin(e)]});return _0x3a51b1(lathe(h,{segments:32,displace:(o,e)=>{const[s,n]=(a=o,[Math.cos(a*Math.PI*2),Math.sin(a*Math.PI*2)]);var a;return(.22*noise(1.4*s+t,1.4*n+2.6*e+t)+.08*noise(3.5*s+t,3.5*n+6*e)+.025*noise(9*s,9*n+14*e+t)-.14+p(o,e))*Math.sin(e*Math.PI)},color:({u:o,v:e,position:s})=>{const i=smooth(0,-.06,p(o,e)),r=smooth(.005,.02,p(o,e)),h=smooth(.55,.75,noise(6*s[0]+t,6*s[1]+4*s[2])),l=.8+.32*noise(24*s[0]+9*s[2],24*s[1]+t),m=mix(mix(n,a,Math.max(.85*i,.45*h)),shade(n,1.25),.6*r);return[...shade(m,l),1]}}),{shine:.1})});export function spawnBelts(o,t,e,s,n){const a=o.spawn({mesh:"none",position:toWorld(t,t.width/2,e),pickable:!1}),i=random(n),r=t.beltHeight,p=t.k,h=(s,n,h)=>o.spawn({mesh:rockMesh(Math.floor(4*i())),parent:a,position:[(s-t.width/2)*p,-(n-e)*p,(i()-.5)*r*.35*p],scale:[h*p*(.9+.25*i()),h*p*(.85+.2*i()),h*p*(.9+.2*i())],rotation:quat.multiply(quat.z(6.3*i()),quat.x(6.3*i())),spin:[1.6*(i()-.5),1.6*(i()-.5),1.2*(i()-.5)],pickable:!1}),l=1.08*r,m=(o,t,s)=>{if(t-o<2)return;const n=1===s?t:o,a=t-o+l;for(let o=l/2;o<a;){const t=l*(.7+.5*i());h(n-s*o,e+r/2+(i()-.5)*r*.12,t),o+=.66*t}h(n-s*l*.22,e+.18*r,.42*l),h(n-s*l*.22,e+.82*r,.42*l)};return m(-l/2,s,1),m(s+t.gap,t.width+l/2,-1),{root:a}}export function placeBelts(o,t,e,s){o.set(e.root,{position:toWorld(t,t.width/2,s)})}export function explode(o,t,e,s){const n=toWorld(t,e,s),a=t.shipSize*t.k;effects.explosion(o,{position:n,count:24,size:.9*a,speed:3*a,lifetime:.6,colors:[[2.4,1.6,.5,.95],[2.2,.8,.3,.9],[1.4,.4,.2,.8]],smoke:[.3,.25,.3,.5],debris:[toColor("#C9D3DE"),toColor("#00C8FF")]})}const halfAt=(o,t)=>[t*TAN_HALF*(o.width/o.height),t*TAN_HALF],moonMesh=()=>cached("sf-moon",()=>_0x3a51b1(merge([{geometry:lathe(Array.from({length:17},(o,t)=>{const e=-Math.PI/2+t/16*Math.PI;return[Math.max(.001,.5*Math.cos(e)),.5*Math.sin(e)]}),{segments:40,color:({position:o})=>{const t=smooth(.55,.7,noise(3*o[0]+4,3*o[1]+2*o[2])),e=smooth(.7,.8,noise(9*o[0]+1,9*o[1]-4*o[2]));return shade(mix(rgb("#E8E4D8"),rgb("#8A8070"),.7*t+.5*e),.9+.15*noise(30*o[0],30*o[1]))}})}]),{shine:.05}));export const STAR_DRIFT=5;function spawnSky(o,t,e){const s=[],[n,a]=halfAt(t,170),i=[.55*-n,.38*a,-170];if(e){const t=.26*a;return s.push(o.spawn({mesh:"puff",position:[i[0],i[1],i[2]-2],scale:4.2*t,color:[1.8,1.25,.6,.16],pickable:!1})),s.push(o.spawn({mesh:"puff",position:[i[0],i[1],i[2]-1],scale:2.2*t,color:[2,1.6,.8,.35],pickable:!1})),s.push(o.spawn({mesh:"sphere",position:i,scale:t,color:[2.4,2.05,1.1,1],pickable:!1})),s}const[r,p]=halfAt(t,400);return s.push(o.spawn({mesh:"puff",position:[.9*-r,.75*p,-400],scale:.7*p,color:[1.6,1.2,.9,.18],pickable:!1})),s.push(o.spawn({mesh:moonMesh(),position:i,scale:.32*a,spin:[0,.05,0],pickable:!1})),s}export function setSpaceTheme(o,t,e,s){for(const t of e.sky)o.despawn(t);e.all=e.all.filter(o=>!e.sky.includes(o)),e.sky=spawnSky(o,t,s),e.all.push(...e.sky)}export function spawnSpace(o,t,e,s){const n=[],a=random(3),i=[[.55,.25,.95,.1],[.25,.4,1,.08],[.85,.3,.75,.07]];for(let e=0;e<16;e++){const s=430+50*a(),[r,p]=halfAt(t,s);n.push(o.spawn({mesh:"puff",position:[(2*a()-1)*r*1.1,(2*a()-1)*p,-s],scale:p*(.5+.6*a()),color:i[e%3],pickable:!1}))}for(let e=0;e<36;e++){const s=470,[i,r]=halfAt(t,s),p=e/35;n.push(o.spawn({mesh:"puff",position:[(2.2*p-1.1)*i,(.75-1.3*p+.15*(a()-.5))*r,-s],scale:r*(.12+.14*a()),color:[.85,.8,1.2,.06],pickable:!1}))}const r=spawnSky(o,t,s);n.push(...r);const p=[],h=[[2.2,2.2,2.4,1],[2.3,2.1,1.8,1],[1.9,2.1,2.6,1]];for(let s=0;s<260;s++){const i=30+300*Math.pow(a(),.7),[r,l]=halfAt(t,i),m=(2*a()-1)*r*1.05,u=(2*a()-1)*(l+1),d=o.spawn({mesh:"sphere",position:[m,u,-i],scale:.0028*i*(.6+1.1*a()),color:h[s%3],velocity:[0,-5,0],pickable:!1});n.push(d),p.push({e:d,x:m,y:u,z:i,since:e})}return{all:n,sky:r,stars:p}}export function wrapStars(o,t,e){for(const s of t.stars){const t=s.z*TAN_HALF+1;s.y-5*(e-s.since)<-t&&(s.y=t,s.since=e,o.set(s.e,{position:[s.x,t,-s.z]}))}}export function removeAll(o,t){for(const e of t)o.despawn(e)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const _0x341ddc=_0x3958;function _0x3b65(){const e=["gmkww8kRsq","W5ddPmkRW5C+","CMldTmkAW7i","mbJcPgJcT8oLsbbyomkA","Esj8t8oZWRjp","iCoXW7pdHaSdsYldRCkfnSoN","W5e6o8kpb8o0hSkt","naJcPw7cP8o5wq","mrlcUwJcLCoYrcvFiW","W49vW6rQaKyGWOGEmSkDW4O","WPS0CWdcJG","uYWUAmomyq","WRZcNZ7dS1nVWPldGSoEW5ldVXPd","W6OSW7fgBSkYosRcJmoYlHbp","xCoTWRdcO159W63dGa","zK3dRYRdTSkNfsPGfCknwKW","W4eAAmk0WPdcUwNdNSknza","zd5RA8oSWRboWQHwWR7cV3rdWQpcIti3WOddGXD0aXu","W5aHiW","WR3dMmkwW7ldKG","WPOioa/cQSoRea","mHdcP2JcU8ohqsnumSkgwe/dG8owW7W","W6eSW6LxBCk4bcZcHSoQ","WOO5W7/cSN1ffG","WRLkeCk+fmofsZS","wNaXWOnJkgnrEmk0W6iPWRK8W4G","CSoTWQ9fWQi","W6SDW6tdGSorrSkO","DuaBBSkFA3eqEsldSdJcOCow","W7iInCkgymoufmkxbCoaW60","sbldSeFdPSkPy8krWPhcMW8K","v8kCWQWNhmkKy2VcTsuMWQaMbSoycmoYuCkqWRxcM8o6W5K","WQbXpmo3WP7dGh3dP8kRWPRdUa","g8oVW6ztW48ZCqiUkmoHemoTkSocChKJoSkXWQqnsb0","W7ZdNuzmWPfp","emoyWOvnW6tcVgfvah/dHs3dVCkRWQ95","CdGVCCoo","cSo9W7zaWOjVma","lmoYW7/dMse","ACogqCkJFSkKW6xcJs4","WQtcIv3cNmo/W4DLyKGymWtcQG","WPpcILPm","W4NcNGu6EJtdSxeW","s8kPW4hcGN/cImkWbsLZAmoEuCkzWQ7dNWCv","j8oHWR95W43cJ0DilL7dQq","Eu3cMwpcImoC","pwhdVcVcJG","W5aDWQDTrq","W45AW6DVrqnAW5TuyCokWOVcMHLmW6Wjqh7cKCoNpmklsa","F8oNWR/cUY1GW7/dGmo+WQu7jx/cNg4","W47cNriOFJldIN86W5dcPGy","EmkDiGy1","BCoWWOZcOxK","w8kqaqCfW7JcPhC","WO4TW6dcPvLzb8k3","wCkCWRa6mCkUzhJcVd0","ksj1W57dTq","AwhdOW5Fb2VdM8k8WRTIpNlcK1RcN8ktWOjLW4K6W5HRWPi","v3RcUeVcQCo0","D8k3WRFcJ1DzuG","nHhcVNVcRmoEwsDAja","yfGrDq","m8oVW6pdGG0","FwRdPbC","WQuvDrJdQmosWO0lW7tdKSkguSoDbCovW5RdVmkvW7PiW5e2eu8","imo9WR57W4tcGeO","WOhcNwLwW5S","C8oHWRz+WPKUW6r8ECo2W5pdJclcMc/dOmkaDrS","txtdKXKd","WPv8nG","BZb3yCoZWRm","W5Tyn1tdVCkUz8oU","tmkCgteLW6dcOhC","W4KhWPrVqmkBWPH0WO7dPq","lCklzCkYtW","pSkdc8k1BCkqW7i","oIX0W5pdSSoJWQLY","kJpdMdOUrbpcGa","W7RcH1LQnLmCW5ySfSopcSkMlq","W5SzW6TpW4exp33dMG","CNxdKqmwtdFcGmo3","W6ugp8kmfa","W4mbWQf8smkqWQm","WRJdMmkuW6NdS27cOwK","bWzfW4JdNa","vgFdOmoY","WRLNn8otWOVdHa","FCkXWPxcKvnotXBdVW","W4hcKXiRCI7dJheU","hmkvWRGO","W7ihgmk6h8ogi8k3l8oNWOjg","WRtcGfDpW50","W7ZdIWNdICkUWOSS","W6/cJ8ooWQZcKKBcGN7dLr3dMW","WQX6Emo1amoAhgXvnmojzw/dLNFcVSkCW4/dSCkw","WOSJW7/cPh1ziCk5x8khWQi","rbJcKItcKCoEE8ki","W5b4WRxdUcayvmkDr8kMWRqkuW","qgNcV0BcUmoWWOy","W6ZdJeDBWP9/t8k+W7inW5VdRWGwnwhcOq3dLq","W6ddJWFdICkSWRW0sM8","W4/cLW44FJi","W49jW6r8gxyoWOmD","W5voW4jVafqGWPGDmW","cIfKW5eWAZ5LECkuW7K8WRm","EbTKW5tdHCoWWOe","WRZcG8osgSog","tZeItSoazSkrW6mzW7xdOMzZzW","hCoPW6zEWOjGmwDRzmk2","yMNdRSo6W5ehn8kNFCk2oCkBmmoCAL/dNx0","WR3cJCoucSoAxq","W6/dQSkxW5qh","k0tdKGBcLCo3ASoOWQVcKa","WQyWW49NWRezrSo9W7nPteNcPq","uw3dUmofW4ahnSks","W4dcNrmP","DSkJWQBcLLvfsq3dTSkRiCoRCmkitG","WRZcL8osdmoqxLG","WO4PW7NcK2XkfSkZ","W7CDW4BdRSoztSkiW6BdMNK","AJ18EG","W6WpW7xdQG","WRSxEr7cTmki","W53dTeJdP8kiWQKqAYSLbXlcIG","WPbWk8o9g8oVgcfg","WO3dV8kWW5ddLa","W5qgW55BWO0DiNldJ0q","hSoMW7nKWQa","WOyqW6roWQO","W55jWOvIE8o2gmkCW4/dOmokvN4+ngDWWPC","wSkYW4lcHq","WP4IW7RcLL8","nSo7WQLkW4dcGLjKlLddPW","W65OWRbZWQFcHmkwoI/cKCoa","WRhcQZ5NuSkIxSkXW4KS","tIWGD8oc","WOymW69rWOO","lcXPW47dLCoJWRX5","kdxdLI05wIBcIq","W6pcHKv9nhyeW6CNpCowh8k8ia","DvW4s8k/","WQibCJRcOCkmW5rCWRNcKCoF","cmomW4hdIYpdRffEag1WWRxdS8kRW6hdMa","WR7dQmoTWRH5W6LVtSkZgYijh1BcQa","W5TyW7fDgvaBWOS","Bg/dRW","W5abWQhdGSoBxCkIW6pcN0FdMCoxWQir","maPPW57dO8oY","rmkFcXe0W7u","W70mlCkMkmozAq","smo2WRhcTgzwW6ldKCkQWQK0","cSoMW51HWR0","W73cKLrLoheiW7yNja","W5LCWOHTDCoudmk+W4ldICoc","aIHMW6pdVW","ECkJWRu","WO0PW6ZcRfTkemkYqa","W7HvnrRdQ8kPt8o+h8knW4jqW5pdV8krWRWHdmkdvG","vtONx8okC8k+W6SrW7q","W5PCmfy","WRtcMKLsW4RdICkG","W4ylW5LpW4upi0hdKKC","d8kYW6BcS3ToW7tdQCkF","W60AW67dRmoFAmkMW6ldM0FdNCotWRnC","vw3dOSoIW5eu","ExbqW7JdImoLWR57","WRXXcCoyWP7dLxJdQ8kT","WPJdQ8oHWP99W7Dqq8k+et0","WOf+zmop","sXtdVKVdQSkPrSkEWOxcPWOV","tmkhWReTdCkiBg3cSb0qWRSG","WOSpWRa4vqLFWRq7mmkjW67dMW","nrlcPxJcP8oLBI1BomkC","C3C/WOlcVSk5W7bxW714xh/cIW","eetcQXe","W6q6BCkfW43dRuJdT8kEWPJdSa","gKtcSI3cQ8o8ESkU","DSkTWQNcMq","W47cI0b9fW","m8oPWQHTW4JcGfLsiem","W5maWQPIsa","sSkLW6JcG10","W4XkphFdVCkXsq","W7RdLKLAWPHyACkLW7mmW5hdMa","W5qZW65hx8kVtrJcGCoYiGvBWQGWjCo8","WR7cNgTmW47dNSk9tCkW","W7FdKHVdMSkRWP4SDMOejW","WO/cLayQ","kv3dIrpcNSoqAG","W5ldKMXnWQC","y1OvB8kytvGdBrRdUdNcTW","d8oKW6fkWQnOnLjHFmk6sSk2","W6XnWOjMAa","WRz3k8ogWPRdGMu","W4JdQmkOW7ufDG","WOlcVdqZrSk3wSkkW4HIya","W77dMHRdJCkUWPezxw0D","W5ZdL0viWPHytSkJW6KmWPxdVWGimq","y8o0WQT5WOe","W5NcGqubFI3dTW","WQtcH1PeW4ddKmkgqSkZW4TvWRm","rZ04vCofCSkjW68","W4PnnLNdS8kFr8o4ca","W67dLM96W6hdPmkHya","W6Crg8kdlmogyW","WQ12dmo3WPG","gCkHdGWsW7VcKW","WQxcJLdcN8oYW4SDBwOFeZW","W7ddJHRdMmkIWPeH"];return(_0x3b65=function(){return e})()}function _0x3958(e,d){e-=340;const W=_0x3b65();let o=W[e];if(void 0===_0x3958.txcYad){const e=function(e,d){let W,o,t=[],r=0,s="";for(e=function(e){let d="",W="";for(let W,o,t=0,r=0;o=e.charAt(r++);~o&&(W=t%4?64*W+o:o,t++%4)?d+=String.fromCharCode(255&W>>(-2*t&6)):0)o="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(o);for(let e=0,o=d.length;e<o;e++)W+="%"+("00"+d.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(W)}(e),o=0;o<256;o++)t[o]=o;for(o=0;o<256;o++)r=(r+t[o]+d.charCodeAt(o%d.length))%256,W=t[o],t[o]=t[r],t[r]=W;o=0,r=0;for(let d=0;d<e.length;d++)o=(o+1)%256,r=(r+t[o])%256,W=t[o],t[o]=t[r],t[r]=W,s+=String.fromCharCode(e.charCodeAt(d)^t[(t[o]+t[r])%256]);return s};_0x3958.IFRVeS=e,_0x3958.fkadqS={},_0x3958.txcYad=!0}const t=W[0];_0x3958.QSjiGZ!==t&&(_0x3958.fkadqS={},_0x3958.QSjiGZ=t);const r=_0x3958.fkadqS[e];return void 0===r?(void 0===_0x3958.otRclK&&(_0x3958.otRclK=!0),o=_0x3958.IFRVeS(o,d),_0x3958.fkadqS[e]=o):o=r,o}!function(){const e=_0x3958,d=_0x3b65();for(;;)try{if(763653==-parseInt(e(416,"$LL^"))/1*(-parseInt(e(341,"!AYA"))/2)+parseInt(e(473,"2S(]"))/3*(parseInt(e(404,"@%tI"))/4)+parseInt(e(544,"Eblx"))/5*(-parseInt(e(518,")UqR"))/6)+-parseInt(e(484,"$LL^"))/7+-parseInt(e(535,"3L5G"))/8*(-parseInt(e(514,"PR)]"))/9)+-parseInt(e(482,"OIFl"))/10+-parseInt(e(449,"2$eg"))/11*(-parseInt(e(415,"4&gR"))/12))break;d.push(d.shift())}catch(e){d.push(d.shift())}}();import{c as _0x209bd9}from"react/compiler-runtime";import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x173d62,{useEffect,useRef}from"react";import{View,Text,StyleSheet,ScrollView,TouchableOpacity}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{useSpiderSolitaireStore,useIsPlaying,useIsGameOver,useIsWon,useTableau,useSelectedCards,useTime,useStock}from"./SpiderSolitaireStore.js";import{CardPile}from"./components/CardPile.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x2e18cb}from"../../helpers/index.js";import{SPIDER_SOLITAIRE_GAME_CONFIG,CARD_WIDTH,CARD_HEIGHT}from"./SpiderSolitaireConstants.js";import{GAME_IDS,DEFAULT_GAME_SETTINGS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{calculateTimeBasedScore}from"../../services/ScoringService.js";import{formatTime}from"../../services/UtilsService.js";import{jsx as _0x300987,Fragment as _0x403675,jsxs as _0x6cdf56}from"react/jsx-runtime";const TableauPileWrapper=_0x173d62[_0x341ddc(485,"!AYA")](e=>{const d="$LL^",W="PR)]",o=_0x341ddc,t={};t[o(446,"L$gU")]=function(e,d){return e!==d},t[o(379,"2$eg")]=function(e,d){return e!==d},t.HkaYy=o(422,"JGj)"),t[o(516,"%Hxi")]=o(503,"kiuL"),t.GxvtJ=function(e,d){return e===d},t[o(439,"$8Rp")]=function(e,d){return e!==d};const r=t,s=_0x209bd9(16),{pile:x,tableauIndex:a,pileSpacing:n,selectedCards:i,onCardPress:_,onEmptyPress:S}=e;let l;r[o(373,"BT7^")](s[0],_)||s[1]!==a?(l=e=>{_(a,e)},s[0]=_,s[1]=a,s[2]=l):l=s[2];const m=l;let k;if(r[o(377,"PR)]")](s[3],S)||s[4]!==a)k=()=>{S(a)},s[3]=S,s[4]=a,s[5]=k;else if(r[o(465,d)]===r.xtUCg){const e=_0x2bf65d[o(487,"!AYA")]();if(!e[o(496,W)]||e.isGameOver)return;_0x5907f2(_0x5600c0,_0x49fa7d,_0x4abb98[o(471,W)])}else k=s[5];const u=k,C=r[o(489,"E%Mz")](a,0)?0:n;let f;if(r[o(363,"2S(]")](s[6],C)){const e={};e[o(507,")UqR")]=C,f=[styles[o(464,"kiuL")],e],s[6]=C,s[7]=f}else f=s[7];const R=f;let p,G;if(s[8]!==m||r[o(520,"Jdbu")](s[9],u)||r.hskMk(s[10],x[o(509,"FF)N")])||s[11]!==i){const e={};e[o(417,"YMm#")]=x[o(367,d)],e.selectedCards=i,e.onCardPress=m,e[o(364,"n5A^")]=o(409,"923p"),e[o(541,"3L5G")]=!0,e.onEmptyPress=u,p=_0x300987(CardPile,e),s[8]=m,s[9]=u,s[10]=x.cards,s[11]=i,s[12]=p}else p=s[12];if(s[13]!==R||r[o(436,"@%tI")](s[14],p)){const e={};e[o(491,"4$D[")]=R,e.children=p,G=_0x300987(View,e),s[13]=R,s[14]=p,s[15]=G}else G=s[15];return G});TableauPileWrapper[_0x341ddc(355,"leLD")]=_0x341ddc(420,")]l@");export const SpiderSolitaire=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:d,onEndGame:W,onReplayGame:o,onShare:t,onShareScreenshot:r,onShowLeaderboard:s,bannerAd:x})=>{const a=_0x341ddc,n={dUDge:function(e,d,W,o){return e(d,W,o)},SdOdd:function(e){return e()},MJfjk:function(e,d){return e(d)},pijES:a(347,"L$gU"),rxFbI:a(500,"T7Om"),wnwVG:function(e,d,W){return e(d,W)},wIGJu:a(392,"fsM5"),MEBrZ:function(e,d){return e(d)},shLFK:function(e){return e()},cnYSZ:function(e,d){return e(d)},LFdyN:function(e,d,W){return e(d,W)},rxvXP:a(352,"PR)]")},i=useIsPlaying(),_=useIsGameOver(),S=useIsWon(),l=n.SdOdd(useTableau),m=useSelectedCards(),k=useTime(),u=_0x173d62[a(531,"L$gU")](!1),C=useRef(W);C[a(393,"4$D[")]=W;const f=_0x173d62.useCallback(e=>{const d=a;if(C.current&&!u[d(499,"QJ#4")]){const W=useSpiderSolitaireStore.getState().time,o=600,t=e===d(456,"2$eg")?n.dUDge(calculateTimeBasedScore,W,o,100):0;C[d(527,"3L5G")]({status:e,score:t.toString()}),u[d(543,"G#wp")]=!0}},[]),R=useSpiderSolitaireStore(e=>e[a(418,"L$gU")]),p=n[a(395,"$LL^")](useSpiderSolitaireStore,e=>e[a(413,"OIFl")]),G=useSpiderSolitaireStore(e=>e[a(526,"fsM5")]),b=useSpiderSolitaireStore(e=>e[a(435,"oN8z")]),O=useSpiderSolitaireStore(e=>e[a(469,"L$gU")]),L=useSpiderSolitaireStore(e=>e[a(533,"FIso")]),h=useSpiderSolitaireStore(e=>e[a(467,"G#wp")]),P=n[a(451,"an&7")](useStock);n[a(438,"kMj@")](useEffect,()=>(R(),()=>{const e=_0x3958;useSpiderSolitaireStore[e(425,")]l@")]()[e(477,"%Hxi")]&&!u[e(386,"Egrb")]&&f(e(381,"kde[")),n[e(522,"8*Vu")](G),n[e(362,"n5A^")](b)}),[R,G,b]),n[a(349,"BT7^")](useEffect,()=>{const e=a;_&&!u[e(370,"yYV*")]&&n.MJfjk(f,S?e(380,"oN8z"):e(426,"eXSq")),!_&&(n[e(521,"JGj)")]===n[e(492,"v^uK")]?_0x1be5a0(_0x3acef3):u[e(376,"leLD")]=!1)},[_,S,f]);const g=n[a(462,"kMj@")](useRef,e);g.current=e;const I=_0x173d62[a(478,"A^lT")](()=>{const e=a;u[e(348,"kMj@")]=!1,p();const d={};d.text=e(495,"FIso"),d[e(358,"4$D[")]=1.1,d[e(432,"Wug7")]=1.2,n.wnwVG(playSound,GAME_SOUNDS[e(346,"leLD")]?.[e(447,"$8Rp")]||d,g.current[e(494,"T7Om")]),n[e(442,"G#wp")](playHaptic,HapticType[e(356,"923p")],g[e(519,")UqR")][e(501,"an&7")])},[p]),y=_0x173d62[a(452,"R)J[")](()=>{f("cancel"),G()},[f,G]),M=_0x173d62[a(443,"leLD")](()=>{o?.(),b(),R()},[b,R,o]),T=_0x173d62[a(452,"R)J[")]((e,d)=>{const W=a,o=useSpiderSolitaireStore[W(455,"OIFl")]();o.isPlaying&&!o[W(414,"OIFl")]&&O(e,d,g[W(428,"YMm#")])},[O]),q=_0x173d62.useCallback(e=>{const d=a,W=useSpiderSolitaireStore[d(487,"!AYA")]();if(W[d(391,"2$eg")]&&!W[d(384,"4$D[")]&&W.selectedSource&&W.selectedCards[d(397,"%Hxi")]>0)if(n[d(357,"QJ#4")]===n.wIGJu)L(e,g[d(376,"leLD")]);else{const e=_0x157508[d(429,"G#wp")]();if(!e[d(398,"yYV*")]||e[d(536,"&0W6")])return;_0x4587d0(_0x29d33a[d(504,"%Hxi")])}},[L]),V=_0x173d62[a(343,"%Hxi")](()=>{const e=a,d=useSpiderSolitaireStore[e(383,"n5A^")]();d[e(390,"R2c9")]&&!d[e(430,"Wug7")]&&h(g.current)},[h]),N=_0x173d62.useMemo(()=>Math[a(470,"pV4z")](P.length/10),[P[a(433,"R)J[")]]),J=_0x173d62[a(460,"Eblx")](()=>({isPlaying:i,gameOver:_,onStartGame:I,onStopGame:y,onShare:t,onShowLeaderboard:s,startButtonSubtext:a(360,"2S(]")}),[i,_,I,y,t,s]),Q=_0x173d62[a(444,"FYXv")](()=>a(445,"]B5V"),[]),w=_0x173d62[a(524,"kde[")](()=>({isVisible:_,score:k,onPlayAgain:M,buttonText:a(340,"fsM5"),scoreLabel:S?a(508,"T7Om"):a(457,"Wug7"),scoreFormatter:S?formatTime:Q,title:S?"YOU WON!":a(434,")UqR"),message:S?a(468,"pV4z"):a(405,"oN8z")}),[_,k,M,S,Q]),v=_0x173d62[a(510,"eXSq")](()=>({gameId:GAME_IDS[a(453,"BT7^")],settings:e,onSettingsChange:d}),[e,d]),A=e?.[a(459,"n5A^")]??0,D=SPIDER_SOLITAIRE_GAME_CONFIG[a(401,"fsM5")],K={};K[a(490,"leLD")]=130+A;const E=_0x173d62[a(493,"pV4z")](()=>[styles[a(365,"G#wp")],K],[A]),H=_0x173d62[a(547,"Wug7")](()=>[styles[a(461,"2S(]")],!i&&styles[a(378,"FF)N")]],[i]),F=_0x173d62.useMemo(()=>[styles[a(411,")UqR")],0===N&&styles[a(389,"E%Mz")]],[N]),j={};j.offset=A;const B={...J},U={...w};U[a(515,"Eblx")]=r,U[a(382,"pV4z")]=x;const z={...v};return _0x300987(GestureHandlerRootView,{style:styles[a(523,"3L5G")],children:n[a(530,"R)J[")](_0x6cdf56,_0x2e18cb,{children:[_0x300987(ScoreBoard,j),_0x300987(View,{style:E,children:_0x300987(ScrollView,{horizontal:!0,showsHorizontalScrollIndicator:!1,contentContainerStyle:styles[a(537,"kde[")],style:styles.tableauScrollView,children:_0x300987(View,{style:styles[a(463,"E%Mz")],children:l[a(466,"yYV*")]((e,d)=>_0x300987(TableauPileWrapper,{pile:e,tableauIndex:d,pileSpacing:D,selectedCards:m,onCardPress:T,onEmptyPress:q},e.id))})})}),!_&&_0x300987(TouchableOpacity,{style:H,onPress:V,activeOpacity:i?.7:1,disabled:!i,children:_0x300987(View,{style:F,children:N>0?_0x6cdf56(_0x403675,{children:[_0x300987(Text,{style:styles[a(481,"mOy7")],children:N}),_0x300987(Text,{style:styles[a(548,"an&7")],children:n[a(546,"FF)N")]})]}):_0x300987(Text,{style:styles[a(440,"kiuL")],children:"\u2715"})})}),_0x300987(GameControlButton,B),_0x300987(GameOverModal,U),_0x300987(GameSettingsModal,z)]})})};SpiderSolitaire[_0x341ddc(497,")UqR")]=_0x341ddc(454,"A^lT");const _0x205d9a={};_0x205d9a[_0x341ddc(431,"kde[")]=1,_0x205d9a[_0x341ddc(545,"4&gR")]=BACKGROUND_COLOR;const _0x25627e={};_0x25627e[_0x341ddc(374,"2$eg")]=1;const _0x4beeb2={};_0x4beeb2[_0x341ddc(372,"an&7")]=1;const _0x4ee0f1={paddingHorizontal:8},_0x1ea5a0={flex:1},_0x5b13f7={};_0x5b13f7[_0x341ddc(502,"kMj@")]=_0x341ddc(538,"fsM5"),_0x5b13f7.alignItems=_0x341ddc(437,"R2c9");const _0x4efb8e={};_0x4efb8e[_0x341ddc(423,"QJ#4")]=_0x341ddc(412,"eXSq");const _0x2f8ea2={};_0x2f8ea2[_0x341ddc(387,"$LL^")]=_0x341ddc(512,"L$gU"),_0x2f8ea2[_0x341ddc(421,"YMm#")]=120,_0x2f8ea2.right=16,_0x2f8ea2[_0x341ddc(458,"$LL^")]=100;const _0xf3c1d5={};_0xf3c1d5[_0x341ddc(403,")UqR")]=.5;const _0x4b2212={width:0};_0x4b2212[_0x341ddc(505,"JGj)")]=2;const _0x27818c={};_0x27818c.width=.8*CARD_WIDTH,_0x27818c.height=.8*CARD_HEIGHT,_0x27818c[_0x341ddc(361,"eXSq")]=6,_0x27818c[_0x341ddc(427,"yYV*")]=_0x341ddc(540,"pV4z"),_0x27818c.borderWidth=2,_0x27818c[_0x341ddc(483,"3L5G")]=_0x341ddc(400,"mOy7"),_0x27818c[_0x341ddc(371,"3L5G")]=_0x341ddc(475,")]l@"),_0x27818c[_0x341ddc(450,"E%Mz")]=_0x341ddc(345,"T7Om"),_0x27818c.shadowColor=_0x341ddc(479,"fsM5"),_0x27818c[_0x341ddc(529,"OIFl")]=_0x4b2212,_0x27818c[_0x341ddc(424,"$8Rp")]=.4,_0x27818c[_0x341ddc(511,"PR)]")]=4,_0x27818c[_0x341ddc(353,"eXSq")]=5;const _0x41423e={};_0x41423e.backgroundColor=_0x341ddc(368,"2$eg"),_0x41423e[_0x341ddc(406,"G#wp")]=_0x341ddc(375,"R)J["),_0x41423e.borderStyle="dashed";const _0x31c9a8={};_0x31c9a8[_0x341ddc(394,"@%tI")]=22,_0x31c9a8[_0x341ddc(528,"3L5G")]=_0x341ddc(441,"v^uK"),_0x31c9a8[_0x341ddc(385,"Jdbu")]=_0x341ddc(498,"eXSq");const _0x199cb7={};_0x199cb7[_0x341ddc(534,"2S(]")]=11,_0x199cb7[_0x341ddc(542,"FIso")]=_0x341ddc(488,"yYV*"),_0x199cb7[_0x341ddc(402,"PR)]")]=_0x341ddc(359,"OIFl"),_0x199cb7[_0x341ddc(399,"eXSq")]=2;const _0x16e3a9={};_0x16e3a9[_0x341ddc(448,"$LL^")]=20,_0x16e3a9[_0x341ddc(539,"@%tI")]=_0x341ddc(344,"kMj@"),_0x16e3a9[_0x341ddc(366,"mOy7")]=_0x341ddc(396,")]l@");const _0x35d88b={};_0x35d88b[_0x341ddc(506,"]B5V")]=_0x205d9a,_0x35d88b.container=_0x25627e,_0x35d88b.gameArea=_0x4beeb2,_0x35d88b[_0x341ddc(342,"mOy7")]=_0x4ee0f1,_0x35d88b.tableauScrollView=_0x1ea5a0,_0x35d88b[_0x341ddc(472,"R2c9")]=_0x5b13f7,_0x35d88b[_0x341ddc(419,"kMj@")]=_0x4efb8e,_0x35d88b[_0x341ddc(461,"2S(]")]=_0x2f8ea2,_0x35d88b[_0x341ddc(410,"T7Om")]=_0xf3c1d5,_0x35d88b[_0x341ddc(513,"pV4z")]=_0x27818c,_0x35d88b.stockCardEmpty=_0x41423e,_0x35d88b.stockCardText=_0x31c9a8,_0x35d88b[_0x341ddc(474,"Wug7")]=_0x199cb7,_0x35d88b[_0x341ddc(354,"v^uK")]=_0x16e3a9;const styles=StyleSheet[_0x341ddc(369,"923p")](_0x35d88b);
|
|
1
|
+
"use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{formatTime,GAME_IDS,isTablet}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{textColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,LIGHT}from"./SpiderSolitaireConstants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,start,tick}from"./SpiderSolitaireGame.js";import{dealsLeft,RUNS_TO_WIN}from"./SpiderSolitaireRules.js";import{jsx as _0x4b1f73}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.SPIDER_SOLITAIRE,FEEDBACK={select:{sound:SOUNDS.SELECT,haptic:HapticType.LIGHT},deselect:{sound:SOUNDS.DESELECT,haptic:HapticType.LIGHT},invalid:{sound:SOUNDS.INVALID,haptic:HapticType.LIGHT},place:{sound:SOUNDS.PLACE,haptic:HapticType.MEDIUM},deal:{sound:SOUNDS.DRAW,haptic:HapticType.MEDIUM},complete:{sound:SOUNDS.COMPLETE,haptic:HapticType.SUCCESS},win:{sound:SOUNDS.WIN,haptic:HapticType.SUCCESS}},tryAgain=()=>"Try again!";export const SpiderSolitaire=engineGame(GAME_IDS.SPIDER_SOLITAIRE,e=>{const[t,i]=useLiveState(null),[s,a]=useLiveState(0),{game:r,status:o,screen:S,gameOver:n}=useEngineGame(e,{gameId:GAME_IDS.SPIDER_SOLITAIRE,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,i,s)=>{const a=getLayout(t,i,s,isTablet);return setLayout(e,a),9*a.pitch+a.card},drag:drag,reportScore:(e,t)=>"win"===t?e.score:0,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.MEDIUM),wire:(e,t)=>{e.onDeals=i,e.onCompleted=a,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}});return _0x4b1f73(EngineGameScreen,{...S,light:LIGHT,columns:[textColumn("DEALS",t??dealsLeft(r.board)),textColumn("COMPLETED",s+"/"+RUNS_TO_WIN)],subtext:"Deal the cards!",gameOver:n({title:"win"===o?"YOU WON!":"NO MOVES LEFT",message:"win"===o?"All suits completed!":"No more valid moves!",scoreLabel:"win"===o?"Completion Time":"No Moves Left!",score:r.time,formatter:"win"===o?formatTime:tryAgain,buttonText:"Play Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{project}from"../shared/EngineTilt.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const EXPECTED_TIME=600;export const BASE_SCORE=100;export const TAP_SLOP=10;export const MOVE_TIME=.24;export const DEAL_STAGGER=.05;export const RUN_STAGGER=.045;export const WIN_DELAY=1.1;export const COLORS={FACE:"#FFFFFF",BACK:"#1565C0",BACK_LIGHT:"#3B82D6",BACK_FRAME:"#E3F2FD",RED:"#DC2626",BLACK:"#1F2937",SELECTED:"#FFE082",CLASSIC_SLOT:"rgba(255, 255, 255, 0.35)"};export const SUIT_COLORS={hearts:COLORS.RED,diamonds:COLORS.RED,clubs:COLORS.BLACK,spades:COLORS.BLACK};export const TILT=.2;export const LIGHT=frontLight([-.35,.5,1],.5);export const CARD_RATIO=1.4;export const THICKNESS=.024;export const FACE_DOWN_STEP=.15;export const FACE_UP_STEP=.25;export const SMALL=.74;const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=110,tableY=(t,o)=>(t.centerY-o)/Math.cos(t.tilt);export function getLayout(t,o,r,e){const n=gameWidthFor(t),s=Math.max(3,Math.min(8,Math.round(.012*t))),E=Math.max(20,Math.min(e?96:64,Math.floor((n-9*s)/10))),p=1.4*E,a=E+s,i={width:t,height:o,centerY:o/2,tilt:.2},C=getScoreBoardTop(r)+82,S=.74*p,L=o-110-S/2-4,T=-(10*a-s)/2;return{...i,card:E,cardH:p,columns:Array.from({length:10},(t,o)=>T+E/2+o*a),pitch:a,pileTop:tableY(i,C+6),pileBottom:tableY(i,L-S/2-10),rowY:tableY(i,L),stockRight:-T,foundationX:T+.74*E/2,dz:.024*E+.35}}export const onScreen=(t,o,r,e)=>project(t,o,r,e);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{calculateTimeBasedScore}from"../../services/ScoringService.js";import{aimTilted,project,unproject}from"../shared/EngineTilt.js";import{BASE_SCORE,DEAL_STAGGER,EXPECTED_TIME,MOVE_TIME,RUN_STAGGER,SMALL,TAP_SLOP,WIN_DELAY}from"./SpiderSolitaireConstants.js";import{canMove,dealBlocked,dealRow,dealsLeft,moveRun,newBoard,pickable,PILES,RUNS_TO_WIN,takeCompletedRun}from"./SpiderSolitaireRules.js";import{buildScene,celebrate,layoutCards,pileOffsets,pileSpot,placeCards,removeScene,setSceneTheme,shakeCards,sparkle}from"./SpiderSolitaireScene.js";const WORLD_CAPACITY=900;export function createGame(e){const r=new World(900),o={world:r,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",board:newBoard(),held:null,press:null,get time(){return r.scoreboard.shownSeconds},get score(){return r.scoreboard.score},won:!1,onPhase:e=>{},onDeals:e=>{},onCompleted:e=>{},onEvent:e=>{}};return r.scoreboard.reset(),o}const allCards=e=>[...e.tableau.flat(),...e.stock,...e.completed.flat()];export function setLayout(e,r){const o=!e.scene;e.scene&&removeScene(e.world,e.scene),e.layout=r,aimTilted(e.camera,r),e.scene=buildScene(e.world,r,e.theme,allCards(e.board)),o?draw(e,dealOrder(e.board)):draw(e,()=>0,!0)}export function setTheme(e,r){e.theme=r,e.scene&&setSceneTheme(e.world,e.scene,r)}function draw(e,r,o=!1,n=!1){const{layout:t,scene:a}=e;t&&a&&placeCards(e.world,t,a,layoutCards(t,e.board,e.held,n),r,o)}function dealOrder(e){const r=new Map;return e.tableau.forEach((e,o)=>e.forEach((e,n)=>r.set(e.id,.018*(n*PILES+o)))),e=>r.get(e)??0}function report(e){e.onDeals(dealsLeft(e.board)),e.onCompleted(e.board.completed.length)}export function start(e){"ready"===e.phase&&(e.phase="playing",e.world.scoreboard.reset(),e.world.scoreboard.startClock(),e.won=!1,e.onPhase("playing"))}export function reset(e){e.world.cancelTimers(),e.board=newBoard(),e.held=null,e.press=null,e.world.scoreboard.reset(),e.won=!1,e.phase="ready",draw(e,dealOrder(e.board)),report(e),e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function tick(e,r){e.world.isDisposed||e.world.update(r)}const canPlay=e=>"playing"===e.phase&&!e.won;export function hitAt(e,r,o){const n=e.layout;if(!n)return null;const t=e.board,a=n.card*SMALL,l=Math.max(0,dealsLeft(t)-1)*a*.22,[,d]=project(n,0,n.rowY+n.cardH*SMALL/2,2),[,i]=project(n,0,n.rowY-n.cardH*SMALL/2,2),[s]=project(n,n.stockRight-a-l,0),[p]=project(n,n.stockRight,0);if(r>=s-4&&r<=p+4&&o>=d-4&&o<=i+4)return{kind:"stock"};const[u]=unproject(n,r,o),f=n.columns.findIndex(e=>Math.abs(u-e)<=n.pitch/2);if(f<0)return null;const h=t.tableau[f],b=pileOffsets(n,h);for(let e=h.length-1;e>=0;e--){const[,r,t]=pileSpot(n,f,b[e],e),[,a]=project(n,0,r+n.cardH/2,t),[,l]=project(n,0,r-n.cardH/2,t);if(o>=a&&o<=l)return{kind:"card",pile:f,index:e}}const[,m]=project(n,0,n.pileTop,0),[,w]=project(n,0,n.pileBottom,0);return o>=m&&o<=w?{kind:"pile",pile:f}:null}export function drag(e,r){const o=e.layout;if(!o)return;if("start"===r.phase)return void(e.press={x:r.x,y:r.y,hit:canPlay(e)?hitAt(e,r.x,r.y):null,grab:null,dragging:!1});const n=e.press;if(n)if(!n.dragging&&Math.hypot(r.x-n.x,r.y-n.y)>TAP_SLOP&&!beginDrag(e,n))e.press=null;else{if(n.dragging){const t=e.held;if(!t||!canPlay(e))return void(e.press=null);const[a,l]=unproject(o,r.x,r.y,40);if(t.drag={x:a+n.grab[0],y:l+n.grab[1]},"end"!==r.phase)return void draw(e,void 0,!0,!0);if(e.press=null,t.drag=null,r.cancelled)return putBack(e);const d=a+n.grab[0];let i=0;for(let e=1;e<o.columns.length;e++)Math.abs(o.columns[e]-d)<Math.abs(o.columns[i]-d)&&(i=e);return i===t.pile||Math.abs(o.columns[i]-d)>o.pitch?putBack(e):void moveTo(e,i)}"end"===r.phase&&(e.press=null,tap(e,n.hit))}}function beginDrag(e,r){const o=e.layout,n=r.hit;if(!canPlay(e)||!n||"card"!==n.kind)return!1;if(!pickable(e.board,n.pile,n.index))return e.board.tableau[n.pile][n.index].faceUp&&(e.scene&&shakeCards(e.world,e.scene,e.board.tableau[n.pile].slice(n.index).map(e=>e.id)),e.onEvent("invalid")),!1;const t=pileOffsets(o,e.board.tableau[n.pile]),[a,l]=pileSpot(o,n.pile,t[n.index],n.index),[d,i]=unproject(o,r.x,r.y,40);r.grab=[a-d,l-i],r.dragging=!0;const s=e.held;return e.held={pile:n.pile,index:n.index,drag:{x:a,y:l}},s&&s.pile===n.pile&&s.index===n.index||e.onEvent("select"),draw(e,void 0,!0),!0}function putBack(e){e.held=null,draw(e)}function tap(e,r){if(!canPlay(e)||!r)return;if("stock"===r.kind)return deal(e);if("card"===r.kind)return select(e,r.pile,r.index);const o=e.held;o&&o.pile!==r.pile&&moveTo(e,r.pile)}export function select(e,r,o){if(!canPlay(e))return;const n=e.held;if(n&&n.pile===r&&n.index===o)return e.held=null,draw(e),void e.onEvent("deselect");if(n&&n.pile!==r)return moveTo(e,r);n&&(e.held=null);const t=e.board.tableau[r]?.[o];return t&&t.faceUp?pickable(e.board,r,o)?(e.held={pile:r,index:o,drag:null},draw(e),void e.onEvent("select")):(draw(e),e.scene&&shakeCards(e.world,e.scene,e.board.tableau[r].slice(o).map(e=>e.id)),void e.onEvent("invalid")):draw(e)}export function moveTo(e,r){const o=e.held;if(!o)return;if(e.held=null,o.pile===r)return draw(e);const n=e.board.tableau[o.pile].slice(o.index);if(!canMove(e.board,n,r))return draw(e),e.scene&&shakeCards(e.world,e.scene,n.map(e=>e.id)),void e.onEvent("invalid");moveRun(e.board,o.pile,o.index,r),draw(e,checkRun(e,r,MOVE_TIME)),report(e),e.onEvent("place")}export function deal(e){if(!canPlay(e))return;if(dealBlocked(e.board))return void e.onEvent("invalid");const r=e.board.stock.slice(-PILES).reverse();dealRow(e.board),e.held=null;const o=new Map(r.map((e,r)=>[e.id,r*DEAL_STAGGER])),n=[];for(let r=0;r<PILES;r++)n.push(checkRun(e,r,MOVE_TIME+PILES*DEAL_STAGGER));draw(e,e=>o.get(e)??Math.max(0,...n.map(r=>r(e)))),report(e),e.onEvent("deal")}function checkRun(e,r,o){const n=e.layout?pileOffsets(e.layout,e.board.tableau[r]):[],t=takeCompletedRun(e.board,r);if(!t)return()=>0;const a=e.layout;if(a){const t=e.board.tableau[r].length,[l,d]=pileSpot(a,r,n[Math.min(t,n.length-1)]??0,t);e.world.after(o,()=>sparkle(e.world,a,l,d-.5*a.cardH))}e.onEvent("complete"),e.board.completed.length>=RUNS_TO_WIN&&win(e);const l=new Map(t.map((e,r)=>[e.id,o+(12-r)*RUN_STAGGER]));return e=>l.get(e)??0}function win(e){e.won=!0,e.world.scoreboard.stop(),e.world.scoreboard.set(calculateTimeBasedScore(e.time,EXPECTED_TIME,BASE_SCORE)),e.onEvent("win"),e.world.after(WIN_DELAY,()=>{e.layout&&celebrate(e.world,e.layout),e.phase="over",e.onPhase("over")})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export const SUITS=["hearts","diamonds","clubs","spades"];export const VALUES=["A","2","3","4","5","6","7","8","9","10","J","Q","K"];export const PILES=10;export const RUNS_TO_WIN=8;export const SUIT_COUNT=2;const RANK={A:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,10:10,J:11,Q:12,K:13};export const rank=e=>RANK[e];function createDeck(e){const t=[],n=SUITS.slice(0,e);let o=0;for(let l=0;l<Math.ceil(8/e);l++)for(const e of n)for(const n of VALUES)t.push({id:e+"-"+n+"-"+o++,suit:e,value:n,faceUp:!1});return t.slice(0,104)}function shuffle(e){const t=[...e];for(let e=t.length-1;e>0;e--){const n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t}export function newBoard(){const e=shuffle(createDeck(2)),t=[];let n=0;for(let o=0;o<10;o++){const l=o<4?6:5,s=[];for(let t=0;t<l;t++)s.push({...e[n++],faceUp:t===l-1});t.push(s)}return{tableau:t,stock:e.slice(n).map(e=>({...e,faceUp:!1})),completed:[]}}export function isValidSequence(e){if(!e.length)return!1;for(let t=0;t<e.length-1;t++)if(rank(e[t].value)!==rank(e[t+1].value)+1)return!1;return!0}export function canMove(e,t,n){const o=e.tableau[n],l=t[0];if(!o||!l)return!1;const s=o[o.length-1];return!s||s.faceUp&&rank(l.value)===rank(s.value)-1}export function pickable(e,t,n){const o=e.tableau[t],l=o?.[n];if(!o||!l||!l.faceUp)return null;const s=o.slice(n);return 1===s.length||isValidSequence(s)?s:null}const flipTop=e=>{const t=e[e.length-1];t&&!t.faceUp&&(t.faceUp=!0)};export function moveRun(e,t,n,o){const l=e.tableau[t],s=l.splice(n);flipTop(l),e.tableau[o].push(...s.map(e=>({...e,faceUp:!0})))}export const dealBlocked=e=>e.tableau.some(e=>0===e.length)?"empty-pile":0===e.stock.length?"no-stock":null;export function dealRow(e){for(let t=0;t<10&&e.stock.length>0;t++){const n=e.stock.pop();n.faceUp=!0,e.tableau[t].push(n)}}const RUN=["K","Q","J","10","9","8","7","6","5","4","3","2","A"];export function takeCompletedRun(e,t){const n=e.tableau[t];if(!n||n.length<13)return null;const o=n.slice(-13),l=o[0].suit;return o.every((e,t)=>e.suit===l&&e.value===RUN[t])?(n.splice(-13),flipTop(n),e.completed.push(o),o):null}export const dealsLeft=e=>Math.ceil(e.stock.length/10);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,merge,Path,quat}from"@nayan-ui/engine";import{COLORS as _0x6c979}from"../../services/GamesConstants.js";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{GLYPH_WIDTH,glyphMesh}from"../shared/EngineGlyphs.js";import{cacheGameAsset,createGameMesh as _0x3e687e}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{CARD_RATIO,COLORS,FACE_DOWN_STEP,FACE_UP_STEP,MOVE_TIME,SMALL,SUIT_COLORS,THICKNESS}from"./SpiderSolitaireConstants.js";import{PILES}from"./SpiderSolitaireRules.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("spider-solitaire/SpiderSolitaireScene:"+e,o),meshes.set(e,t)),t},BACKDROP_DEPTH=30,HALF_H=CARD_RATIO/2,RADIUS=.07,FACE_UP=[0,0,0,1],FACE_DOWN=quat.y(Math.PI),EDGE_ON=quat.y(Math.PI/2),LIFT=7,HELD=40,rrect=(e,o=new Path)=>o.addRoundedRect(-.5+e,-HALF_H+e,1-2*e,CARD_RATIO-2*e,Math.max(.01,.07-e)),cardMesh=()=>cached("ss-card",()=>{const e=THICKNESS,o=(o,t,s)=>({geometry:extrude(o,{depth:0,fillRule:"evenodd"}),rotation:FACE_DOWN,position:[0,0,-e/2-.002*s],color:toColor(t)}),t=new Path;for(let e=0;e<7;e++)for(let o=0;o<4;o++){const s=.18*o-.27+(e%2?.09:0),a=.166*e-.5;s>.3||t.addPolygon([[s,a-.07],[s+.06,a],[s,a+.07],[s-.06,a]])}return _0x3e687e(merge([{geometry:extrude(rrect(0),{depth:e}),color:toColor(COLORS.FACE)},o(rrect(.035),COLORS.BACK,1),o(rrect(.075,rrect(.095)),COLORS.BACK_FRAME,2),o(t,COLORS.BACK_LIGHT,2)]),{center:!1,shine:.35})}),SUIT_PATHS={hearts:"M0.5,0.95 C0.2,0.72 0,0.52 0,0.3 C0,0.12 0.13,0 0.28,0 C0.38,0 0.46,0.06 0.5,0.15 C0.54,0.06 0.62,0 0.72,0 C0.87,0 1,0.12 1,0.3 C1,0.52 0.8,0.72 0.5,0.95 Z",diamonds:"M0.5,0 L0.86,0.5 L0.5,1 L0.14,0.5 Z",clubs:"M0.5,0 C0.64,0 0.75,0.11 0.75,0.25 C0.75,0.33 0.71,0.4 0.66,0.44 C0.7,0.42 0.74,0.41 0.78,0.41 C0.92,0.41 1,0.52 1,0.65 C1,0.79 0.9,0.89 0.77,0.89 C0.67,0.89 0.58,0.83 0.54,0.75 C0.56,0.86 0.6,0.94 0.68,1 L0.32,1 C0.4,0.94 0.44,0.86 0.46,0.75 C0.42,0.83 0.33,0.89 0.23,0.89 C0.1,0.89 0,0.79 0,0.65 C0,0.52 0.08,0.41 0.22,0.41 C0.26,0.41 0.3,0.42 0.34,0.44 C0.29,0.4 0.25,0.33 0.25,0.25 C0.25,0.11 0.36,0 0.5,0 Z",spades:"M0.5,0 C0.8,0.25 1,0.42 1,0.6 C1,0.75 0.88,0.84 0.75,0.84 C0.65,0.84 0.57,0.79 0.53,0.72 C0.55,0.84 0.6,0.93 0.68,1 L0.32,1 C0.4,0.93 0.45,0.84 0.47,0.72 C0.43,0.79 0.35,0.84 0.25,0.84 C0.12,0.84 0,0.75 0,0.6 C0,0.42 0.2,0.25 0.5,0 Z"},suitMesh=e=>cached("ss-suit:"+e,()=>_0x3e687e(extrude(Path.fromSVG(SUIT_PATHS[e]),{depth:.08}),{fit:1,shine:.5})),slotRingMesh=()=>cached("ss-slot-ring",()=>_0x3e687e(extrude(rrect(0,rrect(.035)),{depth:0,fillRule:"evenodd"}),{center:!1})),slotFillMesh=()=>cached("ss-slot-fill",()=>_0x3e687e(extrude(rrect(.035),{depth:0}),{center:!1})),slotColor=e=>toColor("classic"===e.mode?COLORS.CLASSIC_SLOT:e.BOARD.BORDER),slotFill=e=>toColor("classic"===e.mode?_0x6c979.BG_35:e.BOARD.CELL_EMPTY);function spawnSlot(e,o,t,s,a,r,n){const l=o.card*(a?SMALL:1);return{ring:e.spawn({mesh:slotRingMesh(),position:[t,s,.1],scale:l,color:slotColor(n),pickable:!1}),fill:r?e.spawn({mesh:slotFillMesh(),position:[t,s,.05],scale:l,color:slotFill(n),pickable:!1}):null}}function spawnFace(e,o,t){const s=toColor(SUIT_COLORS[t.suit]),a=THICKNESS/2,r=t.value.split(""),n=r.length>1?.27:.32,l=n*GLYPH_WIDTH*1.05;r.forEach((t,i)=>{const p=(i-(r.length-1)/2)*l-.33+(r.length>1?.04:0);e.spawn({mesh:glyphMesh(t),parent:o,position:[p,HALF_H-.24,a],scale:n,color:s,pickable:!1})});const i=suitMesh(t.suit);e.spawn({mesh:i,parent:o,position:[.29,HALF_H-.24,a+.02],scale:.26,color:s,pickable:!1}),e.spawn({mesh:i,parent:o,position:[0,-.16,a+.02],scale:.56,color:s,pickable:!1})}export function buildScene(e,o,t,s){const a=spawnBackdrop(e,o.width,o.height,-30,t);placeTiltedBackdrop(e,a,o,30);const r=o.pileTop-o.cardH/2,n=o.card*SMALL,l={backdrop:a,piles:o.columns.map(s=>spawnSlot(e,o,s,r,!1,!1,t)),stock:spawnSlot(e,o,o.stockRight-n/2,o.rowY,!0,!0,t),foundation:spawnSlot(e,o,o.foundationX,o.rowY,!0,!0,t),cards:new Map};for(const t of s){const s=e.spawn({mesh:cardMesh(),scale:o.card*SMALL,rotation:FACE_DOWN,position:[o.stockRight-n/2,o.rowY,1],pickable:!1});spawnFace(e,s,t),l.cards.set(t.id,{body:s,spot:{x:o.stockRight-n/2,y:o.rowY,z:1,faceUp:!1,small:!0,selected:!1}})}return l}export function removeScene(e,o){const t=[...o.piles,o.stock,o.foundation];for(const s of[o.backdrop,...t.flatMap(e=>[e.ring,e.fill]),...Array.from(o.cards.values(),e=>e.body)])null!=s&&e.despawn(s)}export function setSceneTheme(e,o,t){setBackdropTheme(e,o.backdrop,t);for(const s of[...o.piles,o.stock,o.foundation])e.set(s.ring,{color:slotColor(t)}),null!=s.fill&&e.set(s.fill,{color:slotFill(t)})}export function pileOffsets(e,o){const t=o.map(o=>(o.faceUp?FACE_UP_STEP:FACE_DOWN_STEP)*e.cardH);let s=0;for(let e=0;e<o.length-1;e++)s+=t[e];const a=e.pileTop-e.pileBottom-e.cardH,r=s>a&&s>0?Math.max(0,a)/s:1,n=[];let l=0;for(let e=0;e<o.length;e++)n.push(l),l+=t[e]*r;return n}export function pileSpot(e,o,t,s){return[e.columns[o],e.pileTop-t-e.cardH/2,e.dz*(s+1)]}export function layoutCards(e,o,t,s=!1){const a=new Map;if(s&&t?.drag){const s=o.tableau[t.pile],r=pileOffsets(e,s);for(let o=t.index;o<s.length;o++){const n=s[o];a.set(n.id,{x:t.drag.x,y:t.drag.y-(r[o]-r[t.index]),z:40+e.dz*(o-t.index),faceUp:n.faceUp,small:!1,selected:!0})}return a}o.tableau.forEach((o,s)=>{const r=pileOffsets(e,o);o.forEach((o,n)=>{const l=null!==t&&t.pile===s&&n>=t.index;let[i,p,d]=pileSpot(e,s,r[n],n);if(l&&t.drag){const o=r[n]-r[t.index];i=t.drag.x,p=t.drag.y-o,d=40+e.dz*(n-t.index)}else l&&(p+=2,d+=7);a.set(o.id,{x:i,y:p,z:d,faceUp:o.faceUp,small:!1,selected:l})})});const r=e.card*SMALL,n=Math.ceil(o.stock.length/PILES),l=r*THICKNESS+.15;return o.stock.forEach((o,t)=>{const s=Math.floor(t/PILES);a.set(o.id,{x:e.stockRight-r/2-(n-1-s)*r*.22,y:e.rowY,z:1+(s*PILES+t%PILES)*l*.3,faceUp:!1,small:!0,selected:!1})}),o.completed.forEach((o,t)=>{o.forEach((o,s)=>{a.set(o.id,{x:e.foundationX+t*r*.5,y:e.rowY,z:1+3*t+.2*(12-s),faceUp:!0,small:!0,selected:!1})})}),a}const scaleOf=(e,o)=>e.card*(o.small?SMALL:1),same=(e,o)=>e.x===o.x&&e.y===o.y&&e.z===o.z&&e.faceUp===o.faceUp&&e.small===o.small&&e.selected===o.selected;export function placeCards(e,o,t,s,a=()=>0,r=!1){for(const[n,l]of s){const s=t.cards.get(n);if(!s)continue;const i=s.spot;if(i&&same(i,l))continue;s.spot=l;const p=[l.x,l.y,l.z],d=l.faceUp?FACE_UP:FACE_DOWN,f=scaleOf(o,l),h=toColor(l.selected?COLORS.SELECTED:COLORS.FACE);if(r||!i){e.stopAnimation(s.body),e.set(s.body,{position:p,rotation:d,scale:f,color:h});continue}i.selected!==l.selected&&e.set(s.body,{color:h});const C=Math.hypot(i.x-l.x,i.y-l.y),m=i.faceUp!==l.faceUp;if(C<1&&!m){e.animate(s.body,{position:p,scale:f},{duration:.14,delay:a(n)});continue}const u=Math.max(i.z,l.z)+(C>1?18+.05*C:10),S=[(i.x+l.x)/2,(i.y+l.y)/2,u];e.animate(s.body,[{position:S,...m?{rotation:EDGE_ON}:{},scale:(f+scaleOf(o,i))/2,at:.5},{position:p,rotation:d,scale:f}],{duration:MOVE_TIME+Math.min(.16,6e-4*C),delay:a(n),path:"smooth",easing:"easeInOut"})}}export function shakeCards(e,o,t){for(const s of t){const t=o.cards.get(s);t&&e.animate(t.body,{shake:3},{duration:.25})}}export function sparkle(e,o,t,s){effects.sparkle(e,{position:[t,s,30],count:26,size:.1*o.card,speed:3*o.card,lifetime:.7,gravity:3*-o.card,colors:["#FFD700","#FFF59D","#FF8A80","#FFFFFF"].map(e=>toColor(e))})}export function celebrate(e,o){effects.confetti(e,{position:[0,(o.pileTop+o.pileBottom)/2,60],count:80,size:.14*o.card,speed:1.2*o.width,lifetime:1.4,gravity:2*-o.width,colors:["#FFD700","#4CAF50","#2196F3","#E74C3C"].map(e=>toColor(e))})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const _0x460773=_0x4de0;!function(){const e="l7[2",t=_0x4de0,o=_0x178c();for(;;)try{if(365460==parseInt(t(394,"(2T&"))/1*(parseInt(t(313,"0HON"))/2)+-parseInt(t(401,"hYsF"))/3*(parseInt(t(419,"MPYq"))/4)+parseInt(t(317,"(2T&"))/5*(-parseInt(t(405,"(2T&"))/6)+parseInt(t(326,"hYsF"))/7*(parseInt(t(323,"NsdY"))/8)+-parseInt(t(402,e))/9+-parseInt(t(423,"pr6t"))/10+parseInt(t(400,e))/11)break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x415c8f from"react";import{StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0xc93ad5}from"../../helpers/index.js";import{DEFAULT_GAME_SETTINGS,GAME_IDS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{useStackTowerStore,useScore,useIsPlaying,useGameOver,useGameWon}from"./StackTowerStore.js";function _0x4de0(e,t){e-=292;const o=_0x178c();let r=o[e];if(void 0===_0x4de0.ceMEoJ){const e=function(e,t){let o,r,a=[],W=0,n="";for(e=function(e){let t="",o="";for(let o,r,a=0,W=0;r=e.charAt(W++);~r&&(o=a%4?64*o+r:r,a++%4)?t+=String.fromCharCode(255&o>>(-2*a&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let e=0,r=t.length;e<r;e++)o+="%"+("00"+t.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(o)}(e),r=0;r<256;r++)a[r]=r;for(r=0;r<256;r++)W=(W+a[r]+t.charCodeAt(r%t.length))%256,o=a[r],a[r]=a[W],a[W]=o;r=0,W=0;for(let t=0;t<e.length;t++)r=(r+1)%256,W=(W+a[r])%256,o=a[r],a[r]=a[W],a[W]=o,n+=String.fromCharCode(e.charCodeAt(t)^a[(a[r]+a[W])%256]);return n};_0x4de0.pHAwSf=e,_0x4de0.lfSsYf={},_0x4de0.ceMEoJ=!0}const a=o[0];_0x4de0.wuKctA!==a&&(_0x4de0.lfSsYf={},_0x4de0.wuKctA=a);const W=_0x4de0.lfSsYf[e];return void 0===W?(void 0===_0x4de0.dWUgrl&&(_0x4de0.dWUgrl=!0),r=_0x4de0.pHAwSf(r,t),_0x4de0.lfSsYf[e]=r):r=W,r}import{StackTowerService}from"./StackTowerService.js";import{STACK_TOWER_TIME_LIMIT}from"./StackTowerConstants.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameArea}from"./components/GameArea.js";import{setGameInterval,clearGameInterval}from"../../helpers/GameTimer.js";import{jsx as _0x5830b6,jsxs as _0x15965c}from"react/jsx-runtime";const StackTowerComponent=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:t,onEndGame:o,onReplayGame:r,onShare:a,onShareScreenshot:W,onShowLeaderboard:n,bannerAd:d})=>{const s="m*f!",S="ItYv",i=_0x4de0,u={KydHy:function(e,t,o){return e(t,o)},EznHR:function(e){return e()},VqMsg:function(e,t){return e||t},odpkp:i(369,"qA9W"),fLOfu:i(416,s),qKaVs:function(e,t){return e<=t},DOpQG:"cancel",NDpDm:function(e){return e?.()},AgGap:function(e,t,o){return e(t,o)}},l=e?.[i(413,"Hjnl")]??!0,p=e?.[i(357,"h#Cu")]??!0,x=e?.offset??0,m=_0x415c8f[i(303,s)](l);m[i(340,"pyX!")]=l;const f=_0x415c8f[i(325,"RpeO")](p);f[i(355,"i^$n")]=p;const k=_0x415c8f.useRef(o);k[i(364,"Pt8V")]=o;const G=useScore(),_=useIsPlaying(),T=useGameOver(),C=useGameWon(),h=_0x415c8f[i(366,"PK0B")](!1),O=_0x415c8f.useRef(!0),y=_0x415c8f[i(312,"SsEU")](e=>{const t=i;if(k[t(342,"nlXh")]&&!h.current){const o=useStackTowerStore.getState()[t(331,"Rd#f")];k[t(422,"Wlos")]({status:e,score:o.toString()}),h[t(356,"Q4]3")]=!0}},[]),M=_0x415c8f[i(349,"h#Cu")](()=>new StackTowerService,[]),R=_0x415c8f.useCallback(()=>{const e=i;u[e(324,"N&Yv")](playSound,GAME_SOUNDS[e(390,"qA9W")].PLACE,m[e(411,"1l2h")]),playHaptic(HapticType[e(316,"MToc")],f.current)},[]),N=_0x415c8f[i(365,"Hjnl")](()=>{const e=i;playSound(GAME_SOUNDS[e(371,"Zoca")].PERFECT,m[e(372,"(Qua")]),playHaptic(HapticType[e(392,"(Qua")],f[e(356,"Q4]3")])},[]),P=_0x415c8f[i(385,"Q4]3")](()=>{const e=i,t={iVwMl:function(e){return u[_0x4de0(406,"hYsF")](e)}};e(339,"UT]4")!==e(393,"I(bo")?(u[e(307,"zNlF")](playSound,GAME_SOUNDS[e(368,"i^$n")][e(337,"6lew")],m[e(308,"V7j$")]),playHaptic(HapticType[e(391,"SsEU")],f[e(308,"V7j$")])):t[e(304,"MToc")](_0x26b8ae)},[]),v=_0x415c8f.useCallback(()=>{const e=i;playSound(GAME_SOUNDS.STACK_TOWER[e(379,"I(bo")],m[e(347,"MPYq")]),playHaptic(HapticType[e(391,"SsEU")],f.current)},[]);_0x415c8f[i(328,"i^$n")](()=>{M[i(344,"an^t")](R,N,P,v)},[M,R,N,P,v]),_0x415c8f[i(404,S)](()=>{const e=i;return useStackTowerStore[e(378,"Q4]3")](t=>t[e(353,"pr6t")],t=>{M[e(414,"Q4]3")](t)})},[M]),_0x415c8f[i(297,"oPql")](()=>{const e=i;if(u[e(350,"nlXh")](T,C)&&!h[e(370,"pr6t")]){const t=C?u[e(320,"Rd#f")]:u[e(409,"an^t")];y(t)}!T&&!C&&(h[e(396,"tVBl")]=!1)},[T,C,y]),_0x415c8f.useEffect(()=>{M[i(314,"f8x!")]()},[M]),_0x415c8f[i(321,"qA9W")](()=>(O.current=!0,()=>{const e=_0x4de0;O[e(389,"MToc")]=!1,useStackTowerStore[e(417,"7JLp")]()[e(295,"I(bo")]&&!h[e(399,"Y@ru")]&&y(e(398,"dO&8")),useStackTowerStore.getState().stopGame(),M[e(374,"(2T&")](),useStackTowerStore[e(367,"PK0B")]()[e(306,"NsdY")]()}),[M,y]),_0x415c8f[i(297,"oPql")](()=>{const e="Zoca",t=i,o={KyLVI:t(296,"an^t"),KgbPx:"oIqbb",TSsMv:function(e,o){return u[t(333,"B&)Q")](e,o)}};if(!_)return;const r=setGameInterval(()=>{const a=t;if(o.KyLVI===o[a(403,"*c%F")])return _0x2cc256[a(359,"l7[2")](e=>e.isPlaying,e=>{_0x4afdbe.setPlaying(e)});{if(!O[a(364,"Pt8V")])return void clearGameInterval(r);const t=useStackTowerStore[a(418,"B&)Q")]()[a(332,"RpeO")];o.TSsMv(t,0)?(useStackTowerStore[a(309,"oPql")]().setGameWon(),playSound(GAME_SOUNDS[a(361,"zNlF")][a(315,"RpeO")],m[a(397,"kpW*")]),playHaptic(HapticType[a(412,"an^t")],f[a(327,e)]),clearGameInterval(r)):useStackTowerStore[a(386,e)]()[a(300,"NsdY")](-1)}},1e3);return()=>clearGameInterval(r)},[_]);const I=_0x415c8f[i(363,"Zoca")](()=>{const e=i,t=e(420,"i^$n")[e(298,"pyX!")]("|");let o=0;for(;;){switch(t[o++]){case"0":M[e(351,"(2T&")]();continue;case"1":playHaptic(HapticType[e(334,"Hjnl")],f.current);continue;case"2":M[e(408,"i^$n")](!0);continue;case"3":h[e(360,"zNlF")]=!1;continue;case"4":u[e(410,"tVBl")](playSound,GAME_SOUNDS[e(301,"xVv^")][e(345,"MPYq")],m.current);continue;case"5":useStackTowerStore[e(341,"I(bo")]()[e(395,"SsEU")](STACK_TOWER_TIME_LIMIT);continue}break}},[M]),L=_0x415c8f.useCallback(()=>{const e=i;y(u.DOpQG),playSound(GAME_SOUNDS.STACK_TOWER[e(354,"kpW*")],m[e(388,"h#Cu")]),playHaptic(HapticType[e(376,"nlXh")],f[e(377,"Hjnl")]),M[e(310,"V7j$")](),useStackTowerStore[e(311,"*c%F")]().resetGame(),M[e(375,"(2T&")]()},[M,y]),b=_0x415c8f[i(383,s)](()=>{const e=i;u.NDpDm(r),h[e(397,"kpW*")]=!1,M[e(292,"Zoca")](),useStackTowerStore[e(352,"930Y")]().resetGame(),M[e(380,"i^$n")]()},[M,r]),q=_0x415c8f[i(384,"7JLp")](()=>{u.EznHR(b)},[b]),A={..._0x415c8f[i(381,"UT]4")](()=>({isPlaying:_,gameOver:T,onStartGame:I,onStopGame:L,onShare:a,onShowLeaderboard:n,startButtonSubtext:"Tap to stack blocks - keep them aligned!"}),[_,T,I,L,a,n])},K={..._0x415c8f[i(362,"jPRC")](()=>({isVisible:T,score:G,onPlayAgain:q,buttonText:i(382,"kpW*"),title:C?i(302,"7CIs"):"GAME OVER",message:C?i(322,"pr6t"):"Great stacking!"}),[T,G,q,C])};K[i(329,"c#em")]=W,K[i(373,"N&Yv")]=d;const w={};return w.gameId=GAME_IDS[i(335,"*c%F")],w.settings=e||DEFAULT_GAME_SETTINGS,w[i(336,S)]=t,u[i(299,"7JLp")](_0x5830b6,GestureHandlerRootView,{style:styles.container,children:_0x15965c(_0xc93ad5,{offset:x,children:[_0x5830b6(GameArea,{gameService:M,offset:x}),u[i(415,"f8x!")](_0x5830b6,ScoreBoard,{offset:x}),_0x5830b6(GameControlButton,A),_0x5830b6(GameOverModal,K),_0x5830b6(GameSettingsModal,w)]})})},_0x35b027={};function _0x178c(){const e=["p8k5vwKnW7qJWQvaW450","xJhdKuJcOX7cUGpdUtFdQSk0","W6hdMCoFiSkLW7tcJq","ymolWRS6W77dOCoAWRC8W4JcLSoWW6O","B8ooW60dWOT1wGTolg3cUCoG","FCkBdXhcJfyXdSk1","p8oZvsygWRKJWPG3W6uIsde","WRhcNSkAaSkuW5lcICobkq","W7VdLs/cSgxdJelcNSou","W4JcS0uNW44","WQ/cHCkfWOVdPNdcUZa6","m1a6W43dIa","mmoevbNdTW","aMNdLCkukfhcJ3ddQ2nvW7VdMmkHnSozWPNcJ3u","W5ZcLSosmCovWQDPlthdS0e","bSkzW4TYgtaFW5K","W7DTcgpcUmkO","W5xcHbDXgG","wHZdHLGDWO0oWPu","bxZdGSkqkhpcUNtdOW","jvFdO0mh","DSkedND9W6FdGW","WR3cK8kuWP3dThFcQJy","z8kud2bSW47dLLhcGa","W7zjpCoLw2FdSCkM","WQeqW6ZcR3KKtmoxpJ4W","e8ozW7yKitrXyuGSDxDZ","W5OTsgldPZ17qSkkW5tcReJcJLG","W7aIuKdcLWedW6BdOG","W7hcLYr1i8om","BCoeW6mcWOT2iHPId3dcVq","rSkGW558","W4umW4dcGdWCW7JcOJpdOq","WQvXWO7cMNa","W7ibWQJdM8oeWPVdKeSa","a8kyW7XVWQlcS8kEW5ylW7dcHSo6W7O2","rsNcICongfhcK1pdQ2G","vhO7pWi","W4iqELFcRsG","fr7dMuLQW4NdISodB8oNuG","BmkldGBcNx8K","ECk2bvbzW652WROa","W4SlWRnBWQtdGNq","WQH0WP3cMMD3rGVdNrZdKvbPWOGy","WRL2WPhcG2u","W4mkCMdcMIS4W4ldMxGlAx8","bMfZfa4","eWxcVXBcL3ZdLq","W4j4cmo1zfNdKCkmk8k/nG","WPGuW5uosSo7cCkwW7pcH2VcMCoHWPagWPq","W5BdGmkPW5W","W4ytW6iDt8omdq","W6hcGbPXW6e","i1uKW5BdMu/dSa","W7xdGWVcJ3ddLf/cLq","W4BdQ1b1W7VdK8kC","W7irW5lcKZSPW67cMZFdVLe","W5xcLem9W4z+wxNcOCkOsmk/","hsJcLq7cRa","WRpcMrpdU8kBsNPfxSoHdq","lqNcPI7cNsNdHa","W6JcP8oGbSoRWOPymaNdMwC","tdVdGqqmWQXY","W7pdR290W7K","lCkjWRveW48edtnp","W5KuW4GYW5TyDGK","oSkoW55LWQBcQCkdWPGy","W7qVWR5fDtZcR8kIWOq","B8kWeMDAW6zN","W7aZiSoNAWuj","xcBdHsSfWQrvWQ0asmkVWOxcUa","wZJdN0tcOr/dGJxdTdhdRSk+yG","W6aliehcGeBdKmkIWOq","dvVdTxKBWQOa","pxRdHKG1WPSGWOWnB8kN","wdldVCoVkdVdGW","ESkngtFcMx08aCkXWRyI","zSkBWQObWQtcRJ0","nspcMrBcS0pdQSkQW4VdKmos","WP1DW4K7WRxdGG","WO9lW5G6WQtdHqeP","x8krivz0W5DhWPyJW7Cx","W7aBWQm","mmkiW7X7WQlcVSkE","xmkQptFcS04elmkhWPaB","u8kGxbCfhhq","FwiXgr7dKH1J","pCkrWRfxW5u2ha","n8ktWR1cW5iIadDqk1ZcL8odjG","W6JdM2zoW4VdSa","iYxcJIFcT0hdSG","W6aZmSoMBrKuB0m","W5xdPZlcMvVdUN3cTCoH","zCkRcwfwW6L/WRaoW5ChrIby","W6FcSdX+W4RcL8oE","W6aAWPjJqvpcUmkaWRDAW5FcJW","W7DTchlcVmkInmkrrSoDAW","dSoovrldRZLLkHNcRJy","W6y1nCowBWCrB0D9vq","AmkBccFcJhaKbG","gmosxIxdRZXNlqO","wJ3dLJSmWQ9P","W5/cPXjoe8oVWOm","W5qMWOZdNCoPWQldOwCJCSki","WPeXW5VcO0O","y8kaBsyLivm","W6hdJZZcULm","B8kuWRbaW4Oaaq","WQCxW6JcNMWpqCoyoG","W6hdMLBcUComye0","W5aBWOfYtX3cJq","W5vnAh3cNu4","r2xcO8kUW5uqCq","WQvoEWRdKqdcJ8kYWQtcMr/cN1q","fXRdMsSmW4xdUCourq","WQrhEGxdLLBdKSktWQdcRGi","W5Plk8oMvW","WOijW6mUwmoPbCkBW6a","ASopWPvLW5GkfGG","yvlcGdek","WPFcRHO/W5RdMmkGaxrj","F8kGfevtW6LQWRaAW5u","W4dcVxGyW5i","W4NdLKdcG8oq","q8k5W4L2r8kXcq","W7xcPhq9W6jbzG","jt7cNtFcVKRdLCkNW5/dNCoDWPa","W6aJjmofyGOezeH5","W7iKzNFdVG","W65XhLq","hmoyraldUJr9lq","ee9MeqNdVSksmG","Fe3dPM/dIJhdMCo/EIFdKG"];return(_0x178c=function(){return e})()}_0x35b027.flex=1,_0x35b027[_0x460773(330,"Rd#f")]=BACKGROUND_COLOR;const _0x57db66={};_0x57db66[_0x460773(318,"1l2h")]=1;const _0x55c9c3={};_0x55c9c3[_0x460773(387,"7JLp")]=_0x35b027,_0x55c9c3[_0x460773(348,"xVv^")]=_0x57db66;const styles=StyleSheet.create(_0x55c9c3);export const StackTower=StackTowerComponent;StackTower[_0x460773(343,"a3KK")]=_0x460773(319,"a3KK");
|
|
1
|
+
"use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{scoreColumn,timerColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,LIGHT,TIME_LIMIT}from"./StackTowerConstants.js";import{createGame,dispose,reset,setLayout,setTheme,start,tap,tick}from"./StackTowerGame.js";import{jsx as _0x5b5063}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.STACK_TOWER,FEEDBACK={place:{sound:SOUNDS.PLACE,haptic:HapticType.MEDIUM},perfect:{sound:SOUNDS.PERFECT,haptic:HapticType.SUCCESS},miss:{sound:SOUNDS.MISS,haptic:HapticType.ERROR}};export const StackTower=engineGame(GAME_IDS.STACK_TOWER,e=>{const[t,s]=useLiveState(0),[r,a]=useLiveState(TIME_LIMIT),{theme:i,status:o,screen:n,gameOver:S}=useEngineGame(e,{gameId:GAME_IDS.STACK_TOWER,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s)=>{const r=getLayout(t,s);return setLayout(e,r),r.gameWidth},drag:(e,t)=>{"start"===t.phase&&tap(e)},sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.SUCCESS),onStop:e=>e(null,HapticType.MEDIUM),onOver:(e,t)=>e("win"===t?SOUNDS.WIN:SOUNDS.GAME_OVER,"win"===t?HapticType.SUCCESS:HapticType.ERROR),wire:(e,t)=>{e.onScore=s,e.onTime=a,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}});return _0x5b5063(EngineGameScreen,{...n,light:LIGHT,columns:[scoreColumn(t),timerColumn(r,i)],subtext:"Stack blocks with care!",gameOver:S({title:"win"===o?"AMAZING!":"GAME OVER",message:"win"===o?"Perfect tower!":"Great stacking!",scoreLabel:"Final Score",score:t,buttonText:"Stack Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const TIME_LIMIT=120;export const POINTS_PER_BLOCK=500;export const PERFECT_BONUS=250;export const PERFECT_THRESHOLD=3;export const MIN_OVERLAP_RATIO=.4;export const BLOCK_COLORS=["#FF4757","#FFA502","#2ED573","#1E90FF","#FF6BD6","#A55EEA","#00D2D3","#FF6348"];export const FRAME_MS=16.67;export const MAX_FRAMES=2;export const NEXT_BLOCK_DELAY=.2;export const MISS_TIME=.45;export const GAME_OVER_DELAY=.3;export const SPAWN_FADE=.2;export const PERFECT_SHOW=.6;export const CAMERA_TIME=.35;export const TILT=-.24;export const LIGHT=frontLight([-.45,.6,1],.5);const TABLET_WIDTH=640;export function getLayout(t,o){const e=t>640,r=gameWidthFor(t),E=e?200:160;return{width:t,height:o,centerY:o/2,tilt:TILT,left:(t-r)/2,gameWidth:r,blockWidth:E,blockHeight:e?28:22,blockDepth:.36*E,speed:e?4.5:3.5,baseY:o-(e?180:160)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{CAMERA_TIME,FRAME_MS,GAME_OVER_DELAY,MAX_FRAMES,MIN_OVERLAP_RATIO,NEXT_BLOCK_DELAY,PERFECT_BONUS,PERFECT_THRESHOLD,POINTS_PER_BLOCK,TIME_LIMIT}from"./StackTowerConstants.js";import{buildScene,frame,land,removeScene,setSceneTheme,slideBlock,spawnBlock,tumble}from"./StackTowerScene.js";const WORLD_CAPACITY=600;export function createGame(e){const o=new World(600),t={world:o,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",tower:[],moving:null,falling:null,level:0,perfectCount:0,get score(){return o.scoreboard.score},get timeRemaining(){return o.scoreboard.shownSeconds},won:!1,offset:0,offsetTarget:0,onPhase:e=>{},onScore:e=>{},onTime:e=>{},hudFeedback:{},onEvent:e=>{}};return o.scoreboard.reset(0,TIME_LIMIT),o.scoreboard.handlers={onScore:e=>t.onScore(e),onSecond:e=>t.onTime(e),onTimeUp:()=>"playing"===t.phase&&end(t,!0)},t}const after=(e,o,t)=>e.world.after(o,t);export function setLayout(e,o){e.scene&&removeScene(e.world,e.scene),e.layout=o,e.scene=buildScene(e.world,o,e.theme),e.tower.length||(e.tower=[base(o)]);for(const t of e.tower)t.entity=spawnBlock(e.world,o,t.x,t.y,t.level);e.moving&&(e.moving.entity=spawnBlock(e.world,o,e.moving.x,e.moving.y,e.moving.level)),frame(e.world,o,e.scene,e.camera,e.offset)}export function setTheme(e,o){e.theme=o,e.scene&&setSceneTheme(e.world,e.scene,o)}const base=e=>({x:e.left+(e.gameWidth-e.blockWidth)/2,y:e.baseY,level:0,entity:null});export function start(e){"ready"===e.phase&&e.layout&&(e.phase="playing",e.level=0,e.perfectCount=0,e.world.scoreboard.reset(),e.world.scoreboard.startCountdown(TIME_LIMIT),e.onScore(0),e.onTime(TIME_LIMIT),e.onPhase("playing"),spawnMoving(e,e.tower[e.tower.length-1]))}export function reset(e){e.world.cancelTimers();for(const o of e.tower)null!=o.entity&&e.world.despawn(o.entity);null!=e.moving?.entity&&e.world.despawn(e.moving.entity),null!=e.falling&&e.world.despawn(e.falling),e.falling=null,e.moving=null,e.level=0,e.perfectCount=0,e.world.scoreboard.reset(0,TIME_LIMIT),e.won=!1,e.offset=0,e.offsetTarget=0,e.phase="ready";const o=e.layout;if(e.tower=o?[base(o)]:[],o)for(const t of e.tower)t.entity=spawnBlock(e.world,o,t.x,t.y,t.level);e.hudFeedback.message=void 0,e.onScore(0),e.onTime(TIME_LIMIT),e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function tick(e,o){if(e.world.isDisposed)return;const t=e.layout,n=e.moving;if(t&&n&&"playing"===e.phase){const l=Math.min(1e3*o/FRAME_MS,MAX_FRAMES),r=t.left+t.gameWidth-t.blockWidth;let s=n.x+n.direction*t.speed*l;s<=t.left?(s=t.left,n.direction=1):s>=r&&(s=r,n.direction=-1),n.x=s,null!=n.entity&&slideBlock(e.world,t,n.entity,n.x,n.y)}t&&e.scene&&(e.offset+=(e.offsetTarget-e.offset)*Math.min(1,o/(CAMERA_TIME/3)),frame(e.world,t,e.scene,e.camera,e.offset)),e.world.update(o)}function end(e,o){e.world.scoreboard.stop(),e.won=o,e.phase="over",e.onPhase("over")}function spawnMoving(e,o){const t=e.layout;if(!t)return;e.level+=1;const n=o.y-t.blockHeight,l=e.level%2==0?1:-1,r=1===l?t.left:t.left+t.gameWidth-t.blockWidth;e.moving={x:r,y:n,direction:l,level:e.level,entity:spawnBlock(e.world,t,r,n,e.level,!0)};const s=.4*t.height;n<s&&(e.offsetTarget=s-n)}export function tap(e){const o=e.layout,t=e.moving;if(!o||!t||"playing"!==e.phase)return;const n=e.tower[e.tower.length-1];e.moving=null;const l=Math.min(t.x+o.blockWidth,n.x+o.blockWidth)-Math.max(t.x,n.x);if(l<o.blockWidth*MIN_OVERLAP_RATIO){if(null!=t.entity){tumble(e.world,o,t.entity,t.x,t.y,t.direction,t.level);const n=t.entity;e.falling=n,after(e,.5,()=>{e.world.despawn(n),e.falling=null})}return e.onEvent("miss"),e.world.scoreboard.stop(),void after(e,GAME_OVER_DELAY,()=>end(e,!1))}const r=Math.abs(l-o.blockWidth)<=PERFECT_THRESHOLD;r?(e.perfectCount+=1,e.hudFeedback.message="PERFECT!",e.onEvent("perfect")):(e.perfectCount=0,e.onEvent("place"));const s={x:t.x,y:t.y,level:t.level,entity:t.entity};e.tower.push(s),null!=s.entity&&land(e.world,o,s.entity,s.x,s.y,s.level,r),e.world.scoreboard.add(POINTS_PER_BLOCK+(r?PERFECT_BONUS*e.perfectCount:0)),after(e,NEXT_BLOCK_DELAY,()=>{"playing"===e.phase&&spawnMoving(e,s)})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,merge,Path,recolor,shapeGeometry}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{cacheGameAsset,createGameMesh as _0x31483a}from"../shared/EngineMeshes.js";import{aimTilted,placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{BLOCK_COLORS,MISS_TIME,SPAWN_FADE}from"./StackTowerConstants.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("stack-tower/StackTowerScene:"+e,o),meshes.set(e,t)),t},shadeFaces=e=>recolor(e,({normal:[e,o,t]})=>{const i=o>.6?1:o<-.6?.45:Math.abs(e)>.6?.68:t>.6?.88:.7;return[i,i,i,1]}),blockMesh=(e,o,t)=>cached("st-block-v2:"+e+":"+o+":"+t.toFixed(1),()=>{const i=Math.min(4,o/4),n=Math.min(2.5,.12*o);return _0x31483a(merge([{geometry:shadeFaces(extrude((new Path).addRoundedRect(-e/2,-o/2,e,o-n,i),{depth:t}))},{geometry:shapeGeometry("cube"),position:[0,o/2-n/2,0],scale:[e-2*n,n,t-2*n],color:[1,1,1,1]}]),{shine:.45})}),BACKDROP_DEPTH=60,EYE_DISTANCE=250,PLINTH=toColor("#4A4F66");export const viewFor=(e,o)=>({width:e.width,height:e.height,centerY:e.height/2+o,tilt:e.tilt});export function blockAt(e,o,t){return[o+e.blockWidth/2-e.width/2,(e.height/2-(t+e.blockHeight/2))/Math.cos(e.tilt),0]}export const blockColor=e=>toColor(BLOCK_COLORS[e%BLOCK_COLORS.length]);export function buildScene(e,o,t){const i=spawnBackdrop(e,o.width,o.height,-60,t),[n,r]=blockAt(o,o.left+(o.gameWidth-o.blockWidth)/2,o.baseY),a=o.height;return{backdrop:i,plinth:e.spawn({mesh:"roundedBox",position:[n,r-o.blockHeight/2-a/2,0],scale:[1.35*o.blockWidth,a,1.3*o.blockDepth],color:PLINTH,pickable:!1}),blocks:[],moving:null}}export function removeScene(e,o){for(const t of[o.backdrop,o.plinth,...o.blocks,...null!=o.moving?[o.moving]:[]])e.despawn(t)}export function setSceneTheme(e,o,t){setBackdropTheme(e,o.backdrop,t)}export function frame(e,o,t,i,n){if(t.frameOffset===n)return;t.frameOffset=n;const r=viewFor(o,n);aimTilted(i,r);const[a,s,l]=i.eye,[h,d,p]=i.target,k=Math.hypot(a-h,s-d,l-p),m=[(a-h)/k,(s-d)/k,(l-p)/k],b=-p/m[2],u=[h+m[0]*b,d+m[1]*b,0];i.target=[u[0],u[1],u[2]],i.eye=[u[0]+250*m[0],u[1]+250*m[1],u[2]+250*m[2]],placeTiltedBackdrop(e,t.backdrop,r,60)}export function spawnBlock(e,o,t,i,n,r=!1){const a=blockColor(n),s=e.spawn({mesh:blockMesh(o.blockWidth,Math.round(o.blockHeight/Math.cos(o.tilt)*10)/10,o.blockDepth),position:blockAt(o,t,i),color:r?[a[0],a[1],a[2],0]:a,pickable:!1});return r&&e.animate(s,{color:a},{duration:SPAWN_FADE,easing:"easeOut"}),s}export function slideBlock(e,o,t,i,n){e.set(t,{position:blockAt(o,i,n)})}export function land(e,o,t,i,n,r,a){const s=blockColor(r),l=a?1.7:1.35;e.animate(t,[{color:[s[0]*l,s[1]*l,s[2]*l,1],at:.2},{color:s}],{duration:.35}),e.animate(t,[{scale:[1.04,.92,1.04],at:.3},{scale:1}],{duration:.2});const[h,d]=blockAt(o,i,n),p=d-o.blockHeight/2;for(const t of[-1,1])effects.dust(e,{position:[h+t*o.blockWidth/2,p,.3*o.blockDepth],count:4,size:.7*o.blockHeight,speed:2*o.blockHeight,direction:[t,.3,0],spread:.8,lifetime:.4,color:[1,1,1,.55]});a&&effects.sparkle(e,{position:[h,d,.55*o.blockDepth],count:20,size:.3*o.blockHeight,speed:1.4*o.blockWidth,lifetime:.5,colors:[toColor("#FFD700"),toColor("#FFF59D"),[1,1,1,1]]})}export function tumble(e,o,t,i,n,r,a){const[s,l]=blockAt(o,i,n),[h,d,p]=blockColor(a),k=r>=0?1:-1;e.animate(t,{position:[s+k*o.blockWidth*.5,l-8*o.blockHeight,.3*o.blockDepth]},{duration:MISS_TIME,easing:"easeIn"}),e.animate(t,{turn:[.6,0,1.4*-k]},{duration:MISS_TIME,easing:"easeIn"}),e.animate(t,{color:[h,d,p,0]},{duration:MISS_TIME,easing:"easeIn"})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _0x4210(e,o){e-=308;const t=_0x138d();let W=t[e];if(void 0===_0x4210.mYyvro){const e=function(e,o){let t,W,r=[],n=0,a="";for(e=function(e){let o="",t="";for(let t,W,r=0,n=0;W=e.charAt(n++);~W&&(t=r%4?64*t+W:W,r++%4)?o+=String.fromCharCode(255&t>>(-2*r&6)):0)W="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(W);for(let e=0,W=o.length;e<W;e++)t+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(t)}(e),W=0;W<256;W++)r[W]=W;for(W=0;W<256;W++)n=(n+r[W]+o.charCodeAt(W%o.length))%256,t=r[W],r[W]=r[n],r[n]=t;W=0,n=0;for(let o=0;o<e.length;o++)W=(W+1)%256,n=(n+r[W])%256,t=r[W],r[W]=r[n],r[n]=t,a+=String.fromCharCode(e.charCodeAt(o)^r[(r[W]+r[n])%256]);return a};_0x4210.kYraTY=e,_0x4210.fGQlQJ={},_0x4210.mYyvro=!0}const r=t[0];_0x4210.yuKQab!==r&&(_0x4210.fGQlQJ={},_0x4210.yuKQab=r);const n=_0x4210.fGQlQJ[e];return void 0===n?(void 0===_0x4210.eHKsnI&&(_0x4210.eHKsnI=!0),W=_0x4210.kYraTY(W,o),_0x4210.fGQlQJ[e]=W):W=n,W}const _0x6237c=_0x4210;!function(){const e=_0x4210,o=_0x138d();for(;;)try{if(207460==parseInt(e(334,"$&X4"))/1+-parseInt(e(317,"3@zM"))/2+parseInt(e(443,"&$K)"))/3+parseInt(e(408,"@vMq"))/4*(parseInt(e(369,"(@Um"))/5)+-parseInt(e(329,"3@zM"))/6+parseInt(e(400,"$&X4"))/7+-parseInt(e(415,"qcj9"))/8)break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x511b60 from"react";import{StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x3ad923}from"../../helpers/index.js";import{DEFAULT_GAME_SETTINGS,GAME_IDS}from"../../services/UtilsService.js";function _0x138d(){const e=["ymoYWO/cJehcQq","sh8nDCkWtCoU","gSoVdCkeWQBcNa","W7JdRSk7W6bKWQzbW7lcNvru","WPTLWQJdLfC","WPmCsx1JWOpcGa","W5LSWP/dPW","W4NcPJWRja7dIXm","WQrUWOPjBmkxCq","xNKAqSkZrCo/WPiy","WOhcM2X5W57dMCo6W6aXWRZcG1VdPa","iKLQzCkx","eMTCs8kXW5ddOSoptqhcQYVcPcTIsSkAo8k+","W5FcKKpcRSo7","wKxdMCkFWQxcJIi","W5X1WOJdRCkmkCkO","W79/W5vwW50ijq","bg5kwmkGW5VdGG","y8oyWP9Rq1BdIa","WRygW6G9fSkeyG","W5LBi8oSW6FdGmkLW78w","W7elW4VcMCksW5NcU8kQWR7cISov","omkPWPPlEmkujSosW5JdHNS","W5qVW6vWlxa","W799aSoMW4RdSW","jtNdTr/cQSk/W7FdVNJcILnmwq","AMxdR8kIWOVcTq","WRJcTSkgeSkakq","lSkMW5CeWQqlWPfJvq","WPaHW4Gaiq","hmo3imkbWRS","WPdcLGRdVSkvWPhcJSk1W6/cNb/dMCoYmYLZ","iCk3E8k9W4i","W6dcQMJcJ8oXW7OQ","WO84W4VcVNpdPrS","W5HLWO7dJmkDjSkOW64","W5K6W5LGaq","juhcS03dVSoHWR4","WQ7cNSkFfmkQ","WPLWW4mGoGrz","h8onW6pdTCojWOup","W5qVW6vHkxOlxs9/vq","ufpdM8kGA8kPW6e","wmoMt0eUWPdcKa","W55RE8oxbIbLWPVcQxdcVW","W7BcRh/cUmoYW7i7WPOt","a3jlwSkPW5tdJ8oOqqNcNa","WRJcOSkAa8kak8o5","WOmRW5/cV3pdVW","WOpcNwf5W5xdMmk6W58oWR7cVKi","WQ8Daq","yM/cRvZdUG","zxxcOmkqnmkfcSoFWQVdL8kVpW","W6flWQ15rSotxIOznCkkhG","WQLqW7irgJL+","thpdOmk6WRO","W5pdMIO9WONcGSk4","W5pdQSk6WOJcMJyN","W6OWoCkoWOJdQmkt","sgyAzSk7vSoQ","qWxdO1lcR8koWPNcOq","Bam5jqNcJ8kZW57cHq","W55nnComW7xdOCkHW7eh","ah5mECkXW5tdGSod","Bmo9B34P","uYmphmoWWOZdVSoKrIVcVbG","uepdU8kbWQhcMt9aWPq","W645kmk8WPldVmkxW4y","nmoGWPX6r1tdJq","ifP1B8kAW7RdOmoJCG","lSkVWO16FmkwpG","WQ/dP8oszMxcJG","AmoCCwuoWRRdHq","W7JdV8kVegRdMw4OWOaEqmkr","mYpdHmodDmobfmozWRRdVSk/gd/dI0r+","W4dcHSkbWP3dHJJcMCoEja","pZJdPCouzCoBcq","W7OOpCkDWPldMSkcW47cOG","W59lkCoBW6q","W649mCkkWQ/dUq","Du/dHCk+lSkIW6n/vX1GgJpcLCkKsHbekuDUW4hdRmojW4RcSmkAW5qgumoHWOBdGq","W5ZcHSk0WRldHI3cNmosiHFdVa","WRfzWQNdS2tdVJu","W6NcLGWqbJu","uGTTW5/dOSkr","W7RdUmkHfwldMuGoWQ4TuCkQ","qLNcHMhdLmoy","s1xdMmkiWRtcPZDdWPy","x0pcLMS","WQO8y2b0","WOtcN2T9W5VdLmk6W68hWOVcNMq","W67dQmkSW5fGWQrz","W5TlW6PHW6CPbZuA","W4y5W7rXphCtwG","WPKshCoeWOldQhutWOZcPha","iCkhvCkNW50aWOe","W7ijW4nHduu0","WQPCh8kvWQmQlSoPWRrwW4e","mcldPmod","WPKoW7lcM2W","W57dImkAW6XoWP8","W4TnmSo6W7xdH8k0W7K","W6RdO8oCr8oxCmk7sSoKmSksrrG","W5OjgmkGWQ3dIa","rWhdUwlcVSkd","WPXPW5qQ","W4m4C8kJfq","qfldImkGESkaW7r3qa","WPGIW6RcUgtdOGeC","dmoPgSkKWQBcLmop","W4ddMmkAW6PqWOC","WP8ugSo0WOddTNatWOG","WRaDW7STh8kprqCkfmkRoW","pYldUCosyCoCe8osWQ8","W5qVW6vVlxSi","WOtdJsRcNG5U","WQNdSCodD2hcHdnWuSkWcqW","WOmmt0HNWOdcKCoQyCkjyq","zh/cP2VdUCoRWQRdUf8","kt7dSSo0zCot","W6XuWRVdJCk9","WR80pmoiWQJdKq","W57cNmk/","BeSYqSo1BmomWRq+","iCk0W53dRXhdVCk9u3NdUKGzW40","xImphmoXWOxdGCoovJ7cQGe","W4PZWP/dJCkmiq","WPnRW5GMnGTblgSHnwyYcCk1WRO","vcuCW5NcKW","k8kCWRzbFq","uaNdUMtcICkkWOdcPv0jkSo8ya","W65VW5rbW4WHmb0T","W5VcKmkIWPtdKWBcKCoDjG","WOOnAeDw","WRNdU8ozqghcGtf3qq","W4HJW4PbWPGumb5OWPldJSommG","W4yoDSkeggrf","Frm4mHJcPSkM","W5qnW5tcOmkFW5ddT8kRWRdcHmooWQ/dLCoQwWKy","WQJcUmoKvdBcG2W","WPRcJrhdUmkzWP7cLG","W6pdMJWGWOFcMq","WOJcGSkSpSkUea","WPK+W5ZcGxpdPGa","vvFdO8kiFq","uI8nccK"];return(_0x138d=function(){return e})()}import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{useSudokuStore,useIsPlaying,useGameOver,useGameWon}from"./SudokuStore.js";import{SudokuService}from"./SudokuService.js";import{SUDOKU_TIME_LIMIT}from"./SudokuConstants.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameArea}from"./components/GameArea.js";import{setGameInterval,clearGameInterval}from"../../helpers/GameTimer.js";import{jsx as _0x38ee48,jsxs as _0xe094f4}from"react/jsx-runtime";const SudokuComponent=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:W,onShare:r,onShareScreenshot:n,onShowLeaderboard:a,bannerAd:u})=>{const d="McLB",S="Z@Fg",s=_0x4210,m={uIweO:function(e,o){return e||o},ZUXor:s(403,"bno0"),skHWx:s(373,"xyO^"),fqJZs:function(e,o){return e(o)},VaKqL:function(e){return e?.()},gTliB:function(e){return e()},uCKWz:function(e,o,t){return e(o,t)}},k=e?.[s(356,"&$K)")]??!0,i=e?.enableHaptics??!0,x=e?.[s(438,d)]??0,G=_0x511b60[s(370,")rE*")](k);G[s(432,"(MG(")]=k;const p=_0x511b60[s(392,"x]Ec")](i);p[s(335,S)]=i;const l=_0x511b60[s(315,"Kpbg")](t);l[s(404,"*WuS")]=t;const O=useIsPlaying(),_=useGameOver(),f=m[s(308,"1WG^")](useGameWon),C=_0x511b60[s(363,"juhH")](!1),b=_0x511b60[s(328,"aaua")](null),P=_0x511b60[s(413,"iuY9")](0),h=_0x511b60[s(390,"OU[c")](!1),M=_0x511b60[s(431,"iuY9")](e=>{const o=s;if(l[o(320,"juhH")]&&!h[o(398,"#npJ")]){const t=useSudokuStore.getState();l[o(383,"3@zM")]({status:e,score:t[o(441,"qcj9")][o(352,"McLB")]()}),h[o(384,"5bsG")]=!0}},[]),R=_0x511b60[s(387,d)](()=>new SudokuService,[]),q=_0x511b60.useCallback(()=>{const e=s;playSound(GAME_SOUNDS[e(416,"*WuS")].PLACE,G[e(437,"G)*W")]),playHaptic(HapticType[e(389,"PXKL")],p.current)},[]),y=_0x511b60.useCallback(()=>{const e=s;playSound(GAME_SOUNDS[e(330,"qcj9")][e(394,"D$d6")],G[e(391,"e3n[")]),playHaptic(HapticType.ERROR,p[e(314,"xyO^")])},[]),I=_0x511b60[s(341,"ALpq")](()=>{const e=s;playSound(GAME_SOUNDS[e(414,"%m0i")].GAME_OVER,G.current),playHaptic(HapticType[e(419,"&$K)")],p[e(447,"I[&u")])},[]),H=_0x511b60[s(338,"x0R8")](()=>{const e=s;playSound(GAME_SOUNDS[e(344,"Z@Fg")][e(440,"L^M!")],G[e(383,"3@zM")]),playHaptic(HapticType[e(444,"BG%^")],p[e(380,"q$Yp")])},[]),U=_0x511b60[s(412,"xyO^")](()=>{const e=s;playSound(GAME_SOUNDS[e(365,"x0R8")][e(332,"qcj9")],G[e(353,"x]Ec")]),playHaptic(HapticType[e(389,"PXKL")],p[e(409,"&$K)")])},[]);_0x511b60[s(418,"cskF")](()=>{R[s(360,"Kpbg")](q,y,I,H,U)},[R,q,y,I,H,U]),_0x511b60[s(399,"e3n[")](()=>{const e=s;if(m[e(428,"G)*W")](_,f)&&!h[e(312,"@vMq")]){const o=f?e(366,"hu&z"):e(342,"juhH");M(o)}!_&&!f&&(h[e(398,"#npJ")]=!1)},[_,f,M]),_0x511b60[s(362,"qcj9")](()=>{R.initializePuzzle()},[R]),_0x511b60[s(435,"bno0")](()=>{const e="*WuS";return()=>{const o=_0x4210;useSudokuStore[o(453,"(@Um")]()[o(310,e)]&&!h[o(404,e)]&&M(o(348,"]zf0")),R[o(449,"e3n[")](),useSudokuStore[o(450,"]zf0")]()[o(376,"hu&z")]()}},[R,M]),_0x511b60[s(410,"%m0i")](()=>{const e=s,o={ORrdh:function(e,o){return e(o)},zdSHP:function(e){return e()},ULQxw:function(e,o){return e(o)},fCwUh:function(e,o){return e(o)}};if(m[e(333,"OmOU")]!==m[e(420,"x]Ec")]){C[e(405,")rE*")]=useSudokuStore[e(453,"(@Um")]().isPlaying,P[e(446,"$&X4")]=useSudokuStore.getState()[e(322,"%m0i")];const t=useSudokuStore[e(355,"x0R8")](o=>o[e(319,"hu&z")],t=>{const W="GAB*",r=e,n={xfYBI:function(e,o){return e<=o},FRdsk:function(e,t){return o[_0x4210(372,"p*Xm")](e,t)}};C.current=t,t?(b[r(320,"juhH")]&&clearGameInterval(b[r(381,"PXKL")]),b[r(424,"McLB")]=setGameInterval(()=>{const e=r,o=useSudokuStore.getState()[e(374,"]zf0")];n[e(426,"iuY9")](o,0)?(useSudokuStore[e(311,"Ia)a")]()[e(361,"OmOU")](),playSound(GAME_SOUNDS[e(347,"Ia)a")][e(336,W)],G[e(423,"bno0")]),playHaptic(HapticType[e(401,"(@Um")],p[e(316,"1WG^")]),b[e(314,"xyO^")]&&n.FRdsk(clearGameInterval,b[e(406,W)]),b[e(395,"OmOU")]=null):useSudokuStore.getState()[e(402,"(@Um")](-1)},1e3)):(b[r(429,"BG%^")]&&clearGameInterval(b.current),b.current=null)}),W=useSudokuStore.subscribe(e=>e.score,e=>{P.current=e});return()=>{const r=e;o[r(377,"OmOU")](t),W(),b[r(314,"xyO^")]&&o.ULQxw(clearGameInterval,b.current)}}return()=>{const o=e;_0x30ce9a[o(450,"]zf0")]().isPlaying&&!_0x229f5f[o(407,"(@Um")]&&LnvXif[o(350,"q$Yp")](_0xf6f99f,o(417,"G)*W")),_0x29878e[o(448,"Ia)a")](),_0x458fd9[o(345,"%m0i")]()[o(331,"*WuS")]()}},[]);const Q=_0x511b60[s(393,S)](()=>{const e=s;h[e(447,"I[&u")]=!1,useSudokuStore.getState()[e(321,"Ia)a")](SUDOKU_TIME_LIMIT),R[e(351,"(MG(")](),playSound(GAME_SOUNDS[e(386,"G)*W")][e(364,")rE*")],G[e(384,"5bsG")]),playHaptic(HapticType[e(340,"iuY9")],p[e(380,"q$Yp")])},[R]),g=_0x511b60[s(434,"TMOF")](()=>{const e=s;m[e(388,"(MG(")](M,"cancel"),playSound(GAME_SOUNDS.SUDOKU[e(313,"(@Um")],G[e(430,"j]$0")]),playHaptic(HapticType[e(354,"Z@Fg")],p.current),R[e(452,"%m0i")](),useSudokuStore[e(337,"iuY9")]()[e(376,"hu&z")](),R[e(371,"BG%^")]()},[R,M]),v=_0x511b60[s(325,"hu&z")](()=>{const e=s,o="3|0|4|1|2".split("|");let t=0;for(;;){switch(o[t++]){case"0":h.current=!1;continue;case"1":useSudokuStore[e(425,")rE*")]()[e(451,"PXKL")]();continue;case"2":R[e(421,"5bsG")]();continue;case"3":m.VaKqL(W);continue;case"4":R[e(375,"GAB*")]();continue}break}},[R,W]),J=_0x511b60[s(411,"IOSu")](()=>{v()},[v]),A=_0x511b60[s(358,"iuY9")](()=>({isPlaying:O,gameOver:_,onStartGame:Q,onStopGame:g,onShare:r,onShowLeaderboard:a,startButtonSubtext:s(324,"(MG(")}),[O,_,Q,g,r,a]),K=_?P[s(424,d)]:0,L={...A},N={..._0x511b60[s(339,"k)AP")](()=>({isVisible:_,score:K,onPlayAgain:J,buttonText:"Solve Again!",title:f?s(433,"1WG^"):s(367,"e3n["),message:f?s(382,"IOSu"):s(379,"GAB*")}),[_,K,J,f])};N[s(326,"D$d6")]=n,N.bannerAd=u;const V={};return V[s(323,"Ia)a")]=GAME_IDS[s(327,"d1rV")],V[s(397,"d1rV")]=e||DEFAULT_GAME_SETTINGS,V[s(318,"juhH")]=o,m[s(445,"*WuS")](_0x38ee48,GestureHandlerRootView,{style:styles[s(378,"Kpbg")],children:m[s(422,"k)AP")](_0xe094f4,_0x3ad923,{offset:x,children:[_0x38ee48(GameArea,{gameService:R,offset:x}),_0x38ee48(ScoreBoard,{offset:x}),_0x38ee48(GameControlButton,L),m[s(343,"McLB")](_0x38ee48,GameOverModal,N),_0x38ee48(GameSettingsModal,V)]})})},_0x1b080e={};_0x1b080e[_0x6237c(396,")rE*")]=1,_0x1b080e.backgroundColor=BACKGROUND_COLOR;const _0x394bb0={};_0x394bb0[_0x6237c(349,"BG%^")]=1;const _0x599091={};_0x599091[_0x6237c(357,"juhH")]=_0x1b080e,_0x599091.gestureRoot=_0x394bb0;const styles=StyleSheet[_0x6237c(359,"P[Hb")](_0x599091);export const Sudoku=SudokuComponent;Sudoku[_0x6237c(436,"(@Um")]=_0x6237c(385,"$&X4");
|
|
1
|
+
"use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{scoreColumn,timerColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,LIGHT,LOW_TIME,TIME_LIMIT}from"./SudokuConstants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,start,tick}from"./SudokuGame.js";import{jsx as _0x5824f2}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.SUDOKU,FEEDBACK={place:{sound:SOUNDS.PLACE,haptic:HapticType.LIGHT},wrong:{sound:SOUNDS.ERROR,haptic:HapticType.ERROR},win:{sound:SOUNDS.WIN,haptic:HapticType.SUCCESS},lose:{sound:SOUNDS.GAME_OVER,haptic:HapticType.ERROR}};export const Sudoku=engineGame(GAME_IDS.SUDOKU,e=>{const[t,s]=useLiveState(0),[r,o]=useLiveState(TIME_LIMIT),{theme:i,status:a,screen:n,gameOver:m}=useEngineGame(e,{gameId:GAME_IDS.SUDOKU,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,r)=>{const o=getLayout(t,s,r);return setLayout(e,o),o.board},drag:drag,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.SUCCESS),onStop:e=>e(null,HapticType.MEDIUM),wire:(e,t)=>{e.onScore=s,e.onTime=o,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}});return _0x5824f2(EngineGameScreen,{...n,light:LIGHT,columns:[scoreColumn(t),timerColumn(r,i,LOW_TIME)],subtext:"Complete the number grid!",gameOver:m({title:"win"===a?"SOLVED!":"GAME OVER",message:"win"===a?"Puzzle completed!":"Time ran out!",scoreLabel:"Final Score",score:t,buttonText:"Solve Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const TIME_LIMIT=900;export const LOW_TIME=60;export const FLASH_STEP=.028;export const TAP_SLOP=12;export const COLORS={CELL:"#ffffff",GIVEN:"#E8EAF6",SELECTED:"#BBDEFB",SAME_NUMBER:"#E3F2FD",PEER:"#F3E5F5",ERROR:"#FFCDD2",TEXT_GIVEN:"#1a237e",TEXT_PLACED:"#1565C0",TEXT_ERROR:"#D32F2F",LINES:"#1a237e",FRAME:"#5c4033",WELL:"#3a2518",KEY:"#e8ddd0",KEY_TEXT:"#3e2723",KEY_REMAINING:"#8d6e63",KEY_DISABLED:"#bdb5ad",KEY_DISABLED_TEXT:"#9e9e9e"};export const TILT=0;export const LIGHT=frontLight([0,0,1],1);export const CELL_HEIGHT=.12;export const KEY_HEIGHT=.3;const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=120;export const SPACING=1.5;export const BORDER=3.5;const PAD=8,KEY_GAP=4,PAD_GAP=16,gridSide=t=>9*t+9+14;export function getLayout(t,e,o){const r=getScoreBoardTop(o)+82,n=Math.max(260,e-r-120),E=(gameWidthFor(t)-16-9-14)/9,a=(n/Math.cos(0)-16-9-14-16)/10.25,i=Math.max(18,Math.floor(Math.min(E,a))),s=gridSide(i),d=s+16,l=Math.floor((d-32)/9),h=Math.round(Math.min(1.25*i,1.3*l)),T=d+16+h;return{width:t,height:e,tilt:0,centerY:r+n/2,cell:i,grid:s,board:d,boardY:T/2-d/2,key:l,keyH:h,keyPitch:l+4,keysY:-T/2+h/2}}const along=(t,e)=>3.5+e*(t.cell+1.5)+2*Math.floor(e/3);export function cellCentre(t,e,o){return[-t.grid/2+along(t,o)+t.cell/2,t.boardY+t.grid/2-along(t,e)-t.cell/2]}export const keyCentre=(t,e)=>[(e-5)*t.keyPitch,t.keysY];export function cellAt(t,e,o){const r=e+t.grid/2,n=t.boardY+t.grid/2-o;if(r<0||n<0||r>t.grid||n>t.grid)return null;const E=e=>{let o=0;for(let r=1;r<9;r++)Math.abs(along(t,r)+t.cell/2-e)<Math.abs(along(t,o)+t.cell/2-e)&&(o=r);return o};return[E(n),E(r)]}export function keyAt(t,e,o){if(Math.abs(o-t.keysY)>t.keyH/2+4)return 0;const r=Math.round(e/t.keyPitch)+5;return r>=1&&r<=9&&Math.abs(e-(r-5)*t.keyPitch)<=t.keyPitch/2?r:0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{calculateTimeBasedScore}from"../../services/ScoringService.js";import{aimTilted,unproject}from"../shared/EngineTilt.js";import{cellAt,keyAt,TAP_SLOP,TIME_LIMIT}from"./SudokuConstants.js";import{completedUnits,newPuzzle,POINTS_PER_CORRECT,remaining,WIN_BONUS}from"./SudokuRules.js";import{buildScene,celebrate,cellTop,drawGrid,drawKeys,flash,keyTop,pressKey,removeScene,setSceneTheme,shakeCell}from"./SudokuScene.js";const WORLD_CAPACITY=400;export function createGame(e){const o=new World(400),r={world:o,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",puzzle:newPuzzle(),filled:0,selRow:-1,selCol:-1,get score(){return o.scoreboard.score},get timeLeft(){return o.scoreboard.shownSeconds},won:!1,press:null,onPhase:e=>{},onScore:e=>{},onTime:e=>{},onEvent:e=>{}};return o.scoreboard.reset(0,TIME_LIMIT),o.scoreboard.handlers={onSecond:e=>r.onTime(e),onTimeUp:()=>"playing"===r.phase&&end(r,!1)},r}function highlighter(e){const{selRow:o,selCol:r}=e,l=o>=0&&r>=0?e.puzzle.grid[o][r].value:0;return(n,t)=>n===o&&t===r?"selected":l>0&&e.puzzle.grid[n][t].value===l?"same":o>=0&&(n===o||t===r||Math.floor(n/3)===Math.floor(o/3)&&Math.floor(t/3)===Math.floor(r/3))?"peer":"none"}function draw(e,o=-1){const{layout:r,scene:l}=e;r&&l&&(drawGrid(e.world,r,l,e.puzzle.grid,highlighter(e),o),drawKeys(e.world,r,l,remaining(e.puzzle)))}export function setLayout(e,o){e.scene&&removeScene(e.world,e.scene),e.layout=o,aimTilted(e.camera,o),e.scene=buildScene(e.world,o,e.theme),draw(e)}export function setTheme(e,o){e.theme=o,e.layout&&e.scene&&setSceneTheme(e.world,e.layout,e.scene,o)}export function start(e){"ready"===e.phase&&(e.world.scoreboard.reset(),e.world.scoreboard.startCountdown(TIME_LIMIT),e.filled=0,e.won=!1,e.selRow=e.selCol=-1,e.phase="playing",draw(e),e.onScore(0),e.onTime(TIME_LIMIT),e.onPhase("playing"))}export function reset(e){e.puzzle=newPuzzle(),e.filled=0,e.selRow=e.selCol=-1,e.world.scoreboard.reset(0,TIME_LIMIT),e.won=!1,e.press=null,e.phase="ready",e.layout&&setLayout(e,e.layout),e.onScore(0),e.onTime(TIME_LIMIT),e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function tick(e,o){e.world.isDisposed||e.world.update(o)}function end(e,o){e.world.scoreboard.stop(),e.won=o,e.phase="over",e.press?.key&&e.layout&&e.scene&&pressKey(e.world,e.layout,e.scene,e.press.key,!1),e.press=null,e.onPhase("over"),e.onEvent(o?"win":"lose")}export function select(e,o,r){"playing"===e.phase&&(e.selRow=o,e.selCol=r,draw(e))}export function enter(e,o){if("playing"!==e.phase||e.selRow<0||e.selCol<0)return;const{selRow:r,selCol:l}=e,n=e.puzzle.grid[r][l],t=e.puzzle.solution[r][l];if(n.given||n.value===t&&!n.error)return;const s=o===t;n.value=o,n.error=!s;const{layout:a,scene:d}=e,i=9*r+l;if(!s)return draw(e,i),a&&d&&shakeCell(e.world,a,d,i),void e.onEvent("wrong");e.filled+=1,e.world.scoreboard.add(POINTS_PER_CORRECT);const u=completedUnits(e.puzzle,r,l);if(e.world.scoreboard.add(u.points),draw(e,i),u.cells.length&&a&&d&&flash(e.world,a,d,u.cells,i),e.onEvent("place"),e.filled>=e.puzzle.toFill)return a&&d&&(flash(e.world,a,d,Array.from({length:81},(e,o)=>o),i),celebrate(e.world,a)),e.world.scoreboard.add(WIN_BONUS),e.world.scoreboard.set(calculateTimeBasedScore(TIME_LIMIT-e.timeLeft,TIME_LIMIT,e.score)),e.onScore(e.score),void end(e,!0);e.onScore(e.score)}export function hitAt(e,o,r){const l=e.layout;if(!l)return null;const[n,t]=unproject(l,o,r,keyTop(l)),s=keyAt(l,n,t);if(s)return{key:s};const[a,d]=unproject(l,o,r,cellTop(l)),i=cellAt(l,a,d);return i?{cell:i}:null}export function drag(e,{phase:o,x:r,y:l}){const{layout:n,scene:t}=e;if("start"===o){const o="playing"===e.phase?hitAt(e,r,l):null,s=o&&"key"in o?o.key:0;return e.press=o?{x:r,y:l,key:s}:null,void(s&&n&&t&&pressKey(e.world,n,t,s,!0))}const s=e.press;if(!s)return;const a=Math.hypot(r-s.x,l-s.y)>TAP_SLOP;if("end"!==o&&!a)return;if(e.press=null,s.key&&n&&t&&pressKey(e.world,n,t,s.key,!1),"end"!==o||a)return;if(s.key)return enter(e,s.key);const d=hitAt(e,r,l);d&&"cell"in d&&select(e,d.cell[0],d.cell[1])}
|