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,263 @@
1
+ "use strict";
2
+
3
+ import React, { useEffect, useRef, useCallback, useMemo } from 'react';
4
+ import { View, StyleSheet } from 'react-native';
5
+ import { useSharedValue, withSpring, withTiming } from 'react-native-reanimated';
6
+ import { playSound, GAME_SOUNDS } from "../../services/SoundsService.js";
7
+ import { useWhackAMoleStore } from "./WhackAMoleStore.js";
8
+ import { createWhackAMoleService, ANIMATION_CONFIG, GAME_CONFIG } from "./WhackAMoleService.js";
9
+ import { ScoreBoard, GameGrid, GameBackground } from "./components/index.js";
10
+ import { GameControlButton, GameOverModal } from "../../shared/helpers/index.js";
11
+ import { GameSettingsModal } from "../../shared/helpers/GameSettingsModal.js";
12
+ import { WHACK_A_MOLE_CONSTANTS } from "./WhackAMoleConstants.js";
13
+ import { GAME_IDS } from "../../services/GamesService.js";
14
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
+ export const WhackAMole = ({
16
+ settings,
17
+ onSettingsChange
18
+ }) => {
19
+ // Use optimized selectors to minimize re-renders while keeping all functionality
20
+ const {
21
+ score,
22
+ timeLeft,
23
+ isPlaying,
24
+ gameOver,
25
+ holes,
26
+ startGame,
27
+ stopGame,
28
+ resetGame,
29
+ whackMole,
30
+ decrementTime,
31
+ activateHole,
32
+ deactivateHole,
33
+ setHoles
34
+ } = useWhackAMoleStore();
35
+
36
+ // Use settings from props with fallback to defaults
37
+ const {
38
+ difficulty,
39
+ enableSounds
40
+ } = settings;
41
+ // Fixed game duration regardless of difficulty - configurable via constants
42
+ const gameDuration = GAME_CONFIG.GAME_DURATION;
43
+
44
+ // Get game-specific constants based on difficulty (reactive to difficulty changes)
45
+ const gameConstants = React.useMemo(() => ({
46
+ moleSpawnInterval: WHACK_A_MOLE_CONSTANTS.moleSpawnInterval[difficulty],
47
+ moleVisibleDuration: WHACK_A_MOLE_CONSTANTS.moleVisibleDuration[difficulty],
48
+ gridSize: WHACK_A_MOLE_CONSTANTS.gridSize[difficulty],
49
+ pointsPerMole: WHACK_A_MOLE_CONSTANTS.pointsPerMole[difficulty]
50
+ }), [difficulty]);
51
+ const {
52
+ moleSpawnInterval,
53
+ moleVisibleDuration,
54
+ gridSize,
55
+ pointsPerMole
56
+ } = gameConstants;
57
+
58
+ // Memoize hole creation to prevent recreation on every render
59
+ const createHolesForGrid = useCallback(size => {
60
+ const totalHoles = size * size;
61
+ return Array.from({
62
+ length: totalHoles
63
+ }, (_, i) => ({
64
+ id: i,
65
+ isActive: false,
66
+ position: {
67
+ x: (i % size - 1) * (GAME_CONFIG.HOLE_SIZE + 20),
68
+ y: Math.floor(i / size - 1) * (GAME_CONFIG.HOLE_SIZE + 20),
69
+ z: 0
70
+ }
71
+ }));
72
+ }, []);
73
+
74
+ // Track previous difficulty to detect changes during gameplay
75
+ const prevDifficultyRef = React.useRef(difficulty);
76
+ useEffect(() => {
77
+ if (!isPlaying && !gameOver) {
78
+ const newHoles = createHolesForGrid(gridSize);
79
+ setHoles(newHoles);
80
+ }
81
+ }, [gridSize, isPlaying, gameOver, setHoles]);
82
+
83
+ // Create animations at top level (cannot be memoized due to Rules of Hooks)
84
+ const maxHoles = 16;
85
+ const moleAnimations = useRef(Array.from({
86
+ length: maxHoles
87
+ }, () => useSharedValue(0))).current;
88
+ const hitAnimations = useRef(Array.from({
89
+ length: maxHoles
90
+ }, () => useSharedValue(0))).current;
91
+
92
+ // Memoize game service to prevent recreation
93
+ const gameService = useMemo(() => createWhackAMoleService(moleAnimations, hitAnimations), [moleAnimations, hitAnimations]);
94
+ const playHitSound = useCallback(() => {
95
+ playSound(GAME_SOUNDS.WHACK_A_MOLE.HIT, enableSounds);
96
+ }, [enableSounds]);
97
+ const playMissSound = useCallback(() => {
98
+ playSound(GAME_SOUNDS.WHACK_A_MOLE.MISS, enableSounds);
99
+ }, [enableSounds]);
100
+
101
+ // Optimized mole spawning with efficient hole selection and preserved animations
102
+ const spawnMole = useCallback(() => {
103
+ const currentHoles = useWhackAMoleStore.getState().holes;
104
+ // Optimized filtering - use direct array access instead of filter + map
105
+ const availableHoles = [];
106
+ for (let i = 0; i < currentHoles.length; i++) {
107
+ if (currentHoles[i] && !currentHoles[i]?.isActive) {
108
+ availableHoles.push(i);
109
+ }
110
+ }
111
+ gameService.spawnRandomMole(availableHoles, holeId => {
112
+ // Preserve smooth spring animations
113
+ if (moleAnimations[holeId]) {
114
+ moleAnimations[holeId].value = withSpring(1, ANIMATION_CONFIG.MOLE_SPRING);
115
+ activateHole(holeId);
116
+ }
117
+ }, holeId => {
118
+ // Optimized state check with preserved animations
119
+ const currentState = useWhackAMoleStore.getState();
120
+ if (holeId < currentState.holes.length && currentState.holes[holeId] && currentState.holes[holeId].isActive && moleAnimations[holeId]) {
121
+ playMissSound();
122
+ moleAnimations[holeId].value = withSpring(0, ANIMATION_CONFIG.MOLE_SPRING);
123
+ deactivateHole(holeId);
124
+ }
125
+ }, moleVisibleDuration);
126
+ }, [playMissSound, activateHole, deactivateHole, moleVisibleDuration]);
127
+
128
+ // Stable callback references to prevent GameControlButton re-renders
129
+ const handleStartGame = useCallback(() => {
130
+ startGame(gameDuration, gridSize);
131
+ gameService.resetAnimations();
132
+ gameService.startGameTimer(decrementTime);
133
+ gameService.startMoleSpawning(spawnMole, moleSpawnInterval);
134
+ }, [gameDuration, gridSize, decrementTime, moleSpawnInterval, spawnMole]);
135
+ const handleStopGame = useCallback(() => {
136
+ stopGame();
137
+ gameService.cleanup();
138
+ gameService.resetAnimations();
139
+ }, [stopGame]);
140
+
141
+ // Stable callback reference to prevent GameGrid re-renders
142
+ const handleWhackMole = useCallback(holeId => {
143
+ const currentState = useWhackAMoleStore.getState();
144
+ if (!currentState.isPlaying) return;
145
+
146
+ // Optimized hole validation - direct array access instead of find
147
+ if (holeId < 0 || holeId >= currentState.holes.length || !currentState.holes[holeId] || !currentState.holes[holeId].isActive) return;
148
+ gameService.whackMole(holeId, () => {
149
+ playHitSound();
150
+ whackMole(holeId, pointsPerMole); // Pass difficulty-based points
151
+
152
+ // Preserve all smooth animations
153
+ if (moleAnimations[holeId]) {
154
+ moleAnimations[holeId].value = withSpring(0, ANIMATION_CONFIG.MOLE_SPRING);
155
+ }
156
+ if (hitAnimations[holeId]) {
157
+ hitAnimations[holeId].value = withTiming(1, ANIMATION_CONFIG.HIT_TIMING, finished => {
158
+ if (finished && hitAnimations[holeId]) {
159
+ hitAnimations[holeId].value = withTiming(0, ANIMATION_CONFIG.HIT_TIMING);
160
+ }
161
+ });
162
+ }
163
+ });
164
+ }, [playHitSound, whackMole, pointsPerMole]); // Removed isPlaying and holes dependencies
165
+
166
+ const handleResetGame = useCallback(() => {
167
+ gameService.cleanup();
168
+ resetGame();
169
+ gameService.resetAnimations();
170
+ }, [resetGame]);
171
+ useEffect(() => {
172
+ if (gameOver || !isPlaying) {
173
+ gameService.cleanup();
174
+ }
175
+ }, [gameOver, isPlaying]);
176
+ useEffect(() => {
177
+ return () => {
178
+ // Fully reset game when unmounting (navigate back)
179
+ handleResetGame();
180
+ };
181
+ }, [handleResetGame]);
182
+
183
+ // Memoize game control button props to prevent unnecessary re-renders
184
+ const gameControlButtonProps = useMemo(() => ({
185
+ isPlaying,
186
+ gameOver,
187
+ onStartGame: handleStartGame,
188
+ onStopGame: handleStopGame,
189
+ startButtonText: "START WHACKING",
190
+ stopButtonText: "STOP GAME",
191
+ startButtonSubtext: "Whack moles to score!",
192
+ stopButtonSubtext: "End current game",
193
+ startButtonColor: "#10b981",
194
+ stopButtonColor: "#dc2626",
195
+ startButtonBorderColor: "#34d399",
196
+ stopButtonBorderColor: "#f87171"
197
+ }), [isPlaying, gameOver, handleStartGame, handleStopGame]);
198
+
199
+ // Memoize game over modal props to prevent unnecessary re-renders
200
+ const gameOverModalProps = useMemo(() => ({
201
+ isVisible: gameOver,
202
+ score,
203
+ onPlayAgain: handleResetGame,
204
+ buttonText: "Whack Again!",
205
+ primaryColor: "rgba(22, 101, 52, 0.85)",
206
+ borderColor: "rgba(22, 101, 52, 0.95)",
207
+ buttonColor: "#10b981",
208
+ buttonBorderColor: "#34d399"
209
+ }), [gameOver, score, handleResetGame]);
210
+
211
+ // Optimized difficulty change handling with preserved animations
212
+ React.useEffect(() => {
213
+ if (isPlaying && prevDifficultyRef.current !== difficulty) {
214
+ // Difficulty changed during gameplay - restart with optimized cleanup
215
+ stopGame();
216
+ gameService.cleanup();
217
+ gameService.resetAnimations();
218
+
219
+ // Use requestAnimationFrame for smoother transition
220
+ requestAnimationFrame(() => {
221
+ startGame(gameDuration, gridSize);
222
+ gameService.resetAnimations();
223
+ gameService.startGameTimer(decrementTime);
224
+ gameService.startMoleSpawning(spawnMole, moleSpawnInterval);
225
+ });
226
+ }
227
+ prevDifficultyRef.current = difficulty;
228
+ }, [difficulty, isPlaying, gameDuration, gridSize, moleSpawnInterval, startGame, stopGame, decrementTime, spawnMole]);
229
+ return /*#__PURE__*/_jsx(GameBackground, {
230
+ children: /*#__PURE__*/_jsxs(View, {
231
+ style: styles.container,
232
+ children: [/*#__PURE__*/_jsx(ScoreBoard, {
233
+ score: score,
234
+ timeLeft: timeLeft
235
+ }), /*#__PURE__*/_jsx(GameGrid, {
236
+ holes: holes,
237
+ moleAnimations: moleAnimations,
238
+ hitAnimations: hitAnimations,
239
+ onHolePress: handleWhackMole,
240
+ gridSize: gridSize
241
+ }), /*#__PURE__*/_jsx(GameControlButton, {
242
+ ...gameControlButtonProps
243
+ }), /*#__PURE__*/_jsx(GameOverModal, {
244
+ ...gameOverModalProps
245
+ }), /*#__PURE__*/_jsx(GameSettingsModal, {
246
+ gameId: GAME_IDS.WHACK_A_MOLE,
247
+ settings: settings,
248
+ onSettingsChange: onSettingsChange
249
+ })]
250
+ })
251
+ });
252
+ };
253
+ const styles = StyleSheet.create({
254
+ container: {
255
+ flex: 1,
256
+ backgroundColor: 'transparent',
257
+ // Let GameBackground show through
258
+ paddingTop: 0,
259
+ paddingHorizontal: 20,
260
+ paddingBottom: 0
261
+ }
262
+ });
263
+ //# sourceMappingURL=WhackAMole.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useEffect","useRef","useCallback","useMemo","View","StyleSheet","useSharedValue","withSpring","withTiming","playSound","GAME_SOUNDS","useWhackAMoleStore","createWhackAMoleService","ANIMATION_CONFIG","GAME_CONFIG","ScoreBoard","GameGrid","GameBackground","GameControlButton","GameOverModal","GameSettingsModal","WHACK_A_MOLE_CONSTANTS","GAME_IDS","jsx","_jsx","jsxs","_jsxs","WhackAMole","settings","onSettingsChange","score","timeLeft","isPlaying","gameOver","holes","startGame","stopGame","resetGame","whackMole","decrementTime","activateHole","deactivateHole","setHoles","difficulty","enableSounds","gameDuration","GAME_DURATION","gameConstants","moleSpawnInterval","moleVisibleDuration","gridSize","pointsPerMole","createHolesForGrid","size","totalHoles","Array","from","length","_","i","id","isActive","position","x","HOLE_SIZE","y","Math","floor","z","prevDifficultyRef","newHoles","maxHoles","moleAnimations","current","hitAnimations","gameService","playHitSound","WHACK_A_MOLE","HIT","playMissSound","MISS","spawnMole","currentHoles","getState","availableHoles","push","spawnRandomMole","holeId","value","MOLE_SPRING","currentState","handleStartGame","resetAnimations","startGameTimer","startMoleSpawning","handleStopGame","cleanup","handleWhackMole","HIT_TIMING","finished","handleResetGame","gameControlButtonProps","onStartGame","onStopGame","startButtonText","stopButtonText","startButtonSubtext","stopButtonSubtext","startButtonColor","stopButtonColor","startButtonBorderColor","stopButtonBorderColor","gameOverModalProps","isVisible","onPlayAgain","buttonText","primaryColor","borderColor","buttonColor","buttonBorderColor","requestAnimationFrame","children","style","styles","container","onHolePress","gameId","create","flex","backgroundColor","paddingTop","paddingHorizontal","paddingBottom"],"sourceRoot":"../../../../src","sources":["games/whack-a-mole/WhackAMole.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACtE,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,cAAc,EAAEC,UAAU,EAAEC,UAAU,QAAQ,yBAAyB;AAChF,SAASC,SAAS,EAAEC,WAAW,QAAQ,iCAA8B;AACrE,SAASC,kBAAkB,QAAQ,sBAAmB;AACtD,SAASC,uBAAuB,EAAEC,gBAAgB,EAAEC,WAAW,QAAQ,wBAAqB;AAC5F,SAASC,UAAU,EAAEC,QAAQ,EAAEC,cAAc,QAAQ,uBAAc;AACnE,SAASC,iBAAiB,EAAEC,aAAa,QAAQ,+BAAsB;AACvE,SAASC,iBAAiB,QAAQ,2CAAwC;AAC1E,SAASC,sBAAsB,QAAQ,0BAAuB;AAC9D,SAASC,QAAQ,QAAwB,gCAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEvE,OAAO,MAAMC,UAA+B,GAAGA,CAAC;EAC9CC,QAAQ;EACRC;AACF,CAAC,KAAK;EAEJ;EACA,MAAM;IACJC,KAAK;IACLC,QAAQ;IACRC,SAAS;IACTC,QAAQ;IACRC,KAAK;IACLC,SAAS;IACTC,QAAQ;IACRC,SAAS;IACTC,SAAS;IACTC,aAAa;IACbC,YAAY;IACZC,cAA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AAI;MAACsH,KAAK,EAAEC,MAAM,CAACC,SAAU;MAAAH,QAAA,gBAC5BjG,IAAA,CAACT,UAAU;QAACe,KAAK,EAAEA,KAAM;QAACC,QAAQ,EAAEA;MAAS,CAAE,CAAC,eAEhDP,IAAA,CAACR,QAAQ;QACPkB,KAAK,EAAEA,KAAM;QACbsC,cAAc,EAAEA,cAAe;QAC/BE,aAAa,EAAEA,aAAc;QAC7BmD,WAAW,EAAE5B,eAAgB;QAC7B/C,QAAQ,EAAEA;MAAS,CACpB,CAAC,eAEF1B,IAAA,CAACN,iBAAiB;QAAA,GACZmF;MAAsB,CAC3B,CAAC,eAEF7E,IAAA,CAACL,aAAa;QAAA,GACR6F;MAAkB,CACvB,CAAC,eAGFxF,IAAA,CAACJ,iBAAiB;QAChB0G,MAAM,EAAExG,QAAQ,CAACuD,YAAa;QAC9BjD,QAAQ,EAAEA,QAAS;QACnBC,gBAAgB,EAAEA;MAAiB,CACpC,CAAC;IAAA,CACE;EAAC,CACO,CAAC;AAErB,CAAC;AAED,MAAM8F,MAAM,GAAGtH,UAAU,CAAC0H,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,IAAI,EAAE,CAAC;IACPC,eAAe,EAAE,aAAa;IAAE;IAChCC,UAAU,EAAE,CAAC;IACbC,iBAAiB,EAAE,EAAE;IACrBC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+
3
+ import { Dimensions } from 'react-native';
4
+ // Memoize screen dimensions for better performance
5
+ const {
6
+ width
7
+ } = Dimensions.get('window');
8
+
9
+ // Whack A Mole Game Constants
10
+ export const WHACK_A_MOLE_CONSTANTS = {
11
+ moleSpawnInterval: {
12
+ easy: 2000,
13
+ medium: 1500,
14
+ hard: 1000
15
+ },
16
+ moleAppearDuration: {
17
+ easy: 2500,
18
+ medium: 2000,
19
+ hard: 1500
20
+ },
21
+ moleVisibleDuration: {
22
+ easy: 2500,
23
+ medium: 2000,
24
+ hard: 1500
25
+ },
26
+ gridSize: {
27
+ easy: 3,
28
+ medium: 3,
29
+ hard: 4
30
+ },
31
+ pointsPerMole: {
32
+ easy: 10,
33
+ medium: 15,
34
+ hard: 20
35
+ }
36
+ };
37
+ export const WHACK_A_MOLE_GAME_CONFIG = {
38
+ GRID_SIZE: 3,
39
+ HOLE_SIZE: width * 0.25,
40
+ MOLE_APPEAR_DURATION: 1500,
41
+ // ms
42
+ MOLE_DISAPPEAR_DURATION: 500,
43
+ // ms
44
+ GAME_DURATION: 60,
45
+ // seconds
46
+ INITIAL_SPAWN_DELAY: 1000,
47
+ // ms
48
+ MAX_SPAWN_INTERVAL: 2000 // ms
49
+ };
50
+ export const WHACK_A_MOLE_ANIMATION_CONFIG = {
51
+ MOLE_SPRING: {
52
+ damping: 15,
53
+ stiffness: 200
54
+ },
55
+ HOLE_SPRING: {
56
+ damping: 20,
57
+ stiffness: 300
58
+ },
59
+ HIT_TIMING: {
60
+ duration: 300
61
+ }
62
+ };
63
+ export const WHACK_A_MOLE_COLORS = {
64
+ BACKGROUND: '#2E7D32',
65
+ SCORE_BOARD: '#1B5E20',
66
+ HOLE: '#3E2723',
67
+ HOLE_BORDER: '#5D4037',
68
+ HOLE_SHADOW: '#2E2E2E',
69
+ MOLE_SHADOW: 'rgba(0,0,0,0.3)',
70
+ SCORE: '#FFEB3B',
71
+ SCORE_TEXT: '#FFD700',
72
+ TIMER_TEXT: '#FF5722',
73
+ UI: '#4CAF50',
74
+ BUTTON_ACTIVE: '#66BB6A',
75
+ BUTTON_INACTIVE: '#A5D6A7',
76
+ TEXT_PRIMARY: '#FFFFFF',
77
+ TEXT_SECONDARY: '#E8F5E8',
78
+ WHITE: '#FFFFFF',
79
+ START_BUTTON: '#4CAF50',
80
+ HIT_EFFECT_OUTER: '#FFD700',
81
+ HIT_EFFECT_INNER: '#FFA500',
82
+ GAME_OVER_OVERLAY: 'rgba(0, 0, 0, 0.85)',
83
+ BUTTON_BORDER: '#66BB6A'
84
+ };
85
+
86
+ // Whack A Mole Game Theme - Matches scoreboard green with sky blue background like Fruit Ninja
87
+ export const WHACK_A_MOLE_THEME = {
88
+ backgroundColor: '#87CEEB',
89
+ // Sky blue background like Fruit Ninja
90
+ headerBackgroundColor: 'rgba(22, 101, 52, 0.9)',
91
+ // Green header to match scoreboard
92
+ headerTextColor: '#ffffff',
93
+ sectionBackgroundColor: 'rgba(22, 101, 52, 0.4)',
94
+ // Match scoreboard transparency
95
+ sectionTitleColor: '#ffffff',
96
+ // White text on green sections
97
+ buttonSelectedColor: '#166534',
98
+ // Darker green for better contrast
99
+ buttonUnselectedColor: 'rgba(255, 255, 255, 0.3)',
100
+ buttonSelectedTextColor: '#ffffff',
101
+ buttonUnselectedTextColor: '#1f2937',
102
+ switchTrackColorFalse: 'rgba(22, 101, 52, 0.5)',
103
+ switchTrackColorTrue: '#166534',
104
+ // Darker green for better contrast
105
+ switchThumbColor: '#ffffff',
106
+ infoTextColor: '#1f2937' // Dark text for readability on sky blue background
107
+ };
108
+
109
+ // Whack A Mole Difficulty Descriptions
110
+ export const WHACK_A_MOLE_DIFFICULTY_DESCRIPTIONS = {
111
+ easy: 'Moles appear slower and stay longer',
112
+ medium: 'Balanced mole speed and timing',
113
+ hard: 'Fast moles, quick reflexes needed!'
114
+ };
115
+ //# sourceMappingURL=WhackAMoleConstants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Dimensions","width","get","WHACK_A_MOLE_CONSTANTS","moleSpawnInterval","easy","medium","hard","moleAppearDuration","moleVisibleDuration","gridSize","pointsPerMole","WHACK_A_MOLE_GAME_CONFIG","GRID_SIZE","HOLE_SIZE","MOLE_APPEAR_DURATION","MOLE_DISAPPEAR_DURATION","GAME_DURATION","INITIAL_SPAWN_DELAY","MAX_SPAWN_INTERVAL","WHACK_A_MOLE_ANIMATION_CONFIG","MOLE_SPRING","damping","stiffness","HOLE_SPRING","HIT_TIMING","duration","WHACK_A_MOLE_COLORS","BACKGROUND","SCORE_BOARD","HOLE","HOLE_BORDER","HOLE_SHADOW","MOLE_SHADOW","SCORE","SCORE_TEXT","TIMER_TEXT","UI","BUTTON_ACTIVE","BUTTON_INACTIVE","TEXT_PRIMARY","TEXT_SECONDARY","WHITE","START_BUTTON","HIT_EFFECT_OUTER","HIT_EFFECT_INNER","GAME_OVER_OVERLAY","BUTTON_BORDER","WHACK_A_MOLE_THEME","backgroundColor","headerBackgroundColor","headerTextColor","sectionBackgroundColor","sectionTitleColor","buttonSelectedColor","buttonUnselectedColor","buttonSelectedTextColor","buttonUnselectedTextColor","switchTrackColorFalse","switchTrackColorTrue","switchThumbColor","infoTextColor","WHACK_A_MOLE_DIFFICULTY_DESCRIPTIONS"],"sourceRoot":"../../../../src","sources":["games/whack-a-mole/WhackAMoleConstants.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AAGzC;AACA,MAAM;EAAEC;AAAM,CAAC,GAAGD,UAAU,CAACE,GAAG,CAAC,QAAQ,CAAC;;AAE1C;AACA,OAAO,MAAMC,sBAAsB,GAAG;EACpCC,iBAAiB,EAAE;IACjBC,IAAI,EAAE,IAAI;IACVC,MAAM,EAAE,IAAI;IACZC,IAAI,EAAE;EACR,CAAC;EACDC,kBAAkB,EAAE;IAClBH,IAAI,EAAE,IAAI;IACVC,MAAM,EAAE,IAAI;IACZC,IAAI,EAAE;EACR,CAAC;EACDE,mBAAmB,EAAE;IACnBJ,IAAI,EAAE,IAAI;IACVC,MAAM,EAAE,IAAI;IACZC,IAAI,EAAE;EACR,CAAC;EACDG,QAAQ,EAAE;IACRL,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE;EACR,CAAC;EACDI,aAAa,EAAE;IACbN,IAAI,EAAE,EAAE;IACRC,MAAM,EAAE,EAAE;IACVC,IAAI,EAAE;EACR;AACF,CAAU;AAEV,OAAO,MAAMK,wBAAwB,GAAG;EACtCC,SAAS,EAAE,CAAC;EACZC,SAAS,EAAEb,KAAK,G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qBAAqB,EAAE,0BAA0B;EACjDC,uBAAuB,EAAE,SAAS;EAClCC,yBAAyB,EAAE,SAAS;EACpCC,qBAAqB,EAAE,wBAAwB;EAC/CC,oBAAoB,EAAE,SAAS;EAAE;EACjCC,gBAAgB,EAAE,SAAS;EAC3BC,aAAa,EAAE,SAAS,CAAE;AAC5B,CAAC;;AAED;AACA,OAAO,MAAMC,oCAAoC,GAAG;EAClDzD,IAAI,EAAE,qCAAqC;EAC3CC,MAAM,EAAE,gCAAgC;EACxCC,IAAI,EAAE;AACR,CAAU","ignoreList":[]}
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+
3
+ import { WHACK_A_MOLE_GAME_CONFIG as GAME_CONFIG, WHACK_A_MOLE_ANIMATION_CONFIG as ANIMATION_CONFIG, WHACK_A_MOLE_COLORS as COLORS } from "./WhackAMoleConstants.js";
4
+
5
+ // Constants now imported from WhackAMoleConstants.ts
6
+ // Re-export for backward compatibility
7
+ export { GAME_CONFIG, ANIMATION_CONFIG, COLORS };
8
+
9
+ // Types
10
+
11
+ export class WhackAMoleService {
12
+ gameTimerRef = null;
13
+ moleTimerRef = null;
14
+ // Optimized: Use Map instead of object for better performance
15
+ activeMoleTimers = new Map();
16
+ constructor(moleAnimations, hitAnimations) {
17
+ this.moleAnimations = moleAnimations;
18
+ this.hitAnimations = hitAnimations;
19
+ }
20
+
21
+ // Optimized random number generation
22
+ fastRandom(max) {
23
+ return Math.floor(Math.random() * max);
24
+ }
25
+
26
+ // Efficient hole selection algorithm
27
+ selectRandomHole(availableHoles) {
28
+ if (availableHoles.length === 0) return -1;
29
+ if (availableHoles.length === 1) return availableHoles[0];
30
+ const randomIndex = this.fastRandom(availableHoles.length);
31
+ return availableHoles[randomIndex];
32
+ }
33
+ startGameTimer(onTick) {
34
+ this.clearGameTimer();
35
+ this.gameTimerRef = setInterval(onTick, 1000);
36
+ }
37
+ startMoleSpawning(spawnMole, customSpawnInterval) {
38
+ this.clearMoleTimer();
39
+ const baseInterval = customSpawnInterval || GAME_CONFIG.MAX_SPAWN_INTERVAL;
40
+ const minInterval = Math.max(500, baseInterval * 0.7); // 30% faster minimum
41
+ const maxInterval = baseInterval;
42
+ const spawnLoop = () => {
43
+ spawnMole();
44
+ const nextSpawnTime = Math.random() * (maxInterval - minInterval) + minInterval;
45
+ this.moleTimerRef = setTimeout(spawnLoop, nextSpawnTime);
46
+ };
47
+ this.moleTimerRef = setTimeout(spawnLoop, GAME_CONFIG.INITIAL_SPAWN_DELAY);
48
+ }
49
+ spawnRandomMole(availableHoles, onMoleSpawned, onMoleHidden, customVisibleDuration) {
50
+ if (availableHoles.length === 0) return;
51
+
52
+ // Optimized hole selection
53
+ const randomHoleId = this.selectRandomHole(availableHoles);
54
+ if (randomHoleId === -1) return;
55
+
56
+ // Clear any existing timeout for this hole using optimized Map
57
+ const existingTimer = this.activeMoleTimers.get(randomHoleId);
58
+ if (existingTimer) {
59
+ clearTimeout(existingTimer);
60
+ this.activeMoleTimers.delete(randomHoleId);
61
+ }
62
+
63
+ // Trigger mole spawn
64
+ onMoleSpawned(randomHoleId);
65
+
66
+ // Schedule mole hide with custom duration and optimized cleanup
67
+ const visibleDuration = customVisibleDuration || GAME_CONFIG.MOLE_APPEAR_DURATION;
68
+ const deactivationTimer = setTimeout(() => {
69
+ onMoleHidden(randomHoleId);
70
+ this.activeMoleTimers.delete(randomHoleId);
71
+ }, visibleDuration);
72
+ this.activeMoleTimers.set(randomHoleId, deactivationTimer);
73
+ }
74
+ whackMole(holeId, onWhacked) {
75
+ // Optimized: Clear the timer using Map for better performance
76
+ const timer = this.activeMoleTimers.get(holeId);
77
+ if (timer) {
78
+ clearTimeout(timer);
79
+ this.activeMoleTimers.delete(holeId);
80
+ }
81
+
82
+ // Execute callback immediately for responsive feedback
83
+ onWhacked();
84
+ }
85
+ resetAnimations() {
86
+ // Optimized: Reset all animations efficiently
87
+ this.moleAnimations.forEach(anim => {
88
+ anim.value = 0;
89
+ });
90
+ this.hitAnimations.forEach(anim => {
91
+ anim.value = 0;
92
+ });
93
+ }
94
+ cleanup() {
95
+ this.clearGameTimer();
96
+ this.clearMoleTimer();
97
+ this.clearAllMoleHideTimeouts();
98
+ }
99
+ clearGameTimer() {
100
+ if (this.gameTimerRef) {
101
+ clearInterval(this.gameTimerRef);
102
+ this.gameTimerRef = null;
103
+ }
104
+ }
105
+ clearMoleTimer() {
106
+ if (this.moleTimerRef) {
107
+ clearTimeout(this.moleTimerRef);
108
+ this.moleTimerRef = null;
109
+ }
110
+ }
111
+ clearAllMoleHideTimeouts() {
112
+ // Optimized: Batch clear all active mole timers using Map
113
+ this.activeMoleTimers.forEach(timer => clearTimeout(timer));
114
+ this.activeMoleTimers.clear();
115
+ }
116
+ }
117
+ export const createWhackAMoleService = (moleAnimations, hitAnimations) => {
118
+ return new WhackAMoleService(moleAnimations, hitAnimations);
119
+ };
120
+ //# sourceMappingURL=WhackAMoleService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["WHACK_A_MOLE_GAME_CONFIG","GAME_CONFIG","WHACK_A_MOLE_ANIMATION_CONFIG","ANIMATION_CONFIG","WHACK_A_MOLE_COLORS","COLORS","WhackAMoleService","gameTimerRef","moleTimerRef","activeMoleTimers","Map","constructor","moleAnimations","hitAnimations","fastRandom","max","Math","floor","random","selectRandomHole","availableHoles","length","randomIndex","startGameTimer","onTick","clearGameTimer","setInterval","startMoleSpawning","spawnMole","customSpawnInterval","clearMoleTimer","baseInterval","MAX_SPAWN_INTERVAL","minInterval","maxInterval","spawnLoop","nextSpawnTime","setTimeout","INITIAL_SPAWN_DELAY","spawnRandomMole","onMoleSpawned","onMoleHidden","customVisibleDuration","randomHoleId","existingTimer","get","clearTimeout","delete","visibleDuration","MOLE_APPEAR_DURATION","deactivationTimer","set","whackMole","holeId","onWhacked","timer","resetAnimations","forEach","anim","value","cleanup","clearAllMoleHideTimeouts","clearInterval","clear","createWhackAMoleService"],"sourceRoot":"../../../../src","sources":["games/whack-a-mole/WhackAMoleService.ts"],"mapp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