react-native-games 0.7.0 → 1.0.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 +507 -84
- package/lib/module/games/balloon-blaster/BalloonBlaster.js +13 -21
- package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +1 -1
- package/lib/module/games/balloon-blaster/components/GameArea.js +1 -1
- package/lib/module/games/balloon-blaster/components/GameArea.js.map +1 -1
- package/lib/module/games/balloon-blaster/components/GameBackground.js +24 -17
- package/lib/module/games/balloon-blaster/components/GameBackground.js.map +1 -1
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js +47 -47
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/candy-crush/CandyCrush.js +131 -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 +303 -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 +79 -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/colors-sort/ColorsSort.js +143 -0
- package/lib/module/games/colors-sort/ColorsSort.js.map +1 -0
- package/lib/module/games/colors-sort/ColorsSortConstants.js +72 -0
- package/lib/module/games/colors-sort/ColorsSortConstants.js.map +1 -0
- package/lib/module/games/colors-sort/ColorsSortService.js +255 -0
- package/lib/module/games/colors-sort/ColorsSortService.js.map +1 -0
- package/lib/module/games/colors-sort/ColorsSortStore.js +257 -0
- package/lib/module/games/colors-sort/ColorsSortStore.js.map +1 -0
- package/lib/module/games/colors-sort/components/ColorContainer.js +140 -0
- package/lib/module/games/colors-sort/components/ColorContainer.js.map +1 -0
- package/lib/module/games/colors-sort/components/GameBackground.js +135 -0
- package/lib/module/games/colors-sort/components/GameBackground.js.map +1 -0
- package/lib/module/games/colors-sort/components/ScoreBoard.js +70 -0
- package/lib/module/games/colors-sort/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/colors-sort/components/index.js +6 -0
- package/lib/module/games/colors-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 +189 -0
- package/lib/module/games/dino-jump/DinoJumpConstants.js.map +1 -0
- package/lib/module/games/dino-jump/DinoJumpService.js +270 -0
- package/lib/module/games/dino-jump/DinoJumpService.js.map +1 -0
- package/lib/module/games/dino-jump/DinoJumpStore.js +381 -0
- package/lib/module/games/dino-jump/DinoJumpStore.js.map +1 -0
- package/lib/module/games/dino-jump/components/DinoSprite.js +418 -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 +444 -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 +105 -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 +126 -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 +300 -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 +87 -0
- package/lib/module/games/flappy-bird/components/GameArea.js.map +1 -0
- package/lib/module/games/flappy-bird/components/GameBackground.js +79 -0
- package/lib/module/games/flappy-bird/components/GameBackground.js.map +1 -0
- package/lib/module/games/flappy-bird/components/Pipes.js +172 -0
- package/lib/module/games/flappy-bird/components/Pipes.js.map +1 -0
- package/lib/module/games/flappy-bird/components/ScoreBoard.js +73 -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 +120 -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 +315 -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 +103 -0
- package/lib/module/games/fruit-merger/components/GameArea.js.map +1 -0
- package/lib/module/games/fruit-merger/components/GameBackground.js +498 -0
- package/lib/module/games/fruit-merger/components/GameBackground.js.map +1 -0
- package/lib/module/games/fruit-merger/components/ScoreBoard.js +58 -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 +14 -22
- package/lib/module/games/fruit-ninja/FruitNinja.js.map +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js +1 -1
- package/lib/module/games/fruit-ninja/components/GameArea.js +1 -1
- package/lib/module/games/fruit-ninja/components/GameArea.js.map +1 -1
- package/lib/module/games/fruit-ninja/components/GameBackground.js +70 -45
- package/lib/module/games/fruit-ninja/components/GameBackground.js.map +1 -1
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js +47 -46
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/game-2048/Game2048.js +149 -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 +236 -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 +52 -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 +51 -41
- package/lib/module/games/maze-runner/MazeRunner.js.map +1 -1
- package/lib/module/games/maze-runner/MazeRunnerService.js +19 -17
- package/lib/module/games/maze-runner/MazeRunnerService.js.map +1 -1
- package/lib/module/games/maze-runner/components/ScoreBoard.js +32 -42
- package/lib/module/games/maze-runner/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/popit-fidget/PopitFidget.js +57 -66
- package/lib/module/games/popit-fidget/PopitFidget.js.map +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetStore.js +6 -44
- package/lib/module/games/popit-fidget/PopitFidgetStore.js.map +1 -1
- package/lib/module/games/popit-fidget/components/ScoreBoard.js +31 -45
- package/lib/module/games/popit-fidget/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbers.js +159 -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 +274 -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 +64 -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 +189 -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 +182 -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 +51 -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 +22 -26
- package/lib/module/games/space-fighter/SpaceFighter.js.map +1 -1
- package/lib/module/games/space-fighter/SpaceFighterService.js +7 -6
- package/lib/module/games/space-fighter/SpaceFighterService.js.map +1 -1
- package/lib/module/games/space-fighter/SpaceFighterStore.js +25 -11
- package/lib/module/games/space-fighter/SpaceFighterStore.js.map +1 -1
- package/lib/module/games/space-fighter/components/GameArea.js +1 -7
- package/lib/module/games/space-fighter/components/GameArea.js.map +1 -1
- package/lib/module/games/space-fighter/components/ScoreBoard.js +47 -48
- package/lib/module/games/space-fighter/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/whack-a-mole/WhackAMole.js +17 -10
- package/lib/module/games/whack-a-mole/WhackAMole.js.map +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleStore.js +1 -1
- package/lib/module/games/whack-a-mole/components/GameBackground.js +37 -30
- package/lib/module/games/whack-a-mole/components/GameBackground.js.map +1 -1
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js +32 -38
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js.map +1 -1
- package/lib/module/helpers/AnimationFrame.js.map +1 -0
- package/lib/module/helpers/AnimationTracker.js.map +1 -0
- package/lib/module/helpers/ErrorHandler.js.map +1 -0
- package/lib/module/helpers/GameControlButton.js.map +1 -0
- package/lib/module/{shared/helpers → helpers}/GameOverModal.js +6 -3
- package/lib/module/helpers/GameOverModal.js.map +1 -0
- package/lib/module/{shared/helpers → helpers}/GameSettingsModal.js +5 -5
- package/lib/module/helpers/GameSettingsModal.js.map +1 -0
- package/lib/module/{shared/helpers → helpers}/ParticleBlast.js +3 -2
- package/lib/module/helpers/ParticleBlast.js.map +1 -0
- package/lib/module/helpers/ScoreBoardContainer.js +34 -0
- package/lib/module/helpers/ScoreBoardContainer.js.map +1 -0
- package/lib/module/{shared/helpers → helpers}/index.js +1 -1
- package/lib/module/helpers/index.js.map +1 -0
- package/lib/module/index.js +9 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/services/GamesConstants.js +100 -5
- package/lib/module/services/GamesConstants.js.map +1 -1
- package/lib/module/services/GamesService.js +108 -42
- 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/services/UtilsService.js +32 -0
- package/lib/module/services/UtilsService.js.map +1 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +1 -1
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +1 -0
- package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +5 -1
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.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 +6 -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/colors-sort/ColorsSort.d.ts +4 -0
- package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts.map +1 -0
- package/lib/typescript/src/games/colors-sort/ColorsSortConstants.d.ts +54 -0
- package/lib/typescript/src/games/colors-sort/ColorsSortConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/colors-sort/ColorsSortService.d.ts +66 -0
- package/lib/typescript/src/games/colors-sort/ColorsSortService.d.ts.map +1 -0
- package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts +48 -0
- package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts.map +1 -0
- package/lib/typescript/src/games/colors-sort/components/ColorContainer.d.ts +11 -0
- package/lib/typescript/src/games/colors-sort/components/ColorContainer.d.ts.map +1 -0
- package/lib/typescript/src/games/colors-sort/components/GameBackground.d.ts +7 -0
- package/lib/typescript/src/games/colors-sort/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts +7 -0
- package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/colors-sort/components/index.d.ts +4 -0
- package/lib/typescript/src/games/colors-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 +97 -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 +8 -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 +7 -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 +8 -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 +9 -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 +7 -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 +8 -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 +7 -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 +1 -1
- package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts +1 -0
- package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +5 -1
- package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.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 +7 -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 +1 -1
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -1
- package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts +1 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts.map +1 -1
- package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +1 -0
- package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts +1 -1
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts.map +1 -1
- package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +2 -5
- package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts.map +1 -1
- package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +2 -2
- package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.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 +7 -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 +7 -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 +1 -1
- package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts +2 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +5 -1
- package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts +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 +1 -0
- package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts.map +1 -1
- package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts +1 -0
- package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/helpers/AnimationFrame.d.ts.map +1 -0
- package/lib/typescript/src/helpers/AnimationTracker.d.ts.map +1 -0
- package/lib/typescript/src/helpers/ErrorHandler.d.ts.map +1 -0
- package/lib/typescript/src/helpers/GameControlButton.d.ts.map +1 -0
- package/lib/typescript/src/{shared/helpers → helpers}/GameOverModal.d.ts +2 -0
- package/lib/typescript/src/helpers/GameOverModal.d.ts.map +1 -0
- package/lib/typescript/src/{shared/helpers → helpers}/GameSettingsModal.d.ts +1 -1
- package/lib/typescript/src/helpers/GameSettingsModal.d.ts.map +1 -0
- package/lib/typescript/src/helpers/ParticleBlast.d.ts.map +1 -0
- package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts +9 -0
- package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts.map +1 -0
- package/lib/typescript/src/{shared/helpers → helpers}/index.d.ts +2 -1
- package/lib/typescript/src/helpers/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +9 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/services/GamesConstants.d.ts +162 -0
- package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -1
- package/lib/typescript/src/services/GamesService.d.ts +3 -25
- 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/services/UtilsService.d.ts +38 -0
- package/lib/typescript/src/services/UtilsService.d.ts.map +1 -0
- package/package.json +1 -1
- package/lib/module/shared/helpers/AnimationFrame.js.map +0 -1
- package/lib/module/shared/helpers/AnimationTracker.js.map +0 -1
- package/lib/module/shared/helpers/ErrorHandler.js.map +0 -1
- package/lib/module/shared/helpers/GameControlButton.js.map +0 -1
- package/lib/module/shared/helpers/GameOverModal.js.map +0 -1
- package/lib/module/shared/helpers/GameSettingsModal.js.map +0 -1
- package/lib/module/shared/helpers/ParticleBlast.js.map +0 -1
- package/lib/module/shared/helpers/ResponsiveScoreBoard.js +0 -81
- package/lib/module/shared/helpers/ResponsiveScoreBoard.js.map +0 -1
- package/lib/module/shared/helpers/index.js.map +0 -1
- package/lib/typescript/src/shared/helpers/AnimationFrame.d.ts.map +0 -1
- package/lib/typescript/src/shared/helpers/AnimationTracker.d.ts.map +0 -1
- package/lib/typescript/src/shared/helpers/ErrorHandler.d.ts.map +0 -1
- package/lib/typescript/src/shared/helpers/GameControlButton.d.ts.map +0 -1
- package/lib/typescript/src/shared/helpers/GameOverModal.d.ts.map +0 -1
- package/lib/typescript/src/shared/helpers/GameSettingsModal.d.ts.map +0 -1
- package/lib/typescript/src/shared/helpers/ParticleBlast.d.ts.map +0 -1
- package/lib/typescript/src/shared/helpers/ResponsiveScoreBoard.d.ts +0 -42
- package/lib/typescript/src/shared/helpers/ResponsiveScoreBoard.d.ts.map +0 -1
- package/lib/typescript/src/shared/helpers/index.d.ts.map +0 -1
- /package/lib/module/{shared/helpers → helpers}/AnimationFrame.js +0 -0
- /package/lib/module/{shared/helpers → helpers}/AnimationTracker.js +0 -0
- /package/lib/module/{shared/helpers → helpers}/ErrorHandler.js +0 -0
- /package/lib/module/{shared/helpers → helpers}/GameControlButton.js +0 -0
- /package/lib/typescript/src/{shared/helpers → helpers}/AnimationFrame.d.ts +0 -0
- /package/lib/typescript/src/{shared/helpers → helpers}/AnimationTracker.d.ts +0 -0
- /package/lib/typescript/src/{shared/helpers → helpers}/ErrorHandler.d.ts +0 -0
- /package/lib/typescript/src/{shared/helpers → helpers}/GameControlButton.d.ts +0 -0
- /package/lib/typescript/src/{shared/helpers → helpers}/ParticleBlast.d.ts +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Dimensions } from 'react-native';
|
|
4
|
+
const {
|
|
5
|
+
width,
|
|
6
|
+
height
|
|
7
|
+
} = Dimensions.get('window');
|
|
8
|
+
export const COLORS_SORT_COLORS = {
|
|
9
|
+
BACKGROUND: '#FFF5E6',
|
|
10
|
+
// Warm cream/peach background
|
|
11
|
+
PIECE_ORANGE: '#FF6B35',
|
|
12
|
+
PIECE_PINK: '#FF1493',
|
|
13
|
+
PIECE_GREEN: '#32CD32',
|
|
14
|
+
PIECE_RED: '#FF4444',
|
|
15
|
+
PIECE_YELLOW: '#FFD700',
|
|
16
|
+
PIECE_BLUE: '#4169E1',
|
|
17
|
+
PIECE_PURPLE: '#9370DB',
|
|
18
|
+
BASE_SILVER: '#C0C0C0',
|
|
19
|
+
BASE_DARK: '#A8A8A8',
|
|
20
|
+
SCREW_WHITE: '#F5F5F5',
|
|
21
|
+
BUTTON_PRIMARY: '#FF6B35',
|
|
22
|
+
BUTTON_SECONDARY: '#FF8C42',
|
|
23
|
+
SCORE_TEXT: '#FFFFFF',
|
|
24
|
+
SCORE_BACKGROUND: 'rgba(255, 107, 53, 0.4)',
|
|
25
|
+
// Orange theme
|
|
26
|
+
SCORE_BORDER: 'rgba(255, 107, 53, 0.8)',
|
|
27
|
+
// Orange theme
|
|
28
|
+
SELECTED_GLOW: '#FFD700'
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// Game Configuration
|
|
32
|
+
export const COLORS_SORT_GAME_CONFIG = {
|
|
33
|
+
SCREEN_WIDTH: width,
|
|
34
|
+
SCREEN_HEIGHT: height,
|
|
35
|
+
PIECE_SIZE: 50,
|
|
36
|
+
CONTAINER_SIZE: 60,
|
|
37
|
+
CONTAINER_SPACING: 20,
|
|
38
|
+
PIECE_SPACING: 5
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// Game Constants
|
|
42
|
+
export const COLORS_SORT_CONSTANTS = {
|
|
43
|
+
baseScore: 10,
|
|
44
|
+
moveScore: 10,
|
|
45
|
+
perfectBonus: 100
|
|
46
|
+
};
|
|
47
|
+
export const PIECE_COLORS = [COLORS_SORT_COLORS.PIECE_RED, COLORS_SORT_COLORS.PIECE_GREEN, COLORS_SORT_COLORS.PIECE_BLUE, COLORS_SORT_COLORS.PIECE_YELLOW, COLORS_SORT_COLORS.PIECE_PURPLE, COLORS_SORT_COLORS.PIECE_ORANGE, COLORS_SORT_COLORS.PIECE_PINK];
|
|
48
|
+
|
|
49
|
+
// Game Settings Theme
|
|
50
|
+
export const COLORS_SORT_THEME = {
|
|
51
|
+
backgroundColor: '#FFF5E6',
|
|
52
|
+
headerBackgroundColor: '#FF6B35',
|
|
53
|
+
headerTextColor: '#FFFFFF',
|
|
54
|
+
sectionBackgroundColor: '#FFE8CC',
|
|
55
|
+
sectionTitleColor: '#FF6B35',
|
|
56
|
+
buttonSelectedColor: '#FF6B35',
|
|
57
|
+
buttonUnselectedColor: '#FFA366',
|
|
58
|
+
buttonSelectedTextColor: '#FFFFFF',
|
|
59
|
+
buttonUnselectedTextColor: '#FFFFFF',
|
|
60
|
+
switchTrackColorFalse: '#D0D0D0',
|
|
61
|
+
switchTrackColorTrue: '#FF6B35',
|
|
62
|
+
switchThumbColor: '#FFFFFF',
|
|
63
|
+
infoTextColor: '#666666'
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
// Difficulty Descriptions
|
|
67
|
+
export const COLORS_SORT_DIFFICULTY_DESCRIPTIONS = {
|
|
68
|
+
easy: '4 containers, 3 colors, 3 pieces each - Perfect for beginners',
|
|
69
|
+
medium: '5 containers, 4 colors, 3 pieces each - Standard challenge',
|
|
70
|
+
hard: '6 containers, 5 colors, 4 pieces each - Expert level!'
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=ColorsSortConstants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Dimensions","width","height","get","COLORS_SORT_COLORS","BACKGROUND","PIECE_ORANGE","PIECE_PINK","PIECE_GREEN","PIECE_RED","PIECE_YELLOW","PIECE_BLUE","PIECE_PURPLE","BASE_SILVER","BASE_DARK","SCREW_WHITE","BUTTON_PRIMARY","BUTTON_SECONDARY","SCORE_TEXT","SCORE_BACKGROUND","SCORE_BORDER","SELECTED_GLOW","COLORS_SORT_GAME_CONFIG","SCREEN_WIDTH","SCREEN_HEIGHT","PIECE_SIZE","CONTAINER_SIZE","CONTAINER_SPACING","PIECE_SPACING","COLORS_SORT_CONSTANTS","baseScore","moveScore","perfectBonus","PIECE_COLORS","COLORS_SORT_THEME","backgroundColor","headerBackgroundColor","headerTextColor","sectionBackgroundColor","sectionTitleColor","buttonSelectedColor","buttonUnselectedColor","buttonSelectedTextColor","buttonUnselectedTextColor","switchTrackColorFalse","switchTrackColorTrue","switchThumbColor","infoTextColor","COLORS_SORT_DIFFICULTY_DESCRIPTIONS","easy","medium","hard"],"sourceRoot":"../../../../src","sources":["games/colors-sort/ColorsSortConstants.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,MAAM;EAAEC,KAAK;EAAEC;AAAO,CAAC,GAAGF,UAAU,CAACG,GAAG,CAAC,QAAQ,CAAC;AAElD,OAAO,MAAMC,kBAAkB,GAAG;EAChCC,UAAU,EAAE,SAAS;EAAE;EACvBC,YAAY,EAAE,SAAS;EACvBC,UAAU,EAAE,SAAS;EACrBC,WAAW,EAAE,SAAS;EACtBC,SAAS,EAAE,SAAS;EACpBC,YAAY,EAAE,SAAS;EACvBC,UAAU,EAAE,SAAS;EACrBC,YAAY,EAAE,SAAS;EACvBC,WAAW,EAAE,SAAS;EACtBC,SAAS,EAAE,SAAS;EACpBC,WAAW,EAAE,SAAS;EACtBC,cAAc,EAAE,SAAS;EACzBC,gBAAgB,EAAE,SAAS;EAC3BC,UAAU,EAAE,SAAS;EACrBC,gBAAgB,EAAE,yBAAyB;EAAE;EAC7CC,YAAY,EAAE,yBAAyB;EAAE;EACzCC,aAAa,EAAE;AACjB,CAAC;;AAED;AACA,OAAO,MAAMC,uBAAuB,GAAG;EACrCC,YAAY,EAAEtB,KAAK;EACnBuB,aAAa,EAAEtB,MAAM;EACrBuB,UAAU,EAAE,EAAE;EACdC,cAAc,EAAE,EAAE;EAClBC,iBAAiB,EAAE,EAAE;EACrBC,aAAa,EAAE;AACjB,CAAC;;AAED;AACA,OAAO,MAAMC,qBAAqB,GAAG;EACnCC,SAAS,EAAE,EAAE;EACbC,SAAS,EAAE,EAAE;EACbC,YAAY,EAAE;AAChB,CAAC;AAED,OAAO,MAAMC,YAAY,GAAG,CAC1B7B,kBAAkB,CAACK,SAAS,EAC5BL,kBAAkB,CAACI,WAAW,EAC9BJ,kBAAkB,CAACO,UAAU,EAC7BP,kBAAkB,CAACM,YAAY,EAC/BN,kBAAkB,CAACQ,YAAY,EAC/BR,kBAAkB,CAACE,YAAY,EAC/BF,kBAAkB,CAACG,UAAU,CAC9B;;AAED;AACA,OAAO,MAAM2B,iBAAiB,GAAG;EAC/BC,eAAe,EAAE,SAAS;EAC1BC,qBAAqB,EAAE,SAAS;EAChCC,eAAe,EAAE,SAAS;EAC1BC,sBAAsB,EAAE,SAAS;EACjCC,iBAAiB,EAAE,SAAS;EAC5BC,mBAAmB,EAAE,SAAS;EAC9BC,qBAAqB,EAAE,SAAS;EAChCC,uBAAuB,EAAE,SAAS;EAClCC,yBAAyB,EAAE,SAAS;EACpCC,qBAAqB,EAAE,SAAS;EAChCC,oBAAoB,EAAE,SAAS;EAC/BC,gBAAgB,EAAE,SAAS;EAC3BC,aAAa,EAAE;AACjB,CAAC;;AAED;AACA,OAAO,MAAMC,mCAAmC,GAAG;EACjDC,IAAI,EAAE,+DAA+D;EACrEC,MAAM,EAAE,4DAA4D;EACpEC,IAAI,EAAE;AACR,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ColorSort Game Service
|
|
5
|
+
* Handles all utility functions, game logic, and background generation
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { Dimensions } from 'react-native';
|
|
9
|
+
const {
|
|
10
|
+
width,
|
|
11
|
+
height
|
|
12
|
+
} = Dimensions.get('window');
|
|
13
|
+
|
|
14
|
+
// ==================== TYPES ====================
|
|
15
|
+
|
|
16
|
+
// ==================== CONSTANTS ====================
|
|
17
|
+
|
|
18
|
+
// Color sort themed vibrant colors
|
|
19
|
+
export const SORT_COLORS = ['#FF6B35',
|
|
20
|
+
// Primary orange
|
|
21
|
+
'#FF4444',
|
|
22
|
+
// Red
|
|
23
|
+
'#FF8C42',
|
|
24
|
+
// Light orange
|
|
25
|
+
'#FFD700',
|
|
26
|
+
// Yellow
|
|
27
|
+
'#32CD32',
|
|
28
|
+
// Green
|
|
29
|
+
'#4169E1',
|
|
30
|
+
// Blue
|
|
31
|
+
'#FF1493',
|
|
32
|
+
// Pink
|
|
33
|
+
'#9370DB',
|
|
34
|
+
// Purple
|
|
35
|
+
'#00BCD4',
|
|
36
|
+
// Cyan
|
|
37
|
+
'#FFA366',
|
|
38
|
+
// Peach
|
|
39
|
+
'#CDDC39',
|
|
40
|
+
// Lime
|
|
41
|
+
'#E91E63' // Magenta
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
// ==================== GAME UTILITIES ====================
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Format time in seconds to MM:SS format
|
|
48
|
+
*/
|
|
49
|
+
export const formatTime = seconds => {
|
|
50
|
+
const mins = Math.floor(seconds / 60);
|
|
51
|
+
const secs = seconds % 60;
|
|
52
|
+
return `${mins.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Get grid layout style based on difficulty
|
|
57
|
+
*/
|
|
58
|
+
export const getGridLayout = difficulty => {
|
|
59
|
+
switch (difficulty) {
|
|
60
|
+
case 'easy':
|
|
61
|
+
return {
|
|
62
|
+
maxWidth: 400
|
|
63
|
+
};
|
|
64
|
+
// 4 containers in 1 row
|
|
65
|
+
case 'medium':
|
|
66
|
+
return {
|
|
67
|
+
maxWidth: 300
|
|
68
|
+
};
|
|
69
|
+
// 3 in top, 2 in bottom
|
|
70
|
+
case 'hard':
|
|
71
|
+
return {
|
|
72
|
+
maxWidth: 300
|
|
73
|
+
};
|
|
74
|
+
// 3 in top, 3 in bottom
|
|
75
|
+
default:
|
|
76
|
+
return {
|
|
77
|
+
maxWidth: 400
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Get piece height based on difficulty
|
|
84
|
+
*/
|
|
85
|
+
export const getPieceHeight = (difficulty, baseSize) => {
|
|
86
|
+
switch (difficulty) {
|
|
87
|
+
case 'easy':
|
|
88
|
+
return baseSize - 8;
|
|
89
|
+
// 42px
|
|
90
|
+
case 'medium':
|
|
91
|
+
return baseSize - 10;
|
|
92
|
+
// 40px
|
|
93
|
+
case 'hard':
|
|
94
|
+
return baseSize - 18;
|
|
95
|
+
// 32px
|
|
96
|
+
default:
|
|
97
|
+
return baseSize - 10;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
// ==================== BACKGROUND GENERATION ====================
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Generate floating color blocks for background
|
|
105
|
+
*/
|
|
106
|
+
export const generateFloatingBlocks = () => {
|
|
107
|
+
const elements = [];
|
|
108
|
+
const blockCount = 25;
|
|
109
|
+
for (let i = 0; i < blockCount; i++) {
|
|
110
|
+
const baseX = width / blockCount * i;
|
|
111
|
+
const baseY = height / blockCount * i;
|
|
112
|
+
const x = baseX + Math.sin(i * 0.5) * 50 + Math.random() * 100;
|
|
113
|
+
const y = baseY + Math.cos(i * 0.7) * 60 + Math.random() * 120;
|
|
114
|
+
const blockSize = 20 + Math.random() * 20;
|
|
115
|
+
const colorIndex = i % SORT_COLORS.length;
|
|
116
|
+
const opacity = 0.3 + Math.sin(i) * 0.15;
|
|
117
|
+
const blockX = Math.max(blockSize / 2, Math.min(width - blockSize, x));
|
|
118
|
+
const blockY = Math.max(blockSize / 2, Math.min(height - blockSize, y));
|
|
119
|
+
const color = `${SORT_COLORS[colorIndex]}${Math.floor(opacity * 255).toString(16).padStart(2, '0')}`;
|
|
120
|
+
let type;
|
|
121
|
+
if (i % 4 === 0) type = 'square';else if (i % 4 === 1) type = 'rect';else if (i % 4 === 2) type = 'wide';else type = 'circle';
|
|
122
|
+
elements.push({
|
|
123
|
+
key: `${type}-${i}`,
|
|
124
|
+
type,
|
|
125
|
+
x: blockX,
|
|
126
|
+
y: blockY,
|
|
127
|
+
size: blockSize,
|
|
128
|
+
color
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
return elements;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Get decorative blocks positioned around the screen
|
|
136
|
+
*/
|
|
137
|
+
export const getDecorativeBlocks = () => [{
|
|
138
|
+
key: 'top-left',
|
|
139
|
+
x: width * 0.08,
|
|
140
|
+
y: height * 0.12,
|
|
141
|
+
size: 50,
|
|
142
|
+
r: 8,
|
|
143
|
+
color: `${SORT_COLORS[0]}50`
|
|
144
|
+
}, {
|
|
145
|
+
key: 'bottom-right',
|
|
146
|
+
x: width * 0.85,
|
|
147
|
+
y: height * 0.82,
|
|
148
|
+
size: 45,
|
|
149
|
+
r: 7,
|
|
150
|
+
color: `${SORT_COLORS[3]}50`
|
|
151
|
+
}, {
|
|
152
|
+
key: 'top-right',
|
|
153
|
+
x: width * 0.82,
|
|
154
|
+
y: height * 0.18,
|
|
155
|
+
size: 40,
|
|
156
|
+
r: 6,
|
|
157
|
+
color: `${SORT_COLORS[4]}50`
|
|
158
|
+
}, {
|
|
159
|
+
key: 'bottom-left',
|
|
160
|
+
x: width * 0.12,
|
|
161
|
+
y: height * 0.75,
|
|
162
|
+
size: 55,
|
|
163
|
+
r: 9,
|
|
164
|
+
color: `${SORT_COLORS[5]}50`
|
|
165
|
+
}, {
|
|
166
|
+
key: 'top-center',
|
|
167
|
+
x: width * 0.47,
|
|
168
|
+
y: height * 0.08,
|
|
169
|
+
size: 35,
|
|
170
|
+
r: 5,
|
|
171
|
+
color: `${SORT_COLORS[7]}50`
|
|
172
|
+
}, {
|
|
173
|
+
key: 'middle-left',
|
|
174
|
+
x: width * 0.15,
|
|
175
|
+
y: height * 0.47,
|
|
176
|
+
size: 42,
|
|
177
|
+
r: 6,
|
|
178
|
+
color: `${SORT_COLORS[6]}50`
|
|
179
|
+
}, {
|
|
180
|
+
key: 'middle-right',
|
|
181
|
+
x: width * 0.75,
|
|
182
|
+
y: height * 0.57,
|
|
183
|
+
size: 38,
|
|
184
|
+
r: 6,
|
|
185
|
+
color: `${SORT_COLORS[8]}50`
|
|
186
|
+
}, {
|
|
187
|
+
key: 'bottom-center',
|
|
188
|
+
x: width * 0.57,
|
|
189
|
+
y: height * 0.87,
|
|
190
|
+
size: 32,
|
|
191
|
+
r: 5,
|
|
192
|
+
color: `${SORT_COLORS[1]}50`
|
|
193
|
+
}];
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Get decorative circles for variety
|
|
197
|
+
*/
|
|
198
|
+
export const getDecorativeCircles = () => [{
|
|
199
|
+
key: 'circle-1',
|
|
200
|
+
cx: width * 0.25,
|
|
201
|
+
cy: height * 0.25,
|
|
202
|
+
r: 18,
|
|
203
|
+
color: `${SORT_COLORS[10]}45`
|
|
204
|
+
}, {
|
|
205
|
+
key: 'circle-2',
|
|
206
|
+
cx: width * 0.65,
|
|
207
|
+
cy: height * 0.35,
|
|
208
|
+
r: 22,
|
|
209
|
+
color: `${SORT_COLORS[11]}45`
|
|
210
|
+
}, {
|
|
211
|
+
key: 'circle-3',
|
|
212
|
+
cx: width * 0.35,
|
|
213
|
+
cy: height * 0.65,
|
|
214
|
+
r: 16,
|
|
215
|
+
color: `${SORT_COLORS[9]}45`
|
|
216
|
+
}];
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Get gradient colors for background layers
|
|
220
|
+
*/
|
|
221
|
+
export const getGradientColors = () => ({
|
|
222
|
+
main: [`${SORT_COLORS[0]}30`,
|
|
223
|
+
// Orange
|
|
224
|
+
`${SORT_COLORS[3]}25`,
|
|
225
|
+
// Yellow
|
|
226
|
+
`${SORT_COLORS[4]}30`,
|
|
227
|
+
// Green
|
|
228
|
+
`${SORT_COLORS[5]}25`,
|
|
229
|
+
// Blue
|
|
230
|
+
`${SORT_COLORS[7]}30` // Purple
|
|
231
|
+
],
|
|
232
|
+
overlay: [`${SORT_COLORS[1]}20`,
|
|
233
|
+
// Red
|
|
234
|
+
'transparent', `${SORT_COLORS[6]}20`,
|
|
235
|
+
// Pink
|
|
236
|
+
'transparent', `${SORT_COLORS[8]}20`,
|
|
237
|
+
// Cyan
|
|
238
|
+
'transparent'],
|
|
239
|
+
diagonal: [`${SORT_COLORS[2]}15`,
|
|
240
|
+
// Light orange
|
|
241
|
+
'transparent', `${SORT_COLORS[10]}15`,
|
|
242
|
+
// Lime
|
|
243
|
+
'transparent', `${SORT_COLORS[9]}15`,
|
|
244
|
+
// Peach
|
|
245
|
+
'transparent']
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
// ==================== SERVICE CLASS ====================
|
|
249
|
+
|
|
250
|
+
export class ColorSortService {
|
|
251
|
+
cleanup() {
|
|
252
|
+
// Cleanup logic if needed
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
//# sourceMappingURL=ColorsSortService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Dimensions","width","height","get","SORT_COLORS","formatTime","seconds","mins","Math","floor","secs","toString","padStart","getGridLayout","difficulty","maxWidth","getPieceHeight","baseSize","generateFloatingBlocks","elements","blockCount","i","baseX","baseY","x","sin","random","y","cos","blockSize","colorIndex","length","opacity","blockX","max","min","blockY","color","type","push","key","size","getDecorativeBlocks","r","getDecorativeCircles","cx","cy","getGradientColors","main","overlay","diagonal","ColorSortService","cleanup"],"sourceRoot":"../../../../src","sources":["games/colors-sort/ColorsSortService.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,cAAc;AAEzC,MAAM;EAAEC,KAAK;EAAEC;AAAO,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I;EAAE;EACvB,GAAGA,WAAW,CAAC,CAAC,CAAC,IAAI,CAAE;EAAA,CACxB;EACD6C,OAAO,EAAE,CACP,GAAG7C,WAAW,CAAC,CAAC,CAAC,IAAI;EAAE;EACvB,aAAa,EACb,GAAGA,WAAW,CAAC,CAAC,CAAC,IAAI;EAAE;EACvB,aAAa,EACb,GAAGA,WAAW,CAAC,CAAC,CAAC,IAAI;EAAE;EACvB,aAAa,CACd;EACD8C,QAAQ,EAAE,CACR,GAAG9C,WAAW,CAAC,CAAC,CAAC,IAAI;EAAE;EACvB,aAAa,EACb,GAAGA,WAAW,CAAC,EAAE,CAAC,IAAI;EAAE;EACxB,aAAa,EACb,GAAGA,WAAW,CAAC,CAAC,CAAC,IAAI;EAAE;EACvB,aAAa;AAEjB,CAAC,CAAC;;AAEF;;AAEA,OAAO,MAAM+C,gBAAgB,CAAC;EAC5BC,OAAOA,CAAA,EAAG;IACR;EAAA;AAEJ","ignoreList":[]}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { create } from 'zustand';
|
|
4
|
+
import { subscribeWithSelector } from 'zustand/middleware';
|
|
5
|
+
import { immerMiddleware } from "../../services/UtilsService.js";
|
|
6
|
+
import { playSound, GAME_SOUNDS } from "../../services/SoundsService.js";
|
|
7
|
+
import { playHaptic, HapticType } from "../../services/HapticsService.js";
|
|
8
|
+
import { PIECE_COLORS } from "./ColorsSortConstants.js";
|
|
9
|
+
// Helper function to shuffle array
|
|
10
|
+
const shuffleArray = array => {
|
|
11
|
+
const shuffled = [...array];
|
|
12
|
+
for (let i = shuffled.length - 1; i > 0; i--) {
|
|
13
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
14
|
+
const temp = shuffled[i];
|
|
15
|
+
shuffled[i] = shuffled[j];
|
|
16
|
+
shuffled[j] = temp;
|
|
17
|
+
}
|
|
18
|
+
return shuffled;
|
|
19
|
+
};
|
|
20
|
+
export const useColorsSortStore = create()(subscribeWithSelector(immerMiddleware((set, get) => ({
|
|
21
|
+
isPlaying: false,
|
|
22
|
+
isGameOver: false,
|
|
23
|
+
isPaused: false,
|
|
24
|
+
containers: [],
|
|
25
|
+
selectedContainerId: null,
|
|
26
|
+
time: 0,
|
|
27
|
+
timerInterval: null,
|
|
28
|
+
initializeGame: difficulty => {
|
|
29
|
+
let numColors;
|
|
30
|
+
let piecesPerColor;
|
|
31
|
+
let numContainers;
|
|
32
|
+
let maxCapacity;
|
|
33
|
+
switch (difficulty) {
|
|
34
|
+
case 'easy':
|
|
35
|
+
numColors = 3;
|
|
36
|
+
piecesPerColor = 3;
|
|
37
|
+
maxCapacity = 4;
|
|
38
|
+
numContainers = 4;
|
|
39
|
+
break;
|
|
40
|
+
case 'medium':
|
|
41
|
+
numColors = 4;
|
|
42
|
+
piecesPerColor = 3;
|
|
43
|
+
maxCapacity = 4;
|
|
44
|
+
numContainers = 5;
|
|
45
|
+
break;
|
|
46
|
+
case 'hard':
|
|
47
|
+
numColors = 5;
|
|
48
|
+
piecesPerColor = 4;
|
|
49
|
+
maxCapacity = 5;
|
|
50
|
+
numContainers = 6;
|
|
51
|
+
break;
|
|
52
|
+
default:
|
|
53
|
+
numColors = 4;
|
|
54
|
+
piecesPerColor = 3;
|
|
55
|
+
maxCapacity = 4;
|
|
56
|
+
numContainers = 5;
|
|
57
|
+
}
|
|
58
|
+
const selectedColors = PIECE_COLORS.slice(0, numColors);
|
|
59
|
+
let allPieces = [];
|
|
60
|
+
selectedColors.forEach((color, colorIndex) => {
|
|
61
|
+
for (let i = 0; i < piecesPerColor; i++) {
|
|
62
|
+
allPieces.push({
|
|
63
|
+
id: `piece-${colorIndex}-${i}`,
|
|
64
|
+
color
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
allPieces = shuffleArray(allPieces);
|
|
69
|
+
const containers = [];
|
|
70
|
+
for (let i = 0; i < numContainers; i++) {
|
|
71
|
+
const container = {
|
|
72
|
+
id: `container-${i}`,
|
|
73
|
+
pieces: i < numColors ? allPieces.splice(0, piecesPerColor) : [],
|
|
74
|
+
maxCapacity,
|
|
75
|
+
x: 0,
|
|
76
|
+
y: 0
|
|
77
|
+
};
|
|
78
|
+
containers.push(container);
|
|
79
|
+
}
|
|
80
|
+
set(state => {
|
|
81
|
+
state.containers = containers;
|
|
82
|
+
state.selectedContainerId = null;
|
|
83
|
+
state.time = 0;
|
|
84
|
+
state.isPlaying = false;
|
|
85
|
+
state.isGameOver = false;
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
startGame: () => {
|
|
89
|
+
const state = get();
|
|
90
|
+
if (state.timerInterval) {
|
|
91
|
+
clearInterval(state.timerInterval);
|
|
92
|
+
}
|
|
93
|
+
const interval = setInterval(() => {
|
|
94
|
+
get().incrementTime();
|
|
95
|
+
}, 1000);
|
|
96
|
+
set(draftState => {
|
|
97
|
+
draftState.isPlaying = true;
|
|
98
|
+
draftState.isGameOver = false;
|
|
99
|
+
draftState.isPaused = false;
|
|
100
|
+
draftState.time = 0;
|
|
101
|
+
draftState.timerInterval = interval;
|
|
102
|
+
});
|
|
103
|
+
},
|
|
104
|
+
stopGame: () => {
|
|
105
|
+
const state = get();
|
|
106
|
+
if (state.timerInterval) {
|
|
107
|
+
clearInterval(state.timerInterval);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Reset the game instead of showing game over modal
|
|
111
|
+
state.initializeGame(state.difficulty);
|
|
112
|
+
},
|
|
113
|
+
resetGame: () => {
|
|
114
|
+
const state = get();
|
|
115
|
+
if (state.timerInterval) {
|
|
116
|
+
clearInterval(state.timerInterval);
|
|
117
|
+
}
|
|
118
|
+
set(draftState => {
|
|
119
|
+
draftState.isPlaying = false;
|
|
120
|
+
draftState.isGameOver = false;
|
|
121
|
+
draftState.isPaused = false;
|
|
122
|
+
draftState.selectedContainerId = null;
|
|
123
|
+
draftState.time = 0;
|
|
124
|
+
draftState.timerInterval = null;
|
|
125
|
+
});
|
|
126
|
+
},
|
|
127
|
+
pauseGame: () => {
|
|
128
|
+
const state = get();
|
|
129
|
+
if (state.timerInterval) {
|
|
130
|
+
clearInterval(state.timerInterval);
|
|
131
|
+
}
|
|
132
|
+
set(draftState => {
|
|
133
|
+
draftState.isPaused = true;
|
|
134
|
+
draftState.timerInterval = null;
|
|
135
|
+
});
|
|
136
|
+
},
|
|
137
|
+
resumeGame: () => {
|
|
138
|
+
// Resume timer
|
|
139
|
+
const interval = setInterval(() => {
|
|
140
|
+
get().incrementTime();
|
|
141
|
+
}, 1000);
|
|
142
|
+
set(draftState => {
|
|
143
|
+
draftState.isPaused = false;
|
|
144
|
+
draftState.timerInterval = interval;
|
|
145
|
+
});
|
|
146
|
+
},
|
|
147
|
+
selectContainer: (containerId, settings) => {
|
|
148
|
+
const state = get();
|
|
149
|
+
const container = state.containers.find(c => c.id === containerId);
|
|
150
|
+
if (!container) return;
|
|
151
|
+
|
|
152
|
+
// If no container is selected yet
|
|
153
|
+
if (state.selectedContainerId === null) {
|
|
154
|
+
if (container.pieces.length === 0) {
|
|
155
|
+
playSound(GAME_SOUNDS.COLORS_SORT.MISS, settings.enableSounds);
|
|
156
|
+
playHaptic(HapticType.LIGHT, settings.enableHaptics);
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
// First selection - select this container
|
|
160
|
+
set(draftState => {
|
|
161
|
+
draftState.selectedContainerId = containerId;
|
|
162
|
+
});
|
|
163
|
+
playSound(GAME_SOUNDS.COLORS_SORT.MATCH, settings.enableSounds);
|
|
164
|
+
playHaptic(HapticType.LIGHT, settings.enableHaptics);
|
|
165
|
+
} else if (state.selectedContainerId === containerId) {
|
|
166
|
+
set(draftState => {
|
|
167
|
+
draftState.selectedContainerId = null;
|
|
168
|
+
});
|
|
169
|
+
playSound(GAME_SOUNDS.COLORS_SORT.MISS, settings.enableSounds);
|
|
170
|
+
playHaptic(HapticType.LIGHT, settings.enableHaptics);
|
|
171
|
+
} else {
|
|
172
|
+
// Second selection - try to move piece (can be empty container)
|
|
173
|
+
get().movePiece(state.selectedContainerId, containerId, settings);
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
canMovePiece: (fromContainerId, toContainerId) => {
|
|
177
|
+
const state = get();
|
|
178
|
+
const fromContainer = state.containers.find(c => c.id === fromContainerId);
|
|
179
|
+
const toContainer = state.containers.find(c => c.id === toContainerId);
|
|
180
|
+
if (!fromContainer || !toContainer) return false;
|
|
181
|
+
if (fromContainer.pieces.length === 0) return false;
|
|
182
|
+
if (toContainer.pieces.length >= toContainer.maxCapacity) return false;
|
|
183
|
+
|
|
184
|
+
// Can move to any container that has space (no color restriction)
|
|
185
|
+
return true;
|
|
186
|
+
},
|
|
187
|
+
movePiece: (fromContainerId, toContainerId, settings) => {
|
|
188
|
+
const canMove = get().canMovePiece(fromContainerId, toContainerId);
|
|
189
|
+
if (!canMove) {
|
|
190
|
+
// Invalid move
|
|
191
|
+
set(state => {
|
|
192
|
+
state.selectedContainerId = null;
|
|
193
|
+
});
|
|
194
|
+
playSound(GAME_SOUNDS.COLORS_SORT.MISS, settings.enableSounds);
|
|
195
|
+
playHaptic(HapticType.LIGHT, settings.enableHaptics);
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Valid move - move the piece
|
|
200
|
+
set(state => {
|
|
201
|
+
const fromContainer = state.containers.find(c => c.id === fromContainerId);
|
|
202
|
+
const toContainer = state.containers.find(c => c.id === toContainerId);
|
|
203
|
+
if (fromContainer && toContainer && fromContainer.pieces.length > 0) {
|
|
204
|
+
const piece = fromContainer.pieces.pop();
|
|
205
|
+
if (piece) {
|
|
206
|
+
toContainer.pieces.push(piece);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
state.selectedContainerId = null;
|
|
210
|
+
});
|
|
211
|
+
playSound(GAME_SOUNDS.COLORS_SORT.MATCH, settings.enableSounds);
|
|
212
|
+
playHaptic(HapticType.MEDIUM, settings.enableHaptics);
|
|
213
|
+
|
|
214
|
+
// Check win condition
|
|
215
|
+
if (get().checkWinCondition()) {
|
|
216
|
+
playSound(GAME_SOUNDS.COLORS_SORT.COMPLETE, settings.enableSounds);
|
|
217
|
+
playHaptic(HapticType.SUCCESS, settings.enableHaptics);
|
|
218
|
+
get().stopGame();
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
checkWinCondition: () => {
|
|
222
|
+
const state = get();
|
|
223
|
+
|
|
224
|
+
// Win if all non-empty containers have all pieces of the same color
|
|
225
|
+
let sortedContainers = 0;
|
|
226
|
+
const colorCounts = new Map();
|
|
227
|
+
for (const container of state.containers) {
|
|
228
|
+
if (container.pieces.length === 0) continue; // Empty containers are OK
|
|
229
|
+
|
|
230
|
+
// Check if all pieces in this container are the same color
|
|
231
|
+
const firstColor = container.pieces[0]?.color;
|
|
232
|
+
const allSameColor = container.pieces.every(piece => piece.color === firstColor);
|
|
233
|
+
if (!allSameColor) return false; // Mixed colors = not solved
|
|
234
|
+
|
|
235
|
+
// This container is sorted (all same color)
|
|
236
|
+
sortedContainers++;
|
|
237
|
+
colorCounts.set(firstColor, (colorCounts.get(firstColor) || 0) + 1);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// Win if each color appears in exactly one container (all colors sorted)
|
|
241
|
+
return sortedContainers > 0 && colorCounts.size === sortedContainers;
|
|
242
|
+
},
|
|
243
|
+
incrementTime: () => {
|
|
244
|
+
set(state => {
|
|
245
|
+
state.time += 1;
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
}))));
|
|
249
|
+
|
|
250
|
+
// Selectors
|
|
251
|
+
export const useIsPlaying = () => useColorsSortStore(state => state.isPlaying);
|
|
252
|
+
export const useIsGameOver = () => useColorsSortStore(state => state.isGameOver);
|
|
253
|
+
export const useIsPaused = () => useColorsSortStore(state => state.isPaused);
|
|
254
|
+
export const useTime = () => useColorsSortStore(state => state.time);
|
|
255
|
+
export const useContainers = () => useColorsSortStore(state => state.containers);
|
|
256
|
+
export const useSelectedContainerId = () => useColorsSortStore(state => state.selectedContainerId);
|
|
257
|
+
//# sourceMappingURL=ColorsSortStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["create","subscribeWithSelector","immerMiddleware","playSound","GAME_SOUNDS","playHaptic","HapticType","PIECE_COLORS","shuffleArray","array","shuffled","i","length","j","Math","floor","random","temp","useColorsSortStore","set","get","isPlaying","isGameOver","isPaused","containers","selectedContainerId","time","timerInterval","initializeGame","difficulty","numColors","piecesPerColor","numContainers","maxCapacity","selectedColors","slice","allPieces","forEach","color","colorIndex","push","id","container","pieces","splice","x","y","state","startGame","clearInterval","interval","setInterval","incrementTime","draftState","stopGame","resetGame","pauseGame","resumeGame","selectContainer","containerId","settings","find","c","COLORS_SORT","MISS","enableSounds","LIGHT","enableHaptics","MATCH","movePiece","canMovePiece","fromContainerId","toContainerId","fromContainer","toContainer","canMove","piece","pop","MEDIUM","checkWinCondition","COMPLETE","SUCCESS","sortedContainers","colorCounts","Map","firstColor","allSameColor","every","size","useIsPlaying","useIsGameOver","useIsPaused","useTime","useContainers","useSelectedContainerId"],"sourceRoot":"../../../../src","sources":["games/colors-sort/ColorsSortStore.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,SAAS;AAChC,SAASC,qBAAqB,QAAQ,oBAAoB;AAC1D,SAASC,eAAe,QAAQ,gCAA6B;AAE7D,SAASC,SAAS,EAAEC,WAAW,QAAQ,iCAA8B;AACrE,SAASC,UAAU,EAAEC,UAAU,QAAQ,kCAA+B;AACtE,SAASC,YAAY,QAAQ,0BAAuB;AAqCpD;AACA,MAAMC,YAAY,GAAQC,KAAU,IAAU;EAC5C,MAAMC,QAAQ,GAAG,CAAC,GAAGD,KAAK,CAAC;EAC3B,KAAK,IAAIE,CAAC,GAAGD,QAAQ,CAACE,MAAM,GAAG,CAAC,EAAED,CAAC,GAAG,CAAC,EAAEA,CAAC,EAAE,EAAE;IAC5C,MAAME,CAAC,GAAGC,IAAI,CAACC,KAAK,CAACD,IAAI,C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