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
|
@@ -1,71 +1,61 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
4
4
|
import { View, Text, StyleSheet } from 'react-native';
|
|
5
|
-
import {
|
|
5
|
+
import { MazeRunnerService } from "../MazeRunnerService.js";
|
|
6
|
+
import { ScoreBoardContainer } from "../../../helpers/index.js";
|
|
6
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
8
|
// Memoized ScoreBoard component to prevent unnecessary re-renders
|
|
8
9
|
export const ScoreBoard = /*#__PURE__*/React.memo(({
|
|
9
|
-
gameState
|
|
10
|
+
gameState,
|
|
11
|
+
offset = 0
|
|
10
12
|
}) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
})]
|
|
13
|
+
// Create service instance for formatting (memoized to avoid recreation)
|
|
14
|
+
const gameService = useMemo(() => new MazeRunnerService(10, 400, 400, 120), []);
|
|
15
|
+
const formattedTime = useMemo(() => gameService.formatTime(gameState.timeElapsed), [gameService, gameState.timeElapsed]);
|
|
16
|
+
return /*#__PURE__*/_jsx(ScoreBoardContainer, {
|
|
17
|
+
offset: offset,
|
|
18
|
+
backgroundColor: "rgba(139, 69, 19, 0.4)",
|
|
19
|
+
borderColor: "rgba(255, 255, 255, 0.3)",
|
|
20
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
21
|
+
style: styles.scoreBoard,
|
|
22
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
23
|
+
style: styles.scoreSection,
|
|
24
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
25
|
+
style: styles.scoreLabel,
|
|
26
|
+
children: "Time Elapsed"
|
|
27
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
28
|
+
style: styles.timeValue,
|
|
29
|
+
children: formattedTime
|
|
30
|
+
})]
|
|
31
|
+
})
|
|
32
|
+
})
|
|
32
33
|
});
|
|
33
34
|
});
|
|
34
35
|
const styles = StyleSheet.create({
|
|
35
36
|
scoreBoard: {
|
|
36
|
-
...RESPONSIVE_SCOREBOARD_CONTAINER,
|
|
37
|
-
position: 'absolute',
|
|
38
|
-
top: 0,
|
|
39
|
-
left: 20,
|
|
40
|
-
right: 20,
|
|
41
|
-
zIndex: 100,
|
|
42
37
|
flexDirection: 'row',
|
|
43
|
-
justifyContent: '
|
|
44
|
-
alignItems: 'center'
|
|
45
|
-
backgroundColor: 'rgba(139, 69, 19, 0.4)',
|
|
46
|
-
// Semi-transparent brown for maze theme
|
|
47
|
-
borderWidth: 1,
|
|
48
|
-
borderColor: 'rgba(255, 255, 255, 0.3)' // Subtle white border
|
|
38
|
+
justifyContent: 'center',
|
|
39
|
+
alignItems: 'center'
|
|
49
40
|
},
|
|
50
41
|
scoreSection: {
|
|
51
|
-
alignItems: 'center'
|
|
52
|
-
flex: 1
|
|
42
|
+
alignItems: 'center'
|
|
53
43
|
},
|
|
54
44
|
scoreLabel: {
|
|
55
|
-
fontSize:
|
|
45
|
+
fontSize: 18,
|
|
56
46
|
fontWeight: 'bold',
|
|
57
47
|
color: '#ffffff',
|
|
58
48
|
marginBottom: 4
|
|
59
49
|
},
|
|
60
50
|
scoreValue: {
|
|
61
|
-
fontSize:
|
|
51
|
+
fontSize: 30,
|
|
62
52
|
fontWeight: 'bold',
|
|
63
53
|
color: '#92400e' // Brown color for score value
|
|
64
54
|
},
|
|
65
55
|
timeValue: {
|
|
66
|
-
fontSize:
|
|
56
|
+
fontSize: 30,
|
|
67
57
|
fontWeight: 'bold',
|
|
68
|
-
color: '#
|
|
58
|
+
color: '#ffffff' // White color for time value
|
|
69
59
|
}
|
|
70
60
|
});
|
|
71
61
|
//# sourceMappingURL=ScoreBoard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","StyleSheet","
|
|
1
|
+
{"version":3,"names":["React","useMemo","View","Text","StyleSheet","MazeRunnerService","ScoreBoardContainer","jsx","_jsx","jsxs","_jsxs","ScoreBoard","memo","gameState","offset","gameService","formattedTime","formatTime","timeElapsed","backgroundColor","borderColor","children","style","styles","scoreBoard","scoreSection","scoreLabel","timeValue","create","flexDirection","justifyContent","alignItems","fontSize","fontWeight","color","marginBottom","scoreValue"],"sourceRoot":"../../../../../src","sources":["games/maze-runner/components/ScoreBoard.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAErD,SAASC,iBAAiB,QAAQ,yBAAsB;AACxD,SAASC,mBAAmB,QAAQ,2BAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAOvD;AACA,OAAO,MAAMC,UAAqC,gBAAGX,KAAK,CAACY,IAAI,CAAC,CAAC;EAC/DC,SAAS;EACTC,MAAM,GAAG;AACX,CAAC,KAAK;EACJ;EACA,MAAMC,WAAW,GAAGd,OAAO,CAAC,MAAM,IAAII,iBAAiB,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC;EAC/E,MAAMW,aAAa,GAAGf,OAAO,CAAC,MAAMc,WAAW,CAACE,UAAU,CAACJ,SAAS,CAACK,WAAW,CAAC,EAAE,CAACH,WAAW,EAAEF,SAAS,CAACK,WAAW,CAAC,CAAC;EAExH,oBACEV,IAAA,CAACF,mBAAmB;IAClBQ,MAAM,EAAEA,MAAO;IACfK,eAAe,EAAC,wBAAwB;IACxCC,WAAW,EAAC,0BAA0B;IAAAC,QAAA,eAEtCb,IAAA,CAACN,IAAI;MAACoB,KAAK,EAAEC,MAAM,CAACC,UAAW;MAAAH,QAAA,eAC7BX,KAAA,CAACR,IAAI;QAACoB,KAAK,EAAEC,MAAM,CAACE,YAAa;QAAAJ,QAAA,gBAC/Bb,IAAA,CAACL,IAAI;UAACmB,KAAK,EAAEC,MAAM,CAACG,UAAW;UAAAL,QAAA,EAAC;QAAY,CAAM,CAAC,eACnDb,IAAA,CAACL,IAAI;UAACmB,KAAK,EAAEC,MAAM,CAACI,SAAU;UAAAN,QAAA,EAAEL;QAAa,CAAO,CAAC;MAAA,CACjD;IAAC,CACH;EAAC,CACY,CAAC;AAE1B,CAAC,CAAC;AAEF,MAAMO,MAAM,GAAGnB,UAAU,CAACwB,MAAM,CAAC;EAC/BJ,UAAU,EAAE;IACVK,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDN,YAAY,EAAE;IACZM,UAAU,EAAE;EACd,CAAC;EACDL,UAAU,EAAE;IACVM,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,KAAK,EAAE,SAAS;IAChBC,YAAY,EAAE;EAChB,CAAC;EACDC,UAAU,EAAE;IACVJ,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,KAAK,EAAE,SAAS,CAAE;EACpB,CAAC;EACDP,SAAS,EAAE;IACTK,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,KAAK,EAAE,SAAS,CAAE;EACpB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -5,13 +5,12 @@ import { View, StyleSheet, Dimensions } from 'react-native';
|
|
|
5
5
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
6
6
|
import { usePopitFidgetStore } from "./PopitFidgetStore.js";
|
|
7
7
|
import { PopitFidgetService } from "./PopitFidgetService.js";
|
|
8
|
-
import {
|
|
9
|
-
import { GAME_IDS } from "../../services/GamesService.js";
|
|
8
|
+
import { GAME_IDS, DEFAULT_GAME_SETTINGS } from "../../services/UtilsService.js";
|
|
10
9
|
import { playSound, GAME_SOUNDS } from "../../services/SoundsService.js";
|
|
11
10
|
import { playHaptic, HapticType } from "../../services/HapticsService.js";
|
|
12
11
|
import { GameBackground, FidgetGrid as FidgetGridComponent, ScoreBoard } from "./components/index.js";
|
|
13
|
-
import { GameControlButton, GameOverModal } from "../../
|
|
14
|
-
import { GameSettingsModal } from "../../
|
|
12
|
+
import { GameControlButton, GameOverModal } from "../../helpers/index.js";
|
|
13
|
+
import { GameSettingsModal } from "../../helpers/index.js";
|
|
15
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
15
|
const {
|
|
17
16
|
width,
|
|
@@ -23,27 +22,25 @@ const PopitFidget = ({
|
|
|
23
22
|
}) => {
|
|
24
23
|
// Use selective subscriptions to prevent unnecessary re-renders
|
|
25
24
|
const fidgetGrid = usePopitFidgetStore(state => state.fidgetGrid);
|
|
26
|
-
const
|
|
27
|
-
const timeLeft = usePopitFidgetStore(state => state.timeLeft);
|
|
25
|
+
const timeElapsed = usePopitFidgetStore(state => state.timeElapsed);
|
|
28
26
|
const isPlaying = usePopitFidgetStore(state => state.isPlaying);
|
|
29
27
|
const gameOver = usePopitFidgetStore(state => state.gameOver);
|
|
30
28
|
const gameWon = usePopitFidgetStore(state => state.gameWon);
|
|
31
29
|
|
|
32
30
|
// Get store actions (these don't cause re-renders)
|
|
33
31
|
const startGame = usePopitFidgetStore(state => state.startGame);
|
|
34
|
-
const stopGame = usePopitFidgetStore(state => state.stopGame);
|
|
35
32
|
const resetGame = usePopitFidgetStore(state => state.resetGame);
|
|
36
33
|
const setFidgetGrid = usePopitFidgetStore(state => state.setFidgetGrid);
|
|
37
34
|
const popBubble = usePopitFidgetStore(state => state.popBubble);
|
|
38
|
-
const
|
|
35
|
+
const incrementTime = usePopitFidgetStore(state => state.incrementTime);
|
|
39
36
|
const serviceRef = useRef(null);
|
|
40
37
|
|
|
41
38
|
// Use settings from props
|
|
42
39
|
const {
|
|
43
|
-
difficulty,
|
|
44
|
-
enableSounds,
|
|
45
|
-
enableHaptics
|
|
46
|
-
} = settings;
|
|
40
|
+
difficulty = 'medium',
|
|
41
|
+
enableSounds = true,
|
|
42
|
+
enableHaptics = true
|
|
43
|
+
} = settings || {};
|
|
47
44
|
|
|
48
45
|
// Initialize service and generate initial fidget grid
|
|
49
46
|
useEffect(() => {
|
|
@@ -98,22 +95,10 @@ const PopitFidget = ({
|
|
|
98
95
|
if (!isPlaying) {
|
|
99
96
|
// Game not playing - just regenerate grid
|
|
100
97
|
generateNewFidget();
|
|
101
|
-
} else {
|
|
102
|
-
// Game is playing - restart with new difficulty duration
|
|
103
|
-
const newDuration = POPIT_FIDGET_GAME_CONFIG.GAME_DURATION;
|
|
104
|
-
|
|
105
|
-
// Stop current timer
|
|
106
|
-
service.stopGameTimer();
|
|
107
|
-
|
|
108
|
-
// Start new timer with new duration
|
|
109
|
-
service.startGameTimer(newDuration, timeLeft => setTimeLeft(timeLeft), () => stopGame());
|
|
110
|
-
|
|
111
|
-
// Update store with new duration
|
|
112
|
-
setTimeLeft(newDuration);
|
|
113
98
|
}
|
|
114
99
|
prevDifficultyRef.current = difficulty;
|
|
115
100
|
}
|
|
116
|
-
}, [difficulty, isPlaying, generateNewFidget
|
|
101
|
+
}, [difficulty, isPlaying, generateNewFidget]);
|
|
117
102
|
useEffect(() => {
|
|
118
103
|
handleDifficultyChange();
|
|
119
104
|
}, [handleDifficultyChange]);
|
|
@@ -131,19 +116,12 @@ const PopitFidget = ({
|
|
|
131
116
|
}
|
|
132
117
|
}, [gameOver, gameWon, isPlaying, enableSounds]);
|
|
133
118
|
|
|
134
|
-
// Timer effect - handles
|
|
119
|
+
// Timer effect - handles time elapsed when game is playing
|
|
135
120
|
useEffect(() => {
|
|
136
121
|
let timerInterval = null;
|
|
137
|
-
if (isPlaying
|
|
122
|
+
if (isPlaying) {
|
|
138
123
|
timerInterval = setInterval(() => {
|
|
139
|
-
|
|
140
|
-
if (newTime <= 0) {
|
|
141
|
-
// Time's up - stop the game
|
|
142
|
-
setTimeLeft(0);
|
|
143
|
-
stopGame();
|
|
144
|
-
} else {
|
|
145
|
-
setTimeLeft(newTime);
|
|
146
|
-
}
|
|
124
|
+
incrementTime();
|
|
147
125
|
}, 1000);
|
|
148
126
|
}
|
|
149
127
|
return () => {
|
|
@@ -151,7 +129,7 @@ const PopitFidget = ({
|
|
|
151
129
|
clearInterval(timerInterval);
|
|
152
130
|
}
|
|
153
131
|
};
|
|
154
|
-
}, [isPlaying,
|
|
132
|
+
}, [isPlaying, incrementTime]);
|
|
155
133
|
|
|
156
134
|
// Start game
|
|
157
135
|
const startGameHandler = useCallback(() => {
|
|
@@ -235,43 +213,56 @@ const PopitFidget = ({
|
|
|
235
213
|
// Memoize game over modal props to prevent unnecessary re-renders
|
|
236
214
|
const gameOverModalProps = useMemo(() => ({
|
|
237
215
|
isVisible: gameOver,
|
|
238
|
-
score,
|
|
216
|
+
score: timeElapsed,
|
|
239
217
|
onPlayAgain: resetGameHandler,
|
|
240
218
|
buttonText: "Pop Again!",
|
|
241
219
|
primaryColor: "rgba(108, 92, 231, 0.85)",
|
|
242
220
|
borderColor: "rgba(108, 92, 231, 0.95)",
|
|
243
221
|
buttonColor: "#9c27b0",
|
|
244
|
-
buttonBorderColor: "#ce93d8"
|
|
245
|
-
|
|
246
|
-
|
|
222
|
+
buttonBorderColor: "#ce93d8",
|
|
223
|
+
scoreFormatter: time => {
|
|
224
|
+
const mins = Math.floor(time / 60);
|
|
225
|
+
const secs = time % 60;
|
|
226
|
+
return `${mins.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`;
|
|
227
|
+
},
|
|
228
|
+
scoreLabel: "Time Elapsed"
|
|
229
|
+
}), [gameOver, timeElapsed, resetGameHandler]);
|
|
230
|
+
|
|
231
|
+
// Get offset from settings
|
|
232
|
+
const offset = settings?.offset ?? 0;
|
|
233
|
+
return /*#__PURE__*/_jsx(View, {
|
|
247
234
|
style: styles.container,
|
|
248
|
-
children: /*#__PURE__*/
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
timeLeft: timeLeft
|
|
257
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
258
|
-
style: styles.gameArea,
|
|
259
|
-
children: fidgetGrid && /*#__PURE__*/_jsx(FidgetGridComponent, {
|
|
260
|
-
grid: fidgetGrid,
|
|
261
|
-
bubbleSize: bubbleSize,
|
|
262
|
-
onBubblePop: handleBubblePop,
|
|
263
|
-
hapticEnabled: enableHaptics,
|
|
235
|
+
children: /*#__PURE__*/_jsx(GestureHandlerRootView, {
|
|
236
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
237
|
+
style: [styles.gameContainer, {
|
|
238
|
+
paddingTop: offset
|
|
239
|
+
}],
|
|
240
|
+
children: [/*#__PURE__*/_jsx(GameBackground, {
|
|
241
|
+
width: screenDimensions.width,
|
|
242
|
+
height: screenDimensions.height,
|
|
264
243
|
isPlaying: isPlaying
|
|
265
|
-
})
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
244
|
+
}), /*#__PURE__*/_jsx(ScoreBoard, {
|
|
245
|
+
timeElapsed: timeElapsed,
|
|
246
|
+
offset: offset
|
|
247
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
248
|
+
style: styles.gameArea,
|
|
249
|
+
children: fidgetGrid && /*#__PURE__*/_jsx(FidgetGridComponent, {
|
|
250
|
+
grid: fidgetGrid,
|
|
251
|
+
bubbleSize: bubbleSize,
|
|
252
|
+
onBubblePop: handleBubblePop,
|
|
253
|
+
hapticEnabled: enableHaptics,
|
|
254
|
+
isPlaying: isPlaying
|
|
255
|
+
})
|
|
256
|
+
}), /*#__PURE__*/_jsx(GameControlButton, {
|
|
257
|
+
...gameControlButtonProps
|
|
258
|
+
}), /*#__PURE__*/_jsx(GameOverModal, {
|
|
259
|
+
...gameOverModalProps
|
|
260
|
+
}), /*#__PURE__*/_jsx(GameSettingsModal, {
|
|
261
|
+
gameId: GAME_IDS.POPIT_FIDGET,
|
|
262
|
+
settings: settings || DEFAULT_GAME_SETTINGS,
|
|
263
|
+
onSettingsChange: onSettingsChange
|
|
264
|
+
})]
|
|
265
|
+
})
|
|
275
266
|
})
|
|
276
267
|
});
|
|
277
268
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useRef","useCallback","useMemo","View","StyleSheet","Dimensions","GestureHandlerRootView","usePopitFidgetStore","PopitFidgetService","
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","useCallback","useMemo","View","StyleSheet","Dimensions","GestureHandlerRootView","usePopitFidgetStore","PopitFidgetService","GAME_IDS","DEFAULT_GAME_SETTINGS","playSound","GAME_SOUNDS","playHaptic","HapticType","GameBackground","FidgetGrid","FidgetGridComponent","ScoreBoard","GameControlButton","GameOverModal","GameSettingsModal","jsx","_jsx","jsxs","_jsxs","width","height","get","PopitFidget","settings","onSettingsChange","fidgetGrid","state","timeElapsed","isPlaying","gameOver","gameWon","startGame","resetGame","setFidgetGrid","popBubble","incrementTime","serviceRef","difficulty","enableSounds","enableHaptics","current","grid","generateFidgetGrid","stopGameTimer","cleanup","service","generateNewFidget","prevDifficultyRef","handleDifficultyChange","BUBBLE_POPPER","COMPLETE","TIME_UP","timerInterval","setInterval","clearInterval","startGameHandler","START","MEDIUM","stopGameHandler","resetGameHandler","handleBubblePop","row","col","bubble","bubbles","isPopped","POP","LIGHT","screenDimensions","bubbleSize","availableWidth","availableHeight","maxSize","Math","min","size","max","gameControlButtonProps","onStartGame","onStopGame","startButtonText","stopButtonText","startButtonSubtext","stopButtonSubtext","startButtonColor","stopButtonColor","startButtonBorderColor","stopButtonBorderColor","gameOverModalProps","isVisible","score","onPlayAgain","buttonText","primaryColor","borderColor","buttonColor","buttonBorderColor","scoreFormatter","time","mins","floor","secs","toString","padStart","scoreLabel","offset","style","styles","container","children","gameContainer","paddingTop","gameArea","onBubblePop","hapticEnabled","gameId","POPIT_FIDGET","create","flex","backgroundColor","justifyContent","alignItems","paddingHorizontal"],"sourceRoot":"../../../../src","sources":["games/popit-fidget/PopitFidget.tsx"],"mappings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H,MAAM,CAAC;EAC/BT,SAAS,EAAE;IACTU,IAAI,EAAE;EACR,CAAC;EACDR,aAAa,EAAE;IACbQ,IAAI,EAAE,CAAC;IACPC,eAAe,EAAE,SAAS,CAAE;EAC9B,CAAC;EACDP,QAAQ,EAAE;IACRM,IAAI,EAAE,CAAC;IACPE,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC;AAEF,SAASpG,WAAW","ignoreList":[]}
|
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import { create } from 'zustand';
|
|
4
4
|
import { subscribeWithSelector } from 'zustand/middleware';
|
|
5
|
-
import {
|
|
6
|
-
import { immerMiddleware } from "../../services/GamesService.js";
|
|
5
|
+
import { immerMiddleware } from "../../services/UtilsService.js";
|
|
7
6
|
// Optimized store with selective subscriptions for low-end devices
|
|
8
7
|
export const usePopitFidgetStore = create()(subscribeWithSelector(immerMiddleware((set, get) => ({
|
|
9
8
|
// Initial state
|
|
10
|
-
|
|
11
|
-
timeLeft: 60,
|
|
12
|
-
// Default duration, will be set based on difficulty
|
|
9
|
+
timeElapsed: 0,
|
|
13
10
|
isPlaying: false,
|
|
14
11
|
gameOver: false,
|
|
15
12
|
gameWon: false,
|
|
@@ -19,14 +16,11 @@ export const usePopitFidgetStore = create()(subscribeWithSelector(immerMiddlewar
|
|
|
19
16
|
bubbleStates: {},
|
|
20
17
|
// Actions
|
|
21
18
|
startGame: _gameDuration => {
|
|
22
|
-
// Always use fixed duration regardless of difficulty or passed duration
|
|
23
|
-
const duration = 60;
|
|
24
19
|
set(draft => {
|
|
25
20
|
draft.isPlaying = true;
|
|
26
21
|
draft.gameOver = false;
|
|
27
22
|
draft.gameWon = false;
|
|
28
|
-
draft.
|
|
29
|
-
draft.score = 0;
|
|
23
|
+
draft.timeElapsed = 0;
|
|
30
24
|
draft.bubblesPopped = 0;
|
|
31
25
|
});
|
|
32
26
|
},
|
|
@@ -38,8 +32,7 @@ export const usePopitFidgetStore = create()(subscribeWithSelector(immerMiddlewar
|
|
|
38
32
|
},
|
|
39
33
|
resetGame: () => {
|
|
40
34
|
set(draft => {
|
|
41
|
-
draft.
|
|
42
|
-
draft.timeLeft = 60; // Fixed 60 seconds
|
|
35
|
+
draft.timeElapsed = 0;
|
|
43
36
|
draft.isPlaying = false;
|
|
44
37
|
draft.gameOver = false;
|
|
45
38
|
draft.gameWon = false;
|
|
@@ -88,13 +81,6 @@ export const usePopitFidgetStore = create()(subscribeWithSelector(immerMiddlewar
|
|
|
88
81
|
popTime: Date.now()
|
|
89
82
|
};
|
|
90
83
|
draft.bubblesPopped = draft.bubblesPopped + 1;
|
|
91
|
-
|
|
92
|
-
// Only update score if game is actively playing
|
|
93
|
-
if (draft.isPlaying) {
|
|
94
|
-
// Simple scoring - just add base points per bubble
|
|
95
|
-
const points = GAME_CONFIG.POINTS_PER_BUBBLE;
|
|
96
|
-
draft.score = draft.score + points;
|
|
97
|
-
}
|
|
98
84
|
});
|
|
99
85
|
|
|
100
86
|
// Check if game is won (only if actively playing)
|
|
@@ -103,29 +89,9 @@ export const usePopitFidgetStore = create()(subscribeWithSelector(immerMiddlewar
|
|
|
103
89
|
get().checkGameWon();
|
|
104
90
|
}
|
|
105
91
|
},
|
|
106
|
-
|
|
107
|
-
set(draft => {
|
|
108
|
-
draft.score = draft.score + points;
|
|
109
|
-
});
|
|
110
|
-
},
|
|
111
|
-
decrementTime: () => {
|
|
112
|
-
set(draft => {
|
|
113
|
-
const newTimeLeft = Math.max(0, draft.timeLeft - 1);
|
|
114
|
-
draft.timeLeft = newTimeLeft;
|
|
115
|
-
if (newTimeLeft === 0 && draft.isPlaying) {
|
|
116
|
-
draft.isPlaying = false;
|
|
117
|
-
draft.gameOver = true;
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
},
|
|
121
|
-
setTimeLeft: timeLeft => {
|
|
92
|
+
incrementTime: () => {
|
|
122
93
|
set(draft => {
|
|
123
|
-
|
|
124
|
-
draft.timeLeft = newTimeLeft;
|
|
125
|
-
if (newTimeLeft === 0 && draft.isPlaying) {
|
|
126
|
-
draft.isPlaying = false;
|
|
127
|
-
draft.gameOver = true;
|
|
128
|
-
}
|
|
94
|
+
draft.timeElapsed = draft.timeElapsed + 1;
|
|
129
95
|
});
|
|
130
96
|
},
|
|
131
97
|
checkGameWon: () => {
|
|
@@ -148,14 +114,10 @@ export const usePopitFidgetStore = create()(subscribeWithSelector(immerMiddlewar
|
|
|
148
114
|
if (!allPopped) break;
|
|
149
115
|
}
|
|
150
116
|
if (allPopped && state.isPlaying) {
|
|
151
|
-
// Bonus points for completing the fidget
|
|
152
|
-
const completionBonus = GAME_CONFIG.COMPLETION_BONUS;
|
|
153
|
-
const timeBonus = Math.floor(state.timeLeft * GAME_CONFIG.TIME_BONUS_MULTIPLIER);
|
|
154
117
|
set(draft => {
|
|
155
118
|
draft.isPlaying = false;
|
|
156
119
|
draft.gameWon = true;
|
|
157
120
|
draft.gameOver = true;
|
|
158
|
-
draft.score = state.score + completionBonus + timeBonus;
|
|
159
121
|
});
|
|
160
122
|
}
|
|
161
123
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["create","subscribeWithSelector","
|
|
1
|
+
{"version":3,"names":["create","subscribeWithSelector","immerMiddleware","usePopitFidgetStore","set","get","timeElapsed","isPlaying","gameOver","gameWon","fidgetGrid","bubblesPopped","totalBubbles","bubbleStates","startGame","_gameDuration","draft","stopGame","resetGame","setFidgetGrid","grid","totalCount","size","row","col","bubble","bubbles","id","isPopped","popTime","popBubble","bubbleState","Date","now","state","checkGameWon","incrementTime","allPopped"],"sourceRoot":"../../../../src","sources":["games/popit-fidget/PopitFidgetStore.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,SAAS;AAChC,SAASC,qBAAqB,QAAQ,oBAAoB;AAE1D,SAASC,eAAe,QAAQ,gCAA6B;AA0B7D;AACA,OAAO,MAAMC,mBAAmB,G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K,CAACT,SAAS,GAAG,KAAK;QACvBS,KAAK,CAACP,OAAO,GAAG,IAAI;QACpBO,KAAK,CAACR,QAAQ,GAAG,IAAI;MACvB,CAAC,CAAC;IACJ;EACF;AACF,CAAC,CAAC,CACA,CACF,CAAC","ignoreList":[]}
|
|
@@ -2,33 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { View, Text, StyleSheet } from 'react-native';
|
|
5
|
-
import {
|
|
5
|
+
import { ScoreBoardContainer } from "../../../helpers/index.js";
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
const ScoreBoard = ({
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
timeElapsed,
|
|
9
|
+
offset = 0
|
|
10
10
|
}) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
11
|
+
// Format time as MM:SS
|
|
12
|
+
const formatTime = seconds => {
|
|
13
|
+
const mins = Math.floor(seconds / 60);
|
|
14
|
+
const secs = seconds % 60;
|
|
15
|
+
return `${mins.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`;
|
|
16
|
+
};
|
|
17
|
+
return /*#__PURE__*/_jsx(ScoreBoardContainer, {
|
|
18
|
+
offset: offset,
|
|
19
|
+
backgroundColor: "rgba(108, 92, 231, 0.4)",
|
|
20
|
+
borderColor: "rgba(139, 92, 246, 0.3)",
|
|
21
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
22
|
+
style: styles.scoreBoard,
|
|
23
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
24
|
+
style: styles.scoreSection,
|
|
25
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
26
|
+
style: styles.scoreLabel,
|
|
27
|
+
children: "Time Elapsed"
|
|
28
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
29
|
+
style: styles.timeValue,
|
|
30
|
+
children: formatTime(timeElapsed)
|
|
31
|
+
})]
|
|
32
|
+
})
|
|
33
|
+
})
|
|
32
34
|
});
|
|
33
35
|
};
|
|
34
36
|
|
|
@@ -36,37 +38,21 @@ const ScoreBoard = ({
|
|
|
36
38
|
const MemoizedScoreBoard = /*#__PURE__*/React.memo(ScoreBoard);
|
|
37
39
|
const styles = StyleSheet.create({
|
|
38
40
|
scoreBoard: {
|
|
39
|
-
...RESPONSIVE_SCOREBOARD_CONTAINER,
|
|
40
|
-
position: 'absolute',
|
|
41
|
-
top: 0,
|
|
42
|
-
left: 20,
|
|
43
|
-
right: 20,
|
|
44
|
-
zIndex: 100,
|
|
45
41
|
flexDirection: 'row',
|
|
46
|
-
justifyContent: '
|
|
47
|
-
alignItems: 'center'
|
|
48
|
-
backgroundColor: 'rgba(108, 92, 231, 0.4)',
|
|
49
|
-
// Purple background for Pop It theme
|
|
50
|
-
borderWidth: 1,
|
|
51
|
-
borderColor: 'rgba(139, 92, 246, 0.3)' // Subtle purple border instead of white
|
|
42
|
+
justifyContent: 'center',
|
|
43
|
+
alignItems: 'center'
|
|
52
44
|
},
|
|
53
45
|
scoreSection: {
|
|
54
|
-
alignItems: 'center'
|
|
55
|
-
flex: 1
|
|
46
|
+
alignItems: 'center'
|
|
56
47
|
},
|
|
57
48
|
scoreLabel: {
|
|
58
|
-
fontSize:
|
|
49
|
+
fontSize: 18,
|
|
59
50
|
fontWeight: 'bold',
|
|
60
51
|
color: '#ffffff',
|
|
61
52
|
marginBottom: 4
|
|
62
53
|
},
|
|
63
|
-
scoreValue: {
|
|
64
|
-
fontSize: RESPONSIVE_SCOREBOARD_FONTS.valueSize,
|
|
65
|
-
fontWeight: 'bold',
|
|
66
|
-
color: '#1e1b4b' // Dark purple color for Pop It theme
|
|
67
|
-
},
|
|
68
54
|
timeValue: {
|
|
69
|
-
fontSize:
|
|
55
|
+
fontSize: 30,
|
|
70
56
|
fontWeight: 'bold',
|
|
71
57
|
color: '#1e1b4b' // Dark purple color for Pop It theme
|
|
72
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","StyleSheet","
|
|
1
|
+
{"version":3,"names":["React","View","Text","StyleSheet","ScoreBoardContainer","jsx","_jsx","jsxs","_jsxs","ScoreBoard","timeElapsed","offset","formatTime","seconds","mins","Math","floor","secs","toString","padStart","backgroundColor","borderColor","children","style","styles","scoreBoard","scoreSection","scoreLabel","timeValue","MemoizedScoreBoard","memo","create","flexDirection","justifyContent","alignItems","fontSize","fontWeight","color","marginBottom"],"sourceRoot":"../../../../../src","sources":["games/popit-fidget/components/ScoreBoard.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AACrD,SAASC,mBAAmB,QAAQ,2BAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAOvD,MAAMC,UAAqC,GAAGA,CAAC;EAAEC,WAAW;EAAEC,MAAM,GAAG;AAAE,CAAC,KAAK;EAC7E;EACA,MAAMC,UAAU,GAAIC,OAAe,IAAK;IACtC,MAAMC,IAAI,GAAGC,IAAI,CAACC,KAAK,CAACH,OAAO,GAAG,EAAE,CAAC;IACrC,MAAMI,IAAI,GAAGJ,OAAO,GAAG,EAAE;IACzB,OAAO,GAAGC,IAAI,CAACI,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAIF,IAAI,CAACC,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE;EAClF,CAAC;EAED,oBACEb,IAAA,CAACF,mBAAmB;IAClBO,MAAM,EA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