react-native-games 1.1.0 → 1.3.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 +101 -30
- package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -167
- package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -182
- package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js.map +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterService.js +1 -318
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +1 -183
- package/lib/module/games/balloon-blaster/components/BalloonComponent.js +1 -237
- package/lib/module/games/balloon-blaster/components/GameArea.js +1 -156
- package/lib/module/games/balloon-blaster/components/GameBackground.js +1 -476
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js +1 -112
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/balloon-blaster/components/index.js +1 -7
- package/lib/module/games/bike-racing/BikeRacing.js +1 -0
- package/lib/module/games/bike-racing/BikeRacing.js.map +1 -0
- package/lib/module/games/bike-racing/BikeRacingConstants.js +1 -0
- package/lib/module/games/bike-racing/BikeRacingConstants.js.map +1 -0
- package/lib/module/games/bike-racing/BikeRacingService.js +1 -0
- package/lib/module/games/bike-racing/BikeRacingService.js.map +1 -0
- package/lib/module/games/bike-racing/BikeRacingStore.js +1 -0
- package/lib/module/games/bike-racing/BikeRacingStore.js.map +1 -0
- package/lib/module/games/bike-racing/components/BikeComponent.js +1 -0
- package/lib/module/games/bike-racing/components/BikeComponent.js.map +1 -0
- package/lib/module/games/bike-racing/components/GameBackground.js +1 -0
- package/lib/module/games/bike-racing/components/GameBackground.js.map +1 -0
- package/lib/module/games/bike-racing/components/ScoreBoard.js +1 -0
- package/lib/module/games/bike-racing/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/bike-racing/components/index.js +1 -0
- package/lib/module/games/bike-racing/components/index.js.map +1 -0
- package/lib/module/games/bike-racing/index.js +1 -0
- package/lib/module/games/bike-racing/index.js.map +1 -0
- package/lib/module/games/block-blast/BlockBlast.js +1 -0
- package/lib/module/games/block-blast/BlockBlast.js.map +1 -0
- package/lib/module/games/block-blast/BlockBlastConstants.js +1 -0
- package/lib/module/games/block-blast/BlockBlastConstants.js.map +1 -0
- package/lib/module/games/block-blast/BlockBlastService.js +1 -0
- package/lib/module/games/block-blast/BlockBlastService.js.map +1 -0
- package/lib/module/games/block-blast/BlockBlastStore.js +1 -0
- package/lib/module/games/block-blast/BlockBlastStore.js.map +1 -0
- package/lib/module/games/block-blast/components/BlockPieceComponent.js +1 -0
- package/lib/module/games/block-blast/components/BlockPieceComponent.js.map +1 -0
- package/lib/module/games/block-blast/components/GameArea.js +1 -0
- package/lib/module/games/block-blast/components/GameArea.js.map +1 -0
- package/lib/module/games/block-blast/components/GameBackground.js +1 -0
- package/lib/module/games/block-blast/components/GameBackground.js.map +1 -0
- package/lib/module/games/block-blast/components/GridComponent.js +1 -0
- package/lib/module/games/block-blast/components/GridComponent.js.map +1 -0
- package/lib/module/games/block-blast/components/ScoreBoard.js +1 -0
- package/lib/module/games/block-blast/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/block-blast/components/index.js +1 -0
- package/lib/module/games/block-blast/components/index.js.map +1 -0
- package/lib/module/games/block-blast/index.js +1 -0
- package/lib/module/games/block-blast/index.js.map +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooter.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooter.js.map +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterConstants.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterConstants.js.map +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterService.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterService.js.map +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterStore.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterStore.js.map +1 -0
- package/lib/module/games/bubble-shooter/components/GameArea.js +1 -0
- package/lib/module/games/bubble-shooter/components/GameArea.js.map +1 -0
- package/lib/module/games/bubble-shooter/components/GameBackground.js +1 -0
- package/lib/module/games/bubble-shooter/components/GameBackground.js.map +1 -0
- package/lib/module/games/bubble-shooter/components/ScoreBoard.js +1 -0
- package/lib/module/games/bubble-shooter/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/bubble-shooter/components/index.js +1 -0
- package/lib/module/games/bubble-shooter/components/index.js.map +1 -0
- package/lib/module/games/bubble-shooter/index.js +1 -0
- package/lib/module/games/bubble-shooter/index.js.map +1 -0
- package/lib/module/games/candy-crush/CandyCrush.js +1 -131
- package/lib/module/games/candy-crush/CandyCrush.js.map +1 -1
- package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -125
- package/lib/module/games/candy-crush/CandyCrushConstants.js.map +1 -1
- package/lib/module/games/candy-crush/CandyCrushService.js +1 -370
- package/lib/module/games/candy-crush/CandyCrushStore.js +1 -303
- package/lib/module/games/candy-crush/components/CandyItem.js +1 -191
- package/lib/module/games/candy-crush/components/GameBackground.js +1 -85
- package/lib/module/games/candy-crush/components/GameGrid.js +1 -314
- package/lib/module/games/candy-crush/components/ScoreBoard.js +1 -79
- package/lib/module/games/candy-crush/components/index.js +1 -7
- package/lib/module/games/candy-crush/index.js +1 -6
- package/lib/module/games/car-racing/CarRacing.js +1 -0
- package/lib/module/games/car-racing/CarRacing.js.map +1 -0
- package/lib/module/games/car-racing/CarRacingConstants.js +1 -0
- package/lib/module/games/car-racing/CarRacingConstants.js.map +1 -0
- package/lib/module/games/car-racing/CarRacingService.js +1 -0
- package/lib/module/games/car-racing/CarRacingService.js.map +1 -0
- package/lib/module/games/car-racing/CarRacingStore.js +1 -0
- package/lib/module/games/car-racing/CarRacingStore.js.map +1 -0
- package/lib/module/games/car-racing/components/CarComponent.js +1 -0
- package/lib/module/games/car-racing/components/CarComponent.js.map +1 -0
- package/lib/module/games/car-racing/components/GameBackground.js +1 -0
- package/lib/module/games/car-racing/components/GameBackground.js.map +1 -0
- package/lib/module/games/car-racing/components/ScoreBoard.js +1 -0
- package/lib/module/games/car-racing/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/car-racing/components/index.js +1 -0
- package/lib/module/games/car-racing/components/index.js.map +1 -0
- package/lib/module/games/colors-sort/ColorsSort.js +1 -143
- package/lib/module/games/colors-sort/ColorsSort.js.map +1 -1
- package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -72
- package/lib/module/games/colors-sort/ColorsSortConstants.js.map +1 -1
- package/lib/module/games/colors-sort/ColorsSortService.js +1 -255
- package/lib/module/games/colors-sort/ColorsSortStore.js +1 -257
- package/lib/module/games/colors-sort/ColorsSortStore.js.map +1 -1
- package/lib/module/games/colors-sort/components/ColorContainer.js +1 -140
- package/lib/module/games/colors-sort/components/GameBackground.js +1 -135
- package/lib/module/games/colors-sort/components/ScoreBoard.js +1 -70
- package/lib/module/games/colors-sort/components/index.js +1 -6
- package/lib/module/games/dino-jump/DinoJump.js +1 -209
- package/lib/module/games/dino-jump/DinoJump.js.map +1 -1
- package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -189
- package/lib/module/games/dino-jump/DinoJumpConstants.js.map +1 -1
- package/lib/module/games/dino-jump/DinoJumpService.js +1 -270
- package/lib/module/games/dino-jump/DinoJumpStore.js +1 -381
- package/lib/module/games/dino-jump/components/DinoSprite.js +1 -418
- package/lib/module/games/dino-jump/components/DinoSprite.js.map +1 -1
- package/lib/module/games/dino-jump/components/GameArea.js +1 -68
- package/lib/module/games/dino-jump/components/GameBackground.js +1 -444
- package/lib/module/games/dino-jump/components/ObstacleSprite.js +1 -306
- package/lib/module/games/dino-jump/components/ScoreBoard.js +1 -105
- package/lib/module/games/dino-jump/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/dino-jump/components/StarSprite.js +1 -45
- package/lib/module/games/dino-jump/components/index.js +1 -9
- package/lib/module/games/flappy-bird/FlappyBird.js +1 -126
- package/lib/module/games/flappy-bird/FlappyBird.js.map +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -90
- package/lib/module/games/flappy-bird/FlappyBirdConstants.js.map +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdStore.js +1 -300
- package/lib/module/games/flappy-bird/components/Bird.js +1 -87
- package/lib/module/games/flappy-bird/components/GameArea.js +1 -87
- package/lib/module/games/flappy-bird/components/GameBackground.js +1 -79
- package/lib/module/games/flappy-bird/components/Pipes.js +1 -172
- package/lib/module/games/flappy-bird/components/ScoreBoard.js +1 -73
- package/lib/module/games/flappy-bird/components/index.js +1 -8
- package/lib/module/games/fruit-merger/FruitMerger.js +1 -120
- package/lib/module/games/fruit-merger/FruitMerger.js.map +1 -1
- package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -119
- package/lib/module/games/fruit-merger/FruitMergerConstants.js.map +1 -1
- package/lib/module/games/fruit-merger/FruitMergerService.js +1 -13
- package/lib/module/games/fruit-merger/FruitMergerStore.js +1 -315
- package/lib/module/games/fruit-merger/components/FruitItem.js +1 -102
- package/lib/module/games/fruit-merger/components/GameArea.js +1 -103
- package/lib/module/games/fruit-merger/components/GameBackground.js +1 -498
- package/lib/module/games/fruit-merger/components/ScoreBoard.js +1 -58
- package/lib/module/games/fruit-merger/components/index.js +1 -7
- package/lib/module/games/fruit-ninja/FruitNinja.js +1 -134
- package/lib/module/games/fruit-ninja/FruitNinja.js.map +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -148
- package/lib/module/games/fruit-ninja/FruitNinjaConstants.js.map +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaService.js +1 -311
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js +1 -191
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js.map +1 -1
- package/lib/module/games/fruit-ninja/components/FruitComponent.js +1 -99
- package/lib/module/games/fruit-ninja/components/GameArea.js +1 -215
- package/lib/module/games/fruit-ninja/components/GameBackground.js +1 -1267
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js +1 -92
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/fruit-ninja/components/index.js +1 -7
- package/lib/module/games/game-2048/Game2048.js +1 -149
- package/lib/module/games/game-2048/Game2048.js.map +1 -1
- package/lib/module/games/game-2048/Game2048Constants.js +1 -263
- package/lib/module/games/game-2048/Game2048Constants.js.map +1 -1
- package/lib/module/games/game-2048/Game2048Service.js +1 -457
- package/lib/module/games/game-2048/Game2048Store.js +1 -236
- package/lib/module/games/game-2048/components/GameBackground.js +1 -247
- package/lib/module/games/game-2048/components/GameGrid.js +1 -139
- package/lib/module/games/game-2048/components/GameTile.js +1 -72
- package/lib/module/games/game-2048/components/ScoreBoard.js +1 -52
- package/lib/module/games/game-2048/components/index.js +1 -7
- package/lib/module/games/maze-runner/MazeRunner.js +1 -267
- package/lib/module/games/maze-runner/MazeRunner.js.map +1 -1
- package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -100
- package/lib/module/games/maze-runner/MazeRunnerConstants.js.map +1 -1
- package/lib/module/games/maze-runner/MazeRunnerService.js +1 -586
- package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +1 -150
- package/lib/module/games/maze-runner/components/EnhancedGameArea.js +1 -370
- package/lib/module/games/maze-runner/components/GameBackground.js +1 -175
- package/lib/module/games/maze-runner/components/ScoreBoard.js +1 -61
- package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +1 -209
- package/lib/module/games/maze-runner/components/StaticGameBackground.js +1 -169
- package/lib/module/games/maze-runner/components/WallComponent.js +1 -91
- package/lib/module/games/maze-runner/components/index.js +1 -8
- package/lib/module/games/perfect-circle/PerfectCircle.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircle.js.map +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleConstants.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleConstants.js.map +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleService.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleService.js.map +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleStore.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleStore.js.map +1 -0
- package/lib/module/games/perfect-circle/components/DrawingCanvas.js +1 -0
- package/lib/module/games/perfect-circle/components/DrawingCanvas.js.map +1 -0
- package/lib/module/games/perfect-circle/components/GameBackground.js +1 -0
- package/lib/module/games/perfect-circle/components/GameBackground.js.map +1 -0
- package/lib/module/games/perfect-circle/components/ScoreBoard.js +1 -0
- package/lib/module/games/perfect-circle/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/perfect-circle/index.js +1 -0
- package/lib/module/games/perfect-circle/index.js.map +1 -0
- package/lib/module/games/popit-fidget/PopitFidget.js +1 -285
- package/lib/module/games/popit-fidget/PopitFidget.js.map +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -113
- package/lib/module/games/popit-fidget/PopitFidgetConstants.js.map +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetService.js +1 -132
- package/lib/module/games/popit-fidget/PopitFidgetStore.js +1 -125
- package/lib/module/games/popit-fidget/components/BubbleComponent.js +1 -198
- package/lib/module/games/popit-fidget/components/FidgetGrid.js +1 -165
- package/lib/module/games/popit-fidget/components/GameBackground.js +1 -177
- package/lib/module/games/popit-fidget/components/ScoreBoard.js +1 -61
- package/lib/module/games/popit-fidget/components/index.js +1 -7
- package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -159
- package/lib/module/games/sliding-numbers/SlidingNumbers.js.map +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -207
- package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js.map +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersService.js +1 -248
- package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +1 -274
- package/lib/module/games/sliding-numbers/components/GameBackground.js +1 -259
- package/lib/module/games/sliding-numbers/components/NumbersGrid.js +1 -174
- package/lib/module/games/sliding-numbers/components/NumbersTile.js +1 -116
- package/lib/module/games/sliding-numbers/components/ScoreBoard.js +1 -64
- package/lib/module/games/sliding-numbers/components/index.js +1 -7
- package/lib/module/games/snake/Snake.js +1 -189
- package/lib/module/games/snake/Snake.js.map +1 -1
- package/lib/module/games/snake/SnakeConstants.js +1 -138
- package/lib/module/games/snake/SnakeConstants.js.map +1 -1
- package/lib/module/games/snake/SnakeService.js +1 -148
- package/lib/module/games/snake/SnakeStore.js +1 -182
- package/lib/module/games/snake/SnakeStore.js.map +1 -1
- package/lib/module/games/snake/components/GameBackground.js +1 -221
- package/lib/module/games/snake/components/GameGrid.js +1 -153
- package/lib/module/games/snake/components/ScoreBoard.js +1 -51
- package/lib/module/games/snake/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/snake/components/index.js +1 -6
- package/lib/module/games/snake/index.js +1 -6
- package/lib/module/games/space-fighter/SpaceFighter.js +1 -165
- package/lib/module/games/space-fighter/SpaceFighter.js.map +1 -1
- package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -108
- package/lib/module/games/space-fighter/SpaceFighterConstants.js.map +1 -1
- package/lib/module/games/space-fighter/SpaceFighterService.js +1 -326
- package/lib/module/games/space-fighter/SpaceFighterStore.js +1 -209
- package/lib/module/games/space-fighter/components/AsteroidComponent.js +1 -113
- package/lib/module/games/space-fighter/components/GameArea.js +1 -289
- package/lib/module/games/space-fighter/components/GameBackground.js +1 -239
- package/lib/module/games/space-fighter/components/ScoreBoard.js +1 -136
- package/lib/module/games/space-fighter/components/Spacecraft3D.js +1 -202
- package/lib/module/games/space-fighter/components/SpacecraftPath.js +1 -52
- package/lib/module/games/space-fighter/components/index.js +1 -9
- package/lib/module/games/whack-a-mole/WhackAMole.js +1 -270
- package/lib/module/games/whack-a-mole/WhackAMole.js.map +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -115
- package/lib/module/games/whack-a-mole/WhackAMoleConstants.js.map +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleService.js +1 -120
- package/lib/module/games/whack-a-mole/WhackAMoleStore.js +1 -172
- package/lib/module/games/whack-a-mole/components/GameBackground.js +1 -477
- package/lib/module/games/whack-a-mole/components/GameGrid.js +1 -97
- package/lib/module/games/whack-a-mole/components/GameHole.js +1 -196
- package/lib/module/games/whack-a-mole/components/MoleCharacter.js +1 -241
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js +1 -67
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/whack-a-mole/components/index.js +1 -8
- package/lib/module/helpers/AnimationFrame.js +1 -120
- package/lib/module/helpers/AnimationTracker.js +1 -89
- package/lib/module/helpers/ErrorHandler.js +1 -269
- package/lib/module/helpers/GameControlButton.js +1 -219
- package/lib/module/helpers/GameOverModal.js +1 -144
- package/lib/module/helpers/GameOverModal.js.map +1 -1
- package/lib/module/helpers/GameSettingsModal.js +1 -287
- package/lib/module/helpers/GameSettingsModal.js.map +1 -1
- package/lib/module/helpers/ParticleBlast.js +1 -134
- package/lib/module/helpers/ScoreBoardContainer.js +1 -34
- package/lib/module/helpers/ScoreBoardContainer.js.map +1 -1
- package/lib/module/helpers/index.js +1 -12
- package/lib/module/index.js +1 -22
- package/lib/module/index.js.map +1 -1
- package/lib/module/services/GamesConstants.js +1 -178
- package/lib/module/services/GamesConstants.js.map +1 -1
- package/lib/module/services/GamesService.js +1 -112
- package/lib/module/services/GamesService.js.map +1 -1
- package/lib/module/services/HapticsService.js +1 -77
- package/lib/module/services/ScoringService.js +1 -0
- package/lib/module/services/ScoringService.js.map +1 -0
- package/lib/module/services/SoundsService.js +1 -302
- package/lib/module/services/SoundsService.js.map +1 -1
- package/lib/module/services/UtilsService.js +1 -32
- package/lib/module/services/UtilsService.js.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +1 -1
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts +4 -0
- package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts.map +1 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts +76 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +22 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts.map +1 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +72 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts.map +1 -0
- package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +12 -0
- package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +9 -0
- package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +7 -0
- package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/bike-racing/components/index.d.ts +4 -0
- package/lib/typescript/src/games/bike-racing/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/bike-racing/index.d.ts +5 -0
- package/lib/typescript/src/games/bike-racing/index.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/BlockBlast.d.ts +4 -0
- package/lib/typescript/src/games/block-blast/BlockBlast.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts +82 -0
- package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +17 -0
- package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +62 -0
- package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +14 -0
- package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +12 -0
- package/lib/typescript/src/games/block-blast/components/GameArea.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/components/GameBackground.d.ts +7 -0
- package/lib/typescript/src/games/block-blast/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +17 -0
- package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +7 -0
- package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/components/index.d.ts +6 -0
- package/lib/typescript/src/games/block-blast/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/index.d.ts +5 -0
- package/lib/typescript/src/games/block-blast/index.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts +4 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts +61 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +26 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +62 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +9 -0
- package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/components/GameBackground.d.ts +8 -0
- package/lib/typescript/src/games/bubble-shooter/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +7 -0
- package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/components/index.d.ts +4 -0
- package/lib/typescript/src/games/bubble-shooter/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/index.d.ts +3 -0
- package/lib/typescript/src/games/bubble-shooter/index.d.ts.map +1 -0
- package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts.map +1 -1
- package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +7 -7
- package/lib/typescript/src/games/car-racing/CarRacing.d.ts +4 -0
- package/lib/typescript/src/games/car-racing/CarRacing.d.ts.map +1 -0
- package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts +76 -0
- package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +22 -0
- package/lib/typescript/src/games/car-racing/CarRacingService.d.ts.map +1 -0
- package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +72 -0
- package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts.map +1 -0
- package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +13 -0
- package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +9 -0
- package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +7 -0
- package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/car-racing/components/index.d.ts +4 -0
- package/lib/typescript/src/games/car-racing/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts.map +1 -1
- package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts.map +1 -1
- package/lib/typescript/src/games/dino-jump/DinoJump.d.ts.map +1 -1
- package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts.map +1 -1
- package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts.map +1 -1
- package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts.map +1 -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.map +1 -1
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -1
- package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts +4 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts.map +1 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts +81 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +14 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts.map +1 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +40 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts.map +1 -0
- package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +9 -0
- package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts.map +1 -0
- package/lib/typescript/src/games/perfect-circle/components/GameBackground.d.ts +8 -0
- package/lib/typescript/src/games/perfect-circle/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +7 -0
- package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/perfect-circle/index.d.ts +3 -0
- package/lib/typescript/src/games/perfect-circle/index.d.ts.map +1 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts.map +1 -1
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts.map +1 -1
- package/lib/typescript/src/games/snake/Snake.d.ts.map +1 -1
- package/lib/typescript/src/games/snake/SnakeStore.d.ts +4 -0
- package/lib/typescript/src/games/snake/SnakeStore.d.ts.map +1 -1
- package/lib/typescript/src/games/snake/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts.map +1 -1
- package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts.map +1 -1
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +1 -1
- package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/helpers/GameOverModal.d.ts +3 -0
- package/lib/typescript/src/helpers/GameOverModal.d.ts.map +1 -1
- package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +6 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/services/GamesConstants.d.ts +57 -7
- package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -1
- package/lib/typescript/src/services/GamesService.d.ts +2 -1
- package/lib/typescript/src/services/GamesService.d.ts.map +1 -1
- package/lib/typescript/src/services/ScoringService.d.ts +2 -0
- package/lib/typescript/src/services/ScoringService.d.ts.map +1 -0
- package/lib/typescript/src/services/SoundsService.d.ts +88 -0
- package/lib/typescript/src/services/SoundsService.d.ts.map +1 -1
- package/lib/typescript/src/services/UtilsService.d.ts +12 -1
- package/lib/typescript/src/services/UtilsService.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,274 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { create } from 'zustand';
|
|
4
|
-
import { subscribeWithSelector } from 'zustand/middleware';
|
|
5
|
-
import { immerMiddleware } from "../../services/UtilsService.js";
|
|
6
|
-
export const useSlidingNumbersStore = create()(subscribeWithSelector(immerMiddleware((set, get) => ({
|
|
7
|
-
// Initial state
|
|
8
|
-
isPlaying: false,
|
|
9
|
-
isCompleted: false,
|
|
10
|
-
tiles: [],
|
|
11
|
-
gridSize: 3,
|
|
12
|
-
emptyPosition: {
|
|
13
|
-
row: 2,
|
|
14
|
-
col: 2
|
|
15
|
-
},
|
|
16
|
-
score: 0,
|
|
17
|
-
timeLeft: 600,
|
|
18
|
-
timeElapsed: 0,
|
|
19
|
-
startTime: null,
|
|
20
|
-
// Initialize puzzle with given grid size
|
|
21
|
-
initializePuzzle: gridSize => {
|
|
22
|
-
set(state => {
|
|
23
|
-
const tiles = [];
|
|
24
|
-
const totalTiles = gridSize * gridSize;
|
|
25
|
-
|
|
26
|
-
// Create tiles (0 represents empty tile)
|
|
27
|
-
for (let i = 0; i < totalTiles; i++) {
|
|
28
|
-
const row = Math.floor(i / gridSize);
|
|
29
|
-
const col = i % gridSize;
|
|
30
|
-
const value = i === totalTiles - 1 ? 0 : i + 1; // Last tile is empty (0)
|
|
31
|
-
|
|
32
|
-
tiles.push({
|
|
33
|
-
id: i,
|
|
34
|
-
value,
|
|
35
|
-
position: {
|
|
36
|
-
row,
|
|
37
|
-
col
|
|
38
|
-
},
|
|
39
|
-
isCorrect: true // Initially all tiles are in correct position
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
state.tiles = tiles;
|
|
43
|
-
state.gridSize = gridSize;
|
|
44
|
-
state.emptyPosition = {
|
|
45
|
-
row: gridSize - 1,
|
|
46
|
-
col: gridSize - 1
|
|
47
|
-
};
|
|
48
|
-
state.score = 0;
|
|
49
|
-
state.timeLeft = 600; // 10 minutes
|
|
50
|
-
state.timeElapsed = 0;
|
|
51
|
-
state.isCompleted = false;
|
|
52
|
-
state.isPlaying = false;
|
|
53
|
-
state.startTime = null;
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
// Automatically shuffle the puzzle after initialization
|
|
57
|
-
get().shufflePuzzle();
|
|
58
|
-
},
|
|
59
|
-
// Move a tile if it's adjacent to empty space
|
|
60
|
-
moveTile: tileId => {
|
|
61
|
-
const state = get();
|
|
62
|
-
if (!state.isPlaying || state.isCompleted) return false;
|
|
63
|
-
const tile = state.tiles[tileId];
|
|
64
|
-
const emptyPos = state.emptyPosition;
|
|
65
|
-
|
|
66
|
-
// Check if tile is adjacent to empty space
|
|
67
|
-
const rowDiff = Math.abs(tile.position.row - emptyPos.row);
|
|
68
|
-
const colDiff = Math.abs(tile.position.col - emptyPos.col);
|
|
69
|
-
const isAdjacent = rowDiff === 1 && colDiff === 0 || rowDiff === 0 && colDiff === 1;
|
|
70
|
-
if (!isAdjacent) return false;
|
|
71
|
-
set(state => {
|
|
72
|
-
// Swap tile with empty space
|
|
73
|
-
const tile = state.tiles[tileId];
|
|
74
|
-
if (!tile) return;
|
|
75
|
-
const tilePos = tile.position;
|
|
76
|
-
const emptyTileId = state.tiles.findIndex(t => t.value === 0);
|
|
77
|
-
const emptyTile = state.tiles[emptyTileId];
|
|
78
|
-
if (!emptyTile) return;
|
|
79
|
-
|
|
80
|
-
// Update positions
|
|
81
|
-
tile.position = state.emptyPosition;
|
|
82
|
-
emptyTile.position = tilePos;
|
|
83
|
-
state.emptyPosition = tilePos;
|
|
84
|
-
|
|
85
|
-
// Update time elapsed for scoring
|
|
86
|
-
if (state.startTime) {
|
|
87
|
-
state.timeElapsed = Math.floor((Date.now() - state.startTime) / 1000);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// Check if tiles are in correct positions
|
|
91
|
-
state.tiles.forEach((tile, index) => {
|
|
92
|
-
const correctRow = Math.floor(index / state.gridSize);
|
|
93
|
-
const correctCol = index % state.gridSize;
|
|
94
|
-
tile.isCorrect = tile.position.row === correctRow && tile.position.col === correctCol;
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
// Completion will be checked by the component
|
|
99
|
-
return true;
|
|
100
|
-
},
|
|
101
|
-
// Move tile in specific direction (for gesture handling)
|
|
102
|
-
moveTileInDirection: (tileId, direction) => {
|
|
103
|
-
const state = get();
|
|
104
|
-
if (!state.isPlaying || state.isCompleted) return false;
|
|
105
|
-
const tile = state.tiles[tileId];
|
|
106
|
-
if (!tile) return false;
|
|
107
|
-
const emptyPos = state.emptyPosition;
|
|
108
|
-
let expectedEmptyPos;
|
|
109
|
-
|
|
110
|
-
// Calculate where empty space should be for this direction
|
|
111
|
-
switch (direction) {
|
|
112
|
-
case 'up':
|
|
113
|
-
expectedEmptyPos = {
|
|
114
|
-
row: tile.position.row - 1,
|
|
115
|
-
col: tile.position.col
|
|
116
|
-
};
|
|
117
|
-
break;
|
|
118
|
-
case 'down':
|
|
119
|
-
expectedEmptyPos = {
|
|
120
|
-
row: tile.position.row + 1,
|
|
121
|
-
col: tile.position.col
|
|
122
|
-
};
|
|
123
|
-
break;
|
|
124
|
-
case 'left':
|
|
125
|
-
expectedEmptyPos = {
|
|
126
|
-
row: tile.position.row,
|
|
127
|
-
col: tile.position.col - 1
|
|
128
|
-
};
|
|
129
|
-
break;
|
|
130
|
-
case 'right':
|
|
131
|
-
expectedEmptyPos = {
|
|
132
|
-
row: tile.position.row,
|
|
133
|
-
col: tile.position.col + 1
|
|
134
|
-
};
|
|
135
|
-
break;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// Check if empty space is in the expected position
|
|
139
|
-
if (emptyPos.row !== expectedEmptyPos.row || emptyPos.col !== expectedEmptyPos.col) {
|
|
140
|
-
return false;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// Use existing moveTile logic
|
|
144
|
-
return get().moveTile(tileId);
|
|
145
|
-
},
|
|
146
|
-
// Shuffle puzzle by making random valid moves
|
|
147
|
-
shufflePuzzle: () => {
|
|
148
|
-
const shuffleMoves = 100;
|
|
149
|
-
set(state => {
|
|
150
|
-
for (let i = 0; i < shuffleMoves; i++) {
|
|
151
|
-
const emptyPos = state.emptyPosition;
|
|
152
|
-
const possibleMoves = [];
|
|
153
|
-
|
|
154
|
-
// Find tiles adjacent to empty space
|
|
155
|
-
state.tiles.forEach((tile, index) => {
|
|
156
|
-
if (tile.value === 0) return; // Skip empty tile
|
|
157
|
-
|
|
158
|
-
const rowDiff = Math.abs(tile.position.row - emptyPos.row);
|
|
159
|
-
const colDiff = Math.abs(tile.position.col - emptyPos.col);
|
|
160
|
-
const isAdjacent = rowDiff === 1 && colDiff === 0 || rowDiff === 0 && colDiff === 1;
|
|
161
|
-
if (isAdjacent) {
|
|
162
|
-
possibleMoves.push(index);
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
if (possibleMoves.length > 0) {
|
|
166
|
-
const randomTileIndex = Math.floor(Math.random() * possibleMoves.length);
|
|
167
|
-
const randomTileId = possibleMoves[randomTileIndex];
|
|
168
|
-
if (randomTileId !== undefined) {
|
|
169
|
-
const tile = state.tiles[randomTileId];
|
|
170
|
-
const emptyTileId = state.tiles.findIndex(t => t.value === 0);
|
|
171
|
-
const emptyTile = state.tiles[emptyTileId];
|
|
172
|
-
if (tile && emptyTile) {
|
|
173
|
-
// Swap positions
|
|
174
|
-
const tilePos = tile.position;
|
|
175
|
-
tile.position = state.emptyPosition;
|
|
176
|
-
emptyTile.position = tilePos;
|
|
177
|
-
state.emptyPosition = tilePos;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// Update correctness after shuffle
|
|
184
|
-
state.tiles.forEach((tile, index) => {
|
|
185
|
-
const correctRow = Math.floor(index / state.gridSize);
|
|
186
|
-
const correctCol = index % state.gridSize;
|
|
187
|
-
tile.isCorrect = tile.position.row === correctRow && tile.position.col === correctCol;
|
|
188
|
-
});
|
|
189
|
-
|
|
190
|
-
// Reset score after shuffle
|
|
191
|
-
state.score = 0;
|
|
192
|
-
state.timeElapsed = 0;
|
|
193
|
-
});
|
|
194
|
-
},
|
|
195
|
-
// Start the game
|
|
196
|
-
startGame: () => {
|
|
197
|
-
set(state => {
|
|
198
|
-
state.isPlaying = true;
|
|
199
|
-
state.isCompleted = false;
|
|
200
|
-
state.startTime = Date.now();
|
|
201
|
-
});
|
|
202
|
-
},
|
|
203
|
-
// Stop the game
|
|
204
|
-
stopGame: () => {
|
|
205
|
-
const state = get();
|
|
206
|
-
// Reset the game instead of showing game over modal
|
|
207
|
-
state.resetGame();
|
|
208
|
-
},
|
|
209
|
-
// Reset the game (difficulty will be passed from component)
|
|
210
|
-
resetGame: () => {
|
|
211
|
-
set(state => {
|
|
212
|
-
state.isPlaying = false;
|
|
213
|
-
state.isCompleted = false;
|
|
214
|
-
state.score = 0;
|
|
215
|
-
state.timeLeft = 600;
|
|
216
|
-
state.timeElapsed = 0;
|
|
217
|
-
state.startTime = null;
|
|
218
|
-
});
|
|
219
|
-
// Puzzle will be re-initialized by the component with current difficulty
|
|
220
|
-
},
|
|
221
|
-
// Decrement time
|
|
222
|
-
decrementTime: () => {
|
|
223
|
-
set(state => {
|
|
224
|
-
if (state.timeLeft > 0) {
|
|
225
|
-
state.timeLeft--;
|
|
226
|
-
if (state.startTime) {
|
|
227
|
-
state.timeElapsed = Math.floor((Date.now() - state.startTime) / 1000);
|
|
228
|
-
}
|
|
229
|
-
} else {
|
|
230
|
-
state.isPlaying = false;
|
|
231
|
-
state.startTime = null;
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
},
|
|
235
|
-
// Check if puzzle is completed
|
|
236
|
-
checkCompletion: difficulty => {
|
|
237
|
-
const state = get();
|
|
238
|
-
const allCorrect = state.tiles.every(tile => tile.isCorrect);
|
|
239
|
-
if (allCorrect && state.isPlaying) {
|
|
240
|
-
set(state => {
|
|
241
|
-
state.isCompleted = true;
|
|
242
|
-
state.isPlaying = false;
|
|
243
|
-
|
|
244
|
-
// Calculate time-based score (faster completion = higher score)
|
|
245
|
-
const baseScore = difficulty === 'easy' ? 1000 : difficulty === 'medium' ? 2000 : 3000;
|
|
246
|
-
const multiplier = difficulty === 'easy' ? 5 : difficulty === 'medium' ? 10 : 15;
|
|
247
|
-
|
|
248
|
-
// Score decreases with time elapsed, bonus for remaining time
|
|
249
|
-
const timeScore = Math.max(0, baseScore - state.timeElapsed * multiplier);
|
|
250
|
-
const remainingTimeBonus = state.timeLeft * multiplier;
|
|
251
|
-
state.score = timeScore + remainingTimeBonus;
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
},
|
|
255
|
-
// Update score
|
|
256
|
-
updateScore: points => {
|
|
257
|
-
set(state => {
|
|
258
|
-
state.score += points;
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
}))));
|
|
262
|
-
|
|
263
|
-
// Selectors for performance optimization
|
|
264
|
-
export const useGameState = () => useSlidingNumbersStore(state => ({
|
|
265
|
-
isPlaying: state.isPlaying,
|
|
266
|
-
isCompleted: state.isCompleted
|
|
267
|
-
}));
|
|
268
|
-
export const useScore = () => useSlidingNumbersStore(state => state.score);
|
|
269
|
-
export const useTimeLeft = () => useSlidingNumbersStore(state => state.timeLeft);
|
|
270
|
-
export const useTimeElapsed = () => useSlidingNumbersStore(state => state.timeElapsed);
|
|
271
|
-
export const useTiles = () => useSlidingNumbersStore(state => state.tiles);
|
|
272
|
-
export const useGridSize = () => useSlidingNumbersStore(state => state.gridSize);
|
|
273
|
-
export const useEmptyPosition = () => useSlidingNumbersStore(state => state.emptyPosition);
|
|
274
|
-
//# sourceMappingURL=SlidingNumbersStore.js.map
|
|
1
|
+
"use strict";import{create}from 'zustand';import{subscribeWithSelector}from 'zustand/middleware';import{immerMiddleware}from "../../services/UtilsService.js";export const useSlidingNumbersStore = create()(subscribeWithSelector(immerMiddleware((set,get)=>({isPlaying:false,isCompleted:false,tiles:[],gridSize:3,emptyPosition:{row:2,col:2},score:0,timeLeft:600,timeElapsed:0,startTime:null,initializePuzzle:gridSize =>{set(state =>{const tiles = [];const totalTiles = gridSize * gridSize;for(let i = 0;i < totalTiles;i++){const row = Math.floor(i / gridSize);const col = i % gridSize;const value = i === totalTiles - 1 ? 0:i + 1;tiles.push({id:i,value,position:{row,col},isCorrect:true});}state.tiles = tiles;state.gridSize = gridSize;state.emptyPosition ={row:gridSize - 1,col:gridSize - 1};state.score = 0;state.timeLeft = 600;state.timeElapsed = 0;state.isCompleted = false;state.isPlaying = false;state.startTime = null;});get().shufflePuzzle();},moveTile:tileId =>{const state = get();if(!state.isPlaying || state.isCompleted)return false;const tile = state.tiles[tileId];const emptyPos = state.emptyPosition;const rowDiff = Math.abs(tile.position.row - emptyPos.row);const colDiff = Math.abs(tile.position.col - emptyPos.col);const isAdjacent = rowDiff === 1 && colDiff === 0 || rowDiff === 0 && colDiff === 1;if(!isAdjacent)return false;set(state =>{const tile = state.tiles[tileId];if(!tile)return;const tilePos = tile.position;const emptyTileId = state.tiles.findIndex(t => t.value === 0);const emptyTile = state.tiles[emptyTileId];if(!emptyTile)return;tile.position = state.emptyPosition;emptyTile.position = tilePos;state.emptyPosition = tilePos;if(state.startTime){state.timeElapsed = Math.floor((Date.now()- state.startTime)/ 1000);}state.tiles.forEach((tile,index)=>{const correctRow = Math.floor(index / state.gridSize);const correctCol = index % state.gridSize;tile.isCorrect = tile.position.row === correctRow && tile.position.col === correctCol;});});return true;},moveTileInDirection:(tileId,direction)=>{const state = get();if(!state.isPlaying || state.isCompleted)return false;const tile = state.tiles[tileId];if(!tile)return false;const emptyPos = state.emptyPosition;let expectedEmptyPos;switch(direction){case 'up':expectedEmptyPos ={row:tile.position.row - 1,col:tile.position.col};break;case 'down':expectedEmptyPos ={row:tile.position.row + 1,col:tile.position.col};break;case 'left':expectedEmptyPos ={row:tile.position.row,col:tile.position.col - 1};break;case 'right':expectedEmptyPos ={row:tile.position.row,col:tile.position.col + 1};break;}if(emptyPos.row !== expectedEmptyPos.row || emptyPos.col !== expectedEmptyPos.col){return false;}return get().moveTile(tileId);},shufflePuzzle:()=>{const shuffleMoves = 100;set(state =>{for(let i = 0;i < shuffleMoves;i++){const emptyPos = state.emptyPosition;const possibleMoves = [];state.tiles.forEach((tile,index)=>{if(tile.value === 0)return;const rowDiff = Math.abs(tile.position.row - emptyPos.row);const colDiff = Math.abs(tile.position.col - emptyPos.col);const isAdjacent = rowDiff === 1 && colDiff === 0 || rowDiff === 0 && colDiff === 1;if(isAdjacent){possibleMoves.push(index);}});if(possibleMoves.length > 0){const randomTileIndex = Math.floor(Math.random()* possibleMoves.length);const randomTileId = possibleMoves[randomTileIndex];if(randomTileId !== undefined){const tile = state.tiles[randomTileId];const emptyTileId = state.tiles.findIndex(t => t.value === 0);const emptyTile = state.tiles[emptyTileId];if(tile && emptyTile){const tilePos = tile.position;tile.position = state.emptyPosition;emptyTile.position = tilePos;state.emptyPosition = tilePos;}}}}state.tiles.forEach((tile,index)=>{const correctRow = Math.floor(index / state.gridSize);const correctCol = index % state.gridSize;tile.isCorrect = tile.position.row === correctRow && tile.position.col === correctCol;});state.score = 0;state.timeElapsed = 0;});},startGame:()=>{set(state =>{state.isPlaying = true;state.isCompleted = false;state.startTime = Date.now();});},stopGame:()=>{const state = get();state.resetGame();},resetGame:()=>{set(state =>{state.isPlaying = false;state.isCompleted = false;state.score = 0;state.timeLeft = 600;state.timeElapsed = 0;state.startTime = null;});},decrementTime:()=>{set(state =>{if(state.timeLeft > 0){state.timeLeft--;if(state.startTime){state.timeElapsed = Math.floor((Date.now()- state.startTime)/ 1000);}}else{state.isPlaying = false;state.startTime = null;}});},checkCompletion:difficulty =>{const state = get();const allCorrect = state.tiles.every(tile => tile.isCorrect);if(allCorrect && state.isPlaying){set(state =>{state.isCompleted = true;state.isPlaying = false;const baseScore = difficulty === 'easy' ? 1000:difficulty === 'medium' ? 2000:3000;const multiplier = difficulty === 'easy' ? 5:difficulty === 'medium' ? 10:15;const timeScore = Math.max(0,baseScore - state.timeElapsed * multiplier);const remainingTimeBonus = state.timeLeft * multiplier;state.score = timeScore + remainingTimeBonus;});}},updateScore:points =>{set(state =>{state.score += points;});}}))));export const useGameState =()=> useSlidingNumbersStore(state =>({isPlaying:state.isPlaying,isCompleted:state.isCompleted}));export const useScore =()=> useSlidingNumbersStore(state => state.score);export const useTimeLeft =()=> useSlidingNumbersStore(state => state.timeLeft);export const useTimeElapsed =()=> useSlidingNumbersStore(state => state.timeElapsed);export const useTiles =()=> useSlidingNumbersStore(state => state.tiles);export const useGridSize =()=> useSlidingNumbersStore(state => state.gridSize);export const useEmptyPosition =()=> useSlidingNumbersStore(state => state.emptyPosition);
|
|
@@ -1,259 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { View, Dimensions } from 'react-native';
|
|
5
|
-
import { Canvas, LinearGradient, Rect, vec, Circle, RoundedRect } from '@shopify/react-native-skia';
|
|
6
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
const {
|
|
8
|
-
width,
|
|
9
|
-
height
|
|
10
|
-
} = Dimensions.get('window');
|
|
11
|
-
|
|
12
|
-
// Puzzle-themed vibrant colors inspired by colorful number tiles
|
|
13
|
-
const PUZZLE_COLORS = ['#E91E63',
|
|
14
|
-
// Vibrant pink
|
|
15
|
-
'#F44336',
|
|
16
|
-
// Bright red
|
|
17
|
-
'#FF5722',
|
|
18
|
-
// Deep orange
|
|
19
|
-
'#FF9800',
|
|
20
|
-
// Orange
|
|
21
|
-
'#FFC107',
|
|
22
|
-
// Amber/yellow
|
|
23
|
-
'#CDDC39',
|
|
24
|
-
// Lime
|
|
25
|
-
'#4CAF50',
|
|
26
|
-
// Green
|
|
27
|
-
'#009688',
|
|
28
|
-
// Teal
|
|
29
|
-
'#00BCD4',
|
|
30
|
-
// Cyan
|
|
31
|
-
'#2196F3',
|
|
32
|
-
// Blue
|
|
33
|
-
'#3F51B5',
|
|
34
|
-
// Indigo
|
|
35
|
-
'#9C27B0' // Purple
|
|
36
|
-
];
|
|
37
|
-
export const GameBackground = /*#__PURE__*/React.memo(({
|
|
38
|
-
children
|
|
39
|
-
}) => {
|
|
40
|
-
// Generate static colorful floating puzzle tiles
|
|
41
|
-
const generateFloatingTiles = React.useMemo(() => {
|
|
42
|
-
const elements = [];
|
|
43
|
-
const tileCount = 25;
|
|
44
|
-
for (let i = 0; i < tileCount; i++) {
|
|
45
|
-
const baseX = width / tileCount * i;
|
|
46
|
-
const baseY = height / tileCount * i;
|
|
47
|
-
|
|
48
|
-
// Add subtle random offset for natural look
|
|
49
|
-
const x = baseX + Math.sin(i * 0.5) * 50 + Math.random() * 100;
|
|
50
|
-
const y = baseY + Math.cos(i * 0.7) * 60 + Math.random() * 120;
|
|
51
|
-
const tileSize = 20 + Math.random() * 20;
|
|
52
|
-
const colorIndex = i % PUZZLE_COLORS.length;
|
|
53
|
-
const opacity = 0.3 + Math.sin(i) * 0.15;
|
|
54
|
-
|
|
55
|
-
// Puzzle tile with varied shapes to suggest numbers
|
|
56
|
-
const tileX = Math.max(tileSize / 2, Math.min(width - tileSize, x));
|
|
57
|
-
const tileY = Math.max(tileSize / 2, Math.min(height - tileSize, y));
|
|
58
|
-
|
|
59
|
-
// Create different tile patterns to suggest different numbers
|
|
60
|
-
if (i % 4 === 0) {
|
|
61
|
-
// Square tiles (like number blocks)
|
|
62
|
-
elements.push(/*#__PURE__*/_jsx(RoundedRect, {
|
|
63
|
-
x: tileX,
|
|
64
|
-
y: tileY,
|
|
65
|
-
width: tileSize,
|
|
66
|
-
height: tileSize,
|
|
67
|
-
r: tileSize * 0.2,
|
|
68
|
-
color: `${PUZZLE_COLORS[colorIndex]}${Math.floor(opacity * 255).toString(16).padStart(2, '0')}`
|
|
69
|
-
}, `square-tile-${i}`));
|
|
70
|
-
} else if (i % 4 === 1) {
|
|
71
|
-
// Rectangular tiles (like number 1)
|
|
72
|
-
elements.push(/*#__PURE__*/_jsx(RoundedRect, {
|
|
73
|
-
x: tileX,
|
|
74
|
-
y: tileY,
|
|
75
|
-
width: tileSize * 0.6,
|
|
76
|
-
height: tileSize,
|
|
77
|
-
r: tileSize * 0.15,
|
|
78
|
-
color: `${PUZZLE_COLORS[colorIndex]}${Math.floor(opacity * 255).toString(16).padStart(2, '0')}`
|
|
79
|
-
}, `rect-tile-${i}`));
|
|
80
|
-
} else if (i % 4 === 2) {
|
|
81
|
-
// Wide tiles (like number 8)
|
|
82
|
-
elements.push(/*#__PURE__*/_jsx(RoundedRect, {
|
|
83
|
-
x: tileX,
|
|
84
|
-
y: tileY,
|
|
85
|
-
width: tileSize * 1.2,
|
|
86
|
-
height: tileSize * 0.8,
|
|
87
|
-
r: tileSize * 0.1,
|
|
88
|
-
color: `${PUZZLE_COLORS[colorIndex]}${Math.floor(opacity * 255).toString(16).padStart(2, '0')}`
|
|
89
|
-
}, `wide-tile-${i}`));
|
|
90
|
-
} else {
|
|
91
|
-
// Circular tiles
|
|
92
|
-
elements.push(/*#__PURE__*/_jsx(Circle, {
|
|
93
|
-
cx: tileX + tileSize / 2,
|
|
94
|
-
cy: tileY + tileSize / 2,
|
|
95
|
-
r: tileSize / 2,
|
|
96
|
-
color: `${PUZZLE_COLORS[colorIndex]}${Math.floor(opacity * 255).toString(16).padStart(2, '0')}`
|
|
97
|
-
}, `circle-tile-${i}`));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return elements;
|
|
101
|
-
}, [width, height]);
|
|
102
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
103
|
-
style: {
|
|
104
|
-
flex: 1
|
|
105
|
-
},
|
|
106
|
-
children: [/*#__PURE__*/_jsxs(Canvas, {
|
|
107
|
-
style: {
|
|
108
|
-
position: 'absolute',
|
|
109
|
-
top: 0,
|
|
110
|
-
left: 0,
|
|
111
|
-
right: 0,
|
|
112
|
-
bottom: 0,
|
|
113
|
-
width,
|
|
114
|
-
height
|
|
115
|
-
},
|
|
116
|
-
children: [/*#__PURE__*/_jsx(Rect, {
|
|
117
|
-
x: 0,
|
|
118
|
-
y: 0,
|
|
119
|
-
width: width,
|
|
120
|
-
height: height,
|
|
121
|
-
children: /*#__PURE__*/_jsx(LinearGradient, {
|
|
122
|
-
start: vec(0, 0),
|
|
123
|
-
end: vec(width, height),
|
|
124
|
-
colors: [`${PUZZLE_COLORS[0]}30`,
|
|
125
|
-
// Vibrant pink
|
|
126
|
-
`${PUZZLE_COLORS[3]}25`,
|
|
127
|
-
// Orange
|
|
128
|
-
`${PUZZLE_COLORS[6]}30`,
|
|
129
|
-
// Green
|
|
130
|
-
`${PUZZLE_COLORS[9]}25`,
|
|
131
|
-
// Blue
|
|
132
|
-
`${PUZZLE_COLORS[11]}30` // Purple
|
|
133
|
-
]
|
|
134
|
-
})
|
|
135
|
-
}), /*#__PURE__*/_jsx(Rect, {
|
|
136
|
-
x: 0,
|
|
137
|
-
y: 0,
|
|
138
|
-
width: width,
|
|
139
|
-
height: height,
|
|
140
|
-
children: /*#__PURE__*/_jsx(LinearGradient, {
|
|
141
|
-
start: vec(0, 0),
|
|
142
|
-
end: vec(width / 2, height / 2),
|
|
143
|
-
colors: [`${PUZZLE_COLORS[1]}20`,
|
|
144
|
-
// Bright red
|
|
145
|
-
'transparent', `${PUZZLE_COLORS[4]}20`,
|
|
146
|
-
// Yellow
|
|
147
|
-
'transparent', `${PUZZLE_COLORS[7]}20`,
|
|
148
|
-
// Teal
|
|
149
|
-
'transparent']
|
|
150
|
-
})
|
|
151
|
-
}), /*#__PURE__*/_jsx(Rect, {
|
|
152
|
-
x: 0,
|
|
153
|
-
y: 0,
|
|
154
|
-
width: width,
|
|
155
|
-
height: height,
|
|
156
|
-
children: /*#__PURE__*/_jsx(LinearGradient, {
|
|
157
|
-
start: vec(width, 0),
|
|
158
|
-
end: vec(0, height),
|
|
159
|
-
colors: [`${PUZZLE_COLORS[2]}15`,
|
|
160
|
-
// Deep orange
|
|
161
|
-
'transparent', `${PUZZLE_COLORS[5]}15`,
|
|
162
|
-
// Lime
|
|
163
|
-
'transparent', `${PUZZLE_COLORS[8]}15`,
|
|
164
|
-
// Cyan
|
|
165
|
-
'transparent']
|
|
166
|
-
})
|
|
167
|
-
}), generateFloatingTiles, /*#__PURE__*/_jsx(RoundedRect, {
|
|
168
|
-
x: width * 0.08,
|
|
169
|
-
y: height * 0.12,
|
|
170
|
-
width: 50,
|
|
171
|
-
height: 50,
|
|
172
|
-
r: 8,
|
|
173
|
-
color: `${PUZZLE_COLORS[0]}50` // Vibrant pink
|
|
174
|
-
}), /*#__PURE__*/_jsx(RoundedRect, {
|
|
175
|
-
x: width * 0.85,
|
|
176
|
-
y: height * 0.82,
|
|
177
|
-
width: 45,
|
|
178
|
-
height: 45,
|
|
179
|
-
r: 7,
|
|
180
|
-
color: `${PUZZLE_COLORS[3]}50` // Orange
|
|
181
|
-
}), /*#__PURE__*/_jsx(RoundedRect, {
|
|
182
|
-
x: width * 0.82,
|
|
183
|
-
y: height * 0.18,
|
|
184
|
-
width: 40,
|
|
185
|
-
height: 40,
|
|
186
|
-
r: 6,
|
|
187
|
-
color: `${PUZZLE_COLORS[6]}50` // Green
|
|
188
|
-
}), /*#__PURE__*/_jsx(RoundedRect, {
|
|
189
|
-
x: width * 0.12,
|
|
190
|
-
y: height * 0.75,
|
|
191
|
-
width: 55,
|
|
192
|
-
height: 55,
|
|
193
|
-
r: 9,
|
|
194
|
-
color: `${PUZZLE_COLORS[9]}50` // Blue
|
|
195
|
-
}), /*#__PURE__*/_jsx(RoundedRect, {
|
|
196
|
-
x: width * 0.47,
|
|
197
|
-
y: height * 0.08,
|
|
198
|
-
width: 35,
|
|
199
|
-
height: 35,
|
|
200
|
-
r: 5,
|
|
201
|
-
color: `${PUZZLE_COLORS[11]}50` // Purple
|
|
202
|
-
}), /*#__PURE__*/_jsx(RoundedRect, {
|
|
203
|
-
x: width * 0.15,
|
|
204
|
-
y: height * 0.47,
|
|
205
|
-
width: 42,
|
|
206
|
-
height: 42,
|
|
207
|
-
r: 6,
|
|
208
|
-
color: `${PUZZLE_COLORS[5]}50` // Lime
|
|
209
|
-
}), /*#__PURE__*/_jsx(RoundedRect, {
|
|
210
|
-
x: width * 0.75,
|
|
211
|
-
y: height * 0.57,
|
|
212
|
-
width: 38,
|
|
213
|
-
height: 38,
|
|
214
|
-
r: 6,
|
|
215
|
-
color: `${PUZZLE_COLORS[8]}50` // Cyan
|
|
216
|
-
}), /*#__PURE__*/_jsx(RoundedRect, {
|
|
217
|
-
x: width * 0.57,
|
|
218
|
-
y: height * 0.87,
|
|
219
|
-
width: 32,
|
|
220
|
-
height: 32,
|
|
221
|
-
r: 5,
|
|
222
|
-
color: `${PUZZLE_COLORS[1]}50` // Red
|
|
223
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
224
|
-
cx: width * 0.25,
|
|
225
|
-
cy: height * 0.25,
|
|
226
|
-
r: 18,
|
|
227
|
-
color: `${PUZZLE_COLORS[4]}45` // Yellow
|
|
228
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
229
|
-
cx: width * 0.65,
|
|
230
|
-
cy: height * 0.35,
|
|
231
|
-
r: 22,
|
|
232
|
-
color: `${PUZZLE_COLORS[7]}45` // Teal
|
|
233
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
234
|
-
cx: width * 0.35,
|
|
235
|
-
cy: height * 0.65,
|
|
236
|
-
r: 16,
|
|
237
|
-
color: `${PUZZLE_COLORS[10]}45` // Indigo
|
|
238
|
-
}), Array.from({
|
|
239
|
-
length: Math.floor(width / 60)
|
|
240
|
-
}, (_, i) => /*#__PURE__*/_jsx(Rect, {
|
|
241
|
-
x: i * 60,
|
|
242
|
-
y: 0,
|
|
243
|
-
width: 1,
|
|
244
|
-
height: height,
|
|
245
|
-
color: "rgba(255, 255, 255, 0.05)"
|
|
246
|
-
}, `grid-v-${i}`)), Array.from({
|
|
247
|
-
length: Math.floor(height / 60)
|
|
248
|
-
}, (_, i) => /*#__PURE__*/_jsx(Rect, {
|
|
249
|
-
x: 0,
|
|
250
|
-
y: i * 60,
|
|
251
|
-
width: width,
|
|
252
|
-
height: 1,
|
|
253
|
-
color: "rgba(255, 255, 255, 0.05)"
|
|
254
|
-
}, `grid-h-${i}`))]
|
|
255
|
-
}), children]
|
|
256
|
-
});
|
|
257
|
-
});
|
|
258
|
-
GameBackground.displayName = 'GameBackground';
|
|
259
|
-
//# sourceMappingURL=GameBackground.js.map
|
|
1
|
+
"use strict";import React from 'react';import{View,Dimensions}from 'react-native';import{Canvas,LinearGradient,Rect,vec,Circle,RoundedRect}from '@shopify/react-native-skia';import{jsx as _jsx,jsxs as _jsxs}from "react/jsx-runtime";const{width,height}= Dimensions.get('window');const PUZZLE_COLORS = ['#E91E63','#F44336','#FF5722','#FF9800','#FFC107','#CDDC39','#4CAF50','#009688','#00BCD4','#2196F3','#3F51B5','#9C27B0' ];export const GameBackground = React.memo(({children})=>{const generateFloatingTiles = React.useMemo(()=>{const elements = [];const tileCount = 25;for(let i = 0;i < tileCount;i++){const baseX = width / tileCount * i;const baseY = height / tileCount * i;const x = baseX + Math.sin(i * 0.5)* 50 + Math.random()* 100;const y = baseY + Math.cos(i * 0.7)* 60 + Math.random()* 120;const tileSize = 20 + Math.random()* 20;const colorIndex = i % PUZZLE_COLORS.length;const opacity = 0.3 + Math.sin(i)* 0.15;const tileX = Math.max(tileSize / 2,Math.min(width - tileSize,x));const tileY = Math.max(tileSize / 2,Math.min(height - tileSize,y));if(i % 4 === 0){elements.push(_jsx(RoundedRect,{x:tileX,y:tileY,width:tileSize,height:tileSize,r:tileSize * 0.2,color:`${PUZZLE_COLORS[colorIndex]}${Math.floor(opacity * 255).toString(16).padStart(2,'0')}`},`square-tile-${i}`));}else if(i % 4 === 1){elements.push(_jsx(RoundedRect,{x:tileX,y:tileY,width:tileSize * 0.6,height:tileSize,r:tileSize * 0.15,color:`${PUZZLE_COLORS[colorIndex]}${Math.floor(opacity * 255).toString(16).padStart(2,'0')}`},`rect-tile-${i}`));}else if(i % 4 === 2){elements.push(_jsx(RoundedRect,{x:tileX,y:tileY,width:tileSize * 1.2,height:tileSize * 0.8,r:tileSize * 0.1,color:`${PUZZLE_COLORS[colorIndex]}${Math.floor(opacity * 255).toString(16).padStart(2,'0')}`},`wide-tile-${i}`));}else{elements.push(_jsx(Circle,{cx:tileX + tileSize / 2,cy:tileY + tileSize / 2,r:tileSize / 2,color:`${PUZZLE_COLORS[colorIndex]}${Math.floor(opacity * 255).toString(16).padStart(2,'0')}`},`circle-tile-${i}`));}}return elements;},[width,height]);return _jsxs(View,{style:{flex:1},children:[_jsxs(Canvas,{style:{position:'absolute',top:0,left:0,right:0,bottom:0,width,height},children:[_jsx(Rect,{x:0,y:0,width:width,height:height,children:_jsx(LinearGradient,{start:vec(0,0),end:vec(width,height),colors:[`${PUZZLE_COLORS[0]}30`,`${PUZZLE_COLORS[3]}25`,`${PUZZLE_COLORS[6]}30`,`${PUZZLE_COLORS[9]}25`,`${PUZZLE_COLORS[11]}30` ]})}),_jsx(Rect,{x:0,y:0,width:width,height:height,children:_jsx(LinearGradient,{start:vec(0,0),end:vec(width / 2,height / 2),colors:[`${PUZZLE_COLORS[1]}20`,'transparent',`${PUZZLE_COLORS[4]}20`,'transparent',`${PUZZLE_COLORS[7]}20`,'transparent']})}),_jsx(Rect,{x:0,y:0,width:width,height:height,children:_jsx(LinearGradient,{start:vec(width,0),end:vec(0,height),colors:[`${PUZZLE_COLORS[2]}15`,'transparent',`${PUZZLE_COLORS[5]}15`,'transparent',`${PUZZLE_COLORS[8]}15`,'transparent']})}),generateFloatingTiles,_jsx(RoundedRect,{x:width * 0.08,y:height * 0.12,width:50,height:50,r:8,color:`${PUZZLE_COLORS[0]}50`}),_jsx(RoundedRect,{x:width * 0.85,y:height * 0.82,width:45,height:45,r:7,color:`${PUZZLE_COLORS[3]}50`}),_jsx(RoundedRect,{x:width * 0.82,y:height * 0.18,width:40,height:40,r:6,color:`${PUZZLE_COLORS[6]}50`}),_jsx(RoundedRect,{x:width * 0.12,y:height * 0.75,width:55,height:55,r:9,color:`${PUZZLE_COLORS[9]}50`}),_jsx(RoundedRect,{x:width * 0.47,y:height * 0.08,width:35,height:35,r:5,color:`${PUZZLE_COLORS[11]}50`}),_jsx(RoundedRect,{x:width * 0.15,y:height * 0.47,width:42,height:42,r:6,color:`${PUZZLE_COLORS[5]}50`}),_jsx(RoundedRect,{x:width * 0.75,y:height * 0.57,width:38,height:38,r:6,color:`${PUZZLE_COLORS[8]}50`}),_jsx(RoundedRect,{x:width * 0.57,y:height * 0.87,width:32,height:32,r:5,color:`${PUZZLE_COLORS[1]}50`}),_jsx(Circle,{cx:width * 0.25,cy:height * 0.25,r:18,color:`${PUZZLE_COLORS[4]}45`}),_jsx(Circle,{cx:width * 0.65,cy:height * 0.35,r:22,color:`${PUZZLE_COLORS[7]}45`}),_jsx(Circle,{cx:width * 0.35,cy:height * 0.65,r:16,color:`${PUZZLE_COLORS[10]}45`}),Array.from({length:Math.floor(width / 60)},(_,i)=> _jsx(Rect,{x:i * 60,y:0,width:1,height:height,color:"rgba(255,255,255,0.05)"},`grid-v-${i}`)),Array.from({length:Math.floor(height / 60)},(_,i)=> _jsx(Rect,{x:0,y:i * 60,width:width,height:1,color:"rgba(255,255,255,0.05)"},`grid-h-${i}`))]}),children]});});GameBackground.displayName = 'GameBackground';
|