react-native-games 0.6.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/games/whack-a-mole/components/GameBackground.js +7 -8
- package/lib/module/games/whack-a-mole/components/GameBackground.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/games/whack-a-mole/components/GameBackground.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,207 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Dimensions } from 'react-native';
|
|
4
|
+
// Memoize screen dimensions for better performance
|
|
5
|
+
const {
|
|
6
|
+
width
|
|
7
|
+
} = Dimensions.get('window');
|
|
8
|
+
|
|
9
|
+
// Sliding Numbers Game Constants
|
|
10
|
+
export const SLIDING_NUMBERS_CONSTANTS = {
|
|
11
|
+
gridSize: {
|
|
12
|
+
easy: 3,
|
|
13
|
+
// 3x3 grid (numbers 1-8 + empty)
|
|
14
|
+
medium: 4,
|
|
15
|
+
// 4x4 grid (numbers 1-15 + empty)
|
|
16
|
+
hard: 5 // 5x5 grid (numbers 1-24 + empty)
|
|
17
|
+
},
|
|
18
|
+
maxNumbers: {
|
|
19
|
+
easy: 8,
|
|
20
|
+
// 1-8 numbers
|
|
21
|
+
medium: 15,
|
|
22
|
+
// 1-15 numbers
|
|
23
|
+
hard: 24 // 1-24 numbers
|
|
24
|
+
},
|
|
25
|
+
baseScore: {
|
|
26
|
+
easy: 1000,
|
|
27
|
+
medium: 2000,
|
|
28
|
+
hard: 3000
|
|
29
|
+
},
|
|
30
|
+
// Score decreases over time - faster completion = higher score
|
|
31
|
+
scoreMultiplier: {
|
|
32
|
+
easy: 5,
|
|
33
|
+
medium: 10,
|
|
34
|
+
hard: 15
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
export const SLIDING_NUMBERS_GAME_CONFIG = {
|
|
38
|
+
TILE_SIZE: Math.min(width * 0.16, 70),
|
|
39
|
+
// Responsive tile size that fits all difficulties
|
|
40
|
+
TILE_GAP: 4,
|
|
41
|
+
GRID_PADDING: 20,
|
|
42
|
+
GAME_DURATION: 600,
|
|
43
|
+
// 10 minutes
|
|
44
|
+
SHUFFLE_MOVES: 100,
|
|
45
|
+
// Number of moves to shuffle the puzzle
|
|
46
|
+
ANIMATION_DURATION: 200 // ms for tile sliding animation
|
|
47
|
+
};
|
|
48
|
+
export const SLIDING_NUMBERS_ANIMATION_CONFIG = {
|
|
49
|
+
TILE_SLIDE: {
|
|
50
|
+
damping: 25,
|
|
51
|
+
stiffness: 400,
|
|
52
|
+
mass: 1,
|
|
53
|
+
restDisplacementThreshold: 0.01,
|
|
54
|
+
restSpeedThreshold: 0.01
|
|
55
|
+
},
|
|
56
|
+
TILE_PRESS: {
|
|
57
|
+
damping: 15,
|
|
58
|
+
stiffness: 200
|
|
59
|
+
},
|
|
60
|
+
GESTURE: {
|
|
61
|
+
activeScale: 1.05,
|
|
62
|
+
snapThreshold: 0.3,
|
|
63
|
+
// 30% of tile size to trigger snap
|
|
64
|
+
velocityThreshold: 500 // minimum velocity for gesture recognition
|
|
65
|
+
},
|
|
66
|
+
COMPLETION_CELEBRATION: {
|
|
67
|
+
duration: 500
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
export const SLIDING_NUMBERS_COLORS = {
|
|
71
|
+
BACKGROUND: '#F5F5DC',
|
|
72
|
+
// Beige background like the physical puzzle
|
|
73
|
+
GRID_BACKGROUND: '#FFFFFF',
|
|
74
|
+
// White grid background
|
|
75
|
+
GRID_BORDER: '#E0E0E0',
|
|
76
|
+
// Light gray border
|
|
77
|
+
TILE_COLORS: ['#FFB3D9',
|
|
78
|
+
// Soft pink (like tiles 1, 14, 11 in image)
|
|
79
|
+
'#B3E5FC',
|
|
80
|
+
// Soft light blue (like tiles 2, 13, 15 in image)
|
|
81
|
+
'#C8E6C9',
|
|
82
|
+
// Soft light green (like tiles 6, 9 in image)
|
|
83
|
+
'#FFF9C4',
|
|
84
|
+
// Soft light yellow (like tile 3 in image)
|
|
85
|
+
'#E1BEE7',
|
|
86
|
+
// Soft lavender (like tiles 7, 10 in image)
|
|
87
|
+
'#FFCDD2',
|
|
88
|
+
// Soft coral pink
|
|
89
|
+
'#B2DFDB',
|
|
90
|
+
// Soft mint green
|
|
91
|
+
'#F8BBD9',
|
|
92
|
+
// Soft rose pink
|
|
93
|
+
'#A5D6A7',
|
|
94
|
+
// Soft green
|
|
95
|
+
'#FFECB3',
|
|
96
|
+
// Soft cream yellow
|
|
97
|
+
'#D1C4E9',
|
|
98
|
+
// Soft purple
|
|
99
|
+
'#B3E5FC',
|
|
100
|
+
// Soft sky blue
|
|
101
|
+
'#FFE0B2',
|
|
102
|
+
// Soft peach
|
|
103
|
+
'#C8E6C9',
|
|
104
|
+
// Soft mint
|
|
105
|
+
'#F8BBD9',
|
|
106
|
+
// Soft pink
|
|
107
|
+
'#E0F2F1',
|
|
108
|
+
// Very soft mint
|
|
109
|
+
'#FCE4EC',
|
|
110
|
+
// Very soft pink
|
|
111
|
+
'#E8F5E8',
|
|
112
|
+
// Very soft green
|
|
113
|
+
'#FFF3E0',
|
|
114
|
+
// Very soft orange
|
|
115
|
+
'#F3E5F5',
|
|
116
|
+
// Very soft purple
|
|
117
|
+
'#E1F5FE',
|
|
118
|
+
// Very soft blue
|
|
119
|
+
'#F9FBE7',
|
|
120
|
+
// Very soft lime
|
|
121
|
+
'#FFF8E1',
|
|
122
|
+
// Very soft yellow
|
|
123
|
+
'#EFEBE9' // Very soft brown
|
|
124
|
+
],
|
|
125
|
+
TILE_BORDER: '#D0D0D0',
|
|
126
|
+
TILE_SHADOW: 'rgba(0,0,0,0.1)',
|
|
127
|
+
NUMBER_TEXT: '#333333',
|
|
128
|
+
WORD_TEXT: '#666666',
|
|
129
|
+
EMPTY_TILE: '#F8F8F8',
|
|
130
|
+
SCORE_BOARD: '#f59e0b',
|
|
131
|
+
// Yellow to match scoreboard
|
|
132
|
+
SCORE_TEXT: '#FFFFFF',
|
|
133
|
+
TIMER_TEXT: '#f59e0b',
|
|
134
|
+
// Yellow for timer
|
|
135
|
+
UI: '#f59e0b',
|
|
136
|
+
// Yellow UI elements
|
|
137
|
+
BUTTON_ACTIVE: '#f59e0b',
|
|
138
|
+
// Yellow active button
|
|
139
|
+
BUTTON_INACTIVE: '#fbbf24',
|
|
140
|
+
// Lighter yellow for inactive
|
|
141
|
+
TEXT_PRIMARY: '#FFFFFF',
|
|
142
|
+
TEXT_SECONDARY: '#fef3c7',
|
|
143
|
+
// Light yellow text
|
|
144
|
+
WHITE: '#FFFFFF',
|
|
145
|
+
START_BUTTON: '#f59e0b',
|
|
146
|
+
// Yellow start button
|
|
147
|
+
COMPLETION_OVERLAY: 'rgba(245, 158, 11, 0.9)',
|
|
148
|
+
// Yellow overlay
|
|
149
|
+
BUTTON_BORDER: '#fbbf24' // Light yellow border
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
// Number word mappings for tiles
|
|
153
|
+
export const NUMBER_WORDS = {
|
|
154
|
+
1: 'one',
|
|
155
|
+
2: 'two',
|
|
156
|
+
3: 'three',
|
|
157
|
+
4: 'four',
|
|
158
|
+
5: 'five',
|
|
159
|
+
6: 'six',
|
|
160
|
+
7: 'seven',
|
|
161
|
+
8: 'eight',
|
|
162
|
+
9: 'nine',
|
|
163
|
+
10: 'ten',
|
|
164
|
+
11: 'eleven',
|
|
165
|
+
12: 'twelve',
|
|
166
|
+
13: 'thirteen',
|
|
167
|
+
14: 'fourteen',
|
|
168
|
+
15: 'fifteen',
|
|
169
|
+
16: 'sixteen',
|
|
170
|
+
17: 'seventeen',
|
|
171
|
+
18: 'eighteen',
|
|
172
|
+
19: 'nineteen',
|
|
173
|
+
20: 'twenty',
|
|
174
|
+
21: 'twenty-one',
|
|
175
|
+
22: 'twenty-two',
|
|
176
|
+
23: 'twenty-three',
|
|
177
|
+
24: 'twenty-four'
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
// Sliding Numbers Game Theme - Yellow theme matching the scoreboard
|
|
181
|
+
export const SLIDING_NUMBERS_THEME = {
|
|
182
|
+
backgroundColor: '#F5F5DC',
|
|
183
|
+
// Beige background like physical puzzle
|
|
184
|
+
headerBackgroundColor: 'rgba(245, 158, 11, 0.9)',
|
|
185
|
+
// Yellow header
|
|
186
|
+
headerTextColor: '#ffffff',
|
|
187
|
+
sectionBackgroundColor: 'rgba(245, 158, 11, 0.4)',
|
|
188
|
+
// Light yellow sections
|
|
189
|
+
sectionTitleColor: '#ffffff',
|
|
190
|
+
buttonSelectedColor: '#f59e0b',
|
|
191
|
+
// Yellow for selected
|
|
192
|
+
buttonUnselectedColor: 'rgba(255, 255, 255, 0.3)',
|
|
193
|
+
buttonSelectedTextColor: '#ffffff',
|
|
194
|
+
buttonUnselectedTextColor: '#1f2937',
|
|
195
|
+
switchTrackColorFalse: 'rgba(245, 158, 11, 0.5)',
|
|
196
|
+
switchTrackColorTrue: '#f59e0b',
|
|
197
|
+
switchThumbColor: '#ffffff',
|
|
198
|
+
infoTextColor: '#1f2937' // Dark text for readability
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
// Sliding Numbers Difficulty Descriptions
|
|
202
|
+
export const SLIDING_NUMBERS_DIFFICULTY_DESCRIPTIONS = {
|
|
203
|
+
easy: '3x3 grid with numbers 1-8, perfect for beginners',
|
|
204
|
+
medium: '4x4 grid with numbers 1-15, moderate challenge',
|
|
205
|
+
hard: '5x5 grid with numbers 1-24, expert level puzzle'
|
|
206
|
+
};
|
|
207
|
+
//# sourceMappingURL=SlidingNumbersConstants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Dimensions","width","get","SLIDING_NUMBERS_CONSTANTS","gridSize","easy","medium","hard","maxNumbers","baseScore","scoreMultiplier","SLIDING_NUMBERS_GAME_CONFIG","TILE_SIZE","Math","min","TILE_GAP","GRID_PADDING","GAME_DURATION","SHUFFLE_MOVES","ANIMATION_DURATION","SLIDING_NUMBERS_ANIMATION_CONFIG","TILE_SLIDE","damping","stiffness","mass","restDisplacementThreshold","restSpeedThreshold","TILE_PRESS","GESTURE","activeScale","snapThreshold","velocityThreshold","COMPLETION_CELEBRATION","duration","SLIDING_NUMBERS_COLORS","BACKGROUND","GRID_BACKGROUND","GRID_BORDER","TILE_COLORS","TILE_BORDER","TILE_SHADOW","NUMBER_TEXT","WORD_TEXT","EMPTY_TILE","SCORE_BOARD","SCORE_TEXT","TIMER_TEXT","UI","BUTTON_ACTIVE","BUTTON_INACTIVE","TEXT_PRIMARY","TEXT_SECONDARY","WHITE","START_BUTTON","COMPLETION_OVERLAY","BUTTON_BORDER","NUMBER_WORDS","SLIDING_NUMBERS_THEME","backgroundColor","headerBackgroundColor","headerTextColor","sectionBackgroundColor","sectionTitleColor","buttonSelectedColor","buttonUnselectedColor","buttonSelectedTextColor","buttonUnselectedTextColor","switchTrackColorFalse","switchTrackColorTrue","switchThumbColor","infoTextColor","SLIDING_NUMBERS_DIFFICULTY_DESCRIPTIONS"],"sourceRoot":"../../../../src","sources":["games/sliding-numbers/Sliding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S } from "./SlidingNumbersConstants.js";
|
|
4
|
+
export class SlidingNumbersService {
|
|
5
|
+
gameTimer = null;
|
|
6
|
+
|
|
7
|
+
// Initialize a solved puzzle
|
|
8
|
+
createSolvedPuzzle(gridSize) {
|
|
9
|
+
const tiles = [];
|
|
10
|
+
const totalTiles = gridSize * gridSize;
|
|
11
|
+
for (let i = 0; i < totalTiles; i++) {
|
|
12
|
+
const row = Math.floor(i / gridSize);
|
|
13
|
+
const col = i % gridSize;
|
|
14
|
+
const value = i === totalTiles - 1 ? 0 : i + 1; // Last tile is empty (0)
|
|
15
|
+
|
|
16
|
+
tiles.push({
|
|
17
|
+
id: i,
|
|
18
|
+
value,
|
|
19
|
+
position: {
|
|
20
|
+
row,
|
|
21
|
+
col
|
|
22
|
+
},
|
|
23
|
+
isCorrect: true
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return tiles;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Check if a tile can be moved (is adjacent to empty space)
|
|
30
|
+
canMoveTile(tile, emptyPosition) {
|
|
31
|
+
const rowDiff = Math.abs(tile.position.row - emptyPosition.row);
|
|
32
|
+
const colDiff = Math.abs(tile.position.col - emptyPosition.col);
|
|
33
|
+
return rowDiff === 1 && colDiff === 0 || rowDiff === 0 && colDiff === 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Get all tiles that can be moved (adjacent to empty space)
|
|
37
|
+
getMovableTiles(tiles, emptyPosition) {
|
|
38
|
+
return tiles.filter(tile => tile.value !== 0 && this.canMoveTile(tile, emptyPosition));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Check if puzzle is solvable using inversion count
|
|
42
|
+
isPuzzleSolvable(tiles, gridSize) {
|
|
43
|
+
const flatArray = [];
|
|
44
|
+
let emptyRow = 0;
|
|
45
|
+
|
|
46
|
+
// Create flat array and find empty tile row
|
|
47
|
+
for (let row = 0; row < gridSize; row++) {
|
|
48
|
+
for (let col = 0; col < gridSize; col++) {
|
|
49
|
+
const tile = tiles.find(t => t.position.row === row && t.position.col === col);
|
|
50
|
+
if (tile) {
|
|
51
|
+
if (tile.value === 0) {
|
|
52
|
+
emptyRow = row;
|
|
53
|
+
} else {
|
|
54
|
+
flatArray.push(tile.value);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Count inversions
|
|
61
|
+
let inversions = 0;
|
|
62
|
+
for (let i = 0; i < flatArray.length - 1; i++) {
|
|
63
|
+
for (let j = i + 1; j < flatArray.length; j++) {
|
|
64
|
+
if ((flatArray[i] || 0) > (flatArray[j] || 0)) {
|
|
65
|
+
inversions++;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// For odd grid size, puzzle is solvable if inversions are even
|
|
71
|
+
if (gridSize % 2 === 1) {
|
|
72
|
+
return inversions % 2 === 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// For even grid size, puzzle is solvable if:
|
|
76
|
+
// - Empty tile is on even row from bottom and inversions are odd
|
|
77
|
+
// - Empty tile is on odd row from bottom and inversions are even
|
|
78
|
+
const emptyRowFromBottom = gridSize - emptyRow;
|
|
79
|
+
if (emptyRowFromBottom % 2 === 0) {
|
|
80
|
+
return inversions % 2 === 1;
|
|
81
|
+
} else {
|
|
82
|
+
return inversions % 2 === 0;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Shuffle puzzle ensuring it remains solvable
|
|
87
|
+
shufflePuzzle(tiles, gridSize) {
|
|
88
|
+
const shuffledTiles = [...tiles];
|
|
89
|
+
let attempts = 0;
|
|
90
|
+
const maxAttempts = 100;
|
|
91
|
+
do {
|
|
92
|
+
// Fisher-Yates shuffle for positions
|
|
93
|
+
const positions = [];
|
|
94
|
+
for (let row = 0; row < gridSize; row++) {
|
|
95
|
+
for (let col = 0; col < gridSize; col++) {
|
|
96
|
+
positions.push({
|
|
97
|
+
row,
|
|
98
|
+
col
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
for (let i = positions.length - 1; i > 0; i--) {
|
|
103
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
104
|
+
const posI = positions[i];
|
|
105
|
+
const posJ = positions[j];
|
|
106
|
+
if (posI && posJ) {
|
|
107
|
+
[positions[i], positions[j]] = [posJ, posI];
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Assign shuffled positions to tiles
|
|
112
|
+
shuffledTiles.forEach((tile, index) => {
|
|
113
|
+
const position = positions[index];
|
|
114
|
+
if (position) {
|
|
115
|
+
tile.position = position;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
attempts++;
|
|
119
|
+
} while (!this.isPuzzleSolvable(shuffledTiles, gridSize) && attempts < maxAttempts);
|
|
120
|
+
|
|
121
|
+
// If we couldn't find a solvable configuration, use a simple swap method
|
|
122
|
+
if (attempts >= maxAttempts) {
|
|
123
|
+
return this.shuffleWithValidMoves(tiles, gridSize);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Update correctness after shuffle
|
|
127
|
+
shuffledTiles.forEach((tile, index) => {
|
|
128
|
+
const correctRow = Math.floor(index / gridSize);
|
|
129
|
+
const correctCol = index % gridSize;
|
|
130
|
+
tile.isCorrect = tile.position.row === correctRow && tile.position.col === correctCol;
|
|
131
|
+
});
|
|
132
|
+
return shuffledTiles;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Alternative shuffle method using valid moves
|
|
136
|
+
shuffleWithValidMoves(tiles, gridSize) {
|
|
137
|
+
const shuffledTiles = [...tiles];
|
|
138
|
+
let emptyPosition = {
|
|
139
|
+
row: gridSize - 1,
|
|
140
|
+
col: gridSize - 1
|
|
141
|
+
};
|
|
142
|
+
const shuffleMoves = 1000;
|
|
143
|
+
for (let i = 0; i < shuffleMoves; i++) {
|
|
144
|
+
const movableTiles = this.getMovableTiles(shuffledTiles, emptyPosition);
|
|
145
|
+
if (movableTiles.length > 0) {
|
|
146
|
+
const randomTile = movableTiles[Math.floor(Math.random() * movableTiles.length)];
|
|
147
|
+
const emptyTile = shuffledTiles.find(t => t.value === 0);
|
|
148
|
+
if (emptyTile && randomTile) {
|
|
149
|
+
// Swap positions
|
|
150
|
+
const tilePos = randomTile.position;
|
|
151
|
+
randomTile.position = emptyPosition;
|
|
152
|
+
emptyTile.position = tilePos;
|
|
153
|
+
emptyPosition = tilePos;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Update correctness after shuffle
|
|
159
|
+
shuffledTiles.forEach((tile, index) => {
|
|
160
|
+
const correctRow = Math.floor(index / gridSize);
|
|
161
|
+
const correctCol = index % gridSize;
|
|
162
|
+
tile.isCorrect = tile.position.row === correctRow && tile.position.col === correctCol;
|
|
163
|
+
});
|
|
164
|
+
return shuffledTiles;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Check if puzzle is completed
|
|
168
|
+
isPuzzleCompleted(tiles, gridSize) {
|
|
169
|
+
return tiles.every((tile, index) => {
|
|
170
|
+
const correctRow = Math.floor(index / gridSize);
|
|
171
|
+
const correctCol = index % gridSize;
|
|
172
|
+
return tile.position.row === correctRow && tile.position.col === correctCol;
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Calculate score based on time elapsed
|
|
177
|
+
calculateScore(timeElapsed, difficulty) {
|
|
178
|
+
const baseScore = SLIDING_NUMBERS_CONSTANTS.baseScore[difficulty];
|
|
179
|
+
const multiplier = SLIDING_NUMBERS_CONSTANTS.scoreMultiplier[difficulty];
|
|
180
|
+
const timeScore = Math.max(0, baseScore - timeElapsed * multiplier);
|
|
181
|
+
return timeScore;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Get optimal move count for difficulty (for scoring reference)
|
|
185
|
+
getOptimalMoveCount(difficulty) {
|
|
186
|
+
switch (difficulty) {
|
|
187
|
+
case 'easy':
|
|
188
|
+
return 50;
|
|
189
|
+
// 3x3 puzzle
|
|
190
|
+
case 'medium':
|
|
191
|
+
return 100;
|
|
192
|
+
// 4x4 puzzle
|
|
193
|
+
case 'hard':
|
|
194
|
+
return 200;
|
|
195
|
+
// 5x5 puzzle
|
|
196
|
+
default:
|
|
197
|
+
return 50;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// Start game timer
|
|
202
|
+
startTimer(onTick) {
|
|
203
|
+
this.stopTimer();
|
|
204
|
+
this.gameTimer = setInterval(onTick, 1000);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// Stop game timer
|
|
208
|
+
stopTimer() {
|
|
209
|
+
if (this.gameTimer) {
|
|
210
|
+
clearInterval(this.gameTimer);
|
|
211
|
+
this.gameTimer = null;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// Get hint for next best move
|
|
216
|
+
getHint(tiles, emptyPosition) {
|
|
217
|
+
// Simple heuristic: find a tile that's not in correct position and can be moved
|
|
218
|
+
const movableTiles = this.getMovableTiles(tiles, emptyPosition);
|
|
219
|
+
const incorrectMovableTiles = movableTiles.filter(tile => !tile.isCorrect);
|
|
220
|
+
if (incorrectMovableTiles.length > 0) {
|
|
221
|
+
return incorrectMovableTiles[0] || null;
|
|
222
|
+
}
|
|
223
|
+
return movableTiles.length > 0 ? movableTiles[0] || null : null;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// Format time for display
|
|
227
|
+
formatTime(seconds) {
|
|
228
|
+
const minutes = Math.floor(seconds / 60);
|
|
229
|
+
const remainingSeconds = seconds % 60;
|
|
230
|
+
return `${minutes}:${remainingSeconds.toString().padStart(2, '0')}`;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// Get difficulty settings
|
|
234
|
+
getDifficultySettings(difficulty) {
|
|
235
|
+
return {
|
|
236
|
+
gridSize: SLIDING_NUMBERS_CONSTANTS.gridSize[difficulty],
|
|
237
|
+
maxNumbers: SLIDING_NUMBERS_CONSTANTS.maxNumbers[difficulty],
|
|
238
|
+
baseScore: SLIDING_NUMBERS_CONSTANTS.baseScore[difficulty],
|
|
239
|
+
scoreMultiplier: SLIDING_NUMBERS_CONSTANTS.scoreMultiplier[difficulty]
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// Clean up resources
|
|
244
|
+
cleanup() {
|
|
245
|
+
this.stopTimer();
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
//# sourceMappingURL=SlidingNumbersService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SLIDING_NUMBERS_CONSTANTS","SlidingNumbersService","gameTimer","createSolvedPuzzle","gridSize","tiles","totalTiles","i","row","Math","floor","col","value","push","id","position","isCorrect","canMoveTile","tile","emptyPosition","rowDiff","abs","colDiff","getMovableTiles","filter","isPuzzleSolvable","flatArray","emptyRow","find","t","inversions","length","j","emptyRowFromBottom","shufflePuzzle","shuffledTiles","attempts","maxAttempts","positions","random","posI","posJ","forEach","index","shuffleWithValidMoves","correctRow","correctCol","shuffleMoves","movableTiles","randomTile","emptyTile","tilePos","isPuzzleCompleted","every","calculateScore","timeElapsed","difficulty","baseScore","multiplier","scoreMultiplier","timeScore","max","getOptimalMoveCount","startTimer","onTick","stopTimer","setInterval","clearInterval","getHint","incorrectMovableTiles","formatTime","seconds","minutes","remainingSeconds","toString","padStart","getDifficultySettings","maxNumbers","cleanup"],"sourceRoot":"../../../../src","sources":["games/sliding-numbers/SlidingNumbersService.ts"],"mappings":";;AAAA,SAASA,yBAAyB,QAAQ,8BAA2B;AAGrE,OAAO,MAAMC,qBAAqB,CAAC;EACzBC,SAAS,GAA0B,IAAI;;EAE/C;EACOC,kBAAkBA,CAACC,QAAgB,EAAgB;IACxD,MAAMC,KAAmB,GAAG,EAAE;IAC9B,MAAMC,UAAU,GAAGF,QAAQ,GAAGA,QAAQ;IAEtC,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