react-native-games 0.7.0 → 0.8.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 +148 -23
- package/lib/module/games/balloon-blaster/BalloonBlaster.js +5 -8
- package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -1
- package/lib/module/games/candy-crush/CandyCrush.js +121 -0
- package/lib/module/games/candy-crush/CandyCrush.js.map +1 -0
- package/lib/module/games/candy-crush/CandyCrushConstants.js +125 -0
- package/lib/module/games/candy-crush/CandyCrushConstants.js.map +1 -0
- package/lib/module/games/candy-crush/CandyCrushService.js +370 -0
- package/lib/module/games/candy-crush/CandyCrushService.js.map +1 -0
- package/lib/module/games/candy-crush/CandyCrushStore.js +305 -0
- package/lib/module/games/candy-crush/CandyCrushStore.js.map +1 -0
- package/lib/module/games/candy-crush/components/CandyItem.js +191 -0
- package/lib/module/games/candy-crush/components/CandyItem.js.map +1 -0
- package/lib/module/games/candy-crush/components/GameBackground.js +85 -0
- package/lib/module/games/candy-crush/components/GameBackground.js.map +1 -0
- package/lib/module/games/candy-crush/components/GameGrid.js +314 -0
- package/lib/module/games/candy-crush/components/GameGrid.js.map +1 -0
- package/lib/module/games/candy-crush/components/ScoreBoard.js +112 -0
- package/lib/module/games/candy-crush/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/candy-crush/components/index.js +7 -0
- package/lib/module/games/candy-crush/components/index.js.map +1 -0
- package/lib/module/games/candy-crush/index.js +6 -0
- package/lib/module/games/candy-crush/index.js.map +1 -0
- package/lib/module/games/color-sort/ColorSort.js +130 -0
- package/lib/module/games/color-sort/ColorSort.js.map +1 -0
- package/lib/module/games/color-sort/ColorSortConstants.js +68 -0
- package/lib/module/games/color-sort/ColorSortConstants.js.map +1 -0
- package/lib/module/games/color-sort/ColorSortService.js +255 -0
- package/lib/module/games/color-sort/ColorSortService.js.map +1 -0
- package/lib/module/games/color-sort/ColorSortStore.js +258 -0
- package/lib/module/games/color-sort/ColorSortStore.js.map +1 -0
- package/lib/module/games/color-sort/components/ColorContainer.js +140 -0
- package/lib/module/games/color-sort/components/ColorContainer.js.map +1 -0
- package/lib/module/games/color-sort/components/GameBackground.js +135 -0
- package/lib/module/games/color-sort/components/GameBackground.js.map +1 -0
- package/lib/module/games/color-sort/components/ScoreBoard.js +78 -0
- package/lib/module/games/color-sort/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/color-sort/components/index.js +6 -0
- package/lib/module/games/color-sort/components/index.js.map +1 -0
- package/lib/module/games/dino-jump/DinoJump.js +209 -0
- package/lib/module/games/dino-jump/DinoJump.js.map +1 -0
- package/lib/module/games/dino-jump/DinoJumpConstants.js +179 -0
- package/lib/module/games/dino-jump/DinoJumpConstants.js.map +1 -0
- package/lib/module/games/dino-jump/DinoJumpService.js +268 -0
- package/lib/module/games/dino-jump/DinoJumpService.js.map +1 -0
- package/lib/module/games/dino-jump/DinoJumpStore.js +387 -0
- package/lib/module/games/dino-jump/DinoJumpStore.js.map +1 -0
- package/lib/module/games/dino-jump/components/DinoSprite.js +409 -0
- package/lib/module/games/dino-jump/components/DinoSprite.js.map +1 -0
- package/lib/module/games/dino-jump/components/GameArea.js +68 -0
- package/lib/module/games/dino-jump/components/GameArea.js.map +1 -0
- package/lib/module/games/dino-jump/components/GameBackground.js +421 -0
- package/lib/module/games/dino-jump/components/GameBackground.js.map +1 -0
- package/lib/module/games/dino-jump/components/ObstacleSprite.js +306 -0
- package/lib/module/games/dino-jump/components/ObstacleSprite.js.map +1 -0
- package/lib/module/games/dino-jump/components/ScoreBoard.js +107 -0
- package/lib/module/games/dino-jump/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/dino-jump/components/StarSprite.js +45 -0
- package/lib/module/games/dino-jump/components/StarSprite.js.map +1 -0
- package/lib/module/games/dino-jump/components/index.js +9 -0
- package/lib/module/games/dino-jump/components/index.js.map +1 -0
- package/lib/module/games/flappy-bird/FlappyBird.js +131 -0
- package/lib/module/games/flappy-bird/FlappyBird.js.map +1 -0
- package/lib/module/games/flappy-bird/FlappyBirdConstants.js +90 -0
- package/lib/module/games/flappy-bird/FlappyBirdConstants.js.map +1 -0
- package/lib/module/games/flappy-bird/FlappyBirdStore.js +276 -0
- package/lib/module/games/flappy-bird/FlappyBirdStore.js.map +1 -0
- package/lib/module/games/flappy-bird/components/Bird.js +87 -0
- package/lib/module/games/flappy-bird/components/Bird.js.map +1 -0
- package/lib/module/games/flappy-bird/components/GameArea.js +86 -0
- package/lib/module/games/flappy-bird/components/GameArea.js.map +1 -0
- package/lib/module/games/flappy-bird/components/GameBackground.js +112 -0
- package/lib/module/games/flappy-bird/components/GameBackground.js.map +1 -0
- package/lib/module/games/flappy-bird/components/Pipes.js +175 -0
- package/lib/module/games/flappy-bird/components/Pipes.js.map +1 -0
- package/lib/module/games/flappy-bird/components/ScoreBoard.js +72 -0
- package/lib/module/games/flappy-bird/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/flappy-bird/components/index.js +8 -0
- package/lib/module/games/flappy-bird/components/index.js.map +1 -0
- package/lib/module/games/fruit-merger/FruitMerger.js +112 -0
- package/lib/module/games/fruit-merger/FruitMerger.js.map +1 -0
- package/lib/module/games/fruit-merger/FruitMergerConstants.js +119 -0
- package/lib/module/games/fruit-merger/FruitMergerConstants.js.map +1 -0
- package/lib/module/games/fruit-merger/FruitMergerService.js +13 -0
- package/lib/module/games/fruit-merger/FruitMergerService.js.map +1 -0
- package/lib/module/games/fruit-merger/FruitMergerStore.js +318 -0
- package/lib/module/games/fruit-merger/FruitMergerStore.js.map +1 -0
- package/lib/module/games/fruit-merger/components/FruitItem.js +102 -0
- package/lib/module/games/fruit-merger/components/FruitItem.js.map +1 -0
- package/lib/module/games/fruit-merger/components/GameArea.js +123 -0
- package/lib/module/games/fruit-merger/components/GameArea.js.map +1 -0
- package/lib/module/games/fruit-merger/components/GameBackground.js +477 -0
- package/lib/module/games/fruit-merger/components/GameBackground.js.map +1 -0
- package/lib/module/games/fruit-merger/components/ScoreBoard.js +66 -0
- package/lib/module/games/fruit-merger/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/fruit-merger/components/index.js +7 -0
- package/lib/module/games/fruit-merger/components/index.js.map +1 -0
- package/lib/module/games/fruit-ninja/FruitNinja.js +6 -9
- package/lib/module/games/fruit-ninja/FruitNinja.js.map +1 -1
- package/lib/module/games/game-2048/Game2048.js +120 -0
- package/lib/module/games/game-2048/Game2048.js.map +1 -0
- package/lib/module/games/game-2048/Game2048Constants.js +263 -0
- package/lib/module/games/game-2048/Game2048Constants.js.map +1 -0
- package/lib/module/games/game-2048/Game2048Service.js +457 -0
- package/lib/module/games/game-2048/Game2048Service.js.map +1 -0
- package/lib/module/games/game-2048/Game2048Store.js +238 -0
- package/lib/module/games/game-2048/Game2048Store.js.map +1 -0
- package/lib/module/games/game-2048/components/GameBackground.js +247 -0
- package/lib/module/games/game-2048/components/GameBackground.js.map +1 -0
- package/lib/module/games/game-2048/components/GameGrid.js +139 -0
- package/lib/module/games/game-2048/components/GameGrid.js.map +1 -0
- package/lib/module/games/game-2048/components/GameTile.js +72 -0
- package/lib/module/games/game-2048/components/GameTile.js.map +1 -0
- package/lib/module/games/game-2048/components/ScoreBoard.js +70 -0
- package/lib/module/games/game-2048/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/game-2048/components/index.js +7 -0
- package/lib/module/games/game-2048/components/index.js.map +1 -0
- package/lib/module/games/maze-runner/MazeRunner.js +33 -31
- package/lib/module/games/maze-runner/MazeRunner.js.map +1 -1
- package/lib/module/games/popit-fidget/PopitFidget.js +34 -32
- package/lib/module/games/popit-fidget/PopitFidget.js.map +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbers.js +161 -0
- package/lib/module/games/sliding-numbers/SlidingNumbers.js.map +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +207 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js.map +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersService.js +248 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersService.js.map +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +275 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersStore.js.map +1 -0
- package/lib/module/games/sliding-numbers/components/GameBackground.js +259 -0
- package/lib/module/games/sliding-numbers/components/GameBackground.js.map +1 -0
- package/lib/module/games/sliding-numbers/components/NumbersGrid.js +174 -0
- package/lib/module/games/sliding-numbers/components/NumbersGrid.js.map +1 -0
- package/lib/module/games/sliding-numbers/components/NumbersTile.js +116 -0
- package/lib/module/games/sliding-numbers/components/NumbersTile.js.map +1 -0
- package/lib/module/games/sliding-numbers/components/ScoreBoard.js +66 -0
- package/lib/module/games/sliding-numbers/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/sliding-numbers/components/index.js +7 -0
- package/lib/module/games/sliding-numbers/components/index.js.map +1 -0
- package/lib/module/games/snake/Snake.js +192 -0
- package/lib/module/games/snake/Snake.js.map +1 -0
- package/lib/module/games/snake/SnakeConstants.js +138 -0
- package/lib/module/games/snake/SnakeConstants.js.map +1 -0
- package/lib/module/games/snake/SnakeService.js +148 -0
- package/lib/module/games/snake/SnakeService.js.map +1 -0
- package/lib/module/games/snake/SnakeStore.js +184 -0
- package/lib/module/games/snake/SnakeStore.js.map +1 -0
- package/lib/module/games/snake/components/GameBackground.js +221 -0
- package/lib/module/games/snake/components/GameBackground.js.map +1 -0
- package/lib/module/games/snake/components/GameGrid.js +153 -0
- package/lib/module/games/snake/components/GameGrid.js.map +1 -0
- package/lib/module/games/snake/components/ScoreBoard.js +57 -0
- package/lib/module/games/snake/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/snake/components/index.js +6 -0
- package/lib/module/games/snake/components/index.js.map +1 -0
- package/lib/module/games/snake/index.js +6 -0
- package/lib/module/games/snake/index.js.map +1 -0
- package/lib/module/games/space-fighter/SpaceFighter.js +7 -10
- package/lib/module/games/space-fighter/SpaceFighter.js.map +1 -1
- package/lib/module/games/whack-a-mole/WhackAMole.js +6 -6
- package/lib/module/games/whack-a-mole/WhackAMole.js.map +1 -1
- package/lib/module/index.js +8 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/services/GamesConstants.js +58 -2
- package/lib/module/services/GamesConstants.js.map +1 -1
- package/lib/module/services/GamesService.js +40 -0
- package/lib/module/services/GamesService.js.map +1 -1
- package/lib/module/services/SoundsService.js +132 -1
- package/lib/module/services/SoundsService.js.map +1 -1
- package/lib/module/shared/helpers/GameOverModal.js +6 -3
- package/lib/module/shared/helpers/GameOverModal.js.map +1 -1
- package/lib/module/shared/helpers/GameSettingsModal.js +3 -3
- package/lib/module/shared/helpers/GameSettingsModal.js.map +1 -1
- package/lib/module/shared/helpers/ParticleBlast.js +3 -2
- package/lib/module/shared/helpers/ParticleBlast.js.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -1
- package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts +4 -0
- package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts.map +1 -0
- package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +104 -0
- package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts +40 -0
- package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts.map +1 -0
- package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts +48 -0
- package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts.map +1 -0
- package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts +13 -0
- package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts.map +1 -0
- package/lib/typescript/src/games/candy-crush/components/GameBackground.d.ts +5 -0
- package/lib/typescript/src/games/candy-crush/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts +3 -0
- package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts.map +1 -0
- package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts +3 -0
- package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/candy-crush/components/index.d.ts +5 -0
- package/lib/typescript/src/games/candy-crush/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/candy-crush/index.d.ts +4 -0
- package/lib/typescript/src/games/candy-crush/index.d.ts.map +1 -0
- package/lib/typescript/src/games/color-sort/ColorSort.d.ts +4 -0
- package/lib/typescript/src/games/color-sort/ColorSort.d.ts.map +1 -0
- package/lib/typescript/src/games/color-sort/ColorSortConstants.d.ts +52 -0
- package/lib/typescript/src/games/color-sort/ColorSortConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/color-sort/ColorSortService.d.ts +66 -0
- package/lib/typescript/src/games/color-sort/ColorSortService.d.ts.map +1 -0
- package/lib/typescript/src/games/color-sort/ColorSortStore.d.ts +48 -0
- package/lib/typescript/src/games/color-sort/ColorSortStore.d.ts.map +1 -0
- package/lib/typescript/src/games/color-sort/components/ColorContainer.d.ts +11 -0
- package/lib/typescript/src/games/color-sort/components/ColorContainer.d.ts.map +1 -0
- package/lib/typescript/src/games/color-sort/components/GameBackground.d.ts +7 -0
- package/lib/typescript/src/games/color-sort/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/color-sort/components/ScoreBoard.d.ts +3 -0
- package/lib/typescript/src/games/color-sort/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/color-sort/components/index.d.ts +4 -0
- package/lib/typescript/src/games/color-sort/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/dino-jump/DinoJump.d.ts +4 -0
- package/lib/typescript/src/games/dino-jump/DinoJump.d.ts.map +1 -0
- package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts +95 -0
- package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts +40 -0
- package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts.map +1 -0
- package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts +103 -0
- package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts.map +1 -0
- package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts +3 -0
- package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts.map +1 -0
- package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts +8 -0
- package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts.map +1 -0
- package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts +7 -0
- package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts +3 -0
- package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts.map +1 -0
- package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts +3 -0
- package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts +3 -0
- package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts.map +1 -0
- package/lib/typescript/src/games/dino-jump/components/index.d.ts +7 -0
- package/lib/typescript/src/games/dino-jump/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts +4 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts.map +1 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts +83 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts +53 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts.map +1 -0
- package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts +8 -0
- package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts.map +1 -0
- package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts +8 -0
- package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts.map +1 -0
- package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts +7 -0
- package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts +8 -0
- package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts.map +1 -0
- package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts +3 -0
- package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/flappy-bird/components/index.d.ts +6 -0
- package/lib/typescript/src/games/flappy-bird/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts +4 -0
- package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts +115 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts +5 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts +43 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts +10 -0
- package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts +8 -0
- package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-merger/components/GameBackground.d.ts +7 -0
- package/lib/typescript/src/games/fruit-merger/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts +3 -0
- package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-merger/components/index.d.ts +5 -0
- package/lib/typescript/src/games/fruit-merger/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts.map +1 -1
- package/lib/typescript/src/games/game-2048/Game2048.d.ts +4 -0
- package/lib/typescript/src/games/game-2048/Game2048.d.ts.map +1 -0
- package/lib/typescript/src/games/game-2048/Game2048Constants.d.ts +163 -0
- package/lib/typescript/src/games/game-2048/Game2048Constants.d.ts.map +1 -0
- package/lib/typescript/src/games/game-2048/Game2048Service.d.ts +113 -0
- package/lib/typescript/src/games/game-2048/Game2048Service.d.ts.map +1 -0
- package/lib/typescript/src/games/game-2048/Game2048Store.d.ts +48 -0
- package/lib/typescript/src/games/game-2048/Game2048Store.d.ts.map +1 -0
- package/lib/typescript/src/games/game-2048/components/GameBackground.d.ts +7 -0
- package/lib/typescript/src/games/game-2048/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts +7 -0
- package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts.map +1 -0
- package/lib/typescript/src/games/game-2048/components/GameTile.d.ts +13 -0
- package/lib/typescript/src/games/game-2048/components/GameTile.d.ts.map +1 -0
- package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts +3 -0
- package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/game-2048/components/index.d.ts +5 -0
- package/lib/typescript/src/games/game-2048/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -1
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts.map +1 -1
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts +4 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts.map +1 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersConstants.d.ts +108 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts +34 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts.map +1 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts +56 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts.map +1 -0
- package/lib/typescript/src/games/sliding-numbers/components/GameBackground.d.ts +7 -0
- package/lib/typescript/src/games/sliding-numbers/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts +7 -0
- package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts.map +1 -0
- package/lib/typescript/src/games/sliding-numbers/components/NumbersTile.d.ts +11 -0
- package/lib/typescript/src/games/sliding-numbers/components/NumbersTile.d.ts.map +1 -0
- package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts +3 -0
- package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/sliding-numbers/components/index.d.ts +5 -0
- package/lib/typescript/src/games/sliding-numbers/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/snake/Snake.d.ts +4 -0
- package/lib/typescript/src/games/snake/Snake.d.ts.map +1 -0
- package/lib/typescript/src/games/snake/SnakeConstants.d.ts +93 -0
- package/lib/typescript/src/games/snake/SnakeConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/snake/SnakeService.d.ts +30 -0
- package/lib/typescript/src/games/snake/SnakeService.d.ts.map +1 -0
- package/lib/typescript/src/games/snake/SnakeStore.d.ts +43 -0
- package/lib/typescript/src/games/snake/SnakeStore.d.ts.map +1 -0
- package/lib/typescript/src/games/snake/components/GameBackground.d.ts +5 -0
- package/lib/typescript/src/games/snake/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/snake/components/GameGrid.d.ts +3 -0
- package/lib/typescript/src/games/snake/components/GameGrid.d.ts.map +1 -0
- package/lib/typescript/src/games/snake/components/ScoreBoard.d.ts +3 -0
- package/lib/typescript/src/games/snake/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/snake/components/index.d.ts +4 -0
- package/lib/typescript/src/games/snake/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/snake/index.d.ts +4 -0
- package/lib/typescript/src/games/snake/index.d.ts.map +1 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts.map +1 -1
- package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +8 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/services/GamesConstants.d.ts +156 -0
- package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -1
- package/lib/typescript/src/services/GamesService.d.ts +10 -2
- package/lib/typescript/src/services/GamesService.d.ts.map +1 -1
- package/lib/typescript/src/services/SoundsService.d.ts +103 -0
- package/lib/typescript/src/services/SoundsService.d.ts.map +1 -1
- package/lib/typescript/src/shared/helpers/GameOverModal.d.ts +2 -0
- package/lib/typescript/src/shared/helpers/GameOverModal.d.ts.map +1 -1
- package/lib/typescript/src/shared/helpers/ParticleBlast.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Animated } from 'react-native';
|
|
4
|
+
import { GAME_2048_SETTINGS, GAME_2048_GESTURES, GAME_CONFIG } from "./Game2048Constants.js";
|
|
5
|
+
|
|
6
|
+
// Types
|
|
7
|
+
|
|
8
|
+
export class Game2048Service {
|
|
9
|
+
// Get difficulty settings
|
|
10
|
+
getDifficultySettings(difficulty) {
|
|
11
|
+
return GAME_2048_SETTINGS.DIFFICULTY_SETTINGS[difficulty];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Calculate score based on tile value and difficulty
|
|
15
|
+
calculateMergeScore(tileValue, difficulty) {
|
|
16
|
+
const multiplier = GAME_2048_SETTINGS.SCORE_MULTIPLIER[difficulty];
|
|
17
|
+
return tileValue * multiplier;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Format time for display
|
|
21
|
+
formatTime(seconds) {
|
|
22
|
+
const minutes = Math.floor(seconds / 60);
|
|
23
|
+
const remainingSeconds = seconds % 60;
|
|
24
|
+
return `${minutes.toString().padStart(2, '0')}:${remainingSeconds.toString().padStart(2, '0')}`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Detect swipe direction from gesture data
|
|
28
|
+
detectSwipeDirection(startX, startY, endX, endY, velocity) {
|
|
29
|
+
const deltaX = endX - startX;
|
|
30
|
+
const deltaY = endY - startY;
|
|
31
|
+
const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
|
|
32
|
+
|
|
33
|
+
// Check minimum distance
|
|
34
|
+
if (distance < GAME_2048_GESTURES.MIN_SWIPE_DISTANCE) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Check velocity if provided
|
|
39
|
+
if (velocity) {
|
|
40
|
+
const velocityMagnitude = Math.sqrt(velocity.x * velocity.x + velocity.y * velocity.y);
|
|
41
|
+
if (velocityMagnitude < GAME_2048_GESTURES.MIN_VELOCITY) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Determine primary direction
|
|
47
|
+
const absDeltaX = Math.abs(deltaX);
|
|
48
|
+
const absDeltaY = Math.abs(deltaY);
|
|
49
|
+
if (absDeltaX > absDeltaY) {
|
|
50
|
+
// Horizontal swipe
|
|
51
|
+
return deltaX > 0 ? 'right' : 'left';
|
|
52
|
+
} else {
|
|
53
|
+
// Vertical swipe
|
|
54
|
+
return deltaY > 0 ? 'down' : 'up';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Calculate tile position for animations
|
|
59
|
+
calculateTilePosition(row, col, gridSize, containerSize) {
|
|
60
|
+
const tileSize = GAME_2048_SETTINGS.TILE_SIZE;
|
|
61
|
+
const margin = GAME_2048_SETTINGS.TILE_MARGIN;
|
|
62
|
+
|
|
63
|
+
// Calculate total grid size
|
|
64
|
+
const totalGridSize = tileSize * gridSize + margin * (gridSize + 1);
|
|
65
|
+
|
|
66
|
+
// Calculate starting position to center the grid
|
|
67
|
+
const startX = (containerSize - totalGridSize) / 2;
|
|
68
|
+
const startY = (containerSize - totalGridSize) / 2;
|
|
69
|
+
const x = startX + margin + col * (tileSize + margin);
|
|
70
|
+
const y = startY + margin + row * (tileSize + margin);
|
|
71
|
+
return {
|
|
72
|
+
x,
|
|
73
|
+
y
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Generate haptic feedback patterns
|
|
78
|
+
generateHapticFeedback(type) {
|
|
79
|
+
// This would integrate with react-native-haptic-feedback
|
|
80
|
+
const patterns = {
|
|
81
|
+
move: 'impactLight',
|
|
82
|
+
merge: 'impactMedium',
|
|
83
|
+
win: 'notificationSuccess',
|
|
84
|
+
gameOver: 'notificationError'
|
|
85
|
+
};
|
|
86
|
+
return patterns[type];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Generate sound effects
|
|
90
|
+
generateSoundEffect(type) {
|
|
91
|
+
// This would integrate with react-native-sound
|
|
92
|
+
const sounds = {
|
|
93
|
+
move: 'tile_move.mp3',
|
|
94
|
+
merge: 'tile_merge.mp3',
|
|
95
|
+
win: 'game_win.mp3',
|
|
96
|
+
gameOver: 'game_over.mp3',
|
|
97
|
+
newTile: 'new_tile.mp3'
|
|
98
|
+
};
|
|
99
|
+
return sounds[type];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Animate tile movement
|
|
103
|
+
animateTileMovement(fromPosition, toPosition, duration = GAME_2048_SETTINGS.ANIMATION_DURATION) {
|
|
104
|
+
return {
|
|
105
|
+
from: fromPosition,
|
|
106
|
+
to: toPosition,
|
|
107
|
+
duration,
|
|
108
|
+
easing: 'easeOutCubic'
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Animate tile merge
|
|
113
|
+
animateTileMerge(position, duration = GAME_2048_SETTINGS.MERGE_ANIMATION_DURATION) {
|
|
114
|
+
return {
|
|
115
|
+
position,
|
|
116
|
+
duration,
|
|
117
|
+
scaleFrom: 1,
|
|
118
|
+
scaleTo: 1.1,
|
|
119
|
+
scaleBack: 1,
|
|
120
|
+
easing: 'easeInOutCubic'
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Animate new tile spawn
|
|
125
|
+
animateNewTileSpawn(position, duration = GAME_2048_SETTINGS.SPAWN_ANIMATION_DURATION) {
|
|
126
|
+
return {
|
|
127
|
+
position,
|
|
128
|
+
duration,
|
|
129
|
+
scaleFrom: 0,
|
|
130
|
+
scaleTo: 1,
|
|
131
|
+
easing: 'easeOutBack'
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Check if position is within grid bounds
|
|
136
|
+
isValidPosition(row, col, gridSize) {
|
|
137
|
+
return row >= 0 && row < gridSize && col >= 0 && col < gridSize;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Get adjacent positions
|
|
141
|
+
getAdjacentPositions(row, col, gridSize) {
|
|
142
|
+
const directions = [{
|
|
143
|
+
row: -1,
|
|
144
|
+
col: 0,
|
|
145
|
+
direction: 'up'
|
|
146
|
+
}, {
|
|
147
|
+
row: 1,
|
|
148
|
+
col: 0,
|
|
149
|
+
direction: 'down'
|
|
150
|
+
}, {
|
|
151
|
+
row: 0,
|
|
152
|
+
col: -1,
|
|
153
|
+
direction: 'left'
|
|
154
|
+
}, {
|
|
155
|
+
row: 0,
|
|
156
|
+
col: 1,
|
|
157
|
+
direction: 'right'
|
|
158
|
+
}];
|
|
159
|
+
return directions.map(dir => ({
|
|
160
|
+
row: row + dir.row,
|
|
161
|
+
col: col + dir.col,
|
|
162
|
+
direction: dir.direction
|
|
163
|
+
})).filter(pos => this.isValidPosition(pos.row, pos.col, gridSize));
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Calculate game statistics
|
|
167
|
+
calculateGameStats(score, moves, timeElapsed) {
|
|
168
|
+
const averageScorePerMove = moves > 0 ? Math.round(score / moves) : 0;
|
|
169
|
+
const scorePerSecond = timeElapsed > 0 ? Math.round(score / timeElapsed) : 0;
|
|
170
|
+
return {
|
|
171
|
+
averageScorePerMove,
|
|
172
|
+
scorePerSecond,
|
|
173
|
+
efficiency: moves > 0 ? Math.round(score / moves * 100) / 100 : 0
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Save game state to storage
|
|
178
|
+
async saveGameState(gameState) {
|
|
179
|
+
try {
|
|
180
|
+
// This would integrate with AsyncStorage
|
|
181
|
+
JSON.stringify(gameState); // Validate JSON serialization
|
|
182
|
+
return true;
|
|
183
|
+
} catch (error) {
|
|
184
|
+
console.error('Failed to save game state:', error);
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// Load game state from storage
|
|
190
|
+
async loadGameState() {
|
|
191
|
+
try {
|
|
192
|
+
// This would integrate with AsyncStorage
|
|
193
|
+
// const stateString = await AsyncStorage.getItem('game2048_state');
|
|
194
|
+
// return stateString ? JSON.parse(stateString) : null;
|
|
195
|
+
return null;
|
|
196
|
+
} catch (error) {
|
|
197
|
+
console.error('Failed to load game state:', error);
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// Cleanup resources
|
|
203
|
+
cleanup() {
|
|
204
|
+
// No timers to cleanup - memory safe
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// Create empty grid
|
|
208
|
+
createGrid() {
|
|
209
|
+
return Array(GAME_CONFIG.GRID_SIZE).fill(null).map(() => Array(GAME_CONFIG.GRID_SIZE).fill(null));
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Add random tile (2 or 4)
|
|
213
|
+
addRandomTile(grid, tileId) {
|
|
214
|
+
const emptyCells = [];
|
|
215
|
+
for (let row = 0; row < GAME_CONFIG.GRID_SIZE; row++) {
|
|
216
|
+
for (let col = 0; col < GAME_CONFIG.GRID_SIZE; col++) {
|
|
217
|
+
const gridRow = grid[row];
|
|
218
|
+
if (gridRow && !gridRow[col]) {
|
|
219
|
+
emptyCells.push({
|
|
220
|
+
row,
|
|
221
|
+
col
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (emptyCells.length === 0) return null;
|
|
227
|
+
const randomCell = emptyCells[Math.floor(Math.random() * emptyCells.length)];
|
|
228
|
+
if (!randomCell) return null;
|
|
229
|
+
const newTile = {
|
|
230
|
+
id: tileId,
|
|
231
|
+
value: Math.random() < GAME_CONFIG.NEW_TILE_PROBABILITY_4 ? 4 : 2,
|
|
232
|
+
row: randomCell.row,
|
|
233
|
+
col: randomCell.col,
|
|
234
|
+
animatedValue: new Animated.Value(0),
|
|
235
|
+
scaleValue: new Animated.Value(0)
|
|
236
|
+
};
|
|
237
|
+
const targetRow = grid[randomCell.row];
|
|
238
|
+
if (targetRow) {
|
|
239
|
+
targetRow[randomCell.col] = newTile;
|
|
240
|
+
}
|
|
241
|
+
return newTile;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Move tiles in direction - Optimized for performance
|
|
245
|
+
moveTiles(grid, direction) {
|
|
246
|
+
let moved = false;
|
|
247
|
+
let score = 0;
|
|
248
|
+
|
|
249
|
+
// Pre-calculate direction constants for better performance
|
|
250
|
+
const isHorizontal = direction === 'left' || direction === 'right';
|
|
251
|
+
const isReverse = direction === 'right' || direction === 'down';
|
|
252
|
+
const gridSize = GAME_CONFIG.GRID_SIZE;
|
|
253
|
+
|
|
254
|
+
// Create a temporary grid to avoid multiple allocations
|
|
255
|
+
const newGrid = this.createGrid();
|
|
256
|
+
|
|
257
|
+
// Process each row/column
|
|
258
|
+
for (let i = 0; i < gridSize; i++) {
|
|
259
|
+
// Extract non-null tiles efficiently
|
|
260
|
+
const tiles = [];
|
|
261
|
+
for (let j = 0; j < gridSize; j++) {
|
|
262
|
+
const index = isReverse ? gridSize - 1 - j : j;
|
|
263
|
+
const row = isHorizontal ? grid[i] : grid[index];
|
|
264
|
+
const tile = row ? isHorizontal ? row[index] : row[i] : null;
|
|
265
|
+
if (tile) tiles.push(tile);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// Merge tiles in-place for better performance
|
|
269
|
+
const merged = [];
|
|
270
|
+
let j = 0;
|
|
271
|
+
while (j < tiles.length) {
|
|
272
|
+
const currentTile = tiles[j];
|
|
273
|
+
const nextTile = tiles[j + 1];
|
|
274
|
+
if (currentTile && nextTile && j < tiles.length - 1 && currentTile.value === nextTile.value) {
|
|
275
|
+
// Reuse existing tile object for better memory performance
|
|
276
|
+
const mergedTile = {
|
|
277
|
+
...currentTile,
|
|
278
|
+
value: currentTile.value * 2,
|
|
279
|
+
scaleValue: currentTile.scaleValue || new Animated.Value(1)
|
|
280
|
+
};
|
|
281
|
+
merged.push(mergedTile);
|
|
282
|
+
score += mergedTile.value;
|
|
283
|
+
j += 2;
|
|
284
|
+
} else {
|
|
285
|
+
const tile = tiles[j];
|
|
286
|
+
merged.push(tile || null);
|
|
287
|
+
j++;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// Fill remaining positions with nulls
|
|
292
|
+
while (merged.length < gridSize) {
|
|
293
|
+
merged.push(null);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
// Place tiles back and check for movement
|
|
297
|
+
for (let j = 0; j < gridSize; j++) {
|
|
298
|
+
const tile = merged[j];
|
|
299
|
+
const index = isReverse ? gridSize - 1 - j : j;
|
|
300
|
+
const newRow = isHorizontal ? i : index;
|
|
301
|
+
const newCol = isHorizontal ? index : i;
|
|
302
|
+
|
|
303
|
+
// Check if position changed
|
|
304
|
+
const originalRow = isHorizontal ? grid[i] : grid[index];
|
|
305
|
+
const originalTile = originalRow ? isHorizontal ? originalRow[index] : originalRow[i] : null;
|
|
306
|
+
if (tile !== originalTile || tile && (tile.row !== newRow || tile.col !== newCol)) {
|
|
307
|
+
moved = true;
|
|
308
|
+
}
|
|
309
|
+
if (tile) {
|
|
310
|
+
// Create new tile with updated position to avoid read-only property issues
|
|
311
|
+
const updatedTile = {
|
|
312
|
+
...tile,
|
|
313
|
+
row: newRow,
|
|
314
|
+
col: newCol
|
|
315
|
+
};
|
|
316
|
+
const targetRow = newGrid[newRow];
|
|
317
|
+
if (targetRow) {
|
|
318
|
+
targetRow[newCol] = updatedTile;
|
|
319
|
+
}
|
|
320
|
+
} else {
|
|
321
|
+
const targetRow = newGrid[newRow];
|
|
322
|
+
if (targetRow) {
|
|
323
|
+
targetRow[newCol] = null;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// Copy new grid back efficiently
|
|
330
|
+
for (let row = 0; row < gridSize; row++) {
|
|
331
|
+
for (let col = 0; col < gridSize; col++) {
|
|
332
|
+
const sourceRow = newGrid[row];
|
|
333
|
+
const targetRow = grid[row];
|
|
334
|
+
if (sourceRow && targetRow) {
|
|
335
|
+
targetRow[col] = sourceRow[col] || null;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
return {
|
|
340
|
+
moved,
|
|
341
|
+
score
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// Check if game is over - Optimized
|
|
346
|
+
checkGameOver(grid) {
|
|
347
|
+
const gridSize = GAME_CONFIG.GRID_SIZE;
|
|
348
|
+
|
|
349
|
+
// Single pass to check empty cells and possible merges
|
|
350
|
+
for (let row = 0; row < gridSize; row++) {
|
|
351
|
+
for (let col = 0; col < gridSize; col++) {
|
|
352
|
+
const currentRow = grid[row];
|
|
353
|
+
if (!currentRow) continue;
|
|
354
|
+
const tile = currentRow[col];
|
|
355
|
+
|
|
356
|
+
// If empty cell found, game is not over
|
|
357
|
+
if (!tile) return false;
|
|
358
|
+
|
|
359
|
+
// Check right and down neighbors only (avoid duplicate checks)
|
|
360
|
+
if (col < gridSize - 1) {
|
|
361
|
+
const rightTile = currentRow[col + 1];
|
|
362
|
+
if (rightTile && rightTile.value === tile.value) return false;
|
|
363
|
+
}
|
|
364
|
+
if (row < gridSize - 1) {
|
|
365
|
+
const nextRow = grid[row + 1];
|
|
366
|
+
const downTile = nextRow ? nextRow[col] : null;
|
|
367
|
+
if (downTile && downTile.value === tile.value) return false;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
return true;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// Check if won (reached target value)
|
|
375
|
+
hasWon(grid, targetValue) {
|
|
376
|
+
for (let row = 0; row < GAME_CONFIG.GRID_SIZE; row++) {
|
|
377
|
+
const currentRow = grid[row];
|
|
378
|
+
if (!currentRow) continue;
|
|
379
|
+
for (let col = 0; col < GAME_CONFIG.GRID_SIZE; col++) {
|
|
380
|
+
const tile = currentRow[col];
|
|
381
|
+
if (tile && tile.value >= targetValue) return true;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
return false;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// Get tile colors for rendering
|
|
388
|
+
getTileBackgroundColor(value) {
|
|
389
|
+
const colors = {
|
|
390
|
+
2: '#eee4da',
|
|
391
|
+
4: '#ede0c8',
|
|
392
|
+
8: '#f2b179',
|
|
393
|
+
16: '#f59563',
|
|
394
|
+
32: '#f67c5f',
|
|
395
|
+
64: '#f65e3b',
|
|
396
|
+
128: '#edcf72',
|
|
397
|
+
256: '#edcc61',
|
|
398
|
+
512: '#edc850',
|
|
399
|
+
1024: '#edc53f',
|
|
400
|
+
2048: '#edc22e',
|
|
401
|
+
4096: '#ff6b6b',
|
|
402
|
+
8192: '#ee5a52'
|
|
403
|
+
};
|
|
404
|
+
if (value > 8192) return '#ff4757';
|
|
405
|
+
return colors[value] || '#3c3a32';
|
|
406
|
+
}
|
|
407
|
+
getTileTextColor(value) {
|
|
408
|
+
return value <= 4 ? '#776e65' : '#f9f6f2';
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
// Get tile text size based on value
|
|
412
|
+
getTileTextSize(value) {
|
|
413
|
+
if (value < 100) return 28;
|
|
414
|
+
if (value < 1000) return 24;
|
|
415
|
+
if (value < 10000) return 20;
|
|
416
|
+
return 16;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
// Get tile animation delay for staggered animations
|
|
420
|
+
getTileAnimationDelay(row, col, direction) {
|
|
421
|
+
const baseDelay = 50; // Base delay in milliseconds
|
|
422
|
+
|
|
423
|
+
switch (direction) {
|
|
424
|
+
case 'up':
|
|
425
|
+
return row * baseDelay;
|
|
426
|
+
case 'down':
|
|
427
|
+
return (3 - row) * baseDelay;
|
|
428
|
+
// Assuming 4x4 grid
|
|
429
|
+
case 'left':
|
|
430
|
+
return col * baseDelay;
|
|
431
|
+
case 'right':
|
|
432
|
+
return (3 - col) * baseDelay;
|
|
433
|
+
// Assuming 4x4 grid
|
|
434
|
+
default:
|
|
435
|
+
return 0;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
// Interpolate between two values for animations
|
|
440
|
+
interpolate(from, to, progress) {
|
|
441
|
+
return from + (to - from) * progress;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
// Easing functions for animations
|
|
445
|
+
easeOutCubic(t) {
|
|
446
|
+
return 1 - Math.pow(1 - t, 3);
|
|
447
|
+
}
|
|
448
|
+
easeInOutCubic(t) {
|
|
449
|
+
return t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2;
|
|
450
|
+
}
|
|
451
|
+
easeOutBack(t) {
|
|
452
|
+
const c1 = 1.70158;
|
|
453
|
+
const c3 = c1 + 1;
|
|
454
|
+
return 1 + c3 * Math.pow(t - 1, 3) + c1 * Math.pow(t - 1, 2);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
//# sourceMappingURL=Game2048Service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Animated","GAME_2048_SETTINGS","GAME_2048_GESTURES","GAME_CONFIG","Game2048Service","getDifficultySettings","difficulty","DIFFICULTY_SETTINGS","calculateMergeScore","tileValue","multiplier","SCORE_MULTIPLIER","formatTime","seconds","minutes","Math","floor","remainingSeconds","toString","padStart","detectSwipeDirection","startX","startY","endX","endY","velocity","deltaX","deltaY","distance","sqrt","MIN_SWIPE_DISTANCE","velocityMagnitude","x","y","MIN_VELOCITY","absDeltaX","abs","absDeltaY","calculateTilePosition","row","col","gridSize","containerSize","tileSize","TILE_SIZE","margin","TILE_MARGIN","totalGridSize","generateHapticFeedback","type","patterns","move","merge","win","gameOver","generateSoundEffect","sounds","newTile","animateTileMovement","fromPosition","toPosition","duration","ANIMATION_DURATION","from","to","easing","animateTileMerge","position","MERGE_ANIMATION_DURATION","scaleFrom","scaleTo","scaleBack","animateNewTileSpawn","SPAWN_ANIMATION_DURATION","isValidPosition","getAdjacentPositions","directions","direction","map","dir","filter","pos","calculateGameStats","score","moves","timeElapsed","averageScorePerMove","round","scorePerSecond","efficiency","saveGameState","gameState","JSON","stringify","error","console","loadGameState","cleanup","createGrid","Array","GRID_SIZE","fill","addRandomTile","grid","tileId","emptyCells","gridRow","push","length","randomCell","random","id","value","NEW_TILE_PROBABILITY_4","animatedValue","Value","scaleValue","targetRow","moveTiles","moved","isHorizontal","isReverse","newGrid","i","tiles","j","index","tile","merged","currentTile","nextTile","mergedTile","newRow","newCol","originalRow","originalTile","updatedTile","sourceRow","checkGameOver","currentRow","rightTile","nextRow","downTile","hasWon","targetValue","getTileBackgroundColor","colors","getTileTextColor","getTileTextSize","getTileAnimationDelay","baseDelay","interpolate","progress","easeOutCubic","t","pow","easeInOutCubic","easeOutBack","c1","c3"],"sourceRoot":"../../../../src","sources":["games/game-2048/Game2048Service.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACv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