@nayan-ui/games 1.19.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 -40
- 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 _0x163272=_0x3806;function _0x560a(){const x=["WO/dOvOPFmk5","EbxcQbSzWRybW5Cprmomba","W57cTHzPjSoKtg12WOqNiw4","EmknWPhdO1Pc","cCoLW7n3W4hdS8kuWQ3cHG","lSoOW4JdQSkd","W7xdR8khiW","W7JcNmkvWPNcGW","CCo8ixK","W5ZcNCo8W4VdJM/dHG","lmo9W5m","oN/cMCkIoa","aSoJW7HWW58","kSo9W5q","WOVcTmok","h8kmWQmEWOD8WPi","WRJcT8okW4tcT2T2","pmonWO00Fq","wIdcIa","WPZcTmowW6hcJa","W5CUDsi","bmo2q8kaW7umWRS","aYFcHCoGWR3cUHa","W6ldNmoZtMPpqCki","WRJdI8k9W4dcTg8d","iCkWCbe","WP7cQLm","W7BdLSkB","q3/dKmk6W7O","pCo9W4JdV8kL","W4dcMSkQW7S","W4NdVCkPwCo8pfa","W4GPWOTQDmoaja","W4pdKSo/W5vK","WOOKW4JdRJi","cWrxoCovW6Cr","q8kalmkGeCkBW4W","BSkCWPxcK8ojWOtdNW","WQlcICoahmoQW7/cOSoKuCkPWQxdGaq","WQxdQSoIwM/dGdG","CCoWj3xdQCkFW6jxaW","s8otWPaxBH0/","sSoJAmk2D8kwnv7dULyiWOtcM8opWO7cPSoUpva","q8khlCkSASoQW4G","wSoRFSkJmmol","AupcS8kEx8oQvG","c8kkWRHmxW","W4hdSZKXWRVcUSkX","WOhdSmk3je/cTCoXkmkl","rLRcOCk6cmkTW4nbvmosWRpdI8kvDSoG","WRJdH8k8W4xdHwT1","WO7dRWNdMmkd","WRNdLCkrfwBcJSojbmk+tXS","FCkGW6hcP8ktW43dKq","WR7cKSoLW4/cVw7cSwf4","aSotbmo4kW","eJtcUSkKdWBcUW","W7ldG8kM","W6zDba","omkPWPv6AhTraq1drSkc","WPJcQLq","nIddMCoqFCobW4rNxmoUWRxdQG","WRSvymkQkW","wSkKW7rfW4y","W6VcVJv/BSo2W5qbuCkNb8oz","c8k8ya","lSooWPi","Emo6i3JdQ8kc","W47cTX4EuSksqq","W5/cLSkVW6Tk","cGpcUSodd3Dh","W4pdMmoNW41YWRK","W4VcKmkNW7bq","s8ouW6evggO+","W4RcRCoJdrpdQmkH","W7tdMSkut8kYWRS","W7VcSCkkW5rNuCkcfCkaWOiIW6NdKSk4qq","ESoBz2ebaCkjqM3cMq","W5zHWQ7cKCopnCok","W6ZcUtv+eSkUW7auqSkY","d23dMMTIW51R","umoHA8kZ","W47dQSkiWRZdIb7dHfX0W70zzCoR","W63dPgWWWPhdJ3C2dSoQuW","W5xcSvhcG8oarSkyW4JcVvNcTqhdUq","W6/cNmkj","WRBcJmkZhSoSW7ZcPq","WQ7dHsNdU8kUmmo4W6lcJ3dcIa/dJ8oqW7iS","WRy1hmkgnCkFWQ/cQJ10WQJdImkV","WR7cStDOW5G","l8k/WR/cVmoZ","WQldI8owcvqFWRm","W6zDbmoRWOa","n8k+BqNcUCog","W7ScvWpdUmoieZj8W7ZcPmk+haNcQJLuWP4","WPWCWOzvza","WOD6ihlcLSkIArLaW4/cJ8k6kW","DSoPxuVcK8kDsa","svfWAmo4WQC","bmkdoSo0WOf2W4m","WROFW6xdKXtdHSorB8oEWOK","WPqEp8k+wmo9W5ZdI04BW43cTSoxW6lcQCkFda7cVq","WPWji3FdPmkRhW","W5xdMmoJ","g8octmkrzSoLlq","W6JdPg08W4ddPhaJhmom","WOH7i3dcKCkQBbLsW6ZcQCkPiq","q8oYwCoxzSoQW4q","WQxcQ8okW4dcPW","W54ODYpdICoU","W6DikCo1WPO","WONdLmkdCmoi","WPbuWO7cPCoJ","WQBcJmoggSkvWOldMSoiqmk3","W4JdTSotEa","fCoTW71Z","amkaWRvh","WRJdQg8ImCkX","kgdcMCk0fq","W4vnAmoTr8kmW4a","eKhcVmozCWdcTG","WRezA8kUpMRcP8kOEW","W7VdH8oJW7De","WPBcQXvK","WPqEp8k+wmo/W4tdN1ixW5VcSCoxW6lcRmkffrVcPmomEIxcQq","WORcOXTGWPpdOCoIeCk6","W4ldGNVdPCoIWOa","WQVcHdjnWQ3dL8ohnSkpdqvPlSkZW7/cKwW1A8oMW7y","DCoIxmk4","W4P8WP3cThxcRCkQ","BSkyW6ddQCooWOldNG","pSkXECoOvNVcNq","WRynvW","WOhcPrbNWO0","vh/dJa","rCkLBSoDW44","WOpcQr9TWPhdVa","w8oHuwBdJsJcKG","D8khWPpdQ1W","WOVdTSkKoeZcSq","cGddICkXDh1d","oCkqsXdcVcxcKGO","iSkilG","BmkVgbSilSoC"];return(_0x560a=function(){return x})()}!function(){const x=_0x3806,_=_0x560a();for(;;)try{if(975731==parseInt(x(174,"]Jn("))/1*(parseInt(x(286,"b#He"))/2)+-parseInt(x(192,"[gu)"))/3+-parseInt(x(216,"303X"))/4+parseInt(x(194,"IvfX"))/5+parseInt(x(193,"3jKO"))/6*(parseInt(x(187,"oJeA"))/7)+-parseInt(x(256,"Be%v"))/8+parseInt(x(215,"3jKO"))/9*(-parseInt(x(223,"pmSd"))/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()[_0x163272(179,"XPuR")];export const BOARD_DIMENSION=GAME_WIDTH;export const INNER_BOARD_DIMENSION=BOARD_DIMENSION;export const CELL_SIZE=BOARD_DIMENSION/10;export const TOKEN_RADIUS=.22*CELL_SIZE;const _0x125ac6={};_0x125ac6[_0x163272(159,"$qn[")]=BOARD_DIMENSION,_0x125ac6[_0x163272(237,"qp0R")]=INNER_BOARD_DIMENSION,_0x125ac6.CELL_SIZE=CELL_SIZE,_0x125ac6[_0x163272(255,"avSK")]=TOKEN_RADIUS;export const SNL_LAYOUT=_0x125ac6;const _0x2bb1c2={};function _0x3806(x,_){x-=144;const o=_0x560a();let W=o[x];if(void 0===_0x3806.fmtOOP){const x=function(x,_){let o,W,e=[],t=0,d="";for(x=function(x){let _="",o="";for(let o,W,e=0,t=0;W=x.charAt(t++);~W&&(o=e%4?64*o+W:W,e++%4)?_+=String.fromCharCode(255&o>>(-2*e&6)):0)W="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(W);for(let x=0,W=_.length;x<W;x++)o+="%"+("00"+_.charCodeAt(x).toString(16)).slice(-2);return decodeURIComponent(o)}(x),W=0;W<256;W++)e[W]=W;for(W=0;W<256;W++)t=(t+e[W]+_.charCodeAt(W%_.length))%256,o=e[W],e[W]=e[t],e[t]=o;W=0,t=0;for(let _=0;_<x.length;_++)W=(W+1)%256,t=(t+e[W])%256,o=e[W],e[W]=e[t],e[t]=o,d+=String.fromCharCode(x.charCodeAt(_)^e[(e[W]+e[t])%256]);return d};_0x3806.PEXgkN=x,_0x3806.ENXKKZ={},_0x3806.fmtOOP=!0}const e=o[0];_0x3806.ikffPB!==e&&(_0x3806.ENXKKZ={},_0x3806.ikffPB=e);const t=_0x3806.ENXKKZ[x];return void 0===t?(void 0===_0x3806.lWvzMB&&(_0x3806.lWvzMB=!0),W=_0x3806.PEXgkN(W,_),_0x3806.ENXKKZ[x]=W):W=t,W}_0x2bb1c2.head=16,_0x2bb1c2.tail=6,_0x2bb1c2[_0x163272(243,"qp0R")]=_0x163272(184,"erxb"),_0x2bb1c2[_0x163272(246,"qp0R")]=_0x163272(163,"C9vD"),_0x2bb1c2[_0x163272(199,"3jKO")]="#A5D6A7";const _0x5ba5a1={head:47,tail:26};_0x5ba5a1[_0x163272(283,"C9vD")]=_0x163272(250,"3[Fk"),_0x5ba5a1[_0x163272(177,"((JB")]="#C62828",_0x5ba5a1[_0x163272(245,"hKA1")]="#EF9A9A";const _0x17da2d={};_0x17da2d[_0x163272(224,"f#qZ")]=49,_0x17da2d[_0x163272(233,"qp0R")]=11,_0x17da2d.color=_0x163272(247,"w8nr"),_0x17da2d[_0x163272(208,"ERVS")]=_0x163272(275,"hKA1"),_0x17da2d.belly="#CE93D8";const _0x57a248={};_0x57a248[_0x163272(274,"303X")]=62,_0x57a248.tail=19,_0x57a248[_0x163272(282,"Fl!U")]=_0x163272(270,"7j$u"),_0x57a248.accent="#B71C1C",_0x57a248[_0x163272(172,"v(fK")]=_0x163272(253,"oJeA");const _0xab5ab4={};_0xab5ab4[_0x163272(226,"SqVj")]=72,_0xab5ab4.tail=54,_0xab5ab4[_0x163272(202,"5oIl")]=_0x163272(149,"%Mp3"),_0xab5ab4.accent=_0x163272(269,"rHL9"),_0xab5ab4[_0x163272(165,"6)Vt")]=_0x163272(180,"3[Fk");const _0x56a0e7={};_0x56a0e7[_0x163272(262,"((JB")]=87,_0x56a0e7[_0x163272(225,"yo*s")]=24,_0x56a0e7.color="#5E35B1",_0x56a0e7[_0x163272(219,"303X")]=_0x163272(229,"]H6R"),_0x56a0e7[_0x163272(287,"nrpx")]=_0x163272(240,"WMxj");const _0x11e55d={};_0x11e55d[_0x163272(284,"XPuR")]=93,_0x11e55d.tail=73,_0x11e55d[_0x163272(261,"7j$u")]="#C0CA33",_0x11e55d[_0x163272(185,"pmSd")]=_0x163272(157,"qp0R"),_0x11e55d[_0x163272(200,"WMxj")]="#E6EE9C";const _0x374bf6={};_0x374bf6[_0x163272(238,"Kw6X")]=98,_0x374bf6[_0x163272(260,"U*er")]=78,_0x374bf6[_0x163272(144,"%qY#")]=_0x163272(166,"@Urg"),_0x374bf6[_0x163272(227,"]Jn(")]="#1565C0",_0x374bf6[_0x163272(228,"iRFH")]=_0x163272(178,"Be%v");export const SNAKES=[_0x2bb1c2,_0x5ba5a1,_0x17da2d,_0x57a248,_0xab5ab4,_0x56a0e7,_0x11e55d,_0x374bf6];const _0x3a2dfc={bottom:1};_0x3a2dfc[_0x163272(167,"%Mp3")]=38,_0x3a2dfc[_0x163272(266,"yo*s")]=_0x163272(241,"Kw6X"),_0x3a2dfc[_0x163272(158,"erxb")]=_0x163272(207,"KA)N");const _0x211dc3={bottom:4};_0x211dc3[_0x163272(176,"kWWH")]=14,_0x211dc3[_0x163272(156,"SqVj")]="#5D4037",_0x211dc3[_0x163272(231,"v(fK")]=_0x163272(190,"avSK");const _0x5ecaec={};_0x5ecaec[_0x163272(254,"Be%v")]=9,_0x5ecaec[_0x163272(195,"7j$u")]=31,_0x5ecaec[_0x163272(182,"XPuR")]=_0x163272(160,"7j$u"),_0x5ecaec.highlight=_0x163272(145,"ERVS");const _0x5b52d6={};_0x5b52d6[_0x163272(154,"Yrdo")]=21,_0x5b52d6[_0x163272(242,"K06o")]=42,_0x5b52d6[_0x163272(221,"m!1A")]=_0x163272(239,"%qY#"),_0x5b52d6.highlight="#A1887F";const _0x3e5f43={};_0x3e5f43[_0x163272(249,"erxb")]=28,_0x3e5f43[_0x163272(244,"Fl!U")]=84,_0x3e5f43[_0x163272(273,"[gu)")]=_0x163272(151,"SqVj"),_0x3e5f43[_0x163272(150,"((JB")]=_0x163272(278,"7j$u");const _0x1aafb5={};_0x1aafb5[_0x163272(254,"Be%v")]=36,_0x1aafb5[_0x163272(280,"cct6")]=44,_0x1aafb5[_0x163272(248,"Z%46")]=_0x163272(196,"pmSd"),_0x1aafb5[_0x163272(231,"v(fK")]=_0x163272(276,"Fl!U");const _0x5bfe1e={};_0x5bfe1e[_0x163272(154,"Yrdo")]=51,_0x5bfe1e.top=67,_0x5bfe1e[_0x163272(161,"IvfX")]=_0x163272(160,"7j$u"),_0x5bfe1e.highlight="#6D4C41";const _0x1fe4d9={bottom:71};_0x1fe4d9[_0x163272(267,"C9vD")]=91,_0x1fe4d9.color=_0x163272(276,"Fl!U"),_0x1fe4d9[_0x163272(258,"yo*s")]="#A1887F";const _0x53b5bf={};_0x53b5bf[_0x163272(181,"nrpx")]=80,_0x53b5bf[_0x163272(268,"[gu)")]=99,_0x53b5bf.color=_0x163272(146,"6)Vt"),_0x53b5bf[_0x163272(235,"qp0R")]="#8D6E63";export const LADDERS=[_0x3a2dfc,_0x211dc3,_0x5ecaec,_0x5b52d6,_0x3e5f43,_0x1aafb5,_0x5bfe1e,_0x1fe4d9,_0x53b5bf];export const CELL_TRANSITIONS=(()=>{const x=_0x163272,_=new Map;for(const o of SNAKES)_[x(175,"w8nr")](o.head,o[x(279,"KA)N")]);for(const o of LADDERS)_[x(272,"3[Fk")](o[x(236,"^F)W")],o[x(213,"nrpx")]);return _})();export const CELL_POSITIONS=(()=>{const x=_0x163272,_={};_[x(205,"b#He")]=function(x,_){return x%_},_[x(232,"nrpx")]=function(x,_){return x*_};const o=_,W=new Array(101),e={};e[x(170,"cct6")]=0,e[x(168,"5oIl")]=0,e.x=0,e.y=0,e.cx=0,e.cy=0,W[0]=e;for(let _=1;_<=100;_++){const e=_-1,t=Math[x(173,"rHL9")](e/10),d=o[x(220,"5oIl")](e,10),a=t%2==0?d:9-d,S=9-t,n=o[x(218,"[gu)")](a,CELL_SIZE),k=S*CELL_SIZE,r={};r[x(264,"C9vD")]=S,r[x(281,"pmSd")]=a,r.x=n,r.y=k,r.cx=n+CELL_SIZE/2,r.cy=k+CELL_SIZE/2,W[_]=r}return W})();const CELL_COLOR_PALETTE=[_0x163272(214,"Yrdo"),_0x163272(209,"hKA1"),"#BBDEFB","#F8BBD0",_0x163272(263,"[gu)"),_0x163272(217,"6)Vt"),"#B2EBF2",_0x163272(147,"WMxj"),_0x163272(230,"@Urg"),"#F0F4C3"];export const CELL_COLORS=(()=>{const x=_0x163272,_={};_[x(222,"S*oQ")]=function(x,_){return x+_};const o=_,W=new Array(o[x(265,"iRFH")](100,1));W[0]=x(285,"m!1A");for(let _=1;_<=100;_++){const e=_-1,t=Math[x(271,"kWWH")](e/10),d=e%10;W[_]=CELL_COLOR_PALETTE[o[x(259,"C9vD")](t,d)%CELL_COLOR_PALETTE[x(257,"Z%46")]]}return W})();export const SNAKE_HEAD_SET=new Set(SNAKES.map(x=>x[_0x163272(191,"Yrdo")]));export const LADDER_BASE_SET=new Set(LADDERS[_0x163272(252,"oJeA")](x=>x[_0x163272(203,"KA)N")]));const _0x5ee813={};_0x5ee813[_0x163272(277,"f#qZ")]="#FFF8E1",_0x5ee813.BOARD_FRAME="#5c4033",_0x5ee813.CELL_BORDER=_0x163272(152,"Yrdo"),_0x5ee813[_0x163272(169,"SqVj")]=_0x163272(153,"6)Vt"),_0x5ee813[_0x163272(198,"]H6R")]=_0x163272(183,"SqVj"),_0x5ee813[_0x163272(162,"erxb")]="#0D47A1",_0x5ee813.AI_COLOR="#E53935",_0x5ee813[_0x163272(164,"[gu)")]="#C62828",_0x5ee813.AI_DARK=_0x163272(212,"303X"),_0x5ee813.CELL_NUMBER=_0x163272(211,"]H6R"),_0x5ee813[_0x163272(197,"IvfX")]="#F57F17",_0x5ee813[_0x163272(186,"XPuR")]=_0x163272(234,"]H6R"),_0x5ee813.LADDER_CELL_TINT="rgba(76, 175, 80, 0.12)",_0x5ee813[_0x163272(210,"%qY#")]=_0x163272(201,"U*er"),_0x5ee813.FINISH_CELL=_0x163272(155,"iRFH");export const SNL_COLORS=_0x5ee813;const _0x586fe6={ANIMATION_DURATION:300};_0x586fe6[_0x163272(251,"w8nr")]=800,_0x586fe6[_0x163272(204,"303X")]=500;export const SNL_GAME_CONFIG=_0x586fe6;
|
|
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 _0x403135=_0x1fa1;!function(){const e=_0x1fa1,t=_0x4d89();for(;;)try{if(442478==-parseInt(e(370,"ppmy"))/1*(-parseInt(e(380,"0Nx["))/2)+-parseInt(e(326,"spMG"))/3*(-parseInt(e(374,"0sa]"))/4)+-parseInt(e(361,"oKME"))/5+-parseInt(e(414,"8mFZ"))/6*(parseInt(e(310,"v&gI"))/7)+parseInt(e(362,"tqix"))/8+parseInt(e(315,"!H1N"))/9+-parseInt(e(351,"1xlc"))/10*(parseInt(e(320,"GtVg"))/11))break;t.push(t.shift())}catch(e){t.push(t.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x4ef915,{useEffect,useRef}from"react";import{StyleSheet,Dimensions}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";function _0x1fa1(e,t){e-=296;const o=_0x4d89();let W=o[e];if(void 0===_0x1fa1.flpwmt){const e=function(e,t){let o,W,r=[],a=0,n="";for(e=function(e){let t="",o="";for(let o,W,r=0,a=0;W=e.charAt(a++);~W&&(o=r%4?64*o+W:W,r++%4)?t+=String.fromCharCode(255&o>>(-2*r&6)):0)W="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(W);for(let e=0,W=t.length;e<W;e++)o+="%"+("00"+t.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(o)}(e),W=0;W<256;W++)r[W]=W;for(W=0;W<256;W++)a=(a+r[W]+t.charCodeAt(W%t.length))%256,o=r[W],r[W]=r[a],r[a]=o;W=0,a=0;for(let t=0;t<e.length;t++)W=(W+1)%256,a=(a+r[W])%256,o=r[W],r[W]=r[a],r[a]=o,n+=String.fromCharCode(e.charCodeAt(t)^r[(r[W]+r[a])%256]);return n};_0x1fa1.snmuwb=e,_0x1fa1.lIjLpQ={},_0x1fa1.flpwmt=!0}const r=o[0];_0x1fa1.jKeYzD!==r&&(_0x1fa1.lIjLpQ={},_0x1fa1.jKeYzD=r);const a=_0x1fa1.lIjLpQ[e];return void 0===a?(void 0===_0x1fa1.XjFCNV&&(_0x1fa1.XjFCNV=!0),W=_0x1fa1.snmuwb(W,t),_0x1fa1.lIjLpQ[e]=W):W=a,W}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 _0x343967,jsxs as _0x3da148}from"react/jsx-runtime";const{width:width,height:height}=Dimensions[_0x403135(389,"lb93")](_0x403135(352,"A@dz"));export const SpaceFighter=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:t,onEndGame:o,onReplayGame:W,onShare:r,onShareScreenshot:a,onShowLeaderboard:n,bannerAd:s})=>{const S="8ja#",i=_0x403135,d={PSlOb:i(419,"vtSH"),pkqtQ:i(343,"0sa]"),jnmaW:"win",NHnOT:function(e,t,o){return e(t,o)},KNQzS:function(e,t,o){return e(t,o)},nZpJO:function(e,t){return e(t)},hfrXM:function(e,t,o){return e(t,o)},TMplG:function(e,t,o,W){return e(t,o,W)},vgQvm:function(e,t,o){return e(t,o)},MznHN:function(e,t,o){return e(t,o)},DyHJI:function(e,t,o){return e(t,o)},sdCQe:function(e,t,o){return e(t,o)}},m=useSpaceFighterStore(e=>e[i(402,"&9c@")]),k=useSpaceFighterStore(e=>e.gameOver),p=useRef(0),f=useRef(o);f[i(338,"2*$(")]=o;const C=_0x4ef915[i(386,"1xlc")](!1),x=_0x4ef915[i(302,"1xlc")](e=>{const t=i;if(f[t(312,"&9c@")]&&!C[t(378,"8ja#")]){const o=useSpaceFighterStore[t(409,"lT$a")]();f[t(341,"igmy")]({status:e,score:o.score[t(396,"PbT5")]()}),C[t(356,"VKWX")]=!0}},[]),u=useRef(e?.[i(379,"TYb@")]??!0);u[i(391,"&5!*")]=e?.[i(401,"k!5s")]??!0;const l=useRef(e?.[i(334,"QFt2")]??!0);l[i(364,"L8Qf")]=e?.[i(337,"Orj7")]??!0;const G=e?.[i(300,"&9c@")]??0;useEffect(()=>{const e=i;useSpaceFighterStore[e(371,"PbT5")]()[e(335,"vtSH")](G)},[G]);const{wrapFunction:_,safeExecute:g}=useGameErrorHandler(GAME_IDS[i(316,"FrZV")]),O=d.nZpJO(useRef,null);!O.current&&(O[i(347,"Q^te")]=d[i(348,"ppmy")](g,()=>createSpaceFighterService(width,height),d.hfrXM(createSpaceFighterService,width,height),GameErrorType[i(344,"tqix")]));const h=O[i(359,"x@!k")];useEffect(()=>{const e=i;return useSpaceFighterStore[e(346,"0Nx[")](e=>e.isPlaying,t=>{h&&h[e(358,"tqix")](t)})},[h]),useEffect(()=>{const e=i;if(e(313,"nulq")===e(410,"w!am"))return()=>{const t=e;h&&h[t(384,"Orj7")](),useSpaceFighterStore[t(406,"O*cU")]()[t(407,"spMG")]()};_0x103448[e(416,"vtSH")]=!1},[h]),useEffect(()=>()=>{const e=_0x1fa1;useSpaceFighterStore[e(412,"1UD4")]()[e(411,"L8Qf")]&&!C.current&&x(d[e(301,"8mFZ")])},[x]),useEffect(()=>{const e=i;if(k&&!C[e(331,"Nk]3")]){const t=useSpaceFighterStore.getState();p.current=t.score;const o=t[e(324,"lT$a")]<=0,W=o?d[e(392,"&5!*")]:d.jnmaW;o?(d[e(318,"zkJJ")](playSound,GAME_SOUNDS[e(336,"x@!k")][e(349,"w!am")],u[e(341,"igmy")]),playHaptic(HapticType.ERROR,l.current)):(playSound(GAME_SOUNDS[e(322,"TYb@")].WIN,u[e(417,"lb93")]),d[e(408,"0Nx[")](playHaptic,HapticType.SUCCESS,l[e(399,"0sa]")])),d.nZpJO(x,W)}!k&&(C.current=!1)},[k,x]),useEffect(()=>{const e=i;if(k&&h){h[e(405,"]ANg")]();const t=h.getInitialSpacecraft();h[e(413,"QFt2")](t.x,t.y)}},[k,h]);const P=_0x4ef915.useCallback(()=>_(()=>{const e=i;if(C[e(387,"QFt2")]=!1,useSpaceFighterStore[e(340,"ppmy")]()[e(357,S)](SPACE_FIGHTER_GAME_CONFIG[e(360,"c8l%")]),playSound(GAME_SOUNDS[e(377,"r1H6")][e(397,"vtSH")],u[e(356,"VKWX")]),playHaptic(HapticType[e(308,"Nk]3")],l[e(364,"L8Qf")]),h){h[e(311,"k!5s")](!0),h[e(298,"c8l%")](SPACE_FIGHTER_GAME_CONFIG.ASTEROID_SPEED,SPACE_FIGHTER_GAME_CONFIG[e(420,"lT$a")]);const t=useSpaceFighterStore[e(381,S)]()[e(305,"9qiS")];h.syncFromStore(t,[]),h.startGameTimer(()=>useSpaceFighterStore.getState()[e(307,"O*cU")]()),h.startAsteroidSpawning(t=>{const o=e;useSpaceFighterStore.getState()[o(369,"spMG")](t),h.addAsteroidsToPhysics(t)}),h[e(353,"&9c@")](t=>useSpaceFighterStore[e(314,"7IOV")]().batchRemoveAsteroids(t))}},GameErrorType[i(368,"1UD4")])(),[_,h]),F=_0x4ef915[i(297,"QFt2")](()=>{const e=i;x(e(385,"nulq")),d[e(330,"2*$(")](_,()=>{const t=e;if(useSpaceFighterStore[t(400,"Orj7")]()[t(309,"c8l%")](),h){if(t(372,"8FaK")!==t(373,"igmy")){const e={_0x217be4:304,_0x56d422:"0sa]",_0x57bbe8:403,_0x202a95:"7IOV"};return()=>{const o=t;_0x15a002&&_0x1771ec[o(e._0x217be4,e._0x56d422)](),_0x84a8ba[o(e._0x57bbe8,"WaP%")]()[o(306,e._0x202a95)]()}}{h.cleanup();const e=h[t(363,"lT$a")]();h[t(345,"0sa]")](e.x,e.y)}}},GameErrorType[e(329,"ppmy")])()},[_,x,h]),H=_0x4ef915.useCallback(()=>_(()=>{const e=i;if(W?.(),C[e(321,"qogZ")]=!1,h&&h[e(365,"8FaK")](),useSpaceFighterStore[e(333,"VKWX")]()[e(382,"lb93")](),h){const t=h.getInitialSpacecraft();useSpaceFighterStore[e(418,"k!5s")]().updateSpacecraft(t),h[e(393,"o#[b")](t.x,t.y)}},GameErrorType[i(319,"1xlc")])(),[_,h,W]),E=_0x4ef915[i(323,"k!5s")](()=>({isPlaying:m,gameOver:k,onStartGame:P,onStopGame:F,onShare:r,onShowLeaderboard:n,startButtonSubtext:i(415,"WaP%")}),[m,k,P,F,r,n]);k&&(p[i(417,"lb93")]=useSpaceFighterStore.getState()[i(394,"2*$(")]);const R=_0x4ef915.useMemo(()=>({isVisible:k,score:p[i(338,"2*$(")],onPlayAgain:H,buttonText:i(398,"ppmy"),title:i(366,"w!am"),message:i(376,"x@!k")}),[k,H]),b=_0x4ef915[i(327,"7IOV")](()=>({gameId:GAME_IDS.SPACE_FIGHTER,settings:e||DEFAULT_GAME_SETTINGS,onSettingsChange:t}),[e,t]),y={};y[i(390,"Nk]3")]=h,y[i(383,"GtVg")]=u,y[i(296,"8mFZ")]=l;const A={};A[i(299,"PbT5")]=G;const T={...E},N={...R};N.onShare=a,N[i(367,"Nk]3")]=s;const Q={...b};return d[i(350,"A@dz")](_0x343967,GestureHandlerRootView,{style:styles[i(388,"lT$a")],children:d.MznHN(_0x3da148,GameBackground,{children:[_0x343967(GameArea,y),d.DyHJI(_0x343967,ScoreBoard,A),_0x343967(GameControlButton,T),_0x343967(GameOverModal,N),d[i(332,"Cg(#")](_0x343967,GameSettingsModal,Q)]})})};const _0x4f6690={};function _0x4d89(){const e=["W7HAtXHPWRtdMh4xWQvyBCkeFvFdNgRdKSogeG","W6tcOaJdHCotW5DPW4VcQCogWPFdTa","WQRdNmoBWQ7cUmoqW5W","W77cJw/dUXLsubG","jCoLlSokhW","f8k/br0r","rmkcltyJfCkRya","lxaNWOXHzmoaWPmDgJFdRSoiWPr8","WPj2sCkABqTZjX/dOSoCzq1yaJ/dIbH8h8kIvmkzW5W","WP3cPCkmW6xcKuj1W6pdMSoqW55xWOm","WP3dRSkCWRrWidi","dcTAWQBcKxWiW5/cPSkOW5ZdOq","W57dOCo6WQZdPGpcIJ/dVW09W7iE","WPNdVSkAWPvHlZjw","WQ1PAvBdGmoiFSkCW4a","W5NdOmoOW6ZdQwtcQCkKjCkqEcdcUGft","W4bSWQu9lCo9yq","WPjMW7enkCkg","xKzgWOWWCa","W5uJWPJcLCoxtca","WQLtaCkrW48wi8oECa","WRHPBG","FCkaxCoEW5H+WOXMW6FcMmol","W7ddHSk8CJNcRqG","W6pdMmk/Da0","W4tdHZ4fhaK9WRyhW6iZWOJdG0PyW69CbeDlW6K","qXZcGmoHda","WOtcLx9HwfTPWRqfW6GXWP7dUG","W63cH0JdNb9AsHO","dXRcRCobW78","W53dUCoKW4FcVmocW7BcLmorW5a","e8odoI8koCko","W4rLWRqpn8oPzsS","eCkLW7bbWPFdSbanW5W1DCk6","i8kPBmkuWPO+W4asW6m","AmokW6GkiSoFW4lcKa","WRHPAuFdGCo9ESkJW4P1WQS","W6pdNCocwSoRWPKT","ESksW7XqwCoKp8oi","W7FcOr/dOCouW6rTW5tcOW","WQtcMCktW6BcHW","WQ1zg8k2W5OEoCoE","q2fRW54M","kHBdHN5cW7f0fCk9","W5zXCH9uWPtdOfi","W4uZWP7cTmocqZFdNmkbW7JdMxOkb8kLWRBcUCoQxrNcRa","smkPomk1W51iW60","qCooW6OWmCoFW4lcKeNcJmkJW7j9ECowWPbCW6iVWOldUxJdHG","pZVcNSoHW47cMmo6","WRX5AehdKCoHAW","e8kUW6vWWO/dTdCh","pY/cGSoWW47cMG","WOTVo8kGW7WWbmo/xCkkWQ/cPvPqDbWHvmk7WOPheCk6","fSkfeCkgW4bUW7RcUCkzWOL7WPKvW4xcHmkT","W4mLWO/cPmottJJdM8kdW6NdKW","WP3dHmkLkSkOW5ddR8kaW65lWP4CDstdJConvSoQhJVcKZX0WP8","W7BcJN3dMWHh","jCk8wSklWP4Z","lSk3dCk9W4S","xKzgWP00ESoIW6yYb8kJ","jqNdS2O","e8oAltWbiSkk","turbBmk4Cu9xWRje","W43dUCoUjxHyi8k2qa","ECksW6TXsmoOlSodWR3cKt/cUmkf","sCk0C8o4W45iWQ0","WPVdGmkUo8kBW5tdHSkm","m8oCWRuWWPqMWQbJF8kfW4pdGCk4","b8kUW6vZWPFdTdOlW4C8","kCkVtSkkWP4PW50","WPT2W6SLpG","W5JdUCoPe3H+nSk+","oSkxncCDFSoFW5HDW5agWRKc","pIK6W708WOnlW7PLvMlcGmow","hqerW6zMiCk4W6OMbSk4WOtdHa","WPOQfSkkW4e","FNTOWPaAqCoaW5SwnSkAWQ7dSG","WP/cUSoVW6RdVM3cR8kH","CCoUW4ldPmodWRSQ","oHv6WOFcUeyDW7NcLmkoW6ZdL8k9","aCk4W7rUWP7dUcW","WQzvgCkaW50","B8omzgG","WRZdVvRcSmksW5jUW6JcJmogWRW","W4RdR8o4dwLYlq","W7GmvSoqWPzpESoOvCkGWRxcRu8","W47dM8owWQNcSSoYW5NcOSo6WQnzySoF","wbNcNColja","ECkuqSojW651WOO","W4BdP1xdKCkJ","W7KKWOaNWQZdKCkAfG","W5m4WOVcHCoErXZdMmksW77dKx8n","lYVcMmoCW43cKmo9W6RdVa","WPHjFCkRccDDbYJcISo/qsW","W4zUWQe+l8oTws8OW6pcLcKA","uWRcNCoHdmkQDW","hCkwbmktW51O","W7ZdSmoPWRtcICoeW6pcMa","mCksoIKZWOud","kCk7W64VW6pdJ2PQ","hmozoZG","xmolWQz6W5FdSYRdSrjAd3vBdCoKE8kTWQVdGmk+","a8otpa4FnSkzz8oDWP92jqNcNI42qSktFfyK","WPZcOSkGW6/cT0JdKZddNa","A8oBwwT4E8k6","W4/dMmoTWOVcUG","BLfsW5alW5fyWPGA","A8oOW5OYW4i","gqywW6LTl8k+W7aNc8kQWQNdIW","ASoMW6uGW4ddUG","oCkUxCkkWO8uW4eDW7ypg27dQ8kOaSo2WPrHDCkpyv4GzSoSWQCf","C8oJcSomW4K2W4STW44dma","xWHIWOpcIvWj","W700WOygWR3dNSkA","WO3dR8kpWRrHcsDEWOC","zSoGWPT+W7ldKX/dKsz8","WQHStSkAkbzV","WQ/dTCkmdSkdW7hdVSk7W4L5WR4WtG","W4zwi8kFcrxcQmknFxpcSZbg","i8kXW50wWQ3cHvddLJ15k1LW","WQ1zg8kSW4awoCosy8k1WQZcLgX9tJyDyCkyWQW","ibddPgbgW6zP","a8orbSoTnSoApG","BLfsW5b0W5fyWPGA","EmkaxSovW65PWR90"];return(_0x4d89=function(){return e})()}_0x4f6690[_0x403135(303,"L8Qf")]=1,_0x4f6690[_0x403135(375,"LK1H")]=BACKGROUND_COLOR;const _0xf3f22b={};_0xf3f22b[_0x403135(325,"!H1N")]=1;const _0x118022={};_0x118022.container=_0x4f6690,_0x118022[_0x403135(404,"lb93")]=_0xf3f22b;const styles=StyleSheet[_0x403135(339,"8mFZ")](_0x118022);
|
|
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 _0x4cf523=_0x409c;!function(){const e="$nb8",o=_0x409c,t=_0x533a();for(;;)try{if(930193==-parseInt(o(497,"(ret"))/1+-parseInt(o(550,"thBn"))/2*(-parseInt(o(467,"ijWx"))/3)+-parseInt(o(440,"msd1"))/4*(-parseInt(o(548,"gPnY"))/5)+parseInt(o(601,e))/6*(parseInt(o(493,e))/7)+parseInt(o(615,"8#rX"))/8*(parseInt(o(573,"gPnY"))/9)+-parseInt(o(607,"msd1"))/10+-parseInt(o(448,"k)an"))/11)break;t.push(t.shift())}catch(e){t.push(t.shift())}}();import{c as _0x49ed70}from"react/compiler-runtime";function _0x533a(){const e=["W6jJW4/dG8kWW4O","a8kAWOlcQmkIW77dGmkbW6W","vwy+bCksW7C","r8kigYxcR2aKW44","W6X1WOpdHmknqmow","wJjUWQZcNLpcNmkqsCkUW5jHma","z8kSprhcRvmwW7HBDtjWl38RlG","W5LCWRRcUsm","WPpdKH7cISkzqCkMyrZdVCoJWR03ug7cVSkuWRaLBq","WPBdH8omksVcQ8ktq8kGFgO8WR4","y8kIuSoQmSkgiKntWO/cPmobWQO","CgqDW6XY","wwu2aSksW7e","kCkvWRvTg0LQWRL8W7ZdLW","p8ocWPpcGcSflq","ze08r8oojW","W5m8WRmMv8kOWOJdJCkaW4uwW4ZdQd8","W5WLWRq3W4NdNZpcOmoVWP4gWQ1uWOaMbmkEW6VdKq","WQm1W4/dLCo5jmkXt8kPWPlcMCojW5u","W7Kiumk7qCoOcG","W4GTWRuIvmkF","W6qLW5ZcGa","W7nqEJWp","x2W9amkwW7CQqSk7","WPj4W6WgvCktWR3dVCku","W6OUfqJcSSkrahrpWOK","xrtcMHa","W77cNSkKhe5mW4WajWxdRZvaW5/cVG","wfX4grddOLKNiY/cISoekW","zCkLwmokomkPl1nwWRJcQG","W6Ghu8k1smoSlmk/tW7dKSod","rcLHWQxcRW","vCkEbZRcHhq9W44","dCoDWOimamou","DwtcKCoeW6VdMLW","p8ouWQtcIsr7rdFdJKhdQW","t3m9nCkwW68Vt8k0vCow","ygiwW6a","W4LrWP/dS1RdRW","W5tdGSk4zCor","W4/dPxjIW4BcIa3cUxFcNa","v8kDbJhcMW","F8odWROzdfNcItRcTXe","dSoEWOOyeCoi","dCknDmkNW6PZcq","mrXqWORcSSkl","W7C6W5ZcU8oBDcVdPYxcNmor","yN7cSCoKW6m","nZlcNCoKW4xcSNz2uHtcKG","ney+W69TW63cGW","bYlcS2NcKq","wSo2BCk5W5zfBXzVW6iqW63dSeJdMCkOWRTzW7rqWQHCqx4","irfFWPRcUmkoW4PuW5tdSZzx","lSoTWOtcPmkqqCkAc8o/Bq","mHP6cSkuECksld0Ov8kgW4m","qthcKqWurW","WPKiW57cOGRcUbj2WOHJjYCQ","jKyynaBdIaOiWO7cG8oyemotWOa6gCki","jYpdLCkdWRNcGbhdGWSooCkyW7a","W5m8WRmMv8kOWOJdJCkaW4WAW57dUsO","mc4rFxi","WR/dNf3cJmkrqCkSnatdUmomWRS/h3e","W55AWQxcPJ0qoLLNzvy","dCorW53cUCoAFXhcNG","WROUW6pcVmoVvt0","o8oCWRlcHIK","W6NdG8kPz8oiA1vkWRbCWOGOW63cVKZcVb/dQ3tcHmouW4RdNG","W7hcPSoke8o6","q8kgDmonhmkxhgj4WPFcImoTWP/dPxfc","W7KgyCkJvSoGeCk3","WR7dNeZcG8kf","x8k/WOldLXK","W5PveceSWO/dRSoVuCoZW6TXW6K","s8oKFCkQWPSzlG","hmoJWOJcVmkIrCkgpmo+DqRdOqv4c8o6WQZdNq","WRXBbmoIe8k9rSkNFGpdM8ovfW","kCoLbCkWACk0fMjoWPJcOW","W6n+W4BdHG","WOCnzvniFmk6W5aJWR7dLq","mmkdWR5jdK0","W6tcK8o7cmoWCmosW6Gec8ktws5+b8kAW6G","ds3cJcu6w2K","aSonqgddMtanW69LDIP0","c8oiWQmEcmofeCktWOLw","F2lcS8oAW6/dJuhdMIG","W6H/W5xdGW","l1zmWR7cNqNdRN/cQIK","W5u7WRKgxCkhWOxdNCkfW6mq","pbZdLSk/ga","WOCgBmklWRxdTSoLCwm","WQeVW5/cNG","tSk4WQddIHa","W4jEWQ/dUK3dR3nnWP1CaW","W4dcNSo4hCk1umoaW5Oof8oD","zmkKWQxdIra","xGVdPCkWwmoNBLbQW7PG","nWBcVu/cJ2pcHvldTLhcLG","x20De8o2bCoTra","W7n/rd8xWRJdN8oz","W7ldICk3A8orCf5AWPjrWQKVW6W","c8oxW5xcT8osAdZcKwhdUCoGW4m1","WQ7dLv/cG8kzrmkmmqVdV8oMWQaQ","W6z9uG1lW6VcNSkjxCkFWPWcWOH7emkwW4pcHJ06WQ9tWRRdNG","mtxcL8oeW4/cNg9GrXJcLW","bY5jWQ3cPq","kmoaWRtcLYr0rq","W4JdSh9TW4JcQHNcMxZcP0ZcRuJcTW","W6q6fr3cVSkroa","aXS0BNi","WOlcTYG3WPpcMc3cUghcQe8","smkLWQldTXe8na","WPT7WQJdSftdVga","W5LBWR/cUJudjNK","W65SWPJdKCkgz8owWQ7dQmkS","kmktWRLawW/dIG","FgtcKmocW6FdKLhdTYadimkyW5f/","rbddLmk4vSoPrffH","W6Kmu8k7z8oOdCk0sq","nSkrxSoVW6PMdCocWRu8","W7eSW5xcNCozBatdPdBcMW","hSoMW6pcS0rMCeBdJ1yFWPLL","B8k1WRhdQq","tXhcKG0","tSo+yCkSWQKsm0qRWRy","W7jPWONcSmk5FCo1CW","WPenAvfiB8koW6q","i1qzeW7dIGeIWOdcKSoA","qI59WOtcR1hcPW","tCk/WR7dSsC7oKe","WP4nDvHeC8kBW686","ySo+W7pcUCkF","CuSM","qSoEW53cImkGW4xdTCkXW7HRkSkiW4hdOq","W5P0W73dJJO","WO3cTsq7WPldMdZcR2NcPhZcNW","WRVdKvVcNW","a8oxWO0yc8oPkSkaWOfx","dCoyW5RcTSoByq","mrHqWP3cSSkv","aCouWOOlbmojmmkaWP4","WOZcIcJcLc8","W6JdN8kCB8oFyxriWRrc","W49rWO/dSfJdUuXkWPzlmYeFW4bR","xarDWPVcOW","W4K+WRuGW7hdTdZcSq","nbvBWOBdUSkkW7ftW4ddTa","W6tcNColnSo4","W7BcNCo3emogEmoDW54","W6DPWO7cHSk5w8oGE8ku","E8k0WPtdRcW","W4yPj38","cG8OrW","z8kmhthcJxnPW7H7vrjqd18ldSon","n0SvnWhdRXKLWOZcGG","kmkdWQHA","W74Du8kLumoohSk9xW","W6NcTmoEfSom","W6nLWP/dKCkCrG","WReHeSksyW","WPNcGc/cIYddGmkcW6XzhmkqW7jeW5hdOG","W4RdL3xdKNBcG8ozW55Xl8ksW7P4","W71JWO/cISk3C8oVySkqWO/cGCoPW4dcJW92fCo3vN5cW652","mhC7FSoQlSoH","d2zgWONcSW","y1KPW7nP","emkerCkUWQmZwCkEW7C9W47dPSkdWQdcJ8kMW7RcGmkulCoeWOKMAG","lCoqWPVcQa8AjXm","wbddOCkzuSo9qG","bmkCWOhdNCo7WRlcPmkHW4LTdCk+W4i","iSouWP/cQIyC","AmodWQOrgG","WPJcLd7cKIldNmkz","W6VdJvXlW7ZcUIJcQLVcOMpcIa","W55eWOpdUftdIejnWPW","W7HTWO0","WQJdJLVcPmkxx8kViWVdV8oK","WRL2W7ddPSkrW6ldMW","ycBdGmkDySoD","WPWAsW","W4pdIvr5W68","e0TOWRtcKW","uNtcGSoAWQ7dGeddKw8onCkpW5T4cW","bSoTW4RcNCkOuSkwh8k3vqRdKam4","xSkJWRxdIbe/lW","CwGwW6fLW67cPCoUW7xdUGWZtG","rcL3WQRcOx/cQCkdt8kwW5j4mq","W60+eIRcIa"];return(_0x533a=function(){return e})()}import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x16832e,{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 _0x3624d9}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 _0x49a38f,Fragment as _0x421179,jsxs as _0x11e0bd}from"react/jsx-runtime";const TableauPileWrapper=_0x16832e.memo(e=>{const o=_0x409c,t={};t[o(478,"$YlN")]=function(e,o){return e!==o},t[o(438,")pKT")]=function(e,o){return e!==o},t[o(572,"NPA6")]=function(e,o){return e!==o};const W=t,r=_0x49ed70(16),{pile:d,tableauIndex:s,pileSpacing:a,selectedCards:x,onCardPress:n,onEmptyPress:_}=e;let i;r[0]!==n||W.Unckc(r[1],s)?(i=e=>{n(s,e)},r[0]=n,r[1]=s,r[2]=i):i=r[2];const m=i;let S;r[3]!==_||r[4]!==s?(S=()=>{_(s)},r[3]=_,r[4]=s,r[5]=S):S=r[5];const l=S,f=0===s?0:a;let k;if(W[o(478,"$YlN")](r[6],f))if("Mwjcd"===o(527,"[%Sh"))_0xedf930(o(576,"jJ0F"));else{const e={};e[o(464,")pKT")]=f,k=[styles[o(517,"^wZ(")],e],r[6]=f,r[7]=k}else k=r[7];const u=k;let C,P;if(r[8]!==m||W[o(547,"ijWx")](r[9],l)||W[o(432,"%Ls0")](r[10],d[o(509,"@PFp")])||r[11]!==x){const e={};e[o(480,"XMF4")]=d[o(609,"CdH9")],e[o(538,"$YlN")]=x,e[o(531,"thBn")]=m,e.pileType=o(458,"soP%"),e.emptyPlaceholder=!0,e.onEmptyPress=l,C=_0x49a38f(CardPile,e),r[8]=m,r[9]=l,r[10]=d.cards,r[11]=x,r[12]=C}else C=r[12];if(W.PdDiX(r[13],u)||W[o(588,"JJ3N")](r[14],C)){const e={};e[o(470,"M6aS")]=u,e[o(502,"jJ0F")]=C,P=_0x49a38f(View,e),r[13]=u,r[14]=C,r[15]=P}else P=r[15];return P});TableauPileWrapper[_0x4cf523(501,"Ji#C")]=_0x4cf523(513,"enCG");export const SpiderSolitaire=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:W,onShare:r,onShareScreenshot:d,onShowLeaderboard:s,bannerAd:a})=>{const x=_0x4cf523,n={YDPVS:function(e,o,t,W){return e(o,t,W)},toRRm:function(e){return e()},OtuLd:x(489,"X0K9"),kZIqr:function(e,o){return e===o},xMDwL:function(e,o){return e(o)},gJJPl:function(e,o){return e(o)},aTSwo:function(e,o,t){return e(o,t)},hmAEP:function(e,o,t){return e(o,t)},GMIoN:function(e,o,t){return e(o,t)}},_=n[x(585,"03Da")](useIsPlaying),i=useIsGameOver(),m=useIsWon(),S=useTableau(),l=useSelectedCards(),f=n[x(486,"(ret")](useTime),k=_0x16832e.useRef(!1),u=n[x(431,"gPnY")](useRef,t);u[x(473,"(ret")]=t;const C=_0x16832e[x(475,"rPXL")](e=>{const o=x;if(u.current&&!k[o(549,"JJ3N")]){const t=useSpiderSolitaireStore[o(537,"Dm)k")]()[o(561,"hCHH")],W=600,r="win"===e?n[o(499,"ijWx")](calculateTimeBasedScore,t,W,100):0;u.current({status:e,score:r[o(508,"soP%")]()}),k.current=!0}},[]),P=useSpiderSolitaireStore(e=>e.initializeGame),p=useSpiderSolitaireStore(e=>e[x(594,"soP%")]),R=useSpiderSolitaireStore(e=>e[x(442,"XMF4")]),G=useSpiderSolitaireStore(e=>e[x(587,"Psab")]),h=useSpiderSolitaireStore(e=>e[x(558,"J&BK")]),O=useSpiderSolitaireStore(e=>e[x(444,"M6aS")]),y=n[x(461,"Dm)k")](useSpiderSolitaireStore,e=>e[x(556,"soP%")]),N=useStock();useEffect(()=>{const e={ehpOd:function(e){return e()},yFGrY:function(e){return n[_0x409c(510,"JJ3N")](e)}};return P(),()=>{const o=_0x409c;useSpiderSolitaireStore.getState()[o(523,"(ret")]&&!k[o(549,"JJ3N")]&&C("cancel"),e[o(530,"JJ3N")](R),e[o(595,"03Da")](G)}},[P,R,G]),useEffect(()=>{const e=x;i&&!k[e(544,"f!Rz")]&&C(m?e(570,"$nb8"):"lose"),!i&&(k.current=!1)},[i,m,C]);const I=useRef(e);I[x(443,"2[PZ")]=e;const T=_0x16832e[x(468,"Kqws")](()=>{const e=x;k[e(610,"d*RN")]=!1,p();const o={};o[e(593,"OdOy")]=e(591,"XMF4"),o[e(504,"f!Rz")]=1.1,o.rate=1.2,playSound(GAME_SOUNDS[e(445,"XMF4")]?.[e(569,"msd1")]||o,I.current[e(469,"soP%")]),playHaptic(HapticType[e(616,"n^ga")],I[e(473,"(ret")][e(539,"jJ0F")])},[p]),J=_0x16832e[x(614,"@PFp")](()=>{C(x(577,"E)I0")),R()},[C,R]),g=_0x16832e[x(452,"OdOy")](()=>{const e=x;if(n[e(533,"JJ3N")]!==e(582,"M6aS"))W?.(),G(),P();else{const o={_0x2bdc82:602,_0x2d5475:"%Ls0"};_0x55d7bd=()=>{CsCCyT[e(o._0x2bdc82,o._0x2d5475)](_0x4666e0,_0x19b72f)},_0x96ad58[3]=_0x362d02,_0x50aba4[4]=_0x41a44a,_0x3fe254[5]=_0x4f156d}},[G,P,W]),L=_0x16832e[x(565,"xGP^")]((e,o)=>{const t=x;if(n[t(597,"mg@m")](t(543,"E)I0"),"uGHNj")){const e={};e.style=_0x3e4acb,e[t(551,"Ji#C")]=_0x27a2fd,_0x1afa26=_0x3ef52c(_0x17afbe,e),_0xf3c502[13]=_0x13a907,_0x21dfc0[14]=_0x1f001b,_0x427de8[15]=_0x5438ae}else{const W=useSpiderSolitaireStore[t(563,"Psab")]();if(!W[t(528,"7(mV")]||W[t(522,"97h#")])return;h(e,o,I.current)}},[h]),b=_0x16832e[x(526,"k2*T")](e=>{const o=x,t=useSpiderSolitaireStore.getState();t.isPlaying&&!t[o(580,"$YlN")]&&t.selectedSource&&t[o(436,"LBTh")][o(518,"OdOy")]>0&&O(e,I[o(512,"ltc^")])},[O]),K=_0x16832e[x(485,"J&BK")](()=>{const e=x,o=useSpiderSolitaireStore.getState();o[e(555,"n^ga")]&&!o[e(525,"%Ls0")]&&y(I[e(546,")pKT")])},[y]),q=_0x16832e[x(606,"n^ga")](()=>Math[x(590,"ijWx")](N[x(596,"2[PZ")]/10),[N[x(482,"97h#")]]),B=_0x16832e.useMemo(()=>({isPlaying:_,gameOver:i,onStartGame:T,onStopGame:J,onShare:r,onShowLeaderboard:s,startButtonSubtext:x(433,"(ret")}),[_,i,T,J,r,s]),H=_0x16832e[x(542,"1r!]")](()=>x(557,"L]ms"),[]),w=_0x16832e.useMemo(()=>({isVisible:i,score:f,onPlayAgain:g,buttonText:x(532,"03Da"),scoreLabel:m?"Completion Time":x(434,"enCG"),scoreFormatter:m?formatTime:H,title:m?x(536,"$nb8"):x(511,"Dm)k"),message:m?"All suits completed!":x(447,"@PFp")}),[i,f,g,m,H]),v=_0x16832e[x(453,"D0@$")](()=>({gameId:GAME_IDS[x(507,"Kqws")],settings:e,onSettingsChange:o}),[e,o]),M=e?.[x(472,"97h#")]??0,j=SPIDER_SOLITAIRE_GAME_CONFIG[x(611,"gPnY")],D={};D.paddingTop=130+M;const Q=_0x16832e[x(566,"M6aS")](()=>[styles[x(605,"D0@$")],D],[M]),A=_0x16832e.useMemo(()=>[styles[x(535,"X0K9")],!_&&styles.stockButtonDisabled],[_]),V=_0x16832e[x(435,"JJ3N")](()=>[styles.stockCard,0===q&&styles[x(571,"msd1")]],[q]),E={};E[x(441,"rPXL")]=M;const F={...B},U={...w};U[x(483,"L]ms")]=d,U[x(564,"^wZ(")]=a;const z={...v};return _0x49a38f(GestureHandlerRootView,{style:styles.gestureRoot,children:_0x11e0bd(_0x3624d9,{children:[_0x49a38f(ScoreBoard,E),n[x(603,"LBTh")](_0x49a38f,View,{style:Q,children:_0x49a38f(ScrollView,{horizontal:!0,showsHorizontalScrollIndicator:!1,contentContainerStyle:styles[x(600,"Psab")],style:styles.tableauScrollView,children:_0x49a38f(View,{style:styles[x(479,"gPnY")],children:S[x(613,"Psab")]((e,o)=>_0x49a38f(TableauPileWrapper,{pile:e,tableauIndex:o,pileSpacing:j,selectedCards:l,onCardPress:L,onEmptyPress:b},e.id))})})}),!i&&n[x(506,"03Da")](_0x49a38f,TouchableOpacity,{style:A,onPress:K,activeOpacity:_?.7:1,disabled:!_,children:_0x49a38f(View,{style:V,children:q>0?n.hmAEP(_0x11e0bd,_0x421179,{children:[_0x49a38f(Text,{style:styles[x(437,"M6aS")],children:q}),n.GMIoN(_0x49a38f,Text,{style:styles[x(545,"gPnY")],children:x(560,"JJ3N")})]}):_0x49a38f(Text,{style:styles.stockCardEmptyText,children:"\u2715"})})}),_0x49a38f(GameControlButton,F),_0x49a38f(GameOverModal,U),_0x49a38f(GameSettingsModal,z)]})})};SpiderSolitaire.displayName=_0x4cf523(466,"cG0T");const _0x152077={};_0x152077[_0x4cf523(574,"@PFp")]=1,_0x152077[_0x4cf523(581,"thBn")]=BACKGROUND_COLOR;const _0x5522db={};_0x5522db[_0x4cf523(589,"$%O*")]=1;const _0x49ad3f={};_0x49ad3f[_0x4cf523(460,"J&BK")]=1;const _0x3905d3={};_0x3905d3[_0x4cf523(496,"xGP^")]=8;const _0x5d4af6={};_0x5d4af6[_0x4cf523(465,"hCHH")]=1;const _0x124def={};_0x124def.flexDirection=_0x4cf523(430,"7(mV"),_0x124def[_0x4cf523(552,"2[PZ")]=_0x4cf523(584,"E)I0");const _0x541317={};function _0x409c(e,o){e-=430;const t=_0x533a();let W=t[e];if(void 0===_0x409c.iWWZsk){const e=function(e,o){let t,W,r=[],d=0,s="";for(e=function(e){let o="",t="";for(let t,W,r=0,d=0;W=e.charAt(d++);~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++)d=(d+r[W]+o.charCodeAt(W%o.length))%256,t=r[W],r[W]=r[d],r[d]=t;W=0,d=0;for(let o=0;o<e.length;o++)W=(W+1)%256,d=(d+r[W])%256,t=r[W],r[W]=r[d],r[d]=t,s+=String.fromCharCode(e.charCodeAt(o)^r[(r[W]+r[d])%256]);return s};_0x409c.dsnYzB=e,_0x409c.tRUUFB={},_0x409c.iWWZsk=!0}const r=t[0];_0x409c.omNlUR!==r&&(_0x409c.tRUUFB={},_0x409c.omNlUR=r);const d=_0x409c.tRUUFB[e];return void 0===d?(void 0===_0x409c.WBsplA&&(_0x409c.WBsplA=!0),W=_0x409c.dsnYzB(W,o),_0x409c.tRUUFB[e]=W):W=d,W}_0x541317[_0x4cf523(575,"97h#")]=_0x4cf523(484,"E)I0");const _0x58de85={};_0x58de85.position=_0x4cf523(471,"XMF4"),_0x58de85[_0x4cf523(454,"$nb8")]=120,_0x58de85[_0x4cf523(450,"LBTh")]=16,_0x58de85[_0x4cf523(494,"hCHH")]=100;const _0x489689={opacity:.5},_0x5ea1ae={width:0};_0x5ea1ae[_0x4cf523(608,"D0@$")]=2;const _0x271159={};_0x271159[_0x4cf523(579,"d*RN")]=.8*CARD_WIDTH,_0x271159[_0x4cf523(459,"k2*T")]=.8*CARD_HEIGHT,_0x271159.borderRadius=6,_0x271159[_0x4cf523(598,"d*RN")]=_0x4cf523(553,"CdH9"),_0x271159.borderWidth=2,_0x271159.borderColor=_0x4cf523(529,"J&BK"),_0x271159[_0x4cf523(592,"xGP^")]=_0x4cf523(451,"rPXL"),_0x271159[_0x4cf523(554,"(ret")]="center",_0x271159[_0x4cf523(534,"n^ga")]="#000",_0x271159[_0x4cf523(491,"E)I0")]=_0x5ea1ae,_0x271159[_0x4cf523(540,"@PFp")]=.4,_0x271159.shadowRadius=4,_0x271159[_0x4cf523(462,"rPXL")]=5;const _0x2a063d={};_0x2a063d[_0x4cf523(500,"@PFp")]=_0x4cf523(604,"L]ms"),_0x2a063d.borderColor=_0x4cf523(490,"ltc^"),_0x2a063d.borderStyle=_0x4cf523(477,"thBn");const _0x5587d6={};_0x5587d6[_0x4cf523(583,"yHCH")]=22,_0x5587d6.fontWeight=_0x4cf523(516,"8#rX"),_0x5587d6.color="#fff";const _0x3256e6={};_0x3256e6[_0x4cf523(586,"03Da")]=11,_0x3256e6[_0x4cf523(562,"ltc^")]=_0x4cf523(524,"NPA6"),_0x3256e6.color=_0x4cf523(541,"Dm)k"),_0x3256e6[_0x4cf523(568,"^wZ(")]=2;const _0x47a6a9={};_0x47a6a9[_0x4cf523(567,"JJ3N")]=20,_0x47a6a9[_0x4cf523(446,"Ji#C")]="rgba(255, 255, 255, 0.4)",_0x47a6a9[_0x4cf523(492,"enCG")]=_0x4cf523(476,"LBTh");const _0x49241e={};_0x49241e.gestureRoot=_0x152077,_0x49241e[_0x4cf523(578,"97h#")]=_0x5522db,_0x49241e.gameArea=_0x49ad3f,_0x49241e[_0x4cf523(505,"$YlN")]=_0x3905d3,_0x49241e[_0x4cf523(519,"03Da")]=_0x5d4af6,_0x49241e[_0x4cf523(481,"CdH9")]=_0x124def,_0x49241e[_0x4cf523(474,"f!Rz")]=_0x541317,_0x49241e[_0x4cf523(487,"1r!]")]=_0x58de85,_0x49241e[_0x4cf523(456,"yHCH")]=_0x489689,_0x49241e[_0x4cf523(612,"thBn")]=_0x271159,_0x49241e[_0x4cf523(455,"k2*T")]=_0x2a063d,_0x49241e[_0x4cf523(449,"Kqws")]=_0x5587d6,_0x49241e[_0x4cf523(498,"k2*T")]=_0x3256e6,_0x49241e.stockCardEmptyText=_0x47a6a9;const styles=StyleSheet[_0x4cf523(439,"8#rX")](_0x49241e);
|
|
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 _0x593606=_0x5e68;!function(){const e=_0x5e68,o=_0x2eaf();for(;;)try{if(383830==-parseInt(e(346,"hpE#"))/1+-parseInt(e(353,"1OlA"))/2+parseInt(e(342,"1OlA"))/3*(-parseInt(e(264,"Ycfi"))/4)+parseInt(e(295,"aI%K"))/5*(parseInt(e(347,"7LmL"))/6)+-parseInt(e(246,"rElR"))/7+parseInt(e(348,"8aO1"))/8+parseInt(e(266,"m&(F"))/9)break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x1cedcf from"react";import{StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x5e6a34}from"../../helpers/index.js";import{DEFAULT_GAME_SETTINGS,GAME_IDS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";function _0x2eaf(){const e=["WOxcIr/dVmke","sN3cNCk1W7pcVCov","WO3dLSklASoGoG","WRpcSmkIWOTF","WRLnfmoSoSo/tYldRa","W4Cnn0RcUcGAxSo/a3tdTSkqWOPFWOS","WO3cNmkqWPr7","CKyKW5dcHWO","W7JdNSo2uJuRjLNdMaNcQq","zMdcSHldVa","ctDrWQJdQ34we8oKguv9gG","W59hcxzRC3yj","WPhcTKu0hCodqCoeW5pcOCoOCq","lCoba2pcImolWRy","uhbchK7cIuNdKM7cSSk3","rZHFWPC/","wgyuW4RcPIzufa","pqVcMmkJW6FdQCo5WQDW","Bmk5WPaSWR3dOG0wyq","W7VdQxb+WQDsFG","W5hdGwrAWPm","WPy7dxRcKMTu","WRdcSaNdT8kL","d2dcP8kxW7ZcGmoHaq","qdrbWRya","W4FdTqD2sSkzxa","tmk9WQJcTvhcTKbXWRW","W7FdLdrhzmkOFmo5W7xcImo1","WQlcU8ocla","W5Txd1D6Fhy","W7SxbuZcP3WYv8o5gvNcVW","CL3dUeTpWRxdGq","wv7dL3quWOtdIW7cHJhcGq","wsHAWP0dBSkpWRpdJ8o/W7W","h8oaa0/cMCkgWQOttHfzqSo2xwK","rfFcLG/dVGtcTcJdQW","W4pcSsRdTSk9FmkUlG","lmomyCkszmorswL3","DSoDWPldTq","WQ3dTfPSWPLfzW","wginW7ZcMYm","xmoXWRxdTCobuKZcIq","WPbKBmkzyhBdRxWva8oF","W7VcNaqzW7ZcKa","h8oZk2VcSSoPWO8IFq","WQ3cULyMp8kjW47dIshdLs8","oCoujWCxfSoD","WR5BaSokl8ouqI3dQmklCG","oKBcGb98W5dcMH7cTq","WR3dUCkMWQmBWPuc","B8kvWPBcGglcMg96WO/dR8kr","aGTlestdSmkFn8ot","W5Tde0z6FG","B0T9nwC","iIPPibxdPmkT","W53cUIiiW5ZcPqq","WPOGlgdcLNDf","WPWPW6JdLmoifCkha1FdLSoBW4VdR8oc","c8oMj23cPSo5WO0OEdDG","kdJcImkQW7xdHIy","irPybtxdLmkkESocW53cVmkpA8kp","wmoHWRpdLmoqxuW","W4ldRbb8","WP7dVNOvAs84","WQVdV8kXWPqyWP0ty8os","WPlcTeq1fSoohSouW5dcOmomBqG","w8k2CCouFsSv","W4lcGxVcUrbdEXFdQ1HsWRldU8o3WQBcKCkXwmoeW5XwFgRcJW/cRSoOiCoRqmoYWPpcMmoNBupcSCoty8kJ","FCkPWPe7WQZdIXG","p8oxeN3cMCohWQ0c","WRn6WOrlW7SCqSol","eX5jcdFdHCkrl8oyW5BcImkfDCobmW","tCkWzSoLEsKnW6lcLX/cLq","W5dcUW3dKCk7Dmk0la","W7/cQ3KVlG5b","vmkVWPqAW5q","W5FdTbr2w8kWsCoBW4C","rmkQWOObW4u0ma","WPjVFSkpEwhdM0epaSopW5G","W6RcJ2SeiG","W6pcK27dNajkpGFdQW","eGPyetxdMCkk","W7NcLN3dUai","s8kGBmouFq","EmovW6TSkSoEtbm+eJpdPrS","WP5vxr3dVbu3ECoAj2m","dSk7tCoWFHyY","pmkrWROzF8kahtqS","mSoaC8kTya","WQHDfCo7k8owwG","WPhdOgBcNmo7lCkSidJdSCoAW4y","brxdHNNcOvtdOY3dKmoyq8kXFG","W5TvrmkVW5ZdKmojWRNcJmoIh8ofW7e","WRNdQCkGWOikWPOczq","omoDDmkZzmo3xge","WOJdUg01AsC","WOnOCSkir2hdPu8taSocW4xdUa","dCo1m8kwkNeiW7lcHXdcSum","fvRcNa","EqL5WQ0Rq8kYWP7dVq","WONdKSkrwSoXnYbD","sSkLFu3cHSkNDmoHW7hcJSkK","WOdcKtRdL8kuvCki","W4SwfL3cQtih","WRhcMmkEWOb6","WP5JbaVdVCkUWQn/yq0","l8osmdauhSomW7lcHW","WR1XWPLSW6yCwSohtSktWQb3WOpcOq","W5NcJv8VcJf+W6CwWQvo","f8oKetWNnq","WQmuhmo4WQG","baXpmtxdKq","smk5WP4aW4uU","pSoiW53dItZdIwbFWOddP8kAW6q","gt/cP8kuWQldImoB","W6pcK27dLafbna","WPGSWRyqmMP1dW","W5BdQCkhWRXn","vmk6WOWWW4e2kmoAua9oW4e","cCkIW7lcLmkdbahcGbxcISkAWPNcGq","W4/cOIarW5dcUbbt","auBcGmoAFJvF","vMhdLq","aXPzbItdSmkFn8ot","W5FdPqfdtSkAtCoHW43cOW","cXr1yCoXB8kV","thCpW6NcLsznfa","WRVcMmkRaxehnNNdTZVcR1ZdImoVcgNdGKyA","WQ3cNCk9eMamfG"];return(_0x2eaf=function(){return e})()}import{playHaptic,HapticType}from"../../services/HapticsService.js";import{useStackTowerStore,useScore,useIsPlaying,useGameOver,useGameWon}from"./StackTowerStore.js";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 _0xd0f68b,jsxs as _0x5a4eb1}from"react/jsx-runtime";const StackTowerComponent=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:r,onShare:a,onShareScreenshot:n,onShowLeaderboard:W,bannerAd:s})=>{const d="fcll",S="1OlA",m=_0x5e68,i={ovvaf:function(e,o,t){return e(o,t)},oPOFU:m(284,"cif4"),JHZhH:function(e,o){return e(o)},IDqEZ:function(e,o){return e<=o},qEXRr:function(e,o){return e!==o},nUkUF:function(e,o,t){return e(o,t)},fmWYu:function(e){return e()}},f=e?.[m(334,"7*gP")]??!0,x=e?.enableHaptics??!0,u=e?.[m(239,"vv0k")]??0,l=_0x1cedcf[m(351,"]iRi")](f);l[m(324,"^IYq")]=f;const k=_0x1cedcf.useRef(x);k[m(319,"]iRi")]=x;const _=_0x1cedcf[m(238,"8tx&")](t);_[m(345,d)]=t;const p=useScore(),G=i.fmWYu(useIsPlaying),C=useGameOver(),T=useGameWon(),R=_0x1cedcf[m(299,"Wm5Y")](!1),O=_0x1cedcf[m(238,"8tx&")](!0),h=_0x1cedcf[m(328,S)](e=>{const o=m;if(_[o(302,"4oPi")]&&!R.current){const t=useStackTowerStore[o(292,"hpE#")]()[o(339,"1OlA")];_[o(337,"8tx&")]({status:e,score:t[o(329,"hpE#")]()}),R[o(305,"lstk")]=!0}},[]),P=_0x1cedcf[m(242,"nYsi")](()=>new StackTowerService,[]),I=_0x1cedcf.useCallback(()=>{const e=m;playSound(GAME_SOUNDS.STACK_TOWER.PLACE,l[e(281,"Rous")]),playHaptic(HapticType[e(236,"4oPi")],k[e(305,"lstk")])},[]),b=_0x1cedcf[m(303,d)](()=>{const e=m;playSound(GAME_SOUNDS.STACK_TOWER.PERFECT,l[e(252,"Vx6C")]),playHaptic(HapticType[e(310,"8tx&")],k[e(230,"]9*0")])},[]),v=_0x1cedcf[m(228,"XelP")](()=>{const e=m;playSound(GAME_SOUNDS[e(314,"@!*v")][e(294,"rElR")],l[e(277,"SzNY")]),playHaptic(HapticType.ERROR,k[e(317,"rElR")])},[]),y=_0x1cedcf[m(328,S)](()=>{const e=m;i[e(338,"nYsi")](playSound,GAME_SOUNDS[e(288,"t4G3")][e(282,"8KYT")],l.current),playHaptic(HapticType.ERROR,k[e(324,"^IYq")])},[]);_0x1cedcf[m(343,"jS4f")](()=>{P[m(245,"vv0k")](I,b,v,y)},[P,I,b,v,y]),_0x1cedcf[m(320,"lstk")](()=>{const e=m;if("IvlgG"===e(237,"8aO1"))return useStackTowerStore[e(355,"xDA&")](e=>e.isPlaying,e=>{P.setPlaying(e)});{const o=_0x39af8b?e(354,"QsbB"):"lose";_0x45ed40(o)}},[P]),_0x1cedcf[m(291,"7LmL")](()=>{const e=m;if((C||T)&&!R[e(230,"]9*0")]){const o=T?e(249,"eIG8"):i[e(231,"L1W@")];h(o)}!C&&!T&&(R[e(281,"Rous")]=!1)},[C,T,h]),_0x1cedcf[m(233,"4oPi")](()=>{P[m(313,")5rW")]()},[P]),_0x1cedcf.useEffect(()=>{const e=m;return O[e(248,"QsbB")]=!0,()=>{const o=e;O[o(285,"h#H9")]=!1,useStackTowerStore[o(267,"h#H9")]().isPlaying&&!R[o(333,"vv0k")]&&h(o(258,"[6&r")),useStackTowerStore[o(243,"hJ%#")]()[o(253,"m&(F")](),P[o(275,"aI%K")](),useStackTowerStore[o(356,"[6&r")]()[o(250,"8tx&")]()}},[P,h]),_0x1cedcf[m(336,"nYsi")](()=>{if(!G)return;const e=setGameInterval(()=>{const o=_0x5e68,t={FqQhI:function(e,o){return i[_0x5e68(280,"xDA&")](e,o)}};if(!O[o(229,"7]^j")])return o(271,"xDA&")===o(265,"7LmL")?void t[o(335,"E4V[")](_0x2c27c1,_0x48f30d):void clearGameInterval(e);const r=useStackTowerStore[o(325,"@!*v")]()[o(352,"7*gP")];i[o(276,"aI%K")](r,0)?(useStackTowerStore[o(349,"lstk")]()[o(251,"Rous")](),playSound(GAME_SOUNDS.STACK_TOWER.GAME_OVER,l[o(248,"QsbB")]),playHaptic(HapticType[o(311,"Wm5Y")],k[o(281,"Rous")]),clearGameInterval(e)):useStackTowerStore[o(350,"$&8N")]()[o(254,"Ycfi")](-1)},1e3);return()=>clearGameInterval(e)},[G]);const A=_0x1cedcf[m(235,"E4V[")](()=>{const e=m;R.current=!1,useStackTowerStore[e(297,"rElR")]()[e(293,"$&8N")](STACK_TOWER_TIME_LIMIT),P.setPlaying(!0),P[e(332,"Rous")](),playSound(GAME_SOUNDS[e(289,"xDA&")][e(278,"7]^j")],l.current),playHaptic(HapticType[e(287,"eIG8")],k[e(315,"79uj")])},[P]),E=_0x1cedcf[m(270,"sIfP")](()=>{const e=m;if(i.qEXRr(e(344,"$&8N"),e(259,"L1W@"))){const o="2|0|1|4|3|5"[e(331,"vv0k")]("|");let t=0;for(;;){switch(o[t++]){case"0":_0x5ddd75[e(326,"zXfM")]()[e(307,"8tx&")](_0x2ef136);continue;case"1":_0x242c11[e(232,"79UK")](!0);continue;case"2":_0x4d4c4f.current=!1;continue;case"3":_0x39bdb8(_0x551a65[e(283,"Rous")][e(262,"L1W@")],_0x3eba18[e(255,"Ycfi")]);continue;case"4":_0x59a06a.startGame();continue;case"5":i[e(244,"ql2E")](_0xfd2bc0,_0x248ac9[e(330,"E4V[")],_0x5aca0f[e(277,"SzNY")]);continue}break}}else i[e(309,"sIfP")](h,e(308,"h#H9")),playSound(GAME_SOUNDS.STACK_TOWER[e(300,"@!*v")],l[e(241,"r8Ja")]),i.nUkUF(playHaptic,HapticType[e(263,"m&(F")],k[e(322,"1OlA")]),P[e(260,"fcll")](),useStackTowerStore.getState()[e(274,"^IYq")](),P.initializeBase()},[P,h]),N=_0x1cedcf.useCallback(()=>{const e=m;r?.(),R.current=!1,P.resetGame(),useStackTowerStore[e(272,"m&(F")]()[e(304,"qilI")](),P[e(234,"zXfM")]()},[P,r]),q=_0x1cedcf.useCallback(()=>{i[m(256,"7]^j")](N)},[N]),w={..._0x1cedcf.useMemo(()=>({isPlaying:G,gameOver:C,onStartGame:A,onStopGame:E,onShare:a,onShowLeaderboard:W,startButtonSubtext:m(323,"nYsi")}),[G,C,A,E,a,W])},L={..._0x1cedcf[m(269,"@!*v")](()=>({isVisible:C,score:p,onPlayAgain:q,buttonText:m(286,"]9*0"),title:T?m(247,"Wm5Y"):m(273,"r8Ja"),message:T?m(316,"8tx&"):m(290,"@!*v")}),[C,p,q,T])};L[m(312,"SzNY")]=n,L.bannerAd=s;const F={};return F[m(296,"m&(F")]=GAME_IDS[m(301,"AZ%h")],F[m(279,"3!$t")]=e||DEFAULT_GAME_SETTINGS,F[m(261,"]9*0")]=o,_0xd0f68b(GestureHandlerRootView,{style:styles.container,children:_0x5a4eb1(_0x5e6a34,{offset:u,children:[_0xd0f68b(GameArea,{gameService:P,offset:u}),_0xd0f68b(ScoreBoard,{offset:u}),_0xd0f68b(GameControlButton,w),_0xd0f68b(GameOverModal,L),_0xd0f68b(GameSettingsModal,F)]})})},_0x363248={flex:1};_0x363248[_0x593606(327,"8tx&")]=BACKGROUND_COLOR;const _0x463c5c={};_0x463c5c[_0x593606(318,"Rous")]=1;const _0x2fb9ef={};function _0x5e68(e,o){e-=228;const t=_0x2eaf();let r=t[e];if(void 0===_0x5e68.JDNLDq){const e=function(e,o){let t,r,a=[],n=0,W="";for(e=function(e){let o="",t="";for(let t,r,a=0,n=0;r=e.charAt(n++);~r&&(t=a%4?64*t+r:r,a++%4)?o+=String.fromCharCode(255&t>>(-2*a&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let e=0,r=o.length;e<r;e++)t+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(t)}(e),r=0;r<256;r++)a[r]=r;for(r=0;r<256;r++)n=(n+a[r]+o.charCodeAt(r%o.length))%256,t=a[r],a[r]=a[n],a[n]=t;r=0,n=0;for(let o=0;o<e.length;o++)r=(r+1)%256,n=(n+a[r])%256,t=a[r],a[r]=a[n],a[n]=t,W+=String.fromCharCode(e.charCodeAt(o)^a[(a[r]+a[n])%256]);return W};_0x5e68.NlDUyK=e,_0x5e68.IcbSht={},_0x5e68.JDNLDq=!0}const a=t[0];_0x5e68.jYNXQV!==a&&(_0x5e68.IcbSht={},_0x5e68.jYNXQV=a);const n=_0x5e68.IcbSht[e];return void 0===n?(void 0===_0x5e68.mXXdHv&&(_0x5e68.mXXdHv=!0),r=_0x5e68.NlDUyK(r,o),_0x5e68.IcbSht[e]=r):r=n,r}_0x2fb9ef.container=_0x363248,_0x2fb9ef[_0x593606(298,"7*gP")]=_0x463c5c;const styles=StyleSheet.create(_0x2fb9ef);export const StackTower=StackTowerComponent;StackTower[_0x593606(306,"8KYT")]="StackTower";
|
|
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";const _0x2d819f=_0x40d4;function _0x40d4(e,o){e-=434;const W=_0x5c81();let t=W[e];if(void 0===_0x40d4.LFqKAW){const e=function(e,o){let W,t,d=[],a=0,r="";for(e=function(e){let o="",W="";for(let W,t,d=0,a=0;t=e.charAt(a++);~t&&(W=d%4?64*W+t:t,d++%4)?o+=String.fromCharCode(255&W>>(-2*d&6)):0)t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(t);for(let e=0,t=o.length;e<t;e++)W+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(W)}(e),t=0;t<256;t++)d[t]=t;for(t=0;t<256;t++)a=(a+d[t]+o.charCodeAt(t%o.length))%256,W=d[t],d[t]=d[a],d[a]=W;t=0,a=0;for(let o=0;o<e.length;o++)t=(t+1)%256,a=(a+d[t])%256,W=d[t],d[t]=d[a],d[a]=W,r+=String.fromCharCode(e.charCodeAt(o)^d[(d[t]+d[a])%256]);return r};_0x40d4.YEKdCK=e,_0x40d4.qrDcgE={},_0x40d4.LFqKAW=!0}const d=W[0];_0x40d4.rlPCuF!==d&&(_0x40d4.qrDcgE={},_0x40d4.rlPCuF=d);const a=_0x40d4.qrDcgE[e];return void 0===a?(void 0===_0x40d4.joGvft&&(_0x40d4.joGvft=!0),t=_0x40d4.YEKdCK(t,o),_0x40d4.qrDcgE[e]=t):t=a,t}!function(){const e=_0x40d4,o=_0x5c81();for(;;)try{if(512666==-parseInt(e(434,"mOw@"))/1*(-parseInt(e(516,"jakj"))/2)+-parseInt(e(575,"jaMt"))/3+-parseInt(e(454,"[(NB"))/4*(-parseInt(e(465,"YffF"))/5)+parseInt(e(607,"81Bz"))/6+-parseInt(e(605,"9I]T"))/7*(-parseInt(e(506,"RzW4"))/8)+parseInt(e(455,"o&*o"))/9*(-parseInt(e(537,"jakj"))/10)+-parseInt(e(562,"AiY&"))/11)break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x17a3e4 from"react";import{StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x4a5273}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{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 _0x5a5e8c,jsxs as _0x3a2560}from"react/jsx-runtime";const SudokuComponent=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:W,onReplayGame:t,onShare:d,onShareScreenshot:a,onShowLeaderboard:r,bannerAd:n})=>{const S="67)R",u="RzW4",s="KL5o",k=_0x40d4,x={yNKgu:function(e,o,W){return e(o,W)},dDOeq:k(501,"RzW4"),PniWf:k(599,"RX0^"),ceCSC:function(e,o,W){return e(o,W)},KWVwm:function(e,o,W){return e(o,W)},GWgTv:k(492,"6NoO"),nlfyZ:function(e,o){return e||o},XmWAW:k(613,"jaMt"),BrQkI:function(e,o){return e===o},myfjZ:function(e){return e?.()},Nxdqj:function(e){return e()}},m=e?.[k(475,"F1[R")]??!0,_=e?.[k(439,"csa5")]??!0,f=e?.[k(553,"o&*o")]??0,i=_0x17a3e4[k(545,"$^Ys")](m);i[k(590,"bcq$")]=m;const R=_0x17a3e4.useRef(_);R.current=_;const l=_0x17a3e4[k(559,"Yeul")](W);l[k(442,S)]=W;const G=useIsPlaying(),p=useGameOver(),O=useGameWon(),C=_0x17a3e4[k(542,"yjos")](!1),N=_0x17a3e4[k(510,S)](null),Q=_0x17a3e4[k(524,"nd6d")](0),h=_0x17a3e4.useRef(!1),T=_0x17a3e4[k(474,"yjos")](e=>{const o=k,W={uaHKR:function(e,o,W){return e(o,W)},KAFkh:function(e,o,W){return x[_0x40d4(487,"$yG#")](e,o,W)}};if(o(591,"UThY")!==x[o(456,"ggqf")]){if(l[o(565,"OMQa")]&&!h[o(453,"R])]")]){const W=useSudokuStore[o(600,"a)Nk")]();l[o(447,"nd6d")]({status:e,score:W[o(443,"Yeul")][o(552,"jaMt")]()}),h[o(471,"t3@(")]=!0}}else W[o(544,"67)R")](_0x256d12,_0x28893d.SUDOKU[o(521,"6NoO")],_0x29e005[o(519,"jakj")]),W[o(508,"6NoO")](_0x21e389,_0x5916e5[o(467,"YgEu")],_0x11a187[o(558,"csa5")])},[]),y=_0x17a3e4[k(460,"#G*W")](()=>new SudokuService,[]),K=_0x17a3e4.useCallback(()=>{const e=k;if(x[e(579,"auFq")]!==e(499,"gkQ4"))x[e(611,"Yeul")](playSound,GAME_SOUNDS.SUDOKU[e(483,"ggqf")],i.current),x[e(457,"6LJK")](playHaptic,HapticType.LIGHT,R[e(453,"R])]")]);else{const o=_0x2a27f5[e(462,"RX0^")]();_0xc67691[e(564,"ggqf")]({status:_0x3574d4,score:o[e(588,"F1[R")].toString()}),_0x33ac58[e(504,"8z8a")]=!0}},[]),j=_0x17a3e4[k(615,"6NoO")](()=>{const e=k;playSound(GAME_SOUNDS.SUDOKU[e(529,"AiY&")],i[e(580,"[(NB")]),playHaptic(HapticType[e(581,"B@[v")],R[e(500,"$2f9")])},[]),I=_0x17a3e4.useCallback(()=>{const e=k;playSound(GAME_SOUNDS.SUDOKU[e(570,"AiY&")],i.current),playHaptic(HapticType.ERROR,R.current)},[]),v=_0x17a3e4[k(615,"6NoO")](()=>{const e=k;playSound(GAME_SOUNDS[e(557,"Q1^w")].WIN,i.current),playHaptic(HapticType[e(582,"6NoO")],R[e(556,"auFq")])},[]),b=_0x17a3e4[k(571,"67)R")](()=>{const e=k;x[e(463,s)](playSound,GAME_SOUNDS[e(481,"UThY")][e(509,"6LJK")],i.current),playHaptic(HapticType[e(452,"Yeul")],R[e(444,s)])},[]);_0x17a3e4.useEffect(()=>{const e=k,o={Lauoq:function(e,o,W){return x[_0x40d4(484,"UThY")](e,o,W)},areWA:function(e,o,W){return x[_0x40d4(573,"Q1^w")](e,o,W)}};e(541,"[(NB")!==x[e(595,"loO$")]?(_0x5bed26[e(519,"jakj")]&&_0x3cadb9(_0x18bbd[e(493,"RzW4")]),_0x2fc164[e(577,"Sxsj")]=_0xa9444f(()=>{const W=e;_0x4d4a8d[W(441,"DU)5")]()[W(538,"t3@(")]<=0?(_0x432292[W(612,"RzW4")]()[W(505,"2u@H")](),o[W(477,"67)R")](_0x203622,_0x24d469[W(598,"6LJK")][W(461,"6LJK")],_0x1762d0[W(561,"AiY&")]),o[W(568,"yjos")](_0x1441e9,_0x244a71.ERROR,_0x1e206f[W(614,"DU)5")]),_0x2e6017[W(472,"dQ8m")]&&_0x504701(_0x3b428c.current),_0xa437ab.current=null):_0x1fbfa7[W(602,"R])]")]()[W(609,"Yeul")](-1)},1e3)):y[e(550,"$2f9")](K,j,I,v,b)},[y,K,j,I,v,b]),_0x17a3e4[k(518,"yjos")](()=>{const e=k;if(x[e(464,"auFq")](p,O)&&!h[e(561,"AiY&")]){const o=O?x[e(489,"RX0^")]:e(470,"bcq$");T(o)}!p&&!O&&(h[e(563,"B@[v")]=!1)},[p,O,T]),_0x17a3e4.useEffect(()=>{y[k(476,"RzW4")]()},[y]),_0x17a3e4[k(473,"81Bz")](()=>()=>{const e=_0x40d4;useSudokuStore[e(446,"9#[j")]()[e(511,"67)R")]&&!h[e(438,"o&*o")]&&T(e(535,"csa5")),y[e(527,"T1OR")](),useSudokuStore[e(539,"UThY")]()[e(597,"SSk)")]()},[y,T]),_0x17a3e4[k(587,"jakj")](()=>{const e=k,o={rzcPR:e(513,"nd6d"),cYuGY:function(o,W){return x[e(522,"o&*o")](o,W)}};C[e(493,"RzW4")]=useSudokuStore.getState()[e(526,"SSk)")],Q[e(558,"csa5")]=useSudokuStore[e(445,"81Bz")]().score;const W=useSudokuStore.subscribe(o=>o[e(523,"9#[j")],W=>{const t=e,d={};d[t(497,"RzW4")]="xRLlT",d[t(496,"auFq")]=o[t(451,"gkQ4")];const a=d;C.current=W,W?(N.current&&clearGameInterval(N[t(504,"8z8a")]),N[t(444,"KL5o")]=setGameInterval(()=>{const e=t;if(useSudokuStore[e(567,"$yG#")]()[e(502,"RX0^")]<=0)if(e(578,"B@[v")===a.oucCc)_0xfca7eb?.(),_0x53367d[e(444,"KL5o")]=!1,_0x26b2fb.resetGame(),_0x1025ad[e(515,"jakj")]()[e(486,"loO$")](),_0x7b39d1[e(498,"Sxsj")]();else{const o=a[e(546,"9#[j")].split("|");let W=0;for(;;){switch(o[W++]){case"0":playHaptic(HapticType[e(466,"22hG")],R.current);continue;case"1":N[e(564,"ggqf")]=null;continue;case"2":useSudokuStore[e(548,"t3@(")]()[e(569,"bBpS")]();continue;case"3":N[e(528,"Q1^w")]&&clearGameInterval(N[e(519,"jakj")]);continue;case"4":playSound(GAME_SOUNDS.SUDOKU[e(606,"67)R")],i[e(583,"0!^%")]);continue}break}}else useSudokuStore[e(539,"UThY")]()[e(482,"UThY")](-1)},1e3)):(N[t(549,"a)Nk")]&&clearGameInterval(N.current),N[t(563,"B@[v")]=null)}),t=useSudokuStore.subscribe(e=>e.score,o=>{Q[e(547,"loO$")]=o});return()=>{const d=e;o.cYuGY(d(533,"A^t5"),d(551,"DU)5"))?(_0x36be42[d(548,"t3@(")]()[d(449,"YffF")](),_0x394923(_0x27f249[d(458,"67)R")][d(530,"Wo$2")],_0x13fca1[d(574,"6NoO")]),_0x736615(_0x4ccd7f[d(572,"SSk)")],_0x232c59[d(500,"$2f9")]),_0x54dad0[d(480,"9#[j")]&&_0x1005c2(_0x52c523[d(480,"9#[j")]),_0x12f5af[d(444,"KL5o")]=null):(W(),t(),N.current&&clearGameInterval(N[d(547,"loO$")]))}},[]);const g=_0x17a3e4[k(566,"dQ8m")](()=>{const e=k;e(560,"Sxsj")!==e(440,"RX0^")?(h[e(564,"ggqf")]=!1,useSudokuStore.getState()[e(450,"o&*o")](SUDOKU_TIME_LIMIT),y[e(485,"B@[v")](),playSound(GAME_SOUNDS[e(532,"T1OR")][e(525,"AiY&")],i[e(438,"o&*o")]),playHaptic(HapticType.SUCCESS,R.current)):(_0xc9637a[e(543,"6LJK")]=!1,_0x39ca88[e(507,"F1[R")]()[e(540,"9I]T")](_0x2ce40d),_0x54f07b[e(593,u)](),_0x3f436d(_0x3cf950[e(589,"t3@(")][e(517,"SSk)")],_0x54040f.current),_0x2f0cbe(_0x513f35.SUCCESS,_0x28ef2f[e(493,u)]))},[y]),q=_0x17a3e4.useCallback(()=>{const e=k;T("cancel"),playSound(GAME_SOUNDS[e(598,"6LJK")][e(512,"o&*o")],i.current),playHaptic(HapticType.MEDIUM,R.current),y[e(495,"0!^%")](),useSudokuStore[e(610,"loO$")]()[e(594,"gkQ4")](),y[e(531,"nd6d")]()},[y,T]),U=_0x17a3e4[k(488,"RzW4")](()=>{const e=k;x[e(514,"Wo$2")](t),h.current=!1,y[e(608,"RX0^")](),useSudokuStore[e(515,"jakj")]()[e(478,"$2f9")](),y[e(576,"A^t5")]()},[y,t]),P=_0x17a3e4.useCallback(()=>{x[k(586,"F1[R")](U)},[U]),J=_0x17a3e4[k(520,"bcq$")](()=>({isPlaying:G,gameOver:p,onStartGame:g,onStopGame:q,onShare:d,onShowLeaderboard:r,startButtonSubtext:"Fill every cell with numbers 1-9!"}),[G,p,g,q,d,r]),M=p?Q[k(459,"A^t5")]:0,A={...J},H={..._0x17a3e4[k(554,"Yeul")](()=>({isVisible:p,score:M,onPlayAgain:P,buttonText:"Solve Again!",title:O?"SOLVED!":k(469,"KL5o"),message:O?k(479,"bcq$"):k(435,"auFq")}),[p,M,P,O])};H[k(592,"81Bz")]=a,H[k(494,"[(NB")]=n;const F={};return F.gameId=GAME_IDS[k(448,"AiY&")],F[k(585,"YgEu")]=e||DEFAULT_GAME_SETTINGS,F.onSettingsChange=o,_0x5a5e8c(GestureHandlerRootView,{style:styles[k(604,"$^Ys")],children:_0x3a2560(_0x4a5273,{offset:f,children:[_0x5a5e8c(GameArea,{gameService:y,offset:f}),_0x5a5e8c(ScoreBoard,{offset:f}),_0x5a5e8c(GameControlButton,A),_0x5a5e8c(GameOverModal,H),_0x5a5e8c(GameSettingsModal,F)]})})},_0x3cfe4f={};_0x3cfe4f[_0x2d819f(436,"t3@(")]=1,_0x3cfe4f[_0x2d819f(468,"gkQ4")]=BACKGROUND_COLOR;const _0x2ee8ee={};_0x2ee8ee[_0x2d819f(534,"T1OR")]=1;const _0xe5384d={};function _0x5c81(){const e=["eg/cISoeWOpdVf7cTM4","WRFdVSo7uW3dJM3dLSkV","zYHZtCkM","bmktWOlcH8kiWQBdLSoG","uSogW4tdOSonW7pdSSonmCobWOng","wmkKW7zkoa","WQTYWQOfWReneSkouq","amkdWOtcPSkzWQNdLG","BsbTW5FcGmkRza","xqZcVNpcHbiYhmkY","fvZcLSoQWPu","W5CFW5b+hSkkW7VdL8o8","W7ddSCkQFvJdLa","aCoIbSo7vW","ySkdW6D0dtv8mve","W5ZcTKBcT8kRW53cIW","WQaYWQVcNSk0W5NdKG","f8oKfCoMuq","trbyySkJWQBcLCkCgG","W6ZdRmkMw1tdKZldG8oKcaTlo8oqWQtcIG","W6ZcJ2FcMCkoW70","ssFcUCotAW","W5NcTKBcRG","W5ben2HWWPm","WP7cJ8oGWR4YW4RdLt7cNbDEgG","vmogWQlcK8k2WRhdKSoh","jMn9zf3dJNr5y0bYWQWC","W4pdG2dcOSkdmshdPq","mJJdISkKW7BdSmopWRDo","uSkhqHZcTW","WQTYWQOsWRin","W5RdMSkaWOFdRI1N","WQe1W5ddImoI","E8oqrmoiWPJcKq","W6W7W7rhoa","WOeHqbNcQSkGW6e","nw9KuNVdIM19","nf/cT8k+ymoCcG","W5bWlwRcMdmNFqlcJ8kKWR4","WQhcHmkTWOVdOW","WOuAEIilemk9oa","oeJcOCoYWRNdHW","WRhdP8kBW5eRzSkr","WR1UWQe0WRycgCkivW","W5BcS8oVWR7cNmo4W6a","WPasWP3cO8kAW6i","W5bqk3LWWPhcKq","WRhdP8kBW44RBq","W59if1ddGW","mCodnCoBzSobdq","zmkcDmkFnCkCqaO2fmkyW7RdQq","W63dHujzmvDi","thOjWOVdRuy/","W47cNxWAz8oSfG","W4RcISojWPNdSSk+W6FcPSo5WOeL","W4FdJ2/dPIe2W7lcSq","WR9ZWQOxWPy","sN8pWQldRSoeWODHWRFdUCkL","fCo3cSoSxmoGlYSS","WQeNW73dGmorWP0mkSkFWQ1/","tSkIW6vxpG","WROjWPlcI8kK","EtJcGutcVJmq","W4bnhw5mtCoLdXvTuslcNa","AJhcHSojA8oIu3RdNwmkgHZdVmkPWRm","W4vonuFdSSk0WPe","W4ldT2HVnG","W6xcQmo0WPVcNW","DSkKAbJcTSo3bq","W4VdOMjKbG","srJcShxcNG43","WQNdHSo7W6NcHI0p","WO9uWRqQsSohWQtdQCoUFhWtvG","W6uDWRy2W6TFW41n","W6hdH8k2W7LP","fSkfWPpcKCkAWQhdH8oMeG","W5ZdNmk9W7PM","av9utKtdVG","EYz6W6JcGmkOFW","W5ldRhFcPCkE","WQT3mxddMwfW","aSo/WQBdVCk5DuaxW6u","o8oEdJOGW6tdRKyE","WQudvt/cUq","wsrXsmkxWPW","ECkvW4r9gaT0mLm","W6RdUSk2WRRdGby","ECkBhtldVq","me/cSCkFCCotcLK","W7NcHCkXW7JcGJy/WQeL","W5pdNSkYW5pdUmo9WOT3","W5rGav3dUCo9WQZcKr1TWQPKwG","BComt8oUWPZcNSoEj8kz","CN3cMSoJW5tdKmocWQ5hAa","WPmvW5xdHSoVWR42dCkS","W7aOvYdcJIaJW5BdU8o9kmoMdW","uCkWktVdVSoPh8olWOe","WRhdPmkAW706BSkQW6/cUmksW5PcBmkBaby7uCoe","WOuXrJJcU8kVW6hcKa","WR3dMSk1W7S7","fSoUWRpdNmk5u1uF","WOyCrW","WOxcHSkMWQ3dNmk8na","BZ7cLNxcUJeio8kbWPtdHq","WQdcGSouW5fpWQaQ","W6hcR8oWWQNdMCoKW7vUWRG1zSojWOW","ngz1Eq","FItcGeBcTZWDf8kbWPRdIW","nfVcTCoZWRNdNxW","W5zlogL5WPRcRqJcQuNcTdap","BSkVcdddMa","WOhcLSkGWOZdJCkZnmk3","WRCHW6RdSCovWP8u","WRFdT8krW64R","DmojWPCvW4i4ja","WQn8fKVdJhjHW5y","W5KjW7rbc8ksW6BdNa","W6BdT8k9xvJdNcO","aCoJa8oMsmo6","W55dWOtdRXJdT8oOW4ziW5DS","jfRcPSoZWQJdTgNcNLK","o8obhG8g","WOJdNCk5W5qA","W5FdJSk0W7ldQCoYWOS","jSoNiGNcSSoSnCkTeq","zHRdTCk5W67cGMZcO1ftW4FcIG","s0S0WPZdUq","W5RdISkXWQBdIa","WOCbW5ZdJmo7WQq","ycRcNCopz8oTsW","hmovWQa9b8oUWRa","W77dRSk/WRddLaXfW7VcRa","rmkWlG3dVSopcSod","BSoYWQ4aW5i","W5VcQSo7WRxcOW","WPWFW4tcKeNdRmoIW61WW7T3","WPffk2pdIq","W5mQWPanW5a","k8oAhJqZW5hdOf4vWRBcLSkDyJvj","umo9WQGIWOCzbSk6ua","DdX7W78","mx9IC2RdHw0","W5ZcJmoEWQJdTSk8W78","WRfQb13dNNvWW5ddMG","WQTYWQOdWRyhg8kprc4Q","W4RdKCkZW6PVWPVdLHNcVJr2pW","gmoLWQ7dU8kKu00tW7RdSCo0WRdcRCk9WRTS","WPG1W63dRmob","W5fWkKZcJrGQCGy","sczYW6dcICkJk8ozW6zYnKFdTahdMY3dGa","W50zW7jGgSkDW6y","W7FdS1dcVSk8bq","W5hdLNdcKmkdnqhdQCkQW6JdUbVcRJavvYFcHsG","F0m6WRRdJq","W6/dSulcHSkA","W73dHffzih5DW5pcHa","WPaXqq7cU8kjW7tcMda","W5NdPfddKIa","bmo4WQldJmkSxK0yW6hdT8op","E8k4dr/dNq","WR1ZWQOHWQmo","WQddJSkGWP4AW4qiW5DrWPldMGC","xrVcQ0dcVW","eSo+WRxdVCkOxfu","D8kWDatcTSoRmmk4","WRJdLSo6W77cLWqAWR0e","W6FcKCoPWPNcVG","hSo+WQtdJmkU","W49vlKhdVSk7WOK1WQRcKSkhi8o1ySo5WRy","c8oJlGKx","W4bGk1VcNde/","n8obWQ3dGCkM","v8k8nZVdMmole8ohWO3dSJFdII0","jINdMmkIW7FdHColWOHeqYi","wgzdW4/cUxXw","W47dRZBcQSk2gCk8FmoKWPTW","qmk5W77cT8o5vwGpW5NdNmoH","W4JdMSkMW5T3WP/dSrm","uqZcTv3cSW","W7FdOmkMWRa","WQeNW73dKCovWPC","WR0NW4JdR8orWOGjjSkz"];return(_0x5c81=function(){return e})()}_0xe5384d[_0x2d819f(555,"yjos")]=_0x3cfe4f,_0xe5384d[_0x2d819f(503,"9I]T")]=_0x2ee8ee;const styles=StyleSheet[_0x2d819f(490,"yjos")](_0xe5384d);export const Sudoku=SudokuComponent;Sudoku[_0x2d819f(437,"6NoO")]=_0x2d819f(596,"Wo$2");
|
|
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])}
|