react-native-games 0.3.0 → 0.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 (429) hide show
  1. package/README.md +134 -130
  2. package/lib/module/games/balloon-blaster/BalloonBlaster.js +116 -343
  3. package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -1
  4. package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +182 -0
  5. package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js.map +1 -0
  6. package/lib/module/games/balloon-blaster/BalloonBlasterService.js +123 -101
  7. package/lib/module/games/balloon-blaster/BalloonBlasterService.js.map +1 -1
  8. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +119 -92
  9. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js.map +1 -1
  10. package/lib/module/games/balloon-blaster/components/BalloonComponent.js +123 -113
  11. package/lib/module/games/balloon-blaster/components/BalloonComponent.js.map +1 -1
  12. package/lib/module/games/balloon-blaster/components/GameArea.js +137 -23
  13. package/lib/module/games/balloon-blaster/components/GameArea.js.map +1 -1
  14. package/lib/module/games/balloon-blaster/components/GameBackground.js +8 -83
  15. package/lib/module/games/balloon-blaster/components/GameBackground.js.map +1 -1
  16. package/lib/module/games/balloon-blaster/components/ScoreBoard.js +15 -22
  17. package/lib/module/games/balloon-blaster/components/ScoreBoard.js.map +1 -1
  18. package/lib/module/games/balloon-blaster/components/index.js +0 -4
  19. package/lib/module/games/balloon-blaster/components/index.js.map +1 -1
  20. package/lib/module/games/fruit-ninja/FruitNinja.js +143 -0
  21. package/lib/module/games/fruit-ninja/FruitNinja.js.map +1 -0
  22. package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +148 -0
  23. package/lib/module/games/fruit-ninja/FruitNinjaConstants.js.map +1 -0
  24. package/lib/module/games/{fruit-slicer/FruitSlicerService.js → fruit-ninja/FruitNinjaService.js} +43 -21
  25. package/lib/module/games/fruit-ninja/FruitNinjaService.js.map +1 -0
  26. package/lib/module/games/fruit-ninja/FruitNinjaStore.js +191 -0
  27. package/lib/module/games/fruit-ninja/FruitNinjaStore.js.map +1 -0
  28. package/lib/module/games/{fruit-slicer → fruit-ninja}/components/FruitComponent.js +1 -1
  29. package/lib/module/games/fruit-ninja/components/FruitComponent.js.map +1 -0
  30. package/lib/module/games/fruit-ninja/components/GameArea.js +215 -0
  31. package/lib/module/games/fruit-ninja/components/GameArea.js.map +1 -0
  32. package/lib/module/games/{fruit-slicer → fruit-ninja}/components/GameBackground.js +250 -304
  33. package/lib/module/games/fruit-ninja/components/GameBackground.js.map +1 -0
  34. package/lib/module/games/{fruit-slicer → fruit-ninja}/components/ScoreBoard.js +17 -47
  35. package/lib/module/games/fruit-ninja/components/ScoreBoard.js.map +1 -0
  36. package/lib/module/games/fruit-ninja/components/index.js +7 -0
  37. package/lib/module/games/fruit-ninja/components/index.js.map +1 -0
  38. package/lib/module/games/maze-runner/MazeRunner.js +184 -169
  39. package/lib/module/games/maze-runner/MazeRunner.js.map +1 -1
  40. package/lib/module/games/maze-runner/MazeRunnerConstants.js +100 -0
  41. package/lib/module/games/maze-runner/MazeRunnerConstants.js.map +1 -0
  42. package/lib/module/games/maze-runner/MazeRunnerService.js +37 -14
  43. package/lib/module/games/maze-runner/MazeRunnerService.js.map +1 -1
  44. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +5 -4
  45. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js.map +1 -1
  46. package/lib/module/games/maze-runner/components/EnhancedGameArea.js +20 -15
  47. package/lib/module/games/maze-runner/components/EnhancedGameArea.js.map +1 -1
  48. package/lib/module/games/maze-runner/components/GameBackground.js +151 -192
  49. package/lib/module/games/maze-runner/components/GameBackground.js.map +1 -1
  50. package/lib/module/games/maze-runner/components/ScoreBoard.js +15 -25
  51. package/lib/module/games/maze-runner/components/ScoreBoard.js.map +1 -1
  52. package/lib/module/games/maze-runner/components/WallComponent.js +3 -2
  53. package/lib/module/games/maze-runner/components/WallComponent.js.map +1 -1
  54. package/lib/module/games/maze-runner/components/index.js +0 -2
  55. package/lib/module/games/maze-runner/components/index.js.map +1 -1
  56. package/lib/module/games/popit-fidget/PopitFidget.js +294 -0
  57. package/lib/module/games/popit-fidget/PopitFidget.js.map +1 -0
  58. package/lib/module/games/popit-fidget/PopitFidgetConstants.js +113 -0
  59. package/lib/module/games/popit-fidget/PopitFidgetConstants.js.map +1 -0
  60. package/lib/module/games/popit-fidget/PopitFidgetService.js +132 -0
  61. package/lib/module/games/popit-fidget/PopitFidgetService.js.map +1 -0
  62. package/lib/module/games/popit-fidget/PopitFidgetStore.js +163 -0
  63. package/lib/module/games/popit-fidget/PopitFidgetStore.js.map +1 -0
  64. package/lib/module/games/popit-fidget/components/BubbleComponent.js +198 -0
  65. package/lib/module/games/popit-fidget/components/BubbleComponent.js.map +1 -0
  66. package/lib/module/games/popit-fidget/components/FidgetGrid.js +165 -0
  67. package/lib/module/games/popit-fidget/components/FidgetGrid.js.map +1 -0
  68. package/lib/module/games/popit-fidget/components/GameBackground.js +177 -0
  69. package/lib/module/games/popit-fidget/components/GameBackground.js.map +1 -0
  70. package/lib/module/games/popit-fidget/components/ScoreBoard.js +75 -0
  71. package/lib/module/games/popit-fidget/components/ScoreBoard.js.map +1 -0
  72. package/lib/module/games/popit-fidget/components/index.js +7 -0
  73. package/lib/module/games/popit-fidget/components/index.js.map +1 -0
  74. package/lib/module/games/space-fighter/SpaceFighter.js +169 -0
  75. package/lib/module/games/space-fighter/SpaceFighter.js.map +1 -0
  76. package/lib/module/games/space-fighter/SpaceFighterConstants.js +108 -0
  77. package/lib/module/games/space-fighter/SpaceFighterConstants.js.map +1 -0
  78. package/lib/module/games/{space-traveller/SpaceTravellerService.js → space-fighter/SpaceFighterService.js} +48 -21
  79. package/lib/module/games/space-fighter/SpaceFighterService.js.map +1 -0
  80. package/lib/module/games/space-fighter/SpaceFighterStore.js +195 -0
  81. package/lib/module/games/space-fighter/SpaceFighterStore.js.map +1 -0
  82. package/lib/module/games/{space-traveller → space-fighter}/components/AsteroidComponent.js +7 -5
  83. package/lib/module/games/space-fighter/components/AsteroidComponent.js.map +1 -0
  84. package/lib/module/games/space-fighter/components/GameArea.js +295 -0
  85. package/lib/module/games/space-fighter/components/GameArea.js.map +1 -0
  86. package/lib/module/games/{space-traveller → space-fighter}/components/GameBackground.js +10 -65
  87. package/lib/module/games/space-fighter/components/GameBackground.js.map +1 -0
  88. package/lib/module/games/{space-traveller → space-fighter}/components/ScoreBoard.js +20 -26
  89. package/lib/module/games/space-fighter/components/ScoreBoard.js.map +1 -0
  90. package/lib/module/games/{space-traveller → space-fighter}/components/Spacecraft3D.js +72 -111
  91. package/lib/module/games/space-fighter/components/Spacecraft3D.js.map +1 -0
  92. package/lib/module/games/space-fighter/components/SpacecraftPath.js +52 -0
  93. package/lib/module/games/space-fighter/components/SpacecraftPath.js.map +1 -0
  94. package/lib/module/games/{space-traveller → space-fighter}/components/index.js +0 -4
  95. package/lib/module/games/space-fighter/components/index.js.map +1 -0
  96. package/lib/module/games/whack-a-mole/WhackAMole.js +263 -0
  97. package/lib/module/games/whack-a-mole/WhackAMole.js.map +1 -0
  98. package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +115 -0
  99. package/lib/module/games/whack-a-mole/WhackAMoleConstants.js.map +1 -0
  100. package/lib/module/games/whack-a-mole/WhackAMoleService.js +120 -0
  101. package/lib/module/games/whack-a-mole/WhackAMoleService.js.map +1 -0
  102. package/lib/module/games/whack-a-mole/WhackAMoleStore.js +172 -0
  103. package/lib/module/games/whack-a-mole/WhackAMoleStore.js.map +1 -0
  104. package/lib/module/games/{cat-popper → whack-a-mole}/components/GameBackground.js +31 -91
  105. package/lib/module/games/whack-a-mole/components/GameBackground.js.map +1 -0
  106. package/lib/module/games/whack-a-mole/components/GameGrid.js +97 -0
  107. package/lib/module/games/whack-a-mole/components/GameGrid.js.map +1 -0
  108. package/lib/module/games/{cat-popper → whack-a-mole}/components/GameHole.js +67 -54
  109. package/lib/module/games/whack-a-mole/components/GameHole.js.map +1 -0
  110. package/lib/module/games/{cat-popper/components/CatCharacter.js → whack-a-mole/components/MoleCharacter.js} +75 -115
  111. package/lib/module/games/whack-a-mole/components/MoleCharacter.js.map +1 -0
  112. package/lib/module/games/{cat-popper → whack-a-mole}/components/ScoreBoard.js +13 -17
  113. package/lib/module/games/whack-a-mole/components/ScoreBoard.js.map +1 -0
  114. package/lib/module/games/{cat-popper → whack-a-mole}/components/index.js +1 -3
  115. package/lib/module/games/whack-a-mole/components/index.js.map +1 -0
  116. package/lib/module/index.js +4 -3
  117. package/lib/module/index.js.map +1 -1
  118. package/lib/module/services/GamesConstants.js +41 -519
  119. package/lib/module/services/GamesConstants.js.map +1 -1
  120. package/lib/module/services/GamesService.js +35 -23
  121. package/lib/module/services/GamesService.js.map +1 -1
  122. package/lib/module/services/HapticsService.js +77 -0
  123. package/lib/module/services/HapticsService.js.map +1 -0
  124. package/lib/module/services/SoundsService.js +171 -0
  125. package/lib/module/services/SoundsService.js.map +1 -0
  126. package/lib/module/shared/helpers/AnimationFrame.js +120 -0
  127. package/lib/module/shared/helpers/AnimationFrame.js.map +1 -0
  128. package/lib/module/shared/helpers/AnimationTracker.js +89 -0
  129. package/lib/module/shared/helpers/AnimationTracker.js.map +1 -0
  130. package/lib/module/shared/helpers/ErrorHandler.js +269 -0
  131. package/lib/module/shared/helpers/ErrorHandler.js.map +1 -0
  132. package/lib/module/shared/helpers/GameControlButton.js +219 -0
  133. package/lib/module/shared/helpers/GameControlButton.js.map +1 -0
  134. package/lib/module/{games/balloon-blaster/components → shared/helpers}/GameOverModal.js +25 -17
  135. package/lib/module/shared/helpers/GameOverModal.js.map +1 -0
  136. package/lib/module/shared/helpers/GameSettingsModal.js +287 -0
  137. package/lib/module/shared/helpers/GameSettingsModal.js.map +1 -0
  138. package/lib/module/shared/helpers/ParticleBlast.js +133 -0
  139. package/lib/module/shared/helpers/ParticleBlast.js.map +1 -0
  140. package/lib/module/shared/helpers/ResponsiveScoreBoard.js +81 -0
  141. package/lib/module/shared/helpers/ResponsiveScoreBoard.js.map +1 -0
  142. package/lib/module/shared/helpers/index.js +12 -0
  143. package/lib/module/shared/helpers/index.js.map +1 -0
  144. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +2 -14
  145. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -1
  146. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +144 -0
  147. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts.map +1 -0
  148. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +1 -1
  149. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts.map +1 -1
  150. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +12 -2
  151. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts.map +1 -1
  152. package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts.map +1 -1
  153. package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +1 -15
  154. package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts.map +1 -1
  155. package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts.map +1 -1
  156. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +1 -7
  157. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts.map +1 -1
  158. package/lib/typescript/src/games/balloon-blaster/components/index.d.ts +0 -4
  159. package/lib/typescript/src/games/balloon-blaster/components/index.d.ts.map +1 -1
  160. package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts +4 -0
  161. package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts.map +1 -0
  162. package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts +112 -0
  163. package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts.map +1 -0
  164. package/lib/typescript/src/games/{fruit-slicer/FruitSlicerService.d.ts → fruit-ninja/FruitNinjaService.d.ts} +13 -5
  165. package/lib/typescript/src/games/fruit-ninja/FruitNinjaService.d.ts.map +1 -0
  166. package/lib/typescript/src/games/{fruit-slicer/FruitSlicerStore.d.ts → fruit-ninja/FruitNinjaStore.d.ts} +13 -4
  167. package/lib/typescript/src/games/fruit-ninja/FruitNinjaStore.d.ts.map +1 -0
  168. package/lib/typescript/src/games/{fruit-slicer → fruit-ninja}/components/FruitComponent.d.ts +1 -1
  169. package/lib/typescript/src/games/fruit-ninja/components/FruitComponent.d.ts.map +1 -0
  170. package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts +3 -0
  171. package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts.map +1 -0
  172. package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts.map +1 -0
  173. package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +3 -0
  174. package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts.map +1 -0
  175. package/lib/typescript/src/games/fruit-ninja/components/index.d.ts +5 -0
  176. package/lib/typescript/src/games/fruit-ninja/components/index.d.ts.map +1 -0
  177. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +2 -16
  178. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -1
  179. package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.d.ts +41 -0
  180. package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.d.ts.map +1 -0
  181. package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts +4 -2
  182. package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts.map +1 -1
  183. package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts.map +1 -1
  184. package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts.map +1 -1
  185. package/lib/typescript/src/games/maze-runner/components/GameBackground.d.ts +2 -1
  186. package/lib/typescript/src/games/maze-runner/components/GameBackground.d.ts.map +1 -1
  187. package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts.map +1 -1
  188. package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts.map +1 -1
  189. package/lib/typescript/src/games/maze-runner/components/index.d.ts +0 -2
  190. package/lib/typescript/src/games/maze-runner/components/index.d.ts.map +1 -1
  191. package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts +5 -0
  192. package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts.map +1 -0
  193. package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts +45 -0
  194. package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts.map +1 -0
  195. package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts +33 -0
  196. package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts.map +1 -0
  197. package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +36 -0
  198. package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts.map +1 -0
  199. package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts +12 -0
  200. package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts.map +1 -0
  201. package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts +12 -0
  202. package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts.map +1 -0
  203. package/lib/typescript/src/games/popit-fidget/components/GameBackground.d.ts +9 -0
  204. package/lib/typescript/src/games/popit-fidget/components/GameBackground.d.ts.map +1 -0
  205. package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +8 -0
  206. package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts.map +1 -0
  207. package/lib/typescript/src/games/popit-fidget/components/index.d.ts +5 -0
  208. package/lib/typescript/src/games/popit-fidget/components/index.d.ts.map +1 -0
  209. package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts +4 -0
  210. package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts.map +1 -0
  211. package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts +71 -0
  212. package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts.map +1 -0
  213. package/lib/typescript/src/games/{space-traveller/SpaceTravellerService.d.ts → space-fighter/SpaceFighterService.d.ts} +7 -4
  214. package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts.map +1 -0
  215. package/lib/typescript/src/games/{space-traveller/SpaceTravellerStore.d.ts → space-fighter/SpaceFighterStore.d.ts} +12 -4
  216. package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts.map +1 -0
  217. package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts +8 -0
  218. package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts.map +1 -0
  219. package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts +3 -0
  220. package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts.map +1 -0
  221. package/lib/typescript/src/games/space-fighter/components/GameBackground.d.ts.map +1 -0
  222. package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +3 -0
  223. package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts.map +1 -0
  224. package/lib/typescript/src/games/{space-traveller → space-fighter}/components/Spacecraft3D.d.ts +1 -1
  225. package/lib/typescript/src/games/space-fighter/components/Spacecraft3D.d.ts.map +1 -0
  226. package/lib/typescript/src/games/space-fighter/components/SpacecraftPath.d.ts.map +1 -0
  227. package/lib/typescript/src/games/{space-traveller → space-fighter}/components/index.d.ts +0 -4
  228. package/lib/typescript/src/games/space-fighter/components/index.d.ts.map +1 -0
  229. package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts +4 -0
  230. package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts.map +1 -0
  231. package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +79 -0
  232. package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts.map +1 -0
  233. package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts +33 -0
  234. package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts.map +1 -0
  235. package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts +41 -0
  236. package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts.map +1 -0
  237. package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts.map +1 -0
  238. package/lib/typescript/src/games/{cat-popper → whack-a-mole}/components/GameGrid.d.ts +2 -2
  239. package/lib/typescript/src/games/whack-a-mole/components/GameGrid.d.ts.map +1 -0
  240. package/lib/typescript/src/games/{cat-popper → whack-a-mole}/components/GameHole.d.ts +3 -2
  241. package/lib/typescript/src/games/whack-a-mole/components/GameHole.d.ts.map +1 -0
  242. package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts +7 -0
  243. package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts.map +1 -0
  244. package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts.map +1 -0
  245. package/lib/typescript/src/games/whack-a-mole/components/index.d.ts +6 -0
  246. package/lib/typescript/src/games/whack-a-mole/components/index.d.ts.map +1 -0
  247. package/lib/typescript/src/index.d.ts +4 -3
  248. package/lib/typescript/src/index.d.ts.map +1 -1
  249. package/lib/typescript/src/services/GamesConstants.d.ts +61 -340
  250. package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -1
  251. package/lib/typescript/src/services/GamesService.d.ts +21 -3
  252. package/lib/typescript/src/services/GamesService.d.ts.map +1 -1
  253. package/lib/typescript/src/services/HapticsService.d.ts +16 -0
  254. package/lib/typescript/src/services/HapticsService.d.ts.map +1 -0
  255. package/lib/typescript/src/services/SoundsService.d.ts +154 -0
  256. package/lib/typescript/src/services/SoundsService.d.ts.map +1 -0
  257. package/lib/typescript/src/shared/helpers/AnimationFrame.d.ts +41 -0
  258. package/lib/typescript/src/shared/helpers/AnimationFrame.d.ts.map +1 -0
  259. package/lib/typescript/src/shared/helpers/AnimationTracker.d.ts +45 -0
  260. package/lib/typescript/src/shared/helpers/AnimationTracker.d.ts.map +1 -0
  261. package/lib/typescript/src/shared/helpers/ErrorHandler.d.ts +124 -0
  262. package/lib/typescript/src/shared/helpers/ErrorHandler.d.ts.map +1 -0
  263. package/lib/typescript/src/shared/helpers/GameControlButton.d.ts +17 -0
  264. package/lib/typescript/src/shared/helpers/GameControlButton.d.ts.map +1 -0
  265. package/lib/typescript/src/{games/cat-popper/components → shared/helpers}/GameOverModal.d.ts +5 -0
  266. package/lib/typescript/src/shared/helpers/GameOverModal.d.ts.map +1 -0
  267. package/lib/typescript/src/shared/helpers/GameSettingsModal.d.ts +9 -0
  268. package/lib/typescript/src/shared/helpers/GameSettingsModal.d.ts.map +1 -0
  269. package/lib/typescript/src/shared/helpers/ParticleBlast.d.ts +12 -0
  270. package/lib/typescript/src/shared/helpers/ParticleBlast.d.ts.map +1 -0
  271. package/lib/typescript/src/shared/helpers/ResponsiveScoreBoard.d.ts +42 -0
  272. package/lib/typescript/src/shared/helpers/ResponsiveScoreBoard.d.ts.map +1 -0
  273. package/lib/typescript/src/shared/helpers/index.d.ts +13 -0
  274. package/lib/typescript/src/shared/helpers/index.d.ts.map +1 -0
  275. package/package.json +9 -6
  276. package/lib/module/games/balloon-blaster/components/GameControls.js +0 -229
  277. package/lib/module/games/balloon-blaster/components/GameControls.js.map +0 -1
  278. package/lib/module/games/balloon-blaster/components/GameOverModal.js.map +0 -1
  279. package/lib/module/games/balloon-blaster/components/ParticleSystem.js +0 -52
  280. package/lib/module/games/balloon-blaster/components/ParticleSystem.js.map +0 -1
  281. package/lib/module/games/balloon-blaster/components/SliceTrail.js +0 -58
  282. package/lib/module/games/balloon-blaster/components/SliceTrail.js.map +0 -1
  283. package/lib/module/games/cat-popper/CatPopper.js +0 -230
  284. package/lib/module/games/cat-popper/CatPopper.js.map +0 -1
  285. package/lib/module/games/cat-popper/CatPopperService.js +0 -100
  286. package/lib/module/games/cat-popper/CatPopperService.js.map +0 -1
  287. package/lib/module/games/cat-popper/CatPopperStore.js +0 -113
  288. package/lib/module/games/cat-popper/CatPopperStore.js.map +0 -1
  289. package/lib/module/games/cat-popper/components/CatCharacter.js.map +0 -1
  290. package/lib/module/games/cat-popper/components/GameBackground.js.map +0 -1
  291. package/lib/module/games/cat-popper/components/GameControls.js +0 -230
  292. package/lib/module/games/cat-popper/components/GameControls.js.map +0 -1
  293. package/lib/module/games/cat-popper/components/GameGrid.js +0 -66
  294. package/lib/module/games/cat-popper/components/GameGrid.js.map +0 -1
  295. package/lib/module/games/cat-popper/components/GameHole.js.map +0 -1
  296. package/lib/module/games/cat-popper/components/GameOverModal.js +0 -131
  297. package/lib/module/games/cat-popper/components/GameOverModal.js.map +0 -1
  298. package/lib/module/games/cat-popper/components/ScoreBoard.js.map +0 -1
  299. package/lib/module/games/cat-popper/components/index.js.map +0 -1
  300. package/lib/module/games/fruit-slicer/FruitSlicer.js +0 -411
  301. package/lib/module/games/fruit-slicer/FruitSlicer.js.map +0 -1
  302. package/lib/module/games/fruit-slicer/FruitSlicerService.js.map +0 -1
  303. package/lib/module/games/fruit-slicer/FruitSlicerStore.js +0 -156
  304. package/lib/module/games/fruit-slicer/FruitSlicerStore.js.map +0 -1
  305. package/lib/module/games/fruit-slicer/components/FruitComponent.js.map +0 -1
  306. package/lib/module/games/fruit-slicer/components/GameArea.js +0 -50
  307. package/lib/module/games/fruit-slicer/components/GameArea.js.map +0 -1
  308. package/lib/module/games/fruit-slicer/components/GameBackground.js.map +0 -1
  309. package/lib/module/games/fruit-slicer/components/GameControls.js +0 -230
  310. package/lib/module/games/fruit-slicer/components/GameControls.js.map +0 -1
  311. package/lib/module/games/fruit-slicer/components/GameOverModal.js +0 -189
  312. package/lib/module/games/fruit-slicer/components/GameOverModal.js.map +0 -1
  313. package/lib/module/games/fruit-slicer/components/ParticleSystem.js +0 -52
  314. package/lib/module/games/fruit-slicer/components/ParticleSystem.js.map +0 -1
  315. package/lib/module/games/fruit-slicer/components/ScoreBoard.js.map +0 -1
  316. package/lib/module/games/fruit-slicer/components/SliceTrail.js +0 -58
  317. package/lib/module/games/fruit-slicer/components/SliceTrail.js.map +0 -1
  318. package/lib/module/games/fruit-slicer/components/index.js +0 -11
  319. package/lib/module/games/fruit-slicer/components/index.js.map +0 -1
  320. package/lib/module/games/maze-runner/components/GameControls.js +0 -129
  321. package/lib/module/games/maze-runner/components/GameControls.js.map +0 -1
  322. package/lib/module/games/maze-runner/components/GameOverModal.js +0 -134
  323. package/lib/module/games/maze-runner/components/GameOverModal.js.map +0 -1
  324. package/lib/module/games/space-traveller/SpaceTraveller.js +0 -393
  325. package/lib/module/games/space-traveller/SpaceTraveller.js.map +0 -1
  326. package/lib/module/games/space-traveller/SpaceTravellerService.js.map +0 -1
  327. package/lib/module/games/space-traveller/SpaceTravellerStore.js +0 -139
  328. package/lib/module/games/space-traveller/SpaceTravellerStore.js.map +0 -1
  329. package/lib/module/games/space-traveller/components/AsteroidComponent.js.map +0 -1
  330. package/lib/module/games/space-traveller/components/GameArea.js +0 -75
  331. package/lib/module/games/space-traveller/components/GameArea.js.map +0 -1
  332. package/lib/module/games/space-traveller/components/GameBackground.js.map +0 -1
  333. package/lib/module/games/space-traveller/components/GameControls.js +0 -177
  334. package/lib/module/games/space-traveller/components/GameControls.js.map +0 -1
  335. package/lib/module/games/space-traveller/components/GameOverModal.js +0 -182
  336. package/lib/module/games/space-traveller/components/GameOverModal.js.map +0 -1
  337. package/lib/module/games/space-traveller/components/ParticleComponent.js +0 -34
  338. package/lib/module/games/space-traveller/components/ParticleComponent.js.map +0 -1
  339. package/lib/module/games/space-traveller/components/ScoreBoard.js.map +0 -1
  340. package/lib/module/games/space-traveller/components/SettingsModal.js +0 -222
  341. package/lib/module/games/space-traveller/components/SettingsModal.js.map +0 -1
  342. package/lib/module/games/space-traveller/components/Spacecraft3D.js.map +0 -1
  343. package/lib/module/games/space-traveller/components/SpacecraftPath.js +0 -37
  344. package/lib/module/games/space-traveller/components/SpacecraftPath.js.map +0 -1
  345. package/lib/module/games/space-traveller/components/index.js.map +0 -1
  346. package/lib/module/shared/settings/GameSettings.js +0 -295
  347. package/lib/module/shared/settings/GameSettings.js.map +0 -1
  348. package/lib/module/shared/settings/SettingsService.js +0 -119
  349. package/lib/module/shared/settings/SettingsService.js.map +0 -1
  350. package/lib/typescript/src/games/balloon-blaster/components/GameControls.d.ts +0 -10
  351. package/lib/typescript/src/games/balloon-blaster/components/GameControls.d.ts.map +0 -1
  352. package/lib/typescript/src/games/balloon-blaster/components/GameOverModal.d.ts +0 -9
  353. package/lib/typescript/src/games/balloon-blaster/components/GameOverModal.d.ts.map +0 -1
  354. package/lib/typescript/src/games/balloon-blaster/components/ParticleSystem.d.ts +0 -8
  355. package/lib/typescript/src/games/balloon-blaster/components/ParticleSystem.d.ts.map +0 -1
  356. package/lib/typescript/src/games/balloon-blaster/components/SliceTrail.d.ts +0 -11
  357. package/lib/typescript/src/games/balloon-blaster/components/SliceTrail.d.ts.map +0 -1
  358. package/lib/typescript/src/games/cat-popper/CatPopper.d.ts +0 -13
  359. package/lib/typescript/src/games/cat-popper/CatPopper.d.ts.map +0 -1
  360. package/lib/typescript/src/games/cat-popper/CatPopperService.d.ts +0 -32
  361. package/lib/typescript/src/games/cat-popper/CatPopperService.d.ts.map +0 -1
  362. package/lib/typescript/src/games/cat-popper/CatPopperStore.d.ts +0 -21
  363. package/lib/typescript/src/games/cat-popper/CatPopperStore.d.ts.map +0 -1
  364. package/lib/typescript/src/games/cat-popper/components/CatCharacter.d.ts +0 -7
  365. package/lib/typescript/src/games/cat-popper/components/CatCharacter.d.ts.map +0 -1
  366. package/lib/typescript/src/games/cat-popper/components/GameBackground.d.ts.map +0 -1
  367. package/lib/typescript/src/games/cat-popper/components/GameControls.d.ts +0 -10
  368. package/lib/typescript/src/games/cat-popper/components/GameControls.d.ts.map +0 -1
  369. package/lib/typescript/src/games/cat-popper/components/GameGrid.d.ts.map +0 -1
  370. package/lib/typescript/src/games/cat-popper/components/GameHole.d.ts.map +0 -1
  371. package/lib/typescript/src/games/cat-popper/components/GameOverModal.d.ts.map +0 -1
  372. package/lib/typescript/src/games/cat-popper/components/ScoreBoard.d.ts.map +0 -1
  373. package/lib/typescript/src/games/cat-popper/components/index.d.ts +0 -8
  374. package/lib/typescript/src/games/cat-popper/components/index.d.ts.map +0 -1
  375. package/lib/typescript/src/games/fruit-slicer/FruitSlicer.d.ts +0 -16
  376. package/lib/typescript/src/games/fruit-slicer/FruitSlicer.d.ts.map +0 -1
  377. package/lib/typescript/src/games/fruit-slicer/FruitSlicerService.d.ts.map +0 -1
  378. package/lib/typescript/src/games/fruit-slicer/FruitSlicerStore.d.ts.map +0 -1
  379. package/lib/typescript/src/games/fruit-slicer/components/FruitComponent.d.ts.map +0 -1
  380. package/lib/typescript/src/games/fruit-slicer/components/GameArea.d.ts +0 -17
  381. package/lib/typescript/src/games/fruit-slicer/components/GameArea.d.ts.map +0 -1
  382. package/lib/typescript/src/games/fruit-slicer/components/GameBackground.d.ts.map +0 -1
  383. package/lib/typescript/src/games/fruit-slicer/components/GameControls.d.ts +0 -10
  384. package/lib/typescript/src/games/fruit-slicer/components/GameControls.d.ts.map +0 -1
  385. package/lib/typescript/src/games/fruit-slicer/components/GameOverModal.d.ts +0 -9
  386. package/lib/typescript/src/games/fruit-slicer/components/GameOverModal.d.ts.map +0 -1
  387. package/lib/typescript/src/games/fruit-slicer/components/ParticleSystem.d.ts +0 -8
  388. package/lib/typescript/src/games/fruit-slicer/components/ParticleSystem.d.ts.map +0 -1
  389. package/lib/typescript/src/games/fruit-slicer/components/ScoreBoard.d.ts +0 -9
  390. package/lib/typescript/src/games/fruit-slicer/components/ScoreBoard.d.ts.map +0 -1
  391. package/lib/typescript/src/games/fruit-slicer/components/SliceTrail.d.ts +0 -11
  392. package/lib/typescript/src/games/fruit-slicer/components/SliceTrail.d.ts.map +0 -1
  393. package/lib/typescript/src/games/fruit-slicer/components/index.d.ts +0 -9
  394. package/lib/typescript/src/games/fruit-slicer/components/index.d.ts.map +0 -1
  395. package/lib/typescript/src/games/maze-runner/components/GameControls.d.ts +0 -10
  396. package/lib/typescript/src/games/maze-runner/components/GameControls.d.ts.map +0 -1
  397. package/lib/typescript/src/games/maze-runner/components/GameOverModal.d.ts +0 -11
  398. package/lib/typescript/src/games/maze-runner/components/GameOverModal.d.ts.map +0 -1
  399. package/lib/typescript/src/games/space-traveller/SpaceTraveller.d.ts +0 -17
  400. package/lib/typescript/src/games/space-traveller/SpaceTraveller.d.ts.map +0 -1
  401. package/lib/typescript/src/games/space-traveller/SpaceTravellerService.d.ts.map +0 -1
  402. package/lib/typescript/src/games/space-traveller/SpaceTravellerStore.d.ts.map +0 -1
  403. package/lib/typescript/src/games/space-traveller/components/AsteroidComponent.d.ts +0 -9
  404. package/lib/typescript/src/games/space-traveller/components/AsteroidComponent.d.ts.map +0 -1
  405. package/lib/typescript/src/games/space-traveller/components/GameArea.d.ts +0 -17
  406. package/lib/typescript/src/games/space-traveller/components/GameArea.d.ts.map +0 -1
  407. package/lib/typescript/src/games/space-traveller/components/GameBackground.d.ts.map +0 -1
  408. package/lib/typescript/src/games/space-traveller/components/GameControls.d.ts +0 -10
  409. package/lib/typescript/src/games/space-traveller/components/GameControls.d.ts.map +0 -1
  410. package/lib/typescript/src/games/space-traveller/components/GameOverModal.d.ts +0 -9
  411. package/lib/typescript/src/games/space-traveller/components/GameOverModal.d.ts.map +0 -1
  412. package/lib/typescript/src/games/space-traveller/components/ParticleComponent.d.ts +0 -8
  413. package/lib/typescript/src/games/space-traveller/components/ParticleComponent.d.ts.map +0 -1
  414. package/lib/typescript/src/games/space-traveller/components/ScoreBoard.d.ts +0 -8
  415. package/lib/typescript/src/games/space-traveller/components/ScoreBoard.d.ts.map +0 -1
  416. package/lib/typescript/src/games/space-traveller/components/SettingsModal.d.ts +0 -9
  417. package/lib/typescript/src/games/space-traveller/components/SettingsModal.d.ts.map +0 -1
  418. package/lib/typescript/src/games/space-traveller/components/Spacecraft3D.d.ts.map +0 -1
  419. package/lib/typescript/src/games/space-traveller/components/SpacecraftPath.d.ts.map +0 -1
  420. package/lib/typescript/src/games/space-traveller/components/index.d.ts.map +0 -1
  421. package/lib/typescript/src/shared/settings/GameSettings.d.ts +0 -36
  422. package/lib/typescript/src/shared/settings/GameSettings.d.ts.map +0 -1
  423. package/lib/typescript/src/shared/settings/SettingsService.d.ts +0 -32
  424. package/lib/typescript/src/shared/settings/SettingsService.d.ts.map +0 -1
  425. /package/lib/typescript/src/games/{cat-popper → fruit-ninja}/components/GameBackground.d.ts +0 -0
  426. /package/lib/typescript/src/games/{fruit-slicer → space-fighter}/components/GameBackground.d.ts +0 -0
  427. /package/lib/typescript/src/games/{space-traveller → space-fighter}/components/SpacecraftPath.d.ts +0 -0
  428. /package/lib/typescript/src/games/{space-traveller → whack-a-mole}/components/GameBackground.d.ts +0 -0
  429. /package/lib/typescript/src/games/{cat-popper → whack-a-mole}/components/ScoreBoard.d.ts +0 -0
