react-native-games 1.3.0 → 1.5.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.
Files changed (195) hide show
  1. package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -1
  2. package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -1
  3. package/lib/module/games/balloon-blaster/BalloonBlasterService.js +1 -1
  4. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +1 -1
  5. package/lib/module/games/balloon-blaster/components/BalloonComponent.js +1 -1
  6. package/lib/module/games/balloon-blaster/components/GameArea.js +1 -1
  7. package/lib/module/games/balloon-blaster/components/GameBackground.js +1 -1
  8. package/lib/module/games/balloon-blaster/components/ScoreBoard.js +1 -1
  9. package/lib/module/games/balloon-blaster/components/index.js +1 -1
  10. package/lib/module/games/bike-racing/BikeRacing.js +1 -1
  11. package/lib/module/games/bike-racing/BikeRacingConstants.js +1 -1
  12. package/lib/module/games/bike-racing/BikeRacingService.js +1 -1
  13. package/lib/module/games/bike-racing/BikeRacingStore.js +1 -1
  14. package/lib/module/games/bike-racing/components/BikeComponent.js +1 -1
  15. package/lib/module/games/bike-racing/components/GameBackground.js +1 -1
  16. package/lib/module/games/bike-racing/components/ScoreBoard.js +1 -1
  17. package/lib/module/games/bike-racing/components/index.js +1 -1
  18. package/lib/module/games/bike-racing/index.js +1 -1
  19. package/lib/module/games/block-blast/BlockBlast.js +1 -1
  20. package/lib/module/games/block-blast/BlockBlastConstants.js +1 -1
  21. package/lib/module/games/block-blast/BlockBlastService.js +1 -1
  22. package/lib/module/games/block-blast/BlockBlastStore.js +1 -1
  23. package/lib/module/games/block-blast/components/BlockPieceComponent.js +1 -1
  24. package/lib/module/games/block-blast/components/GameArea.js +1 -1
  25. package/lib/module/games/block-blast/components/GameBackground.js +1 -1
  26. package/lib/module/games/block-blast/components/GridComponent.js +1 -1
  27. package/lib/module/games/block-blast/components/ScoreBoard.js +1 -1
  28. package/lib/module/games/block-blast/components/index.js +1 -1
  29. package/lib/module/games/block-blast/index.js +1 -1
  30. package/lib/module/games/bubble-shooter/BubbleShooter.js +1 -1
  31. package/lib/module/games/bubble-shooter/BubbleShooterConstants.js +1 -1
  32. package/lib/module/games/bubble-shooter/BubbleShooterService.js +1 -1
  33. package/lib/module/games/bubble-shooter/BubbleShooterStore.js +1 -1
  34. package/lib/module/games/bubble-shooter/components/GameArea.js +1 -1
  35. package/lib/module/games/bubble-shooter/components/GameBackground.js +1 -1
  36. package/lib/module/games/bubble-shooter/components/ScoreBoard.js +1 -1
  37. package/lib/module/games/bubble-shooter/components/index.js +1 -1
  38. package/lib/module/games/bubble-shooter/index.js +1 -1
  39. package/lib/module/games/candy-crush/CandyCrush.js +1 -1
  40. package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -1
  41. package/lib/module/games/candy-crush/CandyCrushService.js +1 -1
  42. package/lib/module/games/candy-crush/CandyCrushStore.js +1 -1
  43. package/lib/module/games/candy-crush/components/CandyItem.js +1 -1
  44. package/lib/module/games/candy-crush/components/GameBackground.js +1 -1
  45. package/lib/module/games/candy-crush/components/GameGrid.js +1 -1
  46. package/lib/module/games/candy-crush/components/ScoreBoard.js +1 -1
  47. package/lib/module/games/candy-crush/components/index.js +1 -1
  48. package/lib/module/games/candy-crush/index.js +1 -1
  49. package/lib/module/games/car-racing/CarRacing.js +1 -1
  50. package/lib/module/games/car-racing/CarRacingConstants.js +1 -1
  51. package/lib/module/games/car-racing/CarRacingService.js +1 -1
  52. package/lib/module/games/car-racing/CarRacingStore.js +1 -1
  53. package/lib/module/games/car-racing/components/CarComponent.js +1 -1
  54. package/lib/module/games/car-racing/components/GameBackground.js +1 -1
  55. package/lib/module/games/car-racing/components/ScoreBoard.js +1 -1
  56. package/lib/module/games/car-racing/components/index.js +1 -1
  57. package/lib/module/games/colors-sort/ColorsSort.js +1 -1
  58. package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -1
  59. package/lib/module/games/colors-sort/ColorsSortService.js +1 -1
  60. package/lib/module/games/colors-sort/ColorsSortStore.js +1 -1
  61. package/lib/module/games/colors-sort/components/ColorContainer.js +1 -1
  62. package/lib/module/games/colors-sort/components/GameBackground.js +1 -1
  63. package/lib/module/games/colors-sort/components/ScoreBoard.js +1 -1
  64. package/lib/module/games/colors-sort/components/index.js +1 -1
  65. package/lib/module/games/dino-jump/DinoJump.js +1 -1
  66. package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -1
  67. package/lib/module/games/dino-jump/DinoJumpService.js +1 -1
  68. package/lib/module/games/dino-jump/DinoJumpStore.js +1 -1
  69. package/lib/module/games/dino-jump/components/DinoSprite.js +1 -1
  70. package/lib/module/games/dino-jump/components/GameArea.js +1 -1
  71. package/lib/module/games/dino-jump/components/GameBackground.js +1 -1
  72. package/lib/module/games/dino-jump/components/ObstacleSprite.js +1 -1
  73. package/lib/module/games/dino-jump/components/ScoreBoard.js +1 -1
  74. package/lib/module/games/dino-jump/components/StarSprite.js +1 -1
  75. package/lib/module/games/dino-jump/components/index.js +1 -1
  76. package/lib/module/games/flappy-bird/FlappyBird.js +1 -1
  77. package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -1
  78. package/lib/module/games/flappy-bird/FlappyBirdStore.js +1 -1
  79. package/lib/module/games/flappy-bird/components/Bird.js +1 -1
  80. package/lib/module/games/flappy-bird/components/GameArea.js +1 -1
  81. package/lib/module/games/flappy-bird/components/GameBackground.js +1 -1
  82. package/lib/module/games/flappy-bird/components/Pipes.js +1 -1
  83. package/lib/module/games/flappy-bird/components/ScoreBoard.js +1 -1
  84. package/lib/module/games/flappy-bird/components/index.js +1 -1
  85. package/lib/module/games/fruit-merger/FruitMerger.js +1 -1
  86. package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -1
  87. package/lib/module/games/fruit-merger/FruitMergerService.js +1 -1
  88. package/lib/module/games/fruit-merger/FruitMergerStore.js +1 -1
  89. package/lib/module/games/fruit-merger/components/FruitItem.js +1 -1
  90. package/lib/module/games/fruit-merger/components/GameArea.js +1 -1
  91. package/lib/module/games/fruit-merger/components/GameBackground.js +1 -1
  92. package/lib/module/games/fruit-merger/components/ScoreBoard.js +1 -1
  93. package/lib/module/games/fruit-merger/components/index.js +1 -1
  94. package/lib/module/games/fruit-ninja/FruitNinja.js +1 -1
  95. package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -1
  96. package/lib/module/games/fruit-ninja/FruitNinjaService.js +1 -1
  97. package/lib/module/games/fruit-ninja/FruitNinjaStore.js +1 -1
  98. package/lib/module/games/fruit-ninja/components/FruitComponent.js +1 -1
  99. package/lib/module/games/fruit-ninja/components/GameArea.js +1 -1
  100. package/lib/module/games/fruit-ninja/components/GameBackground.js +1 -1
  101. package/lib/module/games/fruit-ninja/components/ScoreBoard.js +1 -1
  102. package/lib/module/games/fruit-ninja/components/index.js +1 -1
  103. package/lib/module/games/game-2048/Game2048.js +1 -1
  104. package/lib/module/games/game-2048/Game2048Constants.js +1 -1
  105. package/lib/module/games/game-2048/Game2048Service.js +1 -1
  106. package/lib/module/games/game-2048/Game2048Store.js +1 -1
  107. package/lib/module/games/game-2048/components/GameBackground.js +1 -1
  108. package/lib/module/games/game-2048/components/GameGrid.js +1 -1
  109. package/lib/module/games/game-2048/components/GameTile.js +1 -1
  110. package/lib/module/games/game-2048/components/ScoreBoard.js +1 -1
  111. package/lib/module/games/game-2048/components/index.js +1 -1
  112. package/lib/module/games/maze-runner/MazeRunner.js +1 -1
  113. package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -1
  114. package/lib/module/games/maze-runner/MazeRunnerService.js +1 -1
  115. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +1 -1
  116. package/lib/module/games/maze-runner/components/EnhancedGameArea.js +1 -1
  117. package/lib/module/games/maze-runner/components/GameBackground.js +1 -1
  118. package/lib/module/games/maze-runner/components/ScoreBoard.js +1 -1
  119. package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +1 -1
  120. package/lib/module/games/maze-runner/components/StaticGameBackground.js +1 -1
  121. package/lib/module/games/maze-runner/components/WallComponent.js +1 -1
  122. package/lib/module/games/maze-runner/components/index.js +1 -1
  123. package/lib/module/games/perfect-circle/PerfectCircle.js +1 -1
  124. package/lib/module/games/perfect-circle/PerfectCircleConstants.js +1 -1
  125. package/lib/module/games/perfect-circle/PerfectCircleService.js +1 -1
  126. package/lib/module/games/perfect-circle/PerfectCircleStore.js +1 -1
  127. package/lib/module/games/perfect-circle/components/DrawingCanvas.js +1 -1
  128. package/lib/module/games/perfect-circle/components/GameBackground.js +1 -1
  129. package/lib/module/games/perfect-circle/components/ScoreBoard.js +1 -1
  130. package/lib/module/games/perfect-circle/index.js +1 -1
  131. package/lib/module/games/popit-fidget/PopitFidget.js +1 -1
  132. package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -1
  133. package/lib/module/games/popit-fidget/PopitFidgetService.js +1 -1
  134. package/lib/module/games/popit-fidget/PopitFidgetStore.js +1 -1
  135. package/lib/module/games/popit-fidget/components/BubbleComponent.js +1 -1
  136. package/lib/module/games/popit-fidget/components/FidgetGrid.js +1 -1
  137. package/lib/module/games/popit-fidget/components/GameBackground.js +1 -1
  138. package/lib/module/games/popit-fidget/components/ScoreBoard.js +1 -1
  139. package/lib/module/games/popit-fidget/components/index.js +1 -1
  140. package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -1
  141. package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -1
  142. package/lib/module/games/sliding-numbers/SlidingNumbersService.js +1 -1
  143. package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +1 -1
  144. package/lib/module/games/sliding-numbers/components/GameBackground.js +1 -1
  145. package/lib/module/games/sliding-numbers/components/NumbersGrid.js +1 -1
  146. package/lib/module/games/sliding-numbers/components/NumbersTile.js +1 -1
  147. package/lib/module/games/sliding-numbers/components/ScoreBoard.js +1 -1
  148. package/lib/module/games/sliding-numbers/components/index.js +1 -1
  149. package/lib/module/games/snake/Snake.js +1 -1
  150. package/lib/module/games/snake/SnakeConstants.js +1 -1
  151. package/lib/module/games/snake/SnakeService.js +1 -1
  152. package/lib/module/games/snake/SnakeStore.js +1 -1
  153. package/lib/module/games/snake/components/GameBackground.js +1 -1
  154. package/lib/module/games/snake/components/GameGrid.js +1 -1
  155. package/lib/module/games/snake/components/ScoreBoard.js +1 -1
  156. package/lib/module/games/snake/components/index.js +1 -1
  157. package/lib/module/games/snake/index.js +1 -1
  158. package/lib/module/games/space-fighter/SpaceFighter.js +1 -1
  159. package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -1
  160. package/lib/module/games/space-fighter/SpaceFighterService.js +1 -1
  161. package/lib/module/games/space-fighter/SpaceFighterStore.js +1 -1
  162. package/lib/module/games/space-fighter/components/AsteroidComponent.js +1 -1
  163. package/lib/module/games/space-fighter/components/GameArea.js +1 -1
  164. package/lib/module/games/space-fighter/components/GameBackground.js +1 -1
  165. package/lib/module/games/space-fighter/components/ScoreBoard.js +1 -1
  166. package/lib/module/games/space-fighter/components/Spacecraft3D.js +1 -1
  167. package/lib/module/games/space-fighter/components/SpacecraftPath.js +1 -1
  168. package/lib/module/games/space-fighter/components/index.js +1 -1
  169. package/lib/module/games/whack-a-mole/WhackAMole.js +1 -1
  170. package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -1
  171. package/lib/module/games/whack-a-mole/WhackAMoleService.js +1 -1
  172. package/lib/module/games/whack-a-mole/WhackAMoleStore.js +1 -1
  173. package/lib/module/games/whack-a-mole/components/GameBackground.js +1 -1
  174. package/lib/module/games/whack-a-mole/components/GameGrid.js +1 -1
  175. package/lib/module/games/whack-a-mole/components/GameHole.js +1 -1
  176. package/lib/module/games/whack-a-mole/components/MoleCharacter.js +1 -1
  177. package/lib/module/games/whack-a-mole/components/ScoreBoard.js +1 -1
  178. package/lib/module/games/whack-a-mole/components/index.js +1 -1
  179. package/lib/module/helpers/AnimationFrame.js +1 -1
  180. package/lib/module/helpers/AnimationTracker.js +1 -1
  181. package/lib/module/helpers/ErrorHandler.js +1 -1
  182. package/lib/module/helpers/GameControlButton.js +1 -1
  183. package/lib/module/helpers/GameOverModal.js +1 -1
  184. package/lib/module/helpers/GameSettingsModal.js +1 -1
  185. package/lib/module/helpers/ParticleBlast.js +1 -1
  186. package/lib/module/helpers/ScoreBoardContainer.js +1 -1
  187. package/lib/module/helpers/index.js +1 -1
  188. package/lib/module/index.js +1 -1
  189. package/lib/module/services/GamesConstants.js +1 -1
  190. package/lib/module/services/GamesService.js +1 -1
  191. package/lib/module/services/HapticsService.js +1 -1
  192. package/lib/module/services/ScoringService.js +1 -1
  193. package/lib/module/services/SoundsService.js +1 -1
  194. package/lib/module/services/UtilsService.js +1 -1
  195. package/package.json +5 -2
@@ -1 +1 @@
1
- "use strict";import React from 'react';import{View,TouchableOpacity,Text,StyleSheet,Modal}from 'react-native';import{jsx as _jsx,jsxs as _jsxs}from "react/jsx-runtime";export const GameOverModal = React.memo(({isVisible,score,onPlayAgain,buttonText = "Play Again",primaryColor = "rgba(59,130,246,0.8)",borderColor = "rgba(59,130,246,0.9)",buttonColor = "#10b981",buttonBorderColor = "#34d399",buttonTextColor = "#ffffff",scoreLabel = "Final Score",scoreFormatter})=>{const displayScore = scoreFormatter ? scoreFormatter(score):score.toString();return _jsx(Modal,{visible:isVisible,animationType:"fade",transparent:true,onRequestClose:onPlayAgain,children:_jsx(View,{style:styles.gameOverOverlay,children:_jsx(View,{style:[styles.gameOverModal,{backgroundColor:primaryColor,borderColor:borderColor}],children:_jsxs(View,{style:styles.modalContent,children:[_jsx(Text,{style:styles.gameOverTitle,children:"Game Over!"}),_jsxs(View,{style:[styles.finalScoreContainer,{backgroundColor:'rgba(255,255,255,0.2)'}],children:[_jsx(Text,{style:styles.finalScoreLabel,children:scoreLabel}),_jsx(Text,{style:styles.finalScoreValue,children:displayScore})]}),_jsx(View,{style:styles.playAgainContainer,children:_jsx(TouchableOpacity,{style:[styles.playAgainButton,{backgroundColor:buttonColor,borderColor:buttonBorderColor}],onPress:onPlayAgain,activeOpacity:0.8,children:_jsx(Text,{style:[styles.buttonText,{color:buttonTextColor}],children:buttonText})})})]})})})});});const styles = StyleSheet.create({gameOverOverlay:{flex:1,justifyContent:'center',alignItems:'center',backgroundColor:'rgba(0,0,0,0.8)'},gameOverModal:{borderRadius:24,minWidth:'80%',elevation:12},modalContent:{padding:40,alignItems:'center'},gameOverTitle:{fontSize:30,fontWeight:'bold',color:'#ffffff',marginBottom:32,textAlign:'center'},finalScoreContainer:{alignItems:'center',marginBottom:32,borderRadius:16,padding:20,minWidth:150},finalScoreLabel:{fontSize:18,color:'#ffffff',fontWeight:'bold',marginBottom:8},finalScoreValue:{fontSize:48,color:'#facc15',fontWeight:'bold',textAlign:'center'},playAgainContainer:{alignItems:'center'},playAgainButton:{paddingHorizontal:40,paddingVertical:20,borderRadius:24,shadowColor:'#000',shadowOffset:{width:0,height:2},shadowOpacity:0.25,shadowRadius:3.84,elevation:5,borderWidth:2},buttonText:{fontSize:18,fontWeight:'bold',color:'#ffffff',textAlign:'center',lineHeight:24}});
1
+ "use strict";import e from"react";import{View as o,TouchableOpacity as t,Text as r,StyleSheet as n,Modal as i}from"react-native";import{jsx as a,jsxs as l}from"react/jsx-runtime";export const GameOverModal=e.memo(({isVisible:e,score:n,onPlayAgain:c,buttonText:s="Play Again",primaryColor:f="rgba(59, 130, 246, 0.8)",borderColor:g="rgba(59, 130, 246, 0.9)",buttonColor:b="#10b981",buttonBorderColor:m="#34d399",buttonTextColor:h="#ffffff",scoreLabel:u="Final Score",scoreFormatter:y})=>{const C=y?y(n):n.toString();return a(i,{visible:e,animationType:"fade",transparent:!0,onRequestClose:c,children:a(o,{style:d.gameOverOverlay,children:a(o,{style:[d.gameOverModal,{backgroundColor:f,borderColor:g}],children:l(o,{style:d.modalContent,children:[a(r,{style:d.gameOverTitle,children:"Game Over!"}),l(o,{style:[d.finalScoreContainer,{backgroundColor:"rgba(255, 255, 255,0.2)"}],children:[a(r,{style:d.finalScoreLabel,children:u}),a(r,{style:d.finalScoreValue,children:C})]}),a(o,{style:d.playAgainContainer,children:a(t,{style:[d.playAgainButton,{backgroundColor:b,borderColor:m}],onPress:c,activeOpacity:.8,children:a(r,{style:[d.buttonText,{color:h}],children:s})})})]})})})})});const d=n.create({gameOverOverlay:{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0.8)"},gameOverModal:{borderRadius:24,minWidth:"80%",elevation:12},modalContent:{padding:40,alignItems:"center"},gameOverTitle:{fontSize:30,fontWeight:"bold",color:"#ffffff",marginBottom:32,textAlign:"center"},finalScoreContainer:{alignItems:"center",marginBottom:32,borderRadius:16,padding:20,minWidth:150},finalScoreLabel:{fontSize:18,color:"#ffffff",fontWeight:"bold",marginBottom:8},finalScoreValue:{fontSize:48,color:"#facc15",fontWeight:"bold",textAlign:"center"},playAgainContainer:{alignItems:"center"},playAgainButton:{paddingHorizontal:40,paddingVertical:20,borderRadius:24,shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.25,shadowRadius:3.84,elevation:5,borderWidth:2},buttonText:{fontSize:18,fontWeight:"bold",color:"#ffffff",textAlign:"center",lineHeight:24}});
@@ -1 +1 @@
1
- "use strict";import React from 'react';import{View,Text,ScrollView,TouchableOpacity,Switch,StyleSheet,Modal}from 'react-native';import{getGameTheme,getGameDifficultyDescriptions,getGameTitle}from "../services/GamesConstants.js";import{jsx as _jsx,jsxs as _jsxs}from "react/jsx-runtime";export const GameSettingsModal =({gameId,settings,onSettingsChange =()=> undefined})=>{const theme = getGameTheme(gameId);const difficultyDescriptions = getGameDifficultyDescriptions(gameId);const title = `${getGameTitle(gameId)}Settings`;const{isVisible,difficulty,enableSounds,enableHaptics}= settings;const handleDifficultyChange = newDifficulty =>{onSettingsChange({...settings,difficulty:newDifficulty});};const handleSoundToggle = enabled =>{onSettingsChange({...settings,enableSounds:enabled});};const handleHapticToggle = enabled =>{onSettingsChange({...settings,enableHaptics:enabled});};const handleOnClose =()=>{onSettingsChange({...settings,isVisible:false});};return _jsx(Modal,{visible:isVisible,animationType:"fade",transparent:true,onRequestClose:handleOnClose,children:_jsx(View,{style:styles.overlay,children:_jsxs(View,{style:[styles.container,{backgroundColor:theme.backgroundColor}],children:[_jsxs(View,{style:[styles.header,{backgroundColor:theme.headerBackgroundColor}],children:[_jsx(Text,{style:[styles.headerTitle,{color:theme.headerTextColor}],children:title}),_jsx(TouchableOpacity,{onPress:handleOnClose,style:styles.closeButton,children:_jsx(Text,{style:[styles.closeButtonText,{color:theme.headerTextColor}],children:"\u2715"})})]}),_jsxs(ScrollView,{style:styles.scrollView,contentContainerStyle:styles.scrollContent,children:[_jsxs(View,{style:[styles.section,{backgroundColor:theme.sectionBackgroundColor}],children:[_jsx(Text,{style:[styles.sectionTitle,{color:theme.sectionTitleColor}],children:"Difficulty Level"}),_jsx(View,{style:styles.difficultyRow,children:['easy','medium','hard'].map(level => _jsx(TouchableOpacity,{onPress:()=> handleDifficultyChange(level),style:[styles.difficultyButton,{backgroundColor:difficulty === level ? theme.buttonSelectedColor:theme.buttonUnselectedColor}],children:_jsx(Text,{style:[styles.buttonText,styles.capitalize,{color:difficulty === level ? theme.buttonSelectedTextColor:theme.buttonUnselectedTextColor}],children:level})},level))}),_jsx(View,{style:styles.infoBox,children:_jsxs(Text,{style:[styles.infoText,{color:theme.infoTextColor}],children:[_jsx(Text,{style:styles.boldText,children:"Easy:"})," ",typeof difficultyDescriptions.easy === 'string' ? difficultyDescriptions.easy:difficultyDescriptions.easy.description,'\n',_jsx(Text,{style:styles.boldText,children:"Medium:"})," ",typeof difficultyDescriptions.medium === 'string' ? difficultyDescriptions.medium:difficultyDescriptions.medium.description,'\n',_jsx(Text,{style:styles.boldText,children:"Hard:"})," ",typeof difficultyDescriptions.hard === 'string' ? difficultyDescriptions.hard:difficultyDescriptions.hard.description]})})]}),_jsx(View,{style:[styles.section,{backgroundColor:theme.sectionBackgroundColor}],children:_jsxs(View,{style:styles.toggleContainer,children:[_jsxs(View,{children:[_jsx(Text,{style:[styles.toggleTitle,{color:theme.sectionTitleColor}],children:"Sound Effects"}),_jsx(Text,{style:[styles.toggleSubtitle,{color:theme.infoTextColor}],children:"Play sounds during gameplay"})]}),_jsx(Switch,{value:enableSounds,onValueChange:handleSoundToggle,trackColor:{false:theme.switchTrackColorFalse,true:theme.switchTrackColorTrue},thumbColor:theme.switchThumbColor})]})}),_jsx(View,{style:[styles.section,{backgroundColor:theme.sectionBackgroundColor}],children:_jsxs(View,{style:styles.toggleContainer,children:[_jsxs(View,{children:[_jsx(Text,{style:[styles.toggleTitle,{color:theme.sectionTitleColor}],children:"Haptic Feedback"}),_jsx(Text,{style:[styles.toggleSubtitle,{color:theme.infoTextColor}],children:"Vibration feedback for interactions"})]}),_jsx(Switch,{value:enableHaptics,onValueChange:handleHapticToggle,trackColor:{false:theme.switchTrackColorFalse,true:theme.switchTrackColorTrue},thumbColor:theme.switchThumbColor})]})})]})]})})});};const styles = StyleSheet.create({overlay:{flex:1,backgroundColor:'rgba(0,0,0,0.8)',justifyContent:'center',alignItems:'center',padding:20},container:{width:'95%',maxWidth:600,maxHeight:'95%',minHeight:'60%',borderRadius:10,overflow:'hidden'},header:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',padding:10,paddingHorizontal:16},headerTitle:{fontSize:20,fontWeight:'semibold'},closeButton:{padding:8},closeButtonText:{fontSize:18,fontWeight:'semibold'},scrollView:{flex:1,padding:10},scrollContent:{flexGrow:1,paddingBottom:20},section:{borderRadius:12,padding:16,marginBottom:16},sectionTitle:{fontSize:16,fontWeight:'semibold',marginBottom:10},difficultyRow:{flexDirection:'row',justifyContent:'space-between',marginBottom:12},difficultyButton:{flex:1,paddingVertical:12,paddingHorizontal:8,borderRadius:8,marginHorizontal:4,alignItems:'center'},buttonText:{fontSize:16,fontWeight:'600'},capitalize:{textTransform:'capitalize'},infoBox:{backgroundColor:'rgba(255,255,255,0.1)',borderRadius:8,padding:12},infoText:{fontSize:14,lineHeight:20},boldText:{fontWeight:'semibold'},toggleContainer:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},toggleTitle:{fontSize:16,fontWeight:'semibold'},toggleSubtitle:{fontSize:14,marginTop:2}});
1
+ "use strict";import e from"react";import{View as t,Text as o,ScrollView as n,TouchableOpacity as i,Switch as l,StyleSheet as r,Modal as s}from"react-native";import{getGameTheme as a,getGameDifficultyDescriptions as d,getGameTitle as c}from"../services/GamesConstants.js";import{jsx as g,jsxs as f}from"react/jsx-runtime";export const GameSettingsModal=({gameId:e,settings:r,onSettingsChange:u=()=>{}})=>{const y=a(e),m=d(e),b=c(e)+" Settings",{isVisible:p,difficulty:C,enableSounds:x,enableHaptics:S}=r,k=()=>{u({...r,isVisible:!1})};return g(s,{visible:p,animationType:"fade",transparent:!0,onRequestClose:k,children:g(t,{style:h.overlay,children:f(t,{style:[h.container,{backgroundColor:y.backgroundColor}],children:[f(t,{style:[h.header,{backgroundColor:y.headerBackgroundColor}],children:[g(o,{style:[h.headerTitle,{color:y.headerTextColor}],children:b}),g(i,{onPress:k,style:h.closeButton,children:g(o,{style:[h.closeButtonText,{color:y.headerTextColor}],children:"\u2715"})})]}),f(n,{style:h.scrollView,contentContainerStyle:h.scrollContent,children:[f(t,{style:[h.section,{backgroundColor:y.sectionBackgroundColor}],children:[g(o,{style:[h.sectionTitle,{color:y.sectionTitleColor}],children:"Difficulty Level"}),g(t,{style:h.difficultyRow,children:["easy","medium","hard"].map(e=>g(i,{onPress:()=>{return t=e,void u({...r,difficulty:t});var t},style:[h.difficultyButton,{backgroundColor:C===e?y.buttonSelectedColor:y.buttonUnselectedColor}],children:g(o,{style:[h.buttonText,h.capitalize,{color:C===e?y.buttonSelectedTextColor:y.buttonUnselectedTextColor}],children:e})},e))}),g(t,{style:h.infoBox,children:f(o,{style:[h.infoText,{color:y.infoTextColor}],children:[g(o,{style:h.boldText,children:"Easy:"})," ","string"==typeof m.easy?m.easy:m.easy.description,"\n",g(o,{style:h.boldText,children:"Medium:"})," ","string"==typeof m.medium?m.medium:m.medium.description,"\n",g(o,{style:h.boldText,children:"Hard:"})," ","string"==typeof m.hard?m.hard:m.hard.description]})})]}),g(t,{style:[h.section,{backgroundColor:y.sectionBackgroundColor}],children:f(t,{style:h.toggleContainer,children:[f(t,{children:[g(o,{style:[h.toggleTitle,{color:y.sectionTitleColor}],children:"Sound Effects"}),g(o,{style:[h.toggleSubtitle,{color:y.infoTextColor}],children:"Play sounds during gameplay"})]}),g(l,{value:x,onValueChange:e=>{u({...r,enableSounds:e})},trackColor:{false:y.switchTrackColorFalse,true:y.switchTrackColorTrue},thumbColor:y.switchThumbColor})]})}),g(t,{style:[h.section,{backgroundColor:y.sectionBackgroundColor}],children:f(t,{style:h.toggleContainer,children:[f(t,{children:[g(o,{style:[h.toggleTitle,{color:y.sectionTitleColor}],children:"Haptic Feedback"}),g(o,{style:[h.toggleSubtitle,{color:y.infoTextColor}],children:"Vibration feedback for interactions"})]}),g(l,{value:S,onValueChange:e=>{u({...r,enableHaptics:e})},trackColor:{false:y.switchTrackColorFalse,true:y.switchTrackColorTrue},thumbColor:y.switchThumbColor})]})})]})]})})})};const h=r.create({overlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.8)",justifyContent:"center",alignItems:"center",padding:20},container:{width:"95%",maxWidth:600,maxHeight:"95%",minHeight:"60%",borderRadius:10,overflow:"hidden"},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:10,paddingHorizontal:16},headerTitle:{fontSize:20,fontWeight:"semibold"},closeButton:{padding:8},closeButtonText:{fontSize:18,fontWeight:"semibold"},scrollView:{flex:1,padding:10},scrollContent:{flexGrow:1,paddingBottom:20},section:{borderRadius:12,padding:16,marginBottom:16},sectionTitle:{fontSize:16,fontWeight:"semibold",marginBottom:10},difficultyRow:{flexDirection:"row",justifyContent:"space-between",marginBottom:12},difficultyButton:{flex:1,paddingVertical:12,paddingHorizontal:8,borderRadius:8,marginHorizontal:4,alignItems:"center"},buttonText:{fontSize:16,fontWeight:"600"},capitalize:{textTransform:"capitalize"},infoBox:{backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:8,padding:12},infoText:{fontSize:14,lineHeight:20},boldText:{fontWeight:"semibold"},toggleContainer:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},toggleTitle:{fontSize:16,fontWeight:"semibold"},toggleSubtitle:{fontSize:14,marginTop:2}});
@@ -1 +1 @@
1
- "use strict";import React,{useEffect,useState}from 'react';import{View,Dimensions,StyleSheet}from 'react-native';import{jsx as _jsx}from "react/jsx-runtime";const{width,height}= Dimensions.get('window');export const ParticleBlast = React.memo(({x,y,particleCount = 8,colors = ['#FF6B6B','#4ECDC4','#45B7D1','#96CEB4','#FFEAA7','#DDA0DD','#FF9F43','#A55EEA'],duration = 1000,onComplete})=>{const [particles,setParticles] = useState([]);const [isComplete,setIsComplete] = useState(false);useEffect(()=>{const initialParticles = [];for(let i = 0;i < particleCount;i++){const angle = i / particleCount * Math.PI * 2;const speed = 4 + Math.random()* 3;initialParticles.push({id:`particle_${i}_${Date.now()}`,x:x,y:y,vx:Math.cos(angle)* speed,vy:Math.sin(angle)* speed - 2,color:colors[i % colors.length] || '#FF6B6B',size:6 + Math.random()* 8,alpha:1,lifetime:0,maxLifetime:duration});}setParticles(initialParticles);const animationInterval = setInterval(()=>{setParticles(prevParticles =>{const updatedParticles = prevParticles.map(particle =>{const newLifetime = particle.lifetime + 16;if(newLifetime >= particle.maxLifetime){return null;}const newX = particle.x + particle.vx;const newY = particle.y + particle.vy;const newVy = particle.vy + 0.1;const alpha = Math.max(0.3,1 - newLifetime / particle.maxLifetime);return{...particle,x:newX,y:newY,vy:newVy,alpha,lifetime:newLifetime};}).filter(Boolean);if(updatedParticles.length === 0){setIsComplete(true);}return updatedParticles;});},16);const cleanup = setTimeout(()=>{clearInterval(animationInterval);setParticles([]);setIsComplete(true);},duration + 100);return()=>{clearInterval(animationInterval);clearTimeout(cleanup);};},[]);useEffect(()=>{if(isComplete && onComplete){onComplete();}},[isComplete,onComplete]);if(particles.length === 0)return null;return _jsx(View,{style:[styles.container,{width,height}],children:particles.map(particle =>{const particleSize = Math.max(4,particle.size);return _jsx(View,{style:[styles.particle,{left:particle.x - particleSize / 2,top:particle.y - particleSize / 2,width:particleSize,height:particleSize,backgroundColor:particle.color,opacity:particle.alpha,borderRadius:particleSize / 2}]},particle.id);})});});ParticleBlast.displayName = 'ParticleBlast';const styles = StyleSheet.create({container:{position:'absolute',top:0,left:0,pointerEvents:'none'},particle:{position:'absolute'}});
1
+ "use strict";import t,{useEffect as e,useState as o}from"react";import{View as r,Dimensions as a,StyleSheet as i}from"react-native";import{jsx as n}from"react/jsx-runtime";const{width:l,height:s}=a.get("window");export const ParticleBlast=t.memo(({x:t,y:a,particleCount:i=8,colors:h=["#FF6B6B","#4ECDC4","#45B7D1","#96CEB4","#FFEAA7","#DDA0DD","#FF9F43","#A55EEA"],duration:u=1e3,onComplete:p})=>{const[m,d]=o([]),[f,B]=o(!1);return e(()=>{const e=[];for(let o=0;i>o;o++){const r=o/i*Math.PI*2,n=4+3*Math.random();e.push({id:`particle_${o}_${Date.now()}`,x:t,y:a,vx:Math.cos(r)*n,vy:Math.sin(r)*n-2,color:h[o%h.length]||"#FF6B6B",size:6+8*Math.random(),alpha:1,lifetime:0,maxLifetime:u})}d(e);const o=setInterval(()=>{d(t=>{const e=t.map(t=>{const e=t.lifetime+16;if(e>=t.maxLifetime)return null;const o=t.x+t.vx,r=t.y+t.vy,a=t.vy+.1,i=Math.max(.3,1-e/t.maxLifetime);return{...t,x:o,y:r,vy:a,alpha:i,lifetime:e}}).filter(Boolean);return 0===e.length&&B(!0),e})},16),r=setTimeout(()=>{clearInterval(o),d([]),B(!0)},u+100);return()=>{clearInterval(o),clearTimeout(r)}},[]),e(()=>{f&&p&&p()},[f,p]),0===m.length?null:n(r,{style:[c.container,{width:l,height:s}],children:m.map(t=>{const e=Math.max(4,t.size);return n(r,{style:[c.particle,{left:t.x-e/2,top:t.y-e/2,width:e,height:e,backgroundColor:t.color,opacity:t.alpha,borderRadius:e/2}]},t.id)})})});ParticleBlast.displayName="ParticleBlast";const c=i.create({container:{position:"absolute",top:0,left:0,pointerEvents:"none"},particle:{position:"absolute"}});
@@ -1 +1 @@
1
- "use strict";import React from 'react';import{View}from 'react-native';import{jsx as _jsx}from "react/jsx-runtime";export const ScoreBoardContainer = React.memo(({children,offset = 0,backgroundColor = 'rgba(0,0,0,0.7)',borderColor = 'rgba(255,255,255,0.3)'})=>{const wrapperStyle = React.useMemo(()=>({position:'absolute',top:0,left:0,right:0,zIndex:10,alignItems:'center',paddingHorizontal:15,marginTop:offset > 0 ? offset + 30:15}),[offset]);const containerStyle = React.useMemo(()=>({maxWidth:600,width:'100%',backgroundColor,borderColor,borderWidth:2,padding:15,borderRadius:15}),[backgroundColor,borderColor]);return _jsx(View,{style:wrapperStyle,children:_jsx(View,{style:containerStyle,children:children})});});ScoreBoardContainer.displayName = 'ScoreBoardContainer';
1
+ "use strict";import r from"react";import{View as o}from"react-native";import{jsx as t}from"react/jsx-runtime";export const ScoreBoardContainer=r.memo(({children:e,offset:i=0,backgroundColor:n="rgba(0, 0, 0, 0.7)",borderColor:a="rgba(255, 255, 255, 0.3)"})=>{const d=r.useMemo(()=>({position:"absolute",top:0,left:0,right:0,zIndex:10,alignItems:"center",paddingHorizontal:15,marginTop:i>0?i+30:15}),[i]),c=r.useMemo(()=>({maxWidth:600,width:"100%",backgroundColor:n,borderColor:a,borderWidth:2,padding:15,borderRadius:15}),[n,a]);return t(o,{style:d,children:t(o,{style:c,children:e})})});ScoreBoardContainer.displayName="ScoreBoardContainer";
@@ -1 +1 @@
1
- "use strict";export{GameControlButton}from "./GameControlButton.js";export{ScoreBoardContainer}from "./ScoreBoardContainer.js";export{ParticleBlast}from "./ParticleBlast.js";export{GameOverModal}from "./GameOverModal.js";export{GameSettingsModal}from "./GameSettingsModal.js";export{AnimationTracker,useAnimationTracker,useAnimationTrackers,DEFAULT_ANIMATION_STATE}from "./AnimationTracker.js";export{AnimationFrameManager,useAnimationFrame,useAnimationFrameManager}from "./AnimationFrame.js";export{GameErrorHandler,useGameErrorHandler,withErrorHandling,ErrorUtils,globalErrorHandler,DEFAULT_ERROR_CONFIG}from "./ErrorHandler.js";export{GameErrorType}from "./ErrorHandler.js";
1
+ "use strict";export{GameControlButton}from"./GameControlButton.js";export{ScoreBoardContainer}from"./ScoreBoardContainer.js";export{ParticleBlast}from"./ParticleBlast.js";export{GameOverModal}from"./GameOverModal.js";export{GameSettingsModal}from"./GameSettingsModal.js";export{AnimationTracker,useAnimationTracker,useAnimationTrackers,DEFAULT_ANIMATION_STATE}from"./AnimationTracker.js";export{AnimationFrameManager,useAnimationFrame,useAnimationFrameManager}from"./AnimationFrame.js";export{GameErrorHandler,useGameErrorHandler,withErrorHandling,ErrorUtils,globalErrorHandler,DEFAULT_ERROR_CONFIG}from"./ErrorHandler.js";export{GameErrorType}from"./ErrorHandler.js";
@@ -1 +1 @@
1
- "use strict";export * from "./games/balloon-blaster/BalloonBlaster.js";export * from "./games/popit-fidget/PopitFidget.js";export * from "./games/whack-a-mole/WhackAMole.js";export * from "./games/fruit-ninja/FruitNinja.js";export * from "./games/maze-runner/MazeRunner.js";export * from "./games/space-fighter/SpaceFighter.js";export * from "./games/sliding-numbers/SlidingNumbers.js";export * from "./games/game-2048/Game2048.js";export * from "./games/dino-jump/DinoJump.js";export * from "./games/colors-sort/ColorsSort.js";export * from "./games/fruit-merger/FruitMerger.js";export * from "./games/flappy-bird/FlappyBird.js";export * from "./games/candy-crush/CandyCrush.js";export * from "./games/snake/Snake.js";export * from "./games/car-racing/CarRacing.js";export * from "./games/bike-racing/BikeRacing.js";export * from "./games/block-blast/BlockBlast.js";export * from "./games/bubble-shooter/BubbleShooter.js";export * from "./games/perfect-circle/PerfectCircle.js";export * from "./services/GamesService.js";export * from "./services/UtilsService.js";
1
+ "use strict";export*from"./games/balloon-blaster/BalloonBlaster.js";export*from"./games/popit-fidget/PopitFidget.js";export*from"./games/whack-a-mole/WhackAMole.js";export*from"./games/fruit-ninja/FruitNinja.js";export*from"./games/maze-runner/MazeRunner.js";export*from"./games/space-fighter/SpaceFighter.js";export*from"./games/sliding-numbers/SlidingNumbers.js";export*from"./games/game-2048/Game2048.js";export*from"./games/dino-jump/DinoJump.js";export*from"./games/colors-sort/ColorsSort.js";export*from"./games/fruit-merger/FruitMerger.js";export*from"./games/flappy-bird/FlappyBird.js";export*from"./games/candy-crush/CandyCrush.js";export*from"./games/snake/Snake.js";export*from"./games/car-racing/CarRacing.js";export*from"./games/bike-racing/BikeRacing.js";export*from"./games/block-blast/BlockBlast.js";export*from"./games/bubble-shooter/BubbleShooter.js";export*from"./games/perfect-circle/PerfectCircle.js";export*from"./services/GamesService.js";export*from"./services/UtilsService.js";
@@ -1 +1 @@
1
- "use strict";import{GAME_IDS}from "./UtilsService.js";import{BALLOON_BLASTER_THEME,BALLOON_BLASTER_DIFFICULTY_DESCRIPTIONS}from "../games/balloon-blaster/BalloonBlasterConstants.js";import{FRUIT_NINJA_THEME,FRUIT_NINJA_DIFFICULTY_DESCRIPTIONS}from "../games/fruit-ninja/FruitNinjaConstants.js";import{MAZE_RUNNER_THEME,MAZE_RUNNER_DIFFICULTY_DESCRIPTIONS}from "../games/maze-runner/MazeRunnerConstants.js";import{WHACK_A_MOLE_THEME,WHACK_A_MOLE_DIFFICULTY_DESCRIPTIONS}from "../games/whack-a-mole/WhackAMoleConstants.js";import{SPACE_FIGHTER_THEME,SPACE_FIGHTER_DIFFICULTY_DESCRIPTIONS}from "../games/space-fighter/SpaceFighterConstants.js";import{POPIT_FIDGET_THEME,POPIT_FIDGET_DIFFICULTY_DESCRIPTIONS}from "../games/popit-fidget/PopitFidgetConstants.js";import{SLIDING_NUMBERS_THEME,SLIDING_NUMBERS_DIFFICULTY_DESCRIPTIONS}from "../games/sliding-numbers/SlidingNumbersConstants.js";import{GAME_2048_THEME,GAME_2048_DIFFICULTY_DESCRIPTIONS}from "../games/game-2048/Game2048Constants.js";import{DINO_JUMP_THEME,DINO_JUMP_DIFFICULTY_DESCRIPTIONS}from "../games/dino-jump/DinoJumpConstants.js";import{COLORS_SORT_THEME,COLORS_SORT_DIFFICULTY_DESCRIPTIONS}from "../games/colors-sort/ColorsSortConstants.js";import{FRUIT_MERGER_THEME,FRUIT_MERGER_DIFFICULTY_DESCRIPTIONS}from "../games/fruit-merger/FruitMergerConstants.js";import{FLAPPY_BIRD_THEME,FLAPPY_BIRD_DIFFICULTY_DESCRIPTIONS}from "../games/flappy-bird/FlappyBirdConstants.js";import{CANDY_CRUSH_THEME,CANDY_CRUSH_DIFFICULTY_DESCRIPTIONS}from "../games/candy-crush/CandyCrushConstants.js";import{SNAKE_THEME,SNAKE_DIFFICULTY_DESCRIPTIONS}from "../games/snake/SnakeConstants.js";import{CAR_RACING_THEME,CAR_RACING_DIFFICULTY_DESCRIPTIONS}from "../games/car-racing/CarRacingConstants.js";import{BIKE_RACING_THEME,BIKE_RACING_DIFFICULTY_DESCRIPTIONS}from "../games/bike-racing/BikeRacingConstants.js";import{BLOCK_BLAST_THEME,BLOCK_BLAST_DIFFICULTY_DESCRIPTIONS}from "../games/block-blast/BlockBlastConstants.js";import{BUBBLE_SHOOTER_THEME,BUBBLE_SHOOTER_DIFFICULTY_DESCRIPTIONS}from "../games/bubble-shooter/BubbleShooterConstants.js";import{PERFECT_CIRCLE_THEME,PERFECT_CIRCLE_DIFFICULTY_DESCRIPTIONS}from "../games/perfect-circle/PerfectCircleConstants.js";export const GAME_THEMES ={balloonBlaster:BALLOON_BLASTER_THEME,fruitNinja:FRUIT_NINJA_THEME,mazeRunner:MAZE_RUNNER_THEME,whackAMole:WHACK_A_MOLE_THEME,spaceFighter:SPACE_FIGHTER_THEME,popitFidget:POPIT_FIDGET_THEME,slidingNumbers:SLIDING_NUMBERS_THEME,game2048:GAME_2048_THEME,dinoJump:DINO_JUMP_THEME,colorsSort:COLORS_SORT_THEME,fruitMerger:FRUIT_MERGER_THEME,flappyBird:FLAPPY_BIRD_THEME,candyCrush:CANDY_CRUSH_THEME,snake:SNAKE_THEME,carRacing:CAR_RACING_THEME,bikeRacing:BIKE_RACING_THEME,blockBlast:BLOCK_BLAST_THEME,bubbleShooter:BUBBLE_SHOOTER_THEME,perfectCircle:PERFECT_CIRCLE_THEME};export const GAME_DIFFICULTY_DESCRIPTIONS ={balloonBlaster:BALLOON_BLASTER_DIFFICULTY_DESCRIPTIONS,fruitNinja:FRUIT_NINJA_DIFFICULTY_DESCRIPTIONS,mazeRunner:MAZE_RUNNER_DIFFICULTY_DESCRIPTIONS,whackAMole:WHACK_A_MOLE_DIFFICULTY_DESCRIPTIONS,spaceFighter:SPACE_FIGHTER_DIFFICULTY_DESCRIPTIONS,popitFidget:POPIT_FIDGET_DIFFICULTY_DESCRIPTIONS,slidingNumbers:SLIDING_NUMBERS_DIFFICULTY_DESCRIPTIONS,game2048:GAME_2048_DIFFICULTY_DESCRIPTIONS,dinoJump:DINO_JUMP_DIFFICULTY_DESCRIPTIONS,colorsSort:COLORS_SORT_DIFFICULTY_DESCRIPTIONS,fruitMerger:FRUIT_MERGER_DIFFICULTY_DESCRIPTIONS,flappyBird:FLAPPY_BIRD_DIFFICULTY_DESCRIPTIONS,candyCrush:CANDY_CRUSH_DIFFICULTY_DESCRIPTIONS,snake:SNAKE_DIFFICULTY_DESCRIPTIONS,carRacing:CAR_RACING_DIFFICULTY_DESCRIPTIONS,bikeRacing:BIKE_RACING_DIFFICULTY_DESCRIPTIONS,blockBlast:BLOCK_BLAST_DIFFICULTY_DESCRIPTIONS,bubbleShooter:BUBBLE_SHOOTER_DIFFICULTY_DESCRIPTIONS,perfectCircle:PERFECT_CIRCLE_DIFFICULTY_DESCRIPTIONS};export const DIFFICULTY_LEVELS = ['easy','medium','hard'];export const GAME_NAMES ={BALLOON_BLASTER:'balloonBlaster',FRUIT_SLICER:'fruitSlicer',MAZE_RUNNER:'mazeRunner',CAT_POPPER:'catPopper',SPACE_TRAVELLER:'spaceTraveller'};export const getGameTheme = gameId =>{switch(gameId){case GAME_IDS.BALLOON_BLASTER:return GAME_THEMES.balloonBlaster;case GAME_IDS.FRUIT_NINJA:return GAME_THEMES.fruitNinja;case GAME_IDS.MAZE_RUNNER:return GAME_THEMES.mazeRunner;case GAME_IDS.WHACK_A_MOLE:return GAME_THEMES.whackAMole;case GAME_IDS.SPACE_FIGHTER:return GAME_THEMES.spaceFighter;case GAME_IDS.POPIT_FIDGET:return GAME_THEMES.popitFidget;case GAME_IDS.SLIDING_NUMBERS:return GAME_THEMES.slidingNumbers;case GAME_IDS.GAME_2048:return GAME_THEMES.game2048;case GAME_IDS.DINO_JUMP:return GAME_THEMES.dinoJump;case GAME_IDS.COLORS_SORT:return GAME_THEMES.colorsSort;case GAME_IDS.FRUIT_MERGER:return GAME_THEMES.fruitMerger;case GAME_IDS.FLAPPY_BIRD:return GAME_THEMES.flappyBird;case GAME_IDS.CANDY_CRUSH:return GAME_THEMES.candyCrush;case GAME_IDS.SNAKE:return GAME_THEMES.snake;case GAME_IDS.CAR_RACING:return GAME_THEMES.carRacing;case GAME_IDS.BIKE_RACING:return GAME_THEMES.bikeRacing;case GAME_IDS.BLOCK_BLAST:return GAME_THEMES.blockBlast;case GAME_IDS.BUBBLE_SHOOTER:return GAME_THEMES.bubbleShooter;case GAME_IDS.PERFECT_CIRCLE:return GAME_THEMES.perfectCircle;default:return GAME_THEMES.balloonBlaster;}};export const getGameDifficultyDescriptions = gameId =>{switch(gameId){case GAME_IDS.BALLOON_BLASTER:return GAME_DIFFICULTY_DESCRIPTIONS.balloonBlaster;case GAME_IDS.FRUIT_NINJA:return GAME_DIFFICULTY_DESCRIPTIONS.fruitNinja;case GAME_IDS.MAZE_RUNNER:return GAME_DIFFICULTY_DESCRIPTIONS.mazeRunner;case GAME_IDS.WHACK_A_MOLE:return GAME_DIFFICULTY_DESCRIPTIONS.whackAMole;case GAME_IDS.SPACE_FIGHTER:return GAME_DIFFICULTY_DESCRIPTIONS.spaceFighter;case GAME_IDS.POPIT_FIDGET:return GAME_DIFFICULTY_DESCRIPTIONS.popitFidget;case GAME_IDS.SLIDING_NUMBERS:return GAME_DIFFICULTY_DESCRIPTIONS.slidingNumbers;case GAME_IDS.GAME_2048:return GAME_DIFFICULTY_DESCRIPTIONS.game2048;case GAME_IDS.DINO_JUMP:return GAME_DIFFICULTY_DESCRIPTIONS.dinoJump;case GAME_IDS.COLORS_SORT:return GAME_DIFFICULTY_DESCRIPTIONS.colorsSort;case GAME_IDS.FRUIT_MERGER:return GAME_DIFFICULTY_DESCRIPTIONS.fruitMerger;case GAME_IDS.FLAPPY_BIRD:return GAME_DIFFICULTY_DESCRIPTIONS.flappyBird;case GAME_IDS.CANDY_CRUSH:return GAME_DIFFICULTY_DESCRIPTIONS.candyCrush;case GAME_IDS.SNAKE:return GAME_DIFFICULTY_DESCRIPTIONS.snake;case GAME_IDS.CAR_RACING:return GAME_DIFFICULTY_DESCRIPTIONS.carRacing;case GAME_IDS.BIKE_RACING:return GAME_DIFFICULTY_DESCRIPTIONS.bikeRacing;case GAME_IDS.BLOCK_BLAST:return GAME_DIFFICULTY_DESCRIPTIONS.blockBlast;case GAME_IDS.BUBBLE_SHOOTER:return GAME_DIFFICULTY_DESCRIPTIONS.bubbleShooter;case GAME_IDS.PERFECT_CIRCLE:return GAME_DIFFICULTY_DESCRIPTIONS.perfectCircle;default:return GAME_DIFFICULTY_DESCRIPTIONS.balloonBlaster;}};export const getGameTitle = gameId =>{switch(gameId){case GAME_IDS.BALLOON_BLASTER:return 'Balloon Blaster';case GAME_IDS.FRUIT_NINJA:return 'Fruit Ninja';case GAME_IDS.MAZE_RUNNER:return 'Maze Runner';case GAME_IDS.WHACK_A_MOLE:return 'Whack-a-Mole';case GAME_IDS.SPACE_FIGHTER:return 'Space Fighter';case GAME_IDS.POPIT_FIDGET:return 'Pop It Fidget';case GAME_IDS.SLIDING_NUMBERS:return 'Sliding Numbers';case GAME_IDS.GAME_2048:return '2048';case GAME_IDS.DINO_JUMP:return 'Dino Jump';case GAME_IDS.COLORS_SORT:return 'Colors Sort';case GAME_IDS.FRUIT_MERGER:return 'Fruit Merger';case GAME_IDS.FLAPPY_BIRD:return 'Flappy Bird';case GAME_IDS.CANDY_CRUSH:return 'Candy Crush';case GAME_IDS.SNAKE:return 'Snake';case GAME_IDS.CAR_RACING:return 'Car Racing';case GAME_IDS.BIKE_RACING:return 'Bike Racing';case GAME_IDS.BLOCK_BLAST:return 'Block Blast';case GAME_IDS.BUBBLE_SHOOTER:return 'Bubble Shooter';case GAME_IDS.PERFECT_CIRCLE:return 'Perfect Circle';default:return 'Game Settings';}};
1
+ "use strict";import{GAME_IDS as r}from"./UtilsService.js";import{BALLOON_BLASTER_THEME as e,BALLOON_BLASTER_DIFFICULTY_DESCRIPTIONS as t}from"../games/balloon-blaster/BalloonBlasterConstants.js";import{FRUIT_NINJA_THEME as s,FRUIT_NINJA_DIFFICULTY_DESCRIPTIONS as a}from"../games/fruit-ninja/FruitNinjaConstants.js";import{MAZE_RUNNER_THEME as n,MAZE_RUNNER_DIFFICULTY_DESCRIPTIONS as o}from"../games/maze-runner/MazeRunnerConstants.js";import{WHACK_A_MOLE_THEME as c,WHACK_A_MOLE_DIFFICULTY_DESCRIPTIONS as E}from"../games/whack-a-mole/WhackAMoleConstants.js";import{SPACE_FIGHTER_THEME as i,SPACE_FIGHTER_DIFFICULTY_DESCRIPTIONS as u}from"../games/space-fighter/SpaceFighterConstants.js";import{POPIT_FIDGET_THEME as I,POPIT_FIDGET_DIFFICULTY_DESCRIPTIONS as m}from"../games/popit-fidget/PopitFidgetConstants.js";import{SLIDING_NUMBERS_THEME as S,SLIDING_NUMBERS_DIFFICULTY_DESCRIPTIONS as C}from"../games/sliding-numbers/SlidingNumbersConstants.js";import{GAME_2048_THEME as M,GAME_2048_DIFFICULTY_DESCRIPTIONS as T}from"../games/game-2048/Game2048Constants.js";import{DINO_JUMP_THEME as _,DINO_JUMP_DIFFICULTY_DESCRIPTIONS as l}from"../games/dino-jump/DinoJumpConstants.js";import{COLORS_SORT_THEME as p,COLORS_SORT_DIFFICULTY_DESCRIPTIONS as F}from"../games/colors-sort/ColorsSortConstants.js";import{FRUIT_MERGER_THEME as g,FRUIT_MERGER_DIFFICULTY_DESCRIPTIONS as A}from"../games/fruit-merger/FruitMergerConstants.js";import{FLAPPY_BIRD_THEME as G,FLAPPY_BIRD_DIFFICULTY_DESCRIPTIONS as D}from"../games/flappy-bird/FlappyBirdConstants.js";import{CANDY_CRUSH_THEME as f,CANDY_CRUSH_DIFFICULTY_DESCRIPTIONS as R}from"../games/candy-crush/CandyCrushConstants.js";import{SNAKE_THEME as N,SNAKE_DIFFICULTY_DESCRIPTIONS as b}from"../games/snake/SnakeConstants.js";import{CAR_RACING_THEME as L,CAR_RACING_DIFFICULTY_DESCRIPTIONS as P}from"../games/car-racing/CarRacingConstants.js";import{BIKE_RACING_THEME as d,BIKE_RACING_DIFFICULTY_DESCRIPTIONS as j}from"../games/bike-racing/BikeRacingConstants.js";import{BLOCK_BLAST_THEME as h,BLOCK_BLAST_DIFFICULTY_DESCRIPTIONS as U}from"../games/block-blast/BlockBlastConstants.js";import{BUBBLE_SHOOTER_THEME as O,BUBBLE_SHOOTER_DIFFICULTY_DESCRIPTIONS as B}from"../games/bubble-shooter/BubbleShooterConstants.js";import{PERFECT_CIRCLE_THEME as Y,PERFECT_CIRCLE_DIFFICULTY_DESCRIPTIONS as H}from"../games/perfect-circle/PerfectCircleConstants.js";export const GAME_THEMES={balloonBlaster:e,fruitNinja:s,mazeRunner:n,whackAMole:c,spaceFighter:i,popitFidget:I,slidingNumbers:S,game2048:M,dinoJump:_,colorsSort:p,fruitMerger:g,flappyBird:G,candyCrush:f,snake:N,carRacing:L,bikeRacing:d,blockBlast:h,bubbleShooter:O,perfectCircle:Y};export const GAME_DIFFICULTY_DESCRIPTIONS={balloonBlaster:t,fruitNinja:a,mazeRunner:o,whackAMole:E,spaceFighter:u,popitFidget:m,slidingNumbers:C,game2048:T,dinoJump:l,colorsSort:F,fruitMerger:A,flappyBird:D,candyCrush:R,snake:b,carRacing:P,bikeRacing:j,blockBlast:U,bubbleShooter:B,perfectCircle:H};export const DIFFICULTY_LEVELS=["easy","medium","hard"];export const GAME_NAMES={BALLOON_BLASTER:"balloonBlaster",FRUIT_SLICER:"fruitSlicer",MAZE_RUNNER:"mazeRunner",CAT_POPPER:"catPopper",SPACE_TRAVELLER:"spaceTraveller"};export const getGameTheme=e=>{switch(e){case r.BALLOON_BLASTER:return GAME_THEMES.balloonBlaster;case r.FRUIT_NINJA:return GAME_THEMES.fruitNinja;case r.MAZE_RUNNER:return GAME_THEMES.mazeRunner;case r.WHACK_A_MOLE:return GAME_THEMES.whackAMole;case r.SPACE_FIGHTER:return GAME_THEMES.spaceFighter;case r.POPIT_FIDGET:return GAME_THEMES.popitFidget;case r.SLIDING_NUMBERS:return GAME_THEMES.slidingNumbers;case r.GAME_2048:return GAME_THEMES.game2048;case r.DINO_JUMP:return GAME_THEMES.dinoJump;case r.COLORS_SORT:return GAME_THEMES.colorsSort;case r.FRUIT_MERGER:return GAME_THEMES.fruitMerger;case r.FLAPPY_BIRD:return GAME_THEMES.flappyBird;case r.CANDY_CRUSH:return GAME_THEMES.candyCrush;case r.SNAKE:return GAME_THEMES.snake;case r.CAR_RACING:return GAME_THEMES.carRacing;case r.BIKE_RACING:return GAME_THEMES.bikeRacing;case r.BLOCK_BLAST:return GAME_THEMES.blockBlast;case r.BUBBLE_SHOOTER:return GAME_THEMES.bubbleShooter;case r.PERFECT_CIRCLE:return GAME_THEMES.perfectCircle;default:return GAME_THEMES.balloonBlaster}};export const getGameDifficultyDescriptions=e=>{switch(e){case r.BALLOON_BLASTER:return GAME_DIFFICULTY_DESCRIPTIONS.balloonBlaster;case r.FRUIT_NINJA:return GAME_DIFFICULTY_DESCRIPTIONS.fruitNinja;case r.MAZE_RUNNER:return GAME_DIFFICULTY_DESCRIPTIONS.mazeRunner;case r.WHACK_A_MOLE:return GAME_DIFFICULTY_DESCRIPTIONS.whackAMole;case r.SPACE_FIGHTER:return GAME_DIFFICULTY_DESCRIPTIONS.spaceFighter;case r.POPIT_FIDGET:return GAME_DIFFICULTY_DESCRIPTIONS.popitFidget;case r.SLIDING_NUMBERS:return GAME_DIFFICULTY_DESCRIPTIONS.slidingNumbers;case r.GAME_2048:return GAME_DIFFICULTY_DESCRIPTIONS.game2048;case r.DINO_JUMP:return GAME_DIFFICULTY_DESCRIPTIONS.dinoJump;case r.COLORS_SORT:return GAME_DIFFICULTY_DESCRIPTIONS.colorsSort;case r.FRUIT_MERGER:return GAME_DIFFICULTY_DESCRIPTIONS.fruitMerger;case r.FLAPPY_BIRD:return GAME_DIFFICULTY_DESCRIPTIONS.flappyBird;case r.CANDY_CRUSH:return GAME_DIFFICULTY_DESCRIPTIONS.candyCrush;case r.SNAKE:return GAME_DIFFICULTY_DESCRIPTIONS.snake;case r.CAR_RACING:return GAME_DIFFICULTY_DESCRIPTIONS.carRacing;case r.BIKE_RACING:return GAME_DIFFICULTY_DESCRIPTIONS.bikeRacing;case r.BLOCK_BLAST:return GAME_DIFFICULTY_DESCRIPTIONS.blockBlast;case r.BUBBLE_SHOOTER:return GAME_DIFFICULTY_DESCRIPTIONS.bubbleShooter;case r.PERFECT_CIRCLE:return GAME_DIFFICULTY_DESCRIPTIONS.perfectCircle;default:return GAME_DIFFICULTY_DESCRIPTIONS.balloonBlaster}};export const getGameTitle=e=>{switch(e){case r.BALLOON_BLASTER:return"Balloon Blaster";case r.FRUIT_NINJA:return"Fruit Ninja";case r.MAZE_RUNNER:return"Maze Runner";case r.WHACK_A_MOLE:return"Whack-a-Mole";case r.SPACE_FIGHTER:return"Space Fighter";case r.POPIT_FIDGET:return"Pop It Fidget";case r.SLIDING_NUMBERS:return"Sliding Numbers";case r.GAME_2048:return"2048";case r.DINO_JUMP:return"Dino Jump";case r.COLORS_SORT:return"Colors Sort";case r.FRUIT_MERGER:return"Fruit Merger";case r.FLAPPY_BIRD:return"Flappy Bird";case r.CANDY_CRUSH:return"Candy Crush";case r.SNAKE:return"Snake";case r.CAR_RACING:return"Car Racing";case r.BIKE_RACING:return"Bike Racing";case r.BLOCK_BLAST:return"Block Blast";case r.BUBBLE_SHOOTER:return"Bubble Shooter";case r.PERFECT_CIRCLE:return"Perfect Circle";default:return"Game Settings"}};
@@ -1 +1 @@
1
- "use strict";import{CandyCrush}from "../games/candy-crush/index.js";import{BalloonBlaster}from "../games/balloon-blaster/BalloonBlaster.js";import{ColorsSort}from "../games/colors-sort/ColorsSort.js";import{DinoJump}from "../games/dino-jump/DinoJump.js";import{FlappyBird}from "../games/flappy-bird/FlappyBird.js";import{FruitMerger}from "../games/fruit-merger/FruitMerger.js";import{FruitNinja}from "../games/fruit-ninja/FruitNinja.js";import{Game2048}from "../games/game-2048/Game2048.js";import{MazeRunner}from "../games/maze-runner/MazeRunner.js";import{PopitFidget}from "../games/popit-fidget/PopitFidget.js";import{SlidingNumbers}from "../games/sliding-numbers/SlidingNumbers.js";import{Snake}from "../games/snake/index.js";import{SpaceFighter}from "../games/space-fighter/SpaceFighter.js";import{WhackAMole}from "../games/whack-a-mole/WhackAMole.js";import{CarRacing}from "../games/car-racing/CarRacing.js";import{BikeRacing}from "../games/bike-racing/BikeRacing.js";import{BlockBlast}from "../games/block-blast/BlockBlast.js";import{BubbleShooter}from "../games/bubble-shooter/BubbleShooter.js";import{PerfectCircle}from "../games/perfect-circle/PerfectCircle.js";import{GAME_IDS}from "./UtilsService.js";export const GAMES ={[GAME_IDS.BLOCK_BLAST]:{id:GAME_IDS.BLOCK_BLAST,title:'Block Blast',description:'Place blocks on grid to clear lines - strategic puzzle challenge!',component:BlockBlast},[GAME_IDS.BUBBLE_SHOOTER]:{id:GAME_IDS.BUBBLE_SHOOTER,title:'Bubble Shooter',description:'Match 3+ bubbles of the same color - classic puzzle fun!',component:BubbleShooter},[GAME_IDS.FRUIT_NINJA]:{id:GAME_IDS.FRUIT_NINJA,title:'Fruit Ninja',description:'Slice flying fruits with finger swipes and combos - avoid the bombs!',component:FruitNinja},[GAME_IDS.POPIT_FIDGET]:{id:GAME_IDS.POPIT_FIDGET,title:'Popit Fidget',description:'Pop satisfying bubbles in this relaxing fidget toy simulation game!',component:PopitFidget},[GAME_IDS.FLAPPY_BIRD]:{id:GAME_IDS.FLAPPY_BIRD,title:'Flappy Bird',description:'Tap to flap and navigate through pipes - classic arcade challenge!',component:FlappyBird},[GAME_IDS.COLORS_SORT]:{id:GAME_IDS.COLORS_SORT,title:'Colors Sort',description:'Sort colored liquids into matching tubes - challenging logic puzzle!',component:ColorsSort},[GAME_IDS.DINO_JUMP]:{id:GAME_IDS.DINO_JUMP,title:'Dino Jump',description:'Jump over obstacles and collect stars for lives - endless runner!',component:DinoJump},[GAME_IDS.CANDY_CRUSH]:{id:GAME_IDS.CANDY_CRUSH,title:'Candy Crush',description:'Match colorful candies in rows to score points - sweet puzzle fun!',component:CandyCrush},[GAME_IDS.WHACK_A_MOLE]:{id:GAME_IDS.WHACK_A_MOLE,title:'Whack A Mole',description:'Whack cute cats popping from holes - test your lightning reflexes!',component:WhackAMole},[GAME_IDS.BALLOON_BLASTER]:{id:GAME_IDS.BALLOON_BLASTER,title:'Balloon Blaster',description:'Pop rising balloons before they escape - quick taps and swipes win!',component:BalloonBlaster},[GAME_IDS.SPACE_FIGHTER]:{id:GAME_IDS.SPACE_FIGHTER,title:'Space Fighter',description:'Pilot your spaceship through asteroid fields - endless space survival!',component:SpaceFighter},[GAME_IDS.CAR_RACING]:{id:GAME_IDS.CAR_RACING,title:'Car Racing',description:'Dodge traffic and race through lanes - test your reflexes!',component:CarRacing},[GAME_IDS.BIKE_RACING]:{id:GAME_IDS.BIKE_RACING,title:'Bike Racing',description:'Race on bikes through traffic - faster and more challenging!',component:BikeRacing},[GAME_IDS.MAZE_RUNNER]:{id:GAME_IDS.MAZE_RUNNER,title:'Maze Runner',description:'Navigate ball through procedural mazes - tilt and physics controls!',component:MazeRunner},[GAME_IDS.SLIDING_NUMBERS]:{id:GAME_IDS.SLIDING_NUMBERS,title:'Sliding Numbers',description:'Slide numbered tiles to solve puzzles - classic sliding puzzle game!',component:SlidingNumbers},[GAME_IDS.GAME_2048]:{id:GAME_IDS.GAME_2048,title:'2048',description:'Merge matching tiles to reach 2048 and beyond - addictive puzzle!',component:Game2048},[GAME_IDS.FRUIT_MERGER]:{id:GAME_IDS.FRUIT_MERGER,title:'Fruit Merger',description:'Drop and merge fruits to create bigger ones - reach the watermelon!',component:FruitMerger},[GAME_IDS.SNAKE]:{id:GAME_IDS.SNAKE,title:'Snake & Eggs',description:'Eat eggs to grow longer and avoid walls - classic snake gameplay!',component:Snake},[GAME_IDS.PERFECT_CIRCLE]:{id:GAME_IDS.PERFECT_CIRCLE,title:'Perfect Circle',description:'Draw the most perfect circle you can - test your precision!',component:PerfectCircle}};export const GAMES_LIST = Object.values(GAMES);export const GAMES_MAPPING = Object.fromEntries(Object.entries(GAMES).map(([id,{component}])=> [id,component]));
1
+ "use strict";import{CandyCrush as e}from"../games/candy-crush/index.js";import{BalloonBlaster as i}from"../games/balloon-blaster/BalloonBlaster.js";import{ColorsSort as o}from"../games/colors-sort/ColorsSort.js";import{DinoJump as t}from"../games/dino-jump/DinoJump.js";import{FlappyBird as r}from"../games/flappy-bird/FlappyBird.js";import{FruitMerger as s}from"../games/fruit-merger/FruitMerger.js";import{FruitNinja as n}from"../games/fruit-ninja/FruitNinja.js";import{Game2048 as a}from"../games/game-2048/Game2048.js";import{MazeRunner as c}from"../games/maze-runner/MazeRunner.js";import{PopitFidget as l}from"../games/popit-fidget/PopitFidget.js";import{SlidingNumbers as p}from"../games/sliding-numbers/SlidingNumbers.js";import{Snake as m}from"../games/snake/index.js";import{SpaceFighter as d}from"../games/space-fighter/SpaceFighter.js";import{WhackAMole as g}from"../games/whack-a-mole/WhackAMole.js";import{CarRacing as u}from"../games/car-racing/CarRacing.js";import{BikeRacing as f}from"../games/bike-racing/BikeRacing.js";import{BlockBlast as h}from"../games/block-blast/BlockBlast.js";import{BubbleShooter as b}from"../games/bubble-shooter/BubbleShooter.js";import{PerfectCircle as j}from"../games/perfect-circle/PerfectCircle.js";import{GAME_IDS as S}from"./UtilsService.js";export const GAMES={[S.BLOCK_BLAST]:{id:S.BLOCK_BLAST,title:"Block Blast",description:"Place blocks on grid to clear lines - strategic puzzle challenge!",component:h},[S.BUBBLE_SHOOTER]:{id:S.BUBBLE_SHOOTER,title:"Bubble Shooter",description:"Match 3+ bubbles of the same color - classic puzzle fun!",component:b},[S.FRUIT_NINJA]:{id:S.FRUIT_NINJA,title:"Fruit Ninja",description:"Slice flying fruits with finger swipes and combos - avoid the bombs!",component:n},[S.POPIT_FIDGET]:{id:S.POPIT_FIDGET,title:"Popit Fidget",description:"Pop satisfying bubbles in this relaxing fidget toy simulation game!",component:l},[S.FLAPPY_BIRD]:{id:S.FLAPPY_BIRD,title:"Flappy Bird",description:"Tap to flap and navigate through pipes - classic arcade challenge!",component:r},[S.COLORS_SORT]:{id:S.COLORS_SORT,title:"Colors Sort",description:"Sort colored liquids into matching tubes - challenging logic puzzle!",component:o},[S.DINO_JUMP]:{id:S.DINO_JUMP,title:"Dino Jump",description:"Jump over obstacles and collect stars for lives - endless runner!",component:t},[S.CANDY_CRUSH]:{id:S.CANDY_CRUSH,title:"Candy Crush",description:"Match colorful candies in rows to score points - sweet puzzle fun!",component:e},[S.WHACK_A_MOLE]:{id:S.WHACK_A_MOLE,title:"Whack A Mole",description:"Whack cute cats popping from holes - test your lightning reflexes!",component:g},[S.BALLOON_BLASTER]:{id:S.BALLOON_BLASTER,title:"Balloon Blaster",description:"Pop rising balloons before they escape - quick taps and swipes win!",component:i},[S.SPACE_FIGHTER]:{id:S.SPACE_FIGHTER,title:"Space Fighter",description:"Pilot your spaceship through asteroid fields - endless space survival!",component:d},[S.CAR_RACING]:{id:S.CAR_RACING,title:"Car Racing",description:"Dodge traffic and race through lanes - test your reflexes!",component:u},[S.BIKE_RACING]:{id:S.BIKE_RACING,title:"Bike Racing",description:"Race on bikes through traffic - faster and more challenging!",component:f},[S.MAZE_RUNNER]:{id:S.MAZE_RUNNER,title:"Maze Runner",description:"Navigate ball through procedural mazes - tilt and physics controls!",component:c},[S.SLIDING_NUMBERS]:{id:S.SLIDING_NUMBERS,title:"Sliding Numbers",description:"Slide numbered tiles to solve puzzles - classic sliding puzzle game!",component:p},[S.GAME_2048]:{id:S.GAME_2048,title:"2048",description:"Merge matching tiles to reach 2048 and beyond - addictive puzzle!",component:a},[S.FRUIT_MERGER]:{id:S.FRUIT_MERGER,title:"Fruit Merger",description:"Drop and merge fruits to create bigger ones - reach the watermelon!",component:s},[S.SNAKE]:{id:S.SNAKE,title:"Snake & Eggs",description:"Eat eggs to grow longer and avoid walls - classic snake gameplay!",component:m},[S.PERFECT_CIRCLE]:{id:S.PERFECT_CIRCLE,title:"Perfect Circle",description:"Draw the most perfect circle you can - test your precision!",component:j}};export const GAMES_LIST=Object.values(GAMES);export const GAMES_MAPPING=Object.fromEntries(Object.entries(GAMES).map(([e,{component:i}])=>[e,i]));
@@ -1 +1 @@
1
- "use strict";import * as Haptics from 'expo-haptics';export let HapticType = function(HapticType){HapticType["LIGHT"] = "light";HapticType["MEDIUM"] = "medium";HapticType["HEAVY"] = "heavy";HapticType["SUCCESS"] = "success";HapticType["WARNING"] = "warning";HapticType["ERROR"] = "error";HapticType["SELECTION"] = "selection";return HapticType;}({});let hapticsDisabled = false;export const playHaptic =(type,hapticEnabled = false)=>{if(!hapticEnabled || hapticsDisabled)return;try{switch(type){case HapticType.LIGHT:Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light).catch(error =>{console.warn('Light haptic failed:',error);hapticsDisabled = true;});break;case HapticType.MEDIUM:Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium).catch(error =>{console.warn('Medium haptic failed:',error);hapticsDisabled = true;});break;case HapticType.HEAVY:Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Heavy).catch(error =>{console.warn('Heavy haptic failed:',error);hapticsDisabled = true;});break;case HapticType.SUCCESS:Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success).catch(error =>{console.warn('Success haptic failed:',error);hapticsDisabled = true;});break;case HapticType.WARNING:Haptics.notificationAsync(Haptics.NotificationFeedbackType.Warning).catch(error =>{console.warn('Warning haptic failed:',error);hapticsDisabled = true;});break;case HapticType.ERROR:Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error).catch(error =>{console.warn('Error haptic failed:',error);hapticsDisabled = true;});break;case HapticType.SELECTION:Haptics.selectionAsync().catch(error =>{console.warn('Selection haptic failed:',error);hapticsDisabled = true;});break;}}catch(error){console.warn('Haptic feedback failed,disabling haptics:',error);hapticsDisabled = true;}};
1
+ "use strict";import*as e from"expo-haptics";export let HapticType=function(e){return e.LIGHT="light",e.MEDIUM="medium",e.HEAVY="heavy",e.SUCCESS="success",e.WARNING="warning",e.ERROR="error",e.SELECTION="selection",e}({});let a=!1;export const playHaptic=(c,t=!1)=>{if(t&&!a)try{switch(c){case HapticType.LIGHT:e.impactAsync(e.ImpactFeedbackStyle.Light).catch(e=>{a=!0});break;case HapticType.MEDIUM:e.impactAsync(e.ImpactFeedbackStyle.Medium).catch(e=>{a=!0});break;case HapticType.HEAVY:e.impactAsync(e.ImpactFeedbackStyle.Heavy).catch(e=>{a=!0});break;case HapticType.SUCCESS:e.notificationAsync(e.NotificationFeedbackType.Success).catch(e=>{a=!0});break;case HapticType.WARNING:e.notificationAsync(e.NotificationFeedbackType.Warning).catch(e=>{a=!0});break;case HapticType.ERROR:e.notificationAsync(e.NotificationFeedbackType.Error).catch(e=>{a=!0});break;case HapticType.SELECTION:e.selectionAsync().catch(e=>{a=!0})}}catch(e){a=!0}};
@@ -1 +1 @@
1
- "use strict";export const calculateTimeBasedScore =(completionTimeSeconds,expectedTime,maxScore = 1000,minScore = 100,decayRate = 2)=>{if(completionTimeSeconds <= 0){return maxScore;}const timeRatio = completionTimeSeconds / expectedTime;const decayFactor = Math.exp(-decayRate * timeRatio);const scoreRange = maxScore - minScore;const score = minScore + scoreRange * decayFactor;return Math.max(minScore,Math.min(maxScore,Math.round(score)));};
1
+ "use strict";export const calculateTimeBasedScore=(t,a,e=1e3,c=100,h=2)=>t>0?Math.max(c,Math.min(e,Math.round(c+(e-c)*Math.exp(t/a*-h)))):e;
@@ -1 +1 @@
1
- "use strict";import * as Speech from 'expo-speech';let lastSpeechTime = 0;const SPEECH_THROTTLE_MS = 100;let isSpeaking = false;export const playSound =(soundConfig,soundEnabled)=>{if(!soundEnabled)return;const now = Date.now();if(now - lastSpeechTime < SPEECH_THROTTLE_MS){return;}if(isSpeaking){return;}lastSpeechTime = now;isSpeaking = true;Speech.speak(soundConfig.text,{pitch:soundConfig.pitch || 1.0,rate:soundConfig.rate || 1.5,language:soundConfig.language || 'en',onDone:()=>{isSpeaking = false;},onStopped:()=>{isSpeaking = false;},onError:()=>{isSpeaking = false;}});};export const stopAllSounds =()=>{Speech.stop();isSpeaking = false;lastSpeechTime = 0;};export const isSpeechAvailable = async()=>{try{return await Speech.isSpeakingAsync();}catch{return false;}};export const GAME_SOUNDS ={POP:{text:'Pop!',pitch:1.6,rate:2.2},SWOOSH:{text:'Swoosh!',pitch:1.5,rate:2.5},BOOM:{text:'Boom!',pitch:0.8,rate:1.5},WHOOSH:{text:'Whoosh',pitch:0.7,rate:1.8},GAME_START:{text:'Game started!',pitch:1.1,rate:0.9},GAME_OVER:{text:'Game over!',pitch:0.9,rate:0.8},TIME_UP:{text:'Time up! Game over!',pitch:0.9,rate:0.8},WELL_DONE:{text:'Well done!',pitch:1.2,rate:1.0},CONGRATULATIONS:{text:'Congratulations!',pitch:1.1,rate:0.9},BUBBLE_POPPER:{START:{text:'Bubble Popper started!',pitch:1.1,rate:0.9},COMPLETE:{text:'All bubbles popped! Well done!',pitch:1.2,rate:1.0},POP:{text:'Pop!',pitch:1.6,rate:2.2}},WHACK_A_MOLE:{HIT:{text:'Pop!',pitch:1.8,rate:2.0},MISS:{text:'Whoosh',pitch:0.7,rate:1.8}},BALLOON_BLASTER:{POP:{text:'Pop!',pitch:1.5,rate:2.5},BOMB:{text:'Boom!',pitch:0.8,rate:1.5},BONUS:{text:'bonus life!',pitch:1.8,rate:2.0}},FRUIT_NINJA:{SLICE:{text:'Swoosh!',pitch:1.5,rate:2.5},BOMB:{text:'Boom!',pitch:0.8,rate:1.5},BONUS:{text:'bonus life!',pitch:1.8,rate:2.0}},MAZE_RUNNER:{START:{text:'Maze started! Navigate to the exit!',pitch:1.0,rate:0.9},COMPLETE:{text:'Congratulations! Maze completed!',pitch:1.1,rate:0.9},STOP:{text:'Maze stopped!',pitch:0.9,rate:0.8}},SPACE_FIGHTER:{START:{text:'Mission started! Navigate through the asteroid field!',pitch:1.0,rate:0.9},SUCCESS:{text:'Nice!',pitch:1.8,rate:2.0},COLLISION:{text:'Ouch!',pitch:0.8,rate:1.5}},DINO_JUMP:{START:{text:'Run!',pitch:1.2,rate:1.5},COLLECT:{text:'Yum!',pitch:1.8,rate:2.2},HIT:{text:'Ouch!',pitch:0.8,rate:1.5},GAME_OVER:{text:'Game over!',pitch:0.9,rate:0.8}},COLORS_SORT:{START:{text:'Sort colors!',pitch:1.1,rate:1.2},MATCH:{text:'Click!',pitch:1.6,rate:2.0},COMPLETE:{text:'Perfect!',pitch:1.8,rate:1.8},MISS:{text:'Oops!',pitch:0.8,rate:1.0},GAME_OVER:{text:'Game over!',pitch:0.9,rate:0.8}},FRUIT_MERGER:{START:{text:'Merge fruits!',pitch:1.2,rate:1.3},MERGE:{text:'Pop!',pitch:1.5,rate:1.8},DROP:{text:'Boing!',pitch:1.3,rate:1.5},COMPLETE:{text:'Amazing!',pitch:1.9,rate:1.9},GAME_OVER:{text:'Game over!',pitch:0.9,rate:0.8}},FLAPPY_BIRD:{START:{text:'Fly!',pitch:1.3,rate:1.5},FLAP:{text:'Flap!',pitch:1.8,rate:2.5},SCORE:{text:'Point!',pitch:1.6,rate:2.0},HIT:{text:'Ouch!',pitch:0.8,rate:1.2},GAME_OVER:{text:'Game over!',pitch:0.9,rate:0.8}},CAR_RACING:{START:{text:'Race started!',pitch:1.2,rate:1.3},LANE_SWITCH:{text:'Vroom!',pitch:1.4,rate:2.5},PASS:{text:'Nice!',pitch:1.6,rate:2.0},CRASH:{text:'Crash!',pitch:0.7,rate:1.2},GAME_OVER:{text:'Race over!',pitch:0.9,rate:0.8}},BLOCK_BLAST:{START:{text:'Block Blast started!',pitch:1.1,rate:1.2},PLACE:{text:'Click!',pitch:1.5,rate:2.0},CLEAR:{text:'Clear!',pitch:1.7,rate:1.8},COMBO:{text:'Combo!',pitch:1.9,rate:2.0},GAME_OVER:{text:'Game over!',pitch:0.9,rate:0.8}},POPIT_FIDGET:{POP:{text:'Pop!',pitch:1.6,rate:2.2}},PERFECT_CIRCLE:{START:{text:'Draw a perfect circle!',pitch:1.1,rate:1.2},DRAW_START:{text:'Swoosh!',pitch:1.3,rate:2.0},DRAW_END:{text:'Done!',pitch:1.2,rate:1.5},SUCCESS:{text:'Perfect!',pitch:1.8,rate:1.8},FAIL:{text:'Try again!',pitch:0.9,rate:1.0}}};
1
+ "use strict";import*as t from"expo-speech";let e=0;const r=100;let a=!1;export const playSound=(p,c)=>{if(!c)return;const i=Date.now();r>i-e||a||(e=i,a=!0,t.speak(p.text,{pitch:p.pitch||1,rate:p.rate||1.5,language:p.language||"en",onDone:()=>{a=!1},onStopped:()=>{a=!1},onError:()=>{a=!1}}))};export const stopAllSounds=()=>{t.stop(),a=!1,e=0};export const isSpeechAvailable=async()=>{try{return await t.isSpeakingAsync()}catch{return!1}};export const GAME_SOUNDS={POP:{text:"Pop!",pitch:1.6,rate:2.2},SWOOSH:{text:"Swoosh!",pitch:1.5,rate:2.5},BOOM:{text:"Boom!",pitch:.8,rate:1.5},WHOOSH:{text:"Whoosh",pitch:.7,rate:1.8},GAME_START:{text:"Game started!",pitch:1.1,rate:.9},GAME_OVER:{text:"Game over!",pitch:.9,rate:.8},TIME_UP:{text:"Time up! Game over!",pitch:.9,rate:.8},WELL_DONE:{text:"Well done!",pitch:1.2,rate:1},CONGRATULATIONS:{text:"Congratulations!",pitch:1.1,rate:.9},BUBBLE_POPPER:{START:{text:"Bubble Popper started!",pitch:1.1,rate:.9},COMPLETE:{text:"All bubbles popped! Well done!",pitch:1.2,rate:1},POP:{text:"Pop!",pitch:1.6,rate:2.2}},WHACK_A_MOLE:{HIT:{text:"Pop!",pitch:1.8,rate:2},MISS:{text:"Whoosh",pitch:.7,rate:1.8}},BALLOON_BLASTER:{POP:{text:"Pop!",pitch:1.5,rate:2.5},BOMB:{text:"Boom!",pitch:.8,rate:1.5},BONUS:{text:"bonus life!",pitch:1.8,rate:2}},FRUIT_NINJA:{SLICE:{text:"Swoosh!",pitch:1.5,rate:2.5},BOMB:{text:"Boom!",pitch:.8,rate:1.5},BONUS:{text:"bonus life!",pitch:1.8,rate:2}},MAZE_RUNNER:{START:{text:"Maze started! Navigate to the exit!",pitch:1,rate:.9},COMPLETE:{text:"Congratulations! Maze completed!",pitch:1.1,rate:.9},STOP:{text:"Maze stopped!",pitch:.9,rate:.8}},SPACE_FIGHTER:{START:{text:"Mission started! Navigate through the asteroid field!",pitch:1,rate:.9},SUCCESS:{text:"Nice!",pitch:1.8,rate:2},COLLISION:{text:"Ouch!",pitch:.8,rate:1.5}},DINO_JUMP:{START:{text:"Run!",pitch:1.2,rate:1.5},COLLECT:{text:"Yum!",pitch:1.8,rate:2.2},HIT:{text:"Ouch!",pitch:.8,rate:1.5},GAME_OVER:{text:"Game over!",pitch:.9,rate:.8}},COLORS_SORT:{START:{text:"Sort colors!",pitch:1.1,rate:1.2},MATCH:{text:"Click!",pitch:1.6,rate:2},COMPLETE:{text:"Perfect!",pitch:1.8,rate:1.8},MISS:{text:"Oops!",pitch:.8,rate:1},GAME_OVER:{text:"Game over!",pitch:.9,rate:.8}},FRUIT_MERGER:{START:{text:"Merge fruits!",pitch:1.2,rate:1.3},MERGE:{text:"Pop!",pitch:1.5,rate:1.8},DROP:{text:"Boing!",pitch:1.3,rate:1.5},COMPLETE:{text:"Amazing!",pitch:1.9,rate:1.9},GAME_OVER:{text:"Game over!",pitch:.9,rate:.8}},FLAPPY_BIRD:{START:{text:"Fly!",pitch:1.3,rate:1.5},FLAP:{text:"Flap!",pitch:1.8,rate:2.5},SCORE:{text:"Point!",pitch:1.6,rate:2},HIT:{text:"Ouch!",pitch:.8,rate:1.2},GAME_OVER:{text:"Game over!",pitch:.9,rate:.8}},CAR_RACING:{START:{text:"Race started!",pitch:1.2,rate:1.3},LANE_SWITCH:{text:"Vroom!",pitch:1.4,rate:2.5},PASS:{text:"Nice!",pitch:1.6,rate:2},CRASH:{text:"Crash!",pitch:.7,rate:1.2},GAME_OVER:{text:"Race over!",pitch:.9,rate:.8}},BLOCK_BLAST:{START:{text:"Block Blast started!",pitch:1.1,rate:1.2},PLACE:{text:"Click!",pitch:1.5,rate:2},CLEAR:{text:"Clear!",pitch:1.7,rate:1.8},COMBO:{text:"Combo!",pitch:1.9,rate:2},GAME_OVER:{text:"Game over!",pitch:.9,rate:.8}},POPIT_FIDGET:{POP:{text:"Pop!",pitch:1.6,rate:2.2}},PERFECT_CIRCLE:{START:{text:"Draw a perfect circle!",pitch:1.1,rate:1.2},DRAW_START:{text:"Swoosh!",pitch:1.3,rate:2},DRAW_END:{text:"Done!",pitch:1.2,rate:1.5},SUCCESS:{text:"Perfect!",pitch:1.8,rate:1.8},FAIL:{text:"Try again!",pitch:.9,rate:1}}};
@@ -1 +1 @@
1
- "use strict";import{produce}from 'immer';export const DEFAULT_GAME_SETTINGS ={isVisible:false,difficulty:'medium',enableSounds:true,enableHaptics:true,offset:0};export let GAME_IDS = function(GAME_IDS){GAME_IDS["WHACK_A_MOLE"] = "whack-a-mole";GAME_IDS["POPIT_FIDGET"] = "popit-fidget";GAME_IDS["FRUIT_NINJA"] = "fruit-ninja";GAME_IDS["BALLOON_BLASTER"] = "balloon-blaster";GAME_IDS["SPACE_FIGHTER"] = "space-fighter";GAME_IDS["MAZE_RUNNER"] = "maze-runner";GAME_IDS["SLIDING_NUMBERS"] = "sliding-numbers";GAME_IDS["GAME_2048"] = "game-2048";GAME_IDS["DINO_JUMP"] = "dino-jump";GAME_IDS["COLORS_SORT"] = "colors-sort";GAME_IDS["FRUIT_MERGER"] = "fruit-merger";GAME_IDS["FLAPPY_BIRD"] = "flappy-bird";GAME_IDS["CANDY_CRUSH"] = "candy-crush";GAME_IDS["SNAKE"] = "snake-game";GAME_IDS["CAR_RACING"] = "car-racing";GAME_IDS["BIKE_RACING"] = "bike-racing";GAME_IDS["BLOCK_BLAST"] = "block-blast";GAME_IDS["BUBBLE_SHOOTER"] = "bubble-shooter";GAME_IDS["PERFECT_CIRCLE"] = "perfect-circle";return GAME_IDS;}({});export const immerMiddleware = config =>(set,get,api)=> config((partial,...args)=>{const nextState = typeof partial === 'function' ? produce(partial):partial;return set(nextState,...args);},get,api);
1
+ "use strict";import{produce as e}from"immer";export const DEFAULT_GAME_SETTINGS={isVisible:!1,difficulty:"medium",enableSounds:!0,enableHaptics:!0,offset:0};export let GAME_IDS=function(e){return e.WHACK_A_MOLE="whack-a-mole",e.POPIT_FIDGET="popit-fidget",e.FRUIT_NINJA="fruit-ninja",e.BALLOON_BLASTER="balloon-blaster",e.SPACE_FIGHTER="space-fighter",e.MAZE_RUNNER="maze-runner",e.SLIDING_NUMBERS="sliding-numbers",e.GAME_2048="game-2048",e.DINO_JUMP="dino-jump",e.COLORS_SORT="colors-sort",e.FRUIT_MERGER="fruit-merger",e.FLAPPY_BIRD="flappy-bird",e.CANDY_CRUSH="candy-crush",e.SNAKE="snake-game",e.CAR_RACING="car-racing",e.BIKE_RACING="bike-racing",e.BLOCK_BLAST="block-blast",e.BUBBLE_SHOOTER="bubble-shooter",e.PERFECT_CIRCLE="perfect-circle",e}({});export const immerMiddleware=r=>(i,t,n)=>r((r,...t)=>{const n="function"==typeof r?e(r):r;return i(n,...t)},t,n);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-games",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "Free games for your react native projects.",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -34,7 +34,9 @@
34
34
  "example": "yarn workspace playtura",
35
35
  "typecheck": "tsc",
36
36
  "clean": "del-cli lib",
37
- "build": "bob build && node scripts/minify.js"
37
+ "build:local": "bob build && node scripts/minify.js",
38
+ "build:dev": "bob build",
39
+ "build": "bob build && node scripts/minify-aggressive.js"
38
40
  },
39
41
  "keywords": [
40
42
  "react-native",
@@ -77,6 +79,7 @@
77
79
  "react-native-gesture-handler": "^2.28.0",
78
80
  "react-native-reanimated": "^4.1.0",
79
81
  "react-native-worklets": "^0.5.1",
82
+ "terser": "^5.44.1",
80
83
  "typescript": "^5.9.2"
81
84
  },
82
85
  "peerDependencies": {