@@ -0,0 +1,287 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { View, Text, ScrollView, TouchableOpacity, Switch, StyleSheet, Modal } from 'react-native';
5
+ import { getGameTheme, getGameDifficultyDescriptions, getGameTitle } from "../../services/GamesConstants.js";
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ export const GameSettingsModal = ({
8
+ gameId,
9
+ settings,
10
+ onSettingsChange = () => undefined
11
+ }) => {
12
+ const theme = getGameTheme(gameId);
13
+ const difficultyDescriptions = getGameDifficultyDescriptions(gameId);
14
+ const title = `${getGameTitle(gameId)} Settings`;
15
+ const {
16
+ isVisible,
17
+ difficulty,
18
+ enableSounds,
19
+ enableHaptics
20
+ } = settings;
21
+ const handleDifficultyChange = newDifficulty => {
22
+ onSettingsChange({
23
+ ...settings,
24
+ difficulty: newDifficulty
25
+ });
26
+ };
27
+ const handleSoundToggle = enabled => {
28
+ onSettingsChange({
29
+ ...settings,
30
+ enableSounds: enabled
31
+ });
32
+ };
33
+ const handleHapticToggle = enabled => {
34
+ onSettingsChange({
35
+ ...settings,
36
+ enableHaptics: enabled
37
+ });
38
+ };
39
+ const handleOnClose = () => {
40
+ onSettingsChange({
41
+ ...settings,
42
+ isVisible: false
43
+ });
44
+ };
45
+ return /*#__PURE__*/_jsx(Modal, {
46
+ visible: isVisible,
47
+ animationType: "fade",
48
+ transparent: true,
49
+ onRequestClose: handleOnClose,
50
+ children: /*#__PURE__*/_jsx(View, {
51
+ style: styles.overlay,
52
+ children: /*#__PURE__*/_jsxs(View, {
53
+ style: [styles.container, {
54
+ backgroundColor: theme.backgroundColor
55
+ }],
56
+ children: [/*#__PURE__*/_jsxs(View, {
57
+ style: [styles.header, {
58
+ backgroundColor: theme.headerBackgroundColor
59
+ }],
60
+ children: [/*#__PURE__*/_jsx(Text, {
61
+ style: [styles.headerTitle, {
62
+ color: theme.headerTextColor
63
+ }],
64
+ children: title
65
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
66
+ onPress: handleOnClose,
67
+ style: styles.closeButton,
68
+ children: /*#__PURE__*/_jsx(Text, {
69
+ style: [styles.closeButtonText, {
70
+ color: theme.headerTextColor
71
+ }],
72
+ children: "\u2715"
73
+ })
74
+ })]
75
+ }), /*#__PURE__*/_jsxs(ScrollView, {
76
+ style: styles.scrollView,
77
+ contentContainerStyle: styles.scrollContent,
78
+ children: [/*#__PURE__*/_jsxs(View, {
79
+ style: [styles.section, {
80
+ backgroundColor: theme.sectionBackgroundColor
81
+ }],
82
+ children: [/*#__PURE__*/_jsx(Text, {
83
+ style: [styles.sectionTitle, {
84
+ color: theme.sectionTitleColor
85
+ }],
86
+ children: "Difficulty Level"
87
+ }), /*#__PURE__*/_jsx(View, {
88
+ style: styles.difficultyRow,
89
+ children: ['easy', 'medium', 'hard'].map(level => /*#__PURE__*/_jsx(TouchableOpacity, {
90
+ onPress: () => handleDifficultyChange(level),
91
+ style: [styles.difficultyButton, {
92
+ backgroundColor: difficulty === level ? theme.buttonSelectedColor : theme.buttonUnselectedColor
93
+ }],
94
+ children: /*#__PURE__*/_jsx(Text, {
95
+ style: [styles.buttonText, styles.capitalize, {
96
+ color: difficulty === level ? theme.buttonSelectedTextColor : theme.buttonUnselectedTextColor
97
+ }],
98
+ children: level
99
+ })
100
+ }, level))
101
+ }), /*#__PURE__*/_jsx(View, {
102
+ style: styles.infoBox,
103
+ children: /*#__PURE__*/_jsxs(Text, {
104
+ style: [styles.infoText, {
105
+ color: theme.infoTextColor
106
+ }],
107
+ children: [/*#__PURE__*/_jsx(Text, {
108
+ style: styles.boldText,
109
+ children: "Easy:"
110
+ }), " ", difficultyDescriptions.easy, '\n', /*#__PURE__*/_jsx(Text, {
111
+ style: styles.boldText,
112
+ children: "Medium:"
113
+ }), " ", difficultyDescriptions.medium, '\n', /*#__PURE__*/_jsx(Text, {
114
+ style: styles.boldText,
115
+ children: "Hard:"
116
+ }), " ", difficultyDescriptions.hard]
117
+ })
118
+ })]
119
+ }), /*#__PURE__*/_jsx(View, {
120
+ style: [styles.section, {
121
+ backgroundColor: theme.sectionBackgroundColor
122
+ }],
123
+ children: /*#__PURE__*/_jsxs(View, {
124
+ style: styles.toggleContainer,
125
+ children: [/*#__PURE__*/_jsxs(View, {
126
+ children: [/*#__PURE__*/_jsx(Text, {
127
+ style: [styles.toggleTitle, {
128
+ color: theme.sectionTitleColor
129
+ }],
130
+ children: "Sound Effects"
131
+ }), /*#__PURE__*/_jsx(Text, {
132
+ style: [styles.toggleSubtitle, {
133
+ color: theme.infoTextColor
134
+ }],
135
+ children: "Play sounds during gameplay"
136
+ })]
137
+ }), /*#__PURE__*/_jsx(Switch, {
138
+ value: enableSounds,
139
+ onValueChange: handleSoundToggle,
140
+ trackColor: {
141
+ false: theme.switchTrackColorFalse,
142
+ true: theme.switchTrackColorTrue
143
+ },
144
+ thumbColor: theme.switchThumbColor
145
+ })]
146
+ })
147
+ }), /*#__PURE__*/_jsx(View, {
148
+ style: [styles.section, {
149
+ backgroundColor: theme.sectionBackgroundColor
150
+ }],
151
+ children: /*#__PURE__*/_jsxs(View, {
152
+ style: styles.toggleContainer,
153
+ children: [/*#__PURE__*/_jsxs(View, {
154
+ children: [/*#__PURE__*/_jsx(Text, {
155
+ style: [styles.toggleTitle, {
156
+ color: theme.sectionTitleColor
157
+ }],
158
+ children: "Haptic Feedback"
159
+ }), /*#__PURE__*/_jsx(Text, {
160
+ style: [styles.toggleSubtitle, {
161
+ color: theme.infoTextColor
162
+ }],
163
+ children: "Vibration feedback for interactions"
164
+ })]
165
+ }), /*#__PURE__*/_jsx(Switch, {
166
+ value: enableHaptics,
167
+ onValueChange: handleHapticToggle,
168
+ trackColor: {
169
+ false: theme.switchTrackColorFalse,
170
+ true: theme.switchTrackColorTrue
171
+ },
172
+ thumbColor: theme.switchThumbColor
173
+ })]
174
+ })
175
+ })]
176
+ })]
177
+ })
178
+ })
179
+ });
180
+ };
181
+ const styles = StyleSheet.create({
182
+ overlay: {
183
+ flex: 1,
184
+ backgroundColor: 'rgba(0, 0, 0, 0.7)',
185
+ justifyContent: 'center',
186
+ alignItems: 'center',
187
+ padding: 20
188
+ },
189
+ container: {
190
+ width: '95%',
191
+ maxWidth: 600,
192
+ maxHeight: '95%',
193
+ minHeight: '70%',
194
+ borderRadius: 10,
195
+ shadowColor: '#000',
196
+ shadowOffset: {
197
+ width: 0,
198
+ height: 10
199
+ },
200
+ shadowOpacity: 0.25,
201
+ shadowRadius: 20,
202
+ elevation: 10,
203
+ overflow: 'hidden'
204
+ },
205
+ header: {
206
+ flexDirection: 'row',
207
+ justifyContent: 'space-between',
208
+ alignItems: 'center',
209
+ padding: 10,
210
+ paddingHorizontal: 16
211
+ },
212
+ headerTitle: {
213
+ fontSize: 20,
214
+ fontWeight: 'semibold'
215
+ },
216
+ closeButton: {
217
+ padding: 8
218
+ },
219
+ closeButtonText: {
220
+ fontSize: 18,
221
+ fontWeight: 'semibold'
222
+ },
223
+ scrollView: {
224
+ flex: 1,
225
+ padding: 10
226
+ },
227
+ scrollContent: {
228
+ flexGrow: 1,
229
+ paddingBottom: 20
230
+ },
231
+ section: {
232
+ borderRadius: 12,
233
+ padding: 16,
234
+ marginBottom: 16
235
+ },
236
+ sectionTitle: {
237
+ fontSize: 16,
238
+ fontWeight: 'semibold',
239
+ marginBottom: 10
240
+ },
241
+ difficultyRow: {
242
+ flexDirection: 'row',
243
+ justifyContent: 'space-between',
244
+ marginBottom: 12
245
+ },
246
+ difficultyButton: {
247
+ flex: 1,
248
+ paddingVertical: 12,
249
+ paddingHorizontal: 8,
250
+ borderRadius: 8,
251
+ marginHorizontal: 4,
252
+ alignItems: 'center'
253
+ },
254
+ buttonText: {
255
+ fontSize: 16,
256
+ fontWeight: '600'
257
+ },
258
+ capitalize: {
259
+ textTransform: 'capitalize'
260
+ },
261
+ infoBox: {
262
+ backgroundColor: 'rgba(255, 255, 255, 0.1)',
263
+ borderRadius: 8,
264
+ padding: 12
265
+ },
266
+ infoText: {
267
+ fontSize: 14,
268
+ lineHeight: 20
269
+ },
270
+ boldText: {
271
+ fontWeight: 'semibold'
272
+ },
273
+ toggleContainer: {
274
+ flexDirection: 'row',
275
+ justifyContent: 'space-between',
276
+ alignItems: 'center'
277
+ },
278
+ toggleTitle: {
279
+ fontSize: 16,
280
+ fontWeight: 'semibold'
281
+ },
282
+ toggleSubtitle: {
283
+ fontSize: 14,
284
+ marginTop: 2
285
+ }
286
+ });
287
+ //# sourceMappingURL=GameSettingsModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","Text","ScrollView","TouchableOpacity","Switch","StyleSheet","Modal","getGameTheme","getGameDifficultyDescriptions","getGameTitle","jsx","_jsx","jsxs","_jsxs","GameSettingsModal","gameId","settings","onSettingsChange","undefined","theme","difficultyDescriptions","title","isVisible","difficulty","enableSounds","enableHaptics","handleDifficultyChange","newDifficulty","handleSoundToggle","enabled","handleHapticToggle","handleOnClose","visible","animationType","transparent","onRequestClose","children","style","styles","overlay","container","backgroundColor","header","headerBackgroundColor","headerTitle","color","headerTextColor","onPress","closeButton","closeButtonText","scrollView","contentContainerStyle","scrollContent","section","sectionBackgroundColor","sectionTitle","sectionTitleColor","difficultyRow","map","level","difficultyButton","buttonSelectedColor","buttonUnselectedColor","buttonText","capitalize","buttonSelectedTextColor","buttonUnselectedTextColor","infoBox","infoText","infoTextColor","boldText","easy","medium","hard","toggleContainer","toggleTitle","toggleSubtitle","value","onValueChange","trackColor","false","switchTrackColorFalse","true","switchTrackColorTrue","thumbColor","switchThumbColor","create","flex","justifyContent","alignItems","padding","width","maxWidth","maxHeight","minHeight","borderRadius","shadowColor","shadowOffset","height","shadowOpacity","shadowRadius","elevation","overflow","flexDirection","paddingHorizontal","fontSize","fontWeight","flexGrow","paddingBottom","marginBottom","paddingVertical","marginHorizontal","textTransform","lineHeight","marginTop"],"sourceRoot":"../../../../src","sources":["shared/helpers/GameSettingsModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,gBAAgB,EAAEC,MAAM,EAAEC,UAAU,EAAEC,KAAK,QAAQ,cAAc;AAClG,SAASC,YAAY,EAAEC,6BAA6B,EAAEC,YAAY,QAAQ,kCAA+B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAS1G,OAAO,MAAMC,iBAA8C,GAAGA,CAAC;EAC7DC,MAAM;EACNC,QAAQ;EACRC,gBAAgB,GAAGA,CAAA,KAAMC;AAC3B,CAAC,KAAK;EACJ,MAAMC,KAAK,GAAGZ,YAAY,CAACQ,MAAM,CAAC;EAClC,MAAMK,sBAAsB,GAAGZ,6BAA6B,CAACO,MAAM,CAAC;EACpE,MAAMM,KAAK,GAAG,GAAGZ,YAAY,CAACM,MAAM,CAAC,WAAW;EAEhD,MAAM;IAAEO,SAAS;IAAEC,UAAU;IAAEC,YAAY;IAAEC;EAAc,CAAC,GAAGT,QAAQ;EAEvE,MAAMU,sBAAsB,GAAIC,aAAyC,IAAK;IAC5EV,gBAAgB,CAAC;MAC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AC;EACD9B,cAAc,EAAE;IACd6B,QAAQ,EAAE,EAAE;IACZS,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+
3
+ import React, { useEffect, useState } from 'react';
4
+ import { View, Dimensions, StyleSheet } from 'react-native';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ const {
7
+ width,
8
+ height
9
+ } = Dimensions.get('window');
10
+ export const ParticleBlast = ({
11
+ x,
12
+ y,
13
+ particleCount = 8,
14
+ colors = ['#FF6B6B', '#4ECDC4', '#45B7D1', '#96CEB4', '#FFEAA7', '#DDA0DD', '#FF9F43', '#A55EEA'],
15
+ duration = 1000,
16
+ onComplete
17
+ }) => {
18
+ const [particles, setParticles] = useState([]);
19
+ const [isComplete, setIsComplete] = useState(false);
20
+ useEffect(() => {
21
+ // Create initial particles with blast pattern - only once per component mount
22
+ const initialParticles = [];
23
+ for (let i = 0; i < particleCount; i++) {
24
+ const angle = i / particleCount * Math.PI * 2;
25
+ const speed = 4 + Math.random() * 3; // Random speed between 4-7
26
+
27
+ initialParticles.push({
28
+ id: `particle_${i}_${Date.now()}`,
29
+ x: x,
30
+ y: y,
31
+ vx: Math.cos(angle) * speed,
32
+ vy: Math.sin(angle) * speed - 2,
33
+ // Slight upward bias
34
+ color: colors[i % colors.length] || '#FF6B6B',
35
+ size: 6 + Math.random() * 8,
36
+ // More varied sizes between 6-14 for diversity
37
+ alpha: 1,
38
+ lifetime: 0,
39
+ maxLifetime: duration
40
+ });
41
+ }
42
+ setParticles(initialParticles);
43
+
44
+ // Animation loop
45
+ const animationInterval = setInterval(() => {
46
+ setParticles(prevParticles => {
47
+ const updatedParticles = prevParticles.map(particle => {
48
+ const newLifetime = particle.lifetime + 16; // Assume 60fps
49
+
50
+ if (newLifetime >= particle.maxLifetime) {
51
+ return null; // Mark for removal
52
+ }
53
+
54
+ // Update position with velocity
55
+ const newX = particle.x + particle.vx;
56
+ const newY = particle.y + particle.vy;
57
+
58
+ // Apply gravity to velocity
59
+ const newVy = particle.vy + 0.1;
60
+
61
+ // Calculate alpha based on lifetime - keep higher minimum for visibility
62
+ const alpha = Math.max(0.3, 1 - newLifetime / particle.maxLifetime);
63
+ return {
64
+ ...particle,
65
+ x: newX,
66
+ y: newY,
67
+ vy: newVy,
68
+ alpha,
69
+ lifetime: newLifetime
70
+ };
71
+ }).filter(Boolean);
72
+
73
+ // If no particles left, mark as complete
74
+ if (updatedParticles.length === 0) {
75
+ setIsComplete(true);
76
+ }
77
+ return updatedParticles;
78
+ });
79
+ }, 16); // 60fps
80
+
81
+ // Cleanup interval after duration
82
+ const cleanup = setTimeout(() => {
83
+ clearInterval(animationInterval);
84
+ setParticles([]);
85
+ setIsComplete(true);
86
+ }, duration + 100);
87
+ return () => {
88
+ clearInterval(animationInterval);
89
+ clearTimeout(cleanup);
90
+ };
91
+ }, []); // Empty dependency array - only run once on mount
92
+
93
+ // Handle completion callback in a separate useEffect to avoid state updates during render
94
+ useEffect(() => {
95
+ if (isComplete && onComplete) {
96
+ onComplete();
97
+ }
98
+ }, [isComplete, onComplete]);
99
+ if (particles.length === 0) return null;
100
+ return /*#__PURE__*/_jsx(View, {
101
+ style: [styles.container, {
102
+ width,
103
+ height
104
+ }],
105
+ children: particles.map(particle => {
106
+ const particleSize = Math.max(4, particle.size); // Allow smaller particles for more size diversity
107
+
108
+ return /*#__PURE__*/_jsx(View, {
109
+ style: [styles.particle, {
110
+ left: particle.x - particleSize / 2,
111
+ top: particle.y - particleSize / 2,
112
+ width: particleSize,
113
+ height: particleSize,
114
+ backgroundColor: particle.color,
115
+ opacity: particle.alpha,
116
+ borderRadius: particleSize / 2
117
+ }]
118
+ }, particle.id);
119
+ })
120
+ });
121
+ };
122
+ const styles = StyleSheet.create({
123
+ container: {
124
+ position: 'absolute',
125
+ top: 0,
126
+ left: 0,
127
+ pointerEvents: 'none'
128
+ },
129
+ particle: {
130
+ position: 'absolute'
131
+ }
132
+ });
133
+ //# sourceMappingURL=ParticleBlast.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useEffect","useState","View","Dimensions","StyleSheet","jsx","_jsx","width","height","get","ParticleBlast","x","y","particleCount","colors","duration","onComplete","particles","setParticles","isComplete","setIsComplete","initialParticles","i","angle","Math","PI","speed","random","push","id","Date","now","vx","cos","vy","sin","color","length","size","alpha","lifetime","maxLifetime","animationInterval","setInterval","prevParticles","updatedParticles","map","particle","newLifetime","newX","newY","newVy","max","filter","Boolean","cleanup","setTimeout","clearInterval","clearTimeout","style","styles","container","children","particleSize","left","top","backgroundColor","opacity","borderRadius","create","position","pointerEvents"],"sourceRoot":"../../../../src","sources":["shared/helpers/ParticleBlast.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,IAAI,EAAEC,UAAU,EAAEC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5D,MAAM;EAAEC,KAAK;EAAEC;AAAO,CAAC,GAAGL,UAAU,CAACM,GAAG,CAAC,QAAQ,CAAC;AAwBlD,OAAO,MAAMC,aAA2C,GAAGA,CAAC;EAC1DC,CAAC;EACDC,CAAC;EACDC,aAAa,GAAG,CAAC;EACjBC,MAAM,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;EACjGC,QAAQ,GAAG,IAAI;EACfC;AACF,CAAC,KAAK;EACJ,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAGjB,QAAQ,CAAa,EAAE,CAAC;EAC1D,MAAM,CAACkB,UAAU,EAAEC,aAAa,CAAC,GAAGnB,QAAQ,CAAC,KAAK,CAAC;EAEnDD,SAAS,CAAC,MAAM;IACd;IACA,MAAMqB,gBAA4B,GAAG,EAAE;IAEvC,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG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AI;IAACyD,KAAK,EAAE,CAACC,MAAM,CAACC,SAAS,EAAE;MAAEtD,KAAK;MAAEC;IAAO,CAAC,CAAE;IAAAsD,QAAA,EAChD7C,SAAS,CAAC6B,GAAG,CAACC,QAAQ,IAAI;MACzB,MAAMgB,YAAY,GAAGvC,IAAI,CAAC4B,GAAG,CAAC,CAAC,EAAEL,QAAQ,CAACT,IAAI,CAAC,CAAC,CAAC;;MAEjD,oBACEhC,IAAA,CAACJ,IAAI;QAEHyD,KAAK,EAAE,CACLC,MAAM,CAACb,QAAQ,EACf;UACEiB,IAAI,EAAEjB,QAAQ,CAACpC,CAAC,GAAGoD,YAAY,GAAG,CAAC;UACnCE,GAAG,EAAElB,QAAQ,CAACnC,CAAC,GAAGmD,YAAY,GAAG,CAAC;UAClCxD,KAAK,EAAEwD,YAAY;UACnBvD,MAAM,EAAEuD,YAAY;UACpBG,eAAe,EAAEnB,QAAQ,CAACX,KAAK;UAC/B+B,OAAO,EAAEpB,QAAQ,CAACR,KAAK;UACvB6B,YAAY,EAAEL,YAAY,GAAG;QAC/B,CAAC;MACD,GAZGhB,QAAQ,CAAClB,EAaf,CAAC;IAEN,CAAC;EAAC,CACE,CAAC;AAEX,CAAC;AAED,MAAM+B,MAAM,GAAGxD,UAAU,CAACiE,MAAM,CAAC;EAC/BR,SAAS,EAAE;IACTS,QAAQ,EAAE,UAAU;IACpBL,GAAG,EAAE,CAAC;IACND,IAAI,EAAE,CAAC;IACPO,aAAa,EAAE;EACjB,CAAC;EACDxB,QAAQ,EAAE;IACRuB,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+
3
+ import { StyleSheet, Dimensions } from 'react-native';
4
+ const {
5
+ width: screenWidth
6
+ } = Dimensions.get('window');
7
+
8
+ /**
9
+ * Enhanced responsive dimensions for scoreboard optimization
10
+ * Provides better tablet support with dynamic sizing
11
+ */
12
+ export const getResponsiveScoreBoardDimensions = () => {
13
+ // Maximum container width for tablets (600px max)
14
+ const maxContainerWidth = Math.min(screenWidth * 0.9, 600);
15
+
16
+ // Minimum width for small phones
17
+ const minContainerWidth = Math.max(screenWidth * 0.85, 300);
18
+
19
+ // Calculate responsive width
20
+ const responsiveWidth = Math.min(maxContainerWidth, Math.max(minContainerWidth, screenWidth * 0.9));
21
+ return {
22
+ containerWidth: responsiveWidth,
23
+ isTablet: screenWidth >= 768,
24
+ isLargeTablet: screenWidth >= 1024,
25
+ padding: screenWidth >= 768 ? 24 : 20,
26
+ fontSize: {
27
+ label: screenWidth >= 768 ? 20 : 18,
28
+ value: screenWidth >= 768 ? 34 : 30,
29
+ time: screenWidth >= 768 ? 34 : 30
30
+ },
31
+ borderRadius: screenWidth >= 768 ? 20 : 16
32
+ };
33
+ };
34
+
35
+ /**
36
+ * Shared responsive styling for ScoreBoard components across all games
37
+ * Provides consistent maxWidth and centering for mobile/tablet optimization
38
+ */
39
+ export const createResponsiveScoreBoardStyle = gameSpecificStyle => {
40
+ const dimensions = getResponsiveScoreBoardDimensions();
41
+ return StyleSheet.create({
42
+ ...gameSpecificStyle,
43
+ scoreBoard: {
44
+ ...gameSpecificStyle.scoreBoard,
45
+ maxWidth: dimensions.containerWidth,
46
+ alignSelf: 'center',
47
+ width: '100%',
48
+ padding: dimensions.padding,
49
+ borderRadius: dimensions.borderRadius
50
+ }
51
+ });
52
+ };
53
+
54
+ /**
55
+ * Enhanced responsive container style that can be applied to any ScoreBoard
56
+ * Now includes dynamic sizing based on screen dimensions
57
+ */
58
+ export const RESPONSIVE_SCOREBOARD_CONTAINER = (() => {
59
+ const dimensions = getResponsiveScoreBoardDimensions();
60
+ return {
61
+ maxWidth: dimensions.containerWidth,
62
+ alignSelf: 'center',
63
+ width: '100%',
64
+ padding: dimensions.padding,
65
+ borderRadius: dimensions.borderRadius,
66
+ marginTop: 20
67
+ };
68
+ })();
69
+
70
+ /**
71
+ * Responsive font sizes for scoreboard text elements
72
+ */
73
+ export const RESPONSIVE_SCOREBOARD_FONTS = (() => {
74
+ const dimensions = getResponsiveScoreBoardDimensions();
75
+ return {
76
+ labelSize: dimensions.fontSize.label,
77
+ valueSize: dimensions.fontSize.value,
78
+ timeSize: dimensions.fontSize.time
79
+ };
80
+ })();
81
+ //# sourceMappingURL=ResponsiveScoreBoard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["StyleSheet","Dimensions","width","screenWidth","get","getResponsiveScoreBoardDimensions","maxContainerWidth","Math","min","minContainerWidth","max","responsiveWidth","containerWidth","isTablet","isLargeTablet","padding","fontSize","label","value","time","borderRadius","createResponsiveScoreBoardStyle","gameSpecificStyle","dimensions","create","scoreBoard","maxWidth","alignSelf","RESPONSIVE_SCOREBOARD_CONTAINER","marginTop","RESPONSIVE_SCOREBOARD_FONTS","labelSize","valueSize","timeSize"],"sourceRoot":"../../../../src","sources":["shared/helpers/ResponsiveScoreBoard.ts"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,UAAU,QAAQ,cAAc;AAErD,MAAM;EAAEC,KAAK,EAAEC;AAAY,CAAC,GAAGF,UAAU,CAACG,GAAG,CAAC,QAAQ,CAAC;;AAEvD;AACA;AACA;AACA;AACA,OAAO,MAAMC,iCAAiC,GAAGA,CAAA,KAAM;EACrD;EACA,MAAMC,iBAAiB,GAAGC,IAAI,CAACC,GAAG,CAACL,WAAW,GAAG,GAAG,EAAE,GAAG,CAAC;;EAE1D;EACA,MAAMM,iBAAiB,GAAGF,IAAI,CAACG,GAAG,CAACP,WAAW,GAAG,IAAI,EAAE,GAAG,CAAC;;EAE3D;EACA,MAAMQ,eAAe,GAAGJ,IAAI,CAACC,GAAG,CAACF,iBAAiB,EAAEC,IAAI,CAACG,GAAG,CAACD,iBAAiB,EAAEN,WAAW,GAAG,GAAG,CAAC,CAAC;EAEnG,OAAO;IACLS,cAAc,EAAED,eAAe;IAC/BE,QAAQ,EAAEV,WAAW,IAAI,GAAG;IAC5BW,aAAa,EAAEX,WAAW,IAAI,IAAI;IAClCY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AAiC,CAAC,CAAC;EAEtD,OAAO;IACL0B,SAAS,EAAER,UAAU,CAACP,QAAQ,CAACC,KAAK;IACpCe,SAAS,EAAET,UAAU,CAACP,QAAQ,CAACE,KAAK;IACpCe,QAAQ,EAAEV,UAAU,CAACP,QAAQ,CAACG;EAChC,CAAC;AACH,CAAC,EAAE,CAAC","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ export { GameControlButton } from "./GameControlButton.js";
4
+ export { createResponsiveScoreBoardStyle, RESPONSIVE_SCOREBOARD_CONTAINER, RESPONSIVE_SCOREBOARD_FONTS, getResponsiveScoreBoardDimensions } from "./ResponsiveScoreBoard.js";
5
+ export { ParticleBlast } from "./ParticleBlast.js";
6
+ export { GameOverModal } from "./GameOverModal.js";
7
+ export { GameSettingsModal } from "./GameSettingsModal.js";
8
+ export { AnimationTracker, useAnimationTracker, useAnimationTrackers, DEFAULT_ANIMATION_STATE } from "./AnimationTracker.js";
9
+ export { AnimationFrameManager, useAnimationFrame, useAnimationFrameManager } from "./AnimationFrame.js";
10
+ export { GameErrorHandler, useGameErrorHandler, withErrorHandling, ErrorUtils, globalErrorHandler, DEFAULT_ERROR_CONFIG } from "./ErrorHandler.js";
11
+ export { GameErrorType } from "./ErrorHandler.js";
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GameControlButton","createResponsiveScoreBoardStyle","RESPONSIVE_SCOREBOARD_CONTAINER","RESPONSIVE_SCOREBOARD_FONTS","getResponsiveScoreBoardDimensions","ParticleBlast","GameOverModal","GameSettingsModal","AnimationTracker","useAnimationTracker","useAnimationTrackers","DEFAULT_ANIMATION_STATE","AnimationFrameManager","useAnimationFrame","useAnimationFrameManager","GameErrorHandler","useGameErrorHandler","withErrorHandling","ErrorUtils","globalErrorHandler","DEFAULT_ERROR_CONFIG","GameErrorType"],"sourceRoot":"../../../../src","sources":["shared/helpers/index.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAAQ,wBAAqB;AAEvD,SACEC,+BAA+B,EAC/BC,+BAA+B,EAC/BC,2BAA2B,EAC3BC,iCAAiC,QAC5B,2BAAwB;AAC/B,SAASC,aAAa,QAAQ,oBAAiB;AAC/C,SAASC,aAAa,QAAQ,oBAAiB;AAC/C,SAASC,iBAAiB,QAAQ,wBAAqB;AACvD,SACEC,gBAAgB,EAChBC,mBAAmB,EACnBC,oBAAoB,EACpBC,uBAAuB,QAClB,uBAAoB;AAE3B,SAASC,qBAAqB,EAAEC,iBAAiB,EAAEC,wBAAwB,QAAQ,qBAAkB;AACrG,SACEC,gBAAgB,EAChBC,mBAAmB,EACnBC,iBAAiB,EACjBC,UAAU,EACVC,kBAAkB,EAClBC,oBAAoB,QACf,mBAAgB;AACvB,SAASC,aAAa,QAAQ,mBAAgB","ignoreList":[]}
@@ -1,16 +1,4 @@
1
1
  import React from 'react';
2
- interface BalloonBlasterGameSettings {
3
- gameDuration: number;
4
- difficulty: 'easy' | 'medium' | 'hard';
5
- soundEnabled: boolean;
6
- hapticEnabled: boolean;
7
- }
8
- interface BalloonBlasterProps {
9
- settings?: BalloonBlasterGameSettings;
10
- onSettingsChange?: (settings: BalloonBlasterGameSettings) => void;
11
- showSettingsModal?: boolean;
12
- onToggleSettingsModal?: () => void;
13
- }
14
- export declare const BalloonBlaster: React.FC<BalloonBlasterProps>;
15
- export {};
2
+ import { type GameProps } from '../../services/GamesService';
3
+ export declare const BalloonBlaster: React.FC<GameProps>;
16
4
  //# sourceMappingURL=BalloonBlaster.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BalloonBlaster.d.ts","sourceRoot":"","sources":["../../../../../src/games/balloon-blaster/BalloonBlaster.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAUjD,UAAU,0BAA0B;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IACvC,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;CACxB;AAgBD,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,EAAE,0BAA0B,CAAC;IACtC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,0BAA0B,KAAK,IAAI,CAAC;IAClE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;CACpC;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwWxD,CAAC"}
1
+ {"version":3,"file":"BalloonBlaster.d.ts","sourceRoot":"","sources":["../../../../../src/games/balloon-blaster/BalloonBlaster.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAQjD,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAEvE,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAkJ9C,CAAC"}