react-native-games 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (419) hide show
  1. package/README.md +101 -30
  2. package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -167
  3. package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -1
  4. package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -182
  5. package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js.map +1 -1
  6. package/lib/module/games/balloon-blaster/BalloonBlasterService.js +1 -318
  7. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +1 -183
  8. package/lib/module/games/balloon-blaster/components/BalloonComponent.js +1 -237
  9. package/lib/module/games/balloon-blaster/components/GameArea.js +1 -156
  10. package/lib/module/games/balloon-blaster/components/GameBackground.js +1 -476
  11. package/lib/module/games/balloon-blaster/components/ScoreBoard.js +1 -112
  12. package/lib/module/games/balloon-blaster/components/ScoreBoard.js.map +1 -1
  13. package/lib/module/games/balloon-blaster/components/index.js +1 -7
  14. package/lib/module/games/bike-racing/BikeRacing.js +1 -0
  15. package/lib/module/games/bike-racing/BikeRacing.js.map +1 -0
  16. package/lib/module/games/bike-racing/BikeRacingConstants.js +1 -0
  17. package/lib/module/games/bike-racing/BikeRacingConstants.js.map +1 -0
  18. package/lib/module/games/bike-racing/BikeRacingService.js +1 -0
  19. package/lib/module/games/bike-racing/BikeRacingService.js.map +1 -0
  20. package/lib/module/games/bike-racing/BikeRacingStore.js +1 -0
  21. package/lib/module/games/bike-racing/BikeRacingStore.js.map +1 -0
  22. package/lib/module/games/bike-racing/components/BikeComponent.js +1 -0
  23. package/lib/module/games/bike-racing/components/BikeComponent.js.map +1 -0
  24. package/lib/module/games/bike-racing/components/GameBackground.js +1 -0
  25. package/lib/module/games/bike-racing/components/GameBackground.js.map +1 -0
  26. package/lib/module/games/bike-racing/components/ScoreBoard.js +1 -0
  27. package/lib/module/games/bike-racing/components/ScoreBoard.js.map +1 -0
  28. package/lib/module/games/bike-racing/components/index.js +1 -0
  29. package/lib/module/games/bike-racing/components/index.js.map +1 -0
  30. package/lib/module/games/bike-racing/index.js +1 -0
  31. package/lib/module/games/bike-racing/index.js.map +1 -0
  32. package/lib/module/games/block-blast/BlockBlast.js +1 -0
  33. package/lib/module/games/block-blast/BlockBlast.js.map +1 -0
  34. package/lib/module/games/block-blast/BlockBlastConstants.js +1 -0
  35. package/lib/module/games/block-blast/BlockBlastConstants.js.map +1 -0
  36. package/lib/module/games/block-blast/BlockBlastService.js +1 -0
  37. package/lib/module/games/block-blast/BlockBlastService.js.map +1 -0
  38. package/lib/module/games/block-blast/BlockBlastStore.js +1 -0
  39. package/lib/module/games/block-blast/BlockBlastStore.js.map +1 -0
  40. package/lib/module/games/block-blast/components/BlockPieceComponent.js +1 -0
  41. package/lib/module/games/block-blast/components/BlockPieceComponent.js.map +1 -0
  42. package/lib/module/games/block-blast/components/GameArea.js +1 -0
  43. package/lib/module/games/block-blast/components/GameArea.js.map +1 -0
  44. package/lib/module/games/block-blast/components/GameBackground.js +1 -0
  45. package/lib/module/games/block-blast/components/GameBackground.js.map +1 -0
  46. package/lib/module/games/block-blast/components/GridComponent.js +1 -0
  47. package/lib/module/games/block-blast/components/GridComponent.js.map +1 -0
  48. package/lib/module/games/block-blast/components/ScoreBoard.js +1 -0
  49. package/lib/module/games/block-blast/components/ScoreBoard.js.map +1 -0
  50. package/lib/module/games/block-blast/components/index.js +1 -0
  51. package/lib/module/games/block-blast/components/index.js.map +1 -0
  52. package/lib/module/games/block-blast/index.js +1 -0
  53. package/lib/module/games/block-blast/index.js.map +1 -0
  54. package/lib/module/games/bubble-shooter/BubbleShooter.js +1 -0
  55. package/lib/module/games/bubble-shooter/BubbleShooter.js.map +1 -0
  56. package/lib/module/games/bubble-shooter/BubbleShooterConstants.js +1 -0
  57. package/lib/module/games/bubble-shooter/BubbleShooterConstants.js.map +1 -0
  58. package/lib/module/games/bubble-shooter/BubbleShooterService.js +1 -0
  59. package/lib/module/games/bubble-shooter/BubbleShooterService.js.map +1 -0
  60. package/lib/module/games/bubble-shooter/BubbleShooterStore.js +1 -0
  61. package/lib/module/games/bubble-shooter/BubbleShooterStore.js.map +1 -0
  62. package/lib/module/games/bubble-shooter/components/GameArea.js +1 -0
  63. package/lib/module/games/bubble-shooter/components/GameArea.js.map +1 -0
  64. package/lib/module/games/bubble-shooter/components/GameBackground.js +1 -0
  65. package/lib/module/games/bubble-shooter/components/GameBackground.js.map +1 -0
  66. package/lib/module/games/bubble-shooter/components/ScoreBoard.js +1 -0
  67. package/lib/module/games/bubble-shooter/components/ScoreBoard.js.map +1 -0
  68. package/lib/module/games/bubble-shooter/components/index.js +1 -0
  69. package/lib/module/games/bubble-shooter/components/index.js.map +1 -0
  70. package/lib/module/games/bubble-shooter/index.js +1 -0
  71. package/lib/module/games/bubble-shooter/index.js.map +1 -0
  72. package/lib/module/games/candy-crush/CandyCrush.js +1 -131
  73. package/lib/module/games/candy-crush/CandyCrush.js.map +1 -1
  74. package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -125
  75. package/lib/module/games/candy-crush/CandyCrushConstants.js.map +1 -1
  76. package/lib/module/games/candy-crush/CandyCrushService.js +1 -370
  77. package/lib/module/games/candy-crush/CandyCrushStore.js +1 -303
  78. package/lib/module/games/candy-crush/components/CandyItem.js +1 -191
  79. package/lib/module/games/candy-crush/components/GameBackground.js +1 -85
  80. package/lib/module/games/candy-crush/components/GameGrid.js +1 -314
  81. package/lib/module/games/candy-crush/components/ScoreBoard.js +1 -79
  82. package/lib/module/games/candy-crush/components/index.js +1 -7
  83. package/lib/module/games/candy-crush/index.js +1 -6
  84. package/lib/module/games/car-racing/CarRacing.js +1 -0
  85. package/lib/module/games/car-racing/CarRacing.js.map +1 -0
  86. package/lib/module/games/car-racing/CarRacingConstants.js +1 -0
  87. package/lib/module/games/car-racing/CarRacingConstants.js.map +1 -0
  88. package/lib/module/games/car-racing/CarRacingService.js +1 -0
  89. package/lib/module/games/car-racing/CarRacingService.js.map +1 -0
  90. package/lib/module/games/car-racing/CarRacingStore.js +1 -0
  91. package/lib/module/games/car-racing/CarRacingStore.js.map +1 -0
  92. package/lib/module/games/car-racing/components/CarComponent.js +1 -0
  93. package/lib/module/games/car-racing/components/CarComponent.js.map +1 -0
  94. package/lib/module/games/car-racing/components/GameBackground.js +1 -0
  95. package/lib/module/games/car-racing/components/GameBackground.js.map +1 -0
  96. package/lib/module/games/car-racing/components/ScoreBoard.js +1 -0
  97. package/lib/module/games/car-racing/components/ScoreBoard.js.map +1 -0
  98. package/lib/module/games/car-racing/components/index.js +1 -0
  99. package/lib/module/games/car-racing/components/index.js.map +1 -0
  100. package/lib/module/games/colors-sort/ColorsSort.js +1 -143
  101. package/lib/module/games/colors-sort/ColorsSort.js.map +1 -1
  102. package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -72
  103. package/lib/module/games/colors-sort/ColorsSortConstants.js.map +1 -1
  104. package/lib/module/games/colors-sort/ColorsSortService.js +1 -255
  105. package/lib/module/games/colors-sort/ColorsSortStore.js +1 -257
  106. package/lib/module/games/colors-sort/ColorsSortStore.js.map +1 -1
  107. package/lib/module/games/colors-sort/components/ColorContainer.js +1 -140
  108. package/lib/module/games/colors-sort/components/GameBackground.js +1 -135
  109. package/lib/module/games/colors-sort/components/ScoreBoard.js +1 -70
  110. package/lib/module/games/colors-sort/components/index.js +1 -6
  111. package/lib/module/games/dino-jump/DinoJump.js +1 -209
  112. package/lib/module/games/dino-jump/DinoJump.js.map +1 -1
  113. package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -189
  114. package/lib/module/games/dino-jump/DinoJumpConstants.js.map +1 -1
  115. package/lib/module/games/dino-jump/DinoJumpService.js +1 -270
  116. package/lib/module/games/dino-jump/DinoJumpStore.js +1 -381
  117. package/lib/module/games/dino-jump/components/DinoSprite.js +1 -418
  118. package/lib/module/games/dino-jump/components/DinoSprite.js.map +1 -1
  119. package/lib/module/games/dino-jump/components/GameArea.js +1 -68
  120. package/lib/module/games/dino-jump/components/GameBackground.js +1 -444
  121. package/lib/module/games/dino-jump/components/ObstacleSprite.js +1 -306
  122. package/lib/module/games/dino-jump/components/ScoreBoard.js +1 -105
  123. package/lib/module/games/dino-jump/components/ScoreBoard.js.map +1 -1
  124. package/lib/module/games/dino-jump/components/StarSprite.js +1 -45
  125. package/lib/module/games/dino-jump/components/index.js +1 -9
  126. package/lib/module/games/flappy-bird/FlappyBird.js +1 -126
  127. package/lib/module/games/flappy-bird/FlappyBird.js.map +1 -1
  128. package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -90
  129. package/lib/module/games/flappy-bird/FlappyBirdConstants.js.map +1 -1
  130. package/lib/module/games/flappy-bird/FlappyBirdStore.js +1 -300
  131. package/lib/module/games/flappy-bird/components/Bird.js +1 -87
  132. package/lib/module/games/flappy-bird/components/GameArea.js +1 -87
  133. package/lib/module/games/flappy-bird/components/GameBackground.js +1 -79
  134. package/lib/module/games/flappy-bird/components/Pipes.js +1 -172
  135. package/lib/module/games/flappy-bird/components/ScoreBoard.js +1 -73
  136. package/lib/module/games/flappy-bird/components/index.js +1 -8
  137. package/lib/module/games/fruit-merger/FruitMerger.js +1 -120
  138. package/lib/module/games/fruit-merger/FruitMerger.js.map +1 -1
  139. package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -119
  140. package/lib/module/games/fruit-merger/FruitMergerConstants.js.map +1 -1
  141. package/lib/module/games/fruit-merger/FruitMergerService.js +1 -13
  142. package/lib/module/games/fruit-merger/FruitMergerStore.js +1 -315
  143. package/lib/module/games/fruit-merger/components/FruitItem.js +1 -102
  144. package/lib/module/games/fruit-merger/components/GameArea.js +1 -103
  145. package/lib/module/games/fruit-merger/components/GameBackground.js +1 -498
  146. package/lib/module/games/fruit-merger/components/ScoreBoard.js +1 -58
  147. package/lib/module/games/fruit-merger/components/index.js +1 -7
  148. package/lib/module/games/fruit-ninja/FruitNinja.js +1 -134
  149. package/lib/module/games/fruit-ninja/FruitNinja.js.map +1 -1
  150. package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -148
  151. package/lib/module/games/fruit-ninja/FruitNinjaConstants.js.map +1 -1
  152. package/lib/module/games/fruit-ninja/FruitNinjaService.js +1 -311
  153. package/lib/module/games/fruit-ninja/FruitNinjaStore.js +1 -191
  154. package/lib/module/games/fruit-ninja/FruitNinjaStore.js.map +1 -1
  155. package/lib/module/games/fruit-ninja/components/FruitComponent.js +1 -99
  156. package/lib/module/games/fruit-ninja/components/GameArea.js +1 -215
  157. package/lib/module/games/fruit-ninja/components/GameBackground.js +1 -1267
  158. package/lib/module/games/fruit-ninja/components/ScoreBoard.js +1 -92
  159. package/lib/module/games/fruit-ninja/components/ScoreBoard.js.map +1 -1
  160. package/lib/module/games/fruit-ninja/components/index.js +1 -7
  161. package/lib/module/games/game-2048/Game2048.js +1 -149
  162. package/lib/module/games/game-2048/Game2048.js.map +1 -1
  163. package/lib/module/games/game-2048/Game2048Constants.js +1 -263
  164. package/lib/module/games/game-2048/Game2048Constants.js.map +1 -1
  165. package/lib/module/games/game-2048/Game2048Service.js +1 -457
  166. package/lib/module/games/game-2048/Game2048Store.js +1 -236
  167. package/lib/module/games/game-2048/components/GameBackground.js +1 -247
  168. package/lib/module/games/game-2048/components/GameGrid.js +1 -139
  169. package/lib/module/games/game-2048/components/GameTile.js +1 -72
  170. package/lib/module/games/game-2048/components/ScoreBoard.js +1 -52
  171. package/lib/module/games/game-2048/components/index.js +1 -7
  172. package/lib/module/games/maze-runner/MazeRunner.js +1 -267
  173. package/lib/module/games/maze-runner/MazeRunner.js.map +1 -1
  174. package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -100
  175. package/lib/module/games/maze-runner/MazeRunnerConstants.js.map +1 -1
  176. package/lib/module/games/maze-runner/MazeRunnerService.js +1 -586
  177. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +1 -150
  178. package/lib/module/games/maze-runner/components/EnhancedGameArea.js +1 -370
  179. package/lib/module/games/maze-runner/components/GameBackground.js +1 -175
  180. package/lib/module/games/maze-runner/components/ScoreBoard.js +1 -61
  181. package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +1 -209
  182. package/lib/module/games/maze-runner/components/StaticGameBackground.js +1 -169
  183. package/lib/module/games/maze-runner/components/WallComponent.js +1 -91
  184. package/lib/module/games/maze-runner/components/index.js +1 -8
  185. package/lib/module/games/perfect-circle/PerfectCircle.js +1 -0
  186. package/lib/module/games/perfect-circle/PerfectCircle.js.map +1 -0
  187. package/lib/module/games/perfect-circle/PerfectCircleConstants.js +1 -0
  188. package/lib/module/games/perfect-circle/PerfectCircleConstants.js.map +1 -0
  189. package/lib/module/games/perfect-circle/PerfectCircleService.js +1 -0
  190. package/lib/module/games/perfect-circle/PerfectCircleService.js.map +1 -0
  191. package/lib/module/games/perfect-circle/PerfectCircleStore.js +1 -0
  192. package/lib/module/games/perfect-circle/PerfectCircleStore.js.map +1 -0
  193. package/lib/module/games/perfect-circle/components/DrawingCanvas.js +1 -0
  194. package/lib/module/games/perfect-circle/components/DrawingCanvas.js.map +1 -0
  195. package/lib/module/games/perfect-circle/components/GameBackground.js +1 -0
  196. package/lib/module/games/perfect-circle/components/GameBackground.js.map +1 -0
  197. package/lib/module/games/perfect-circle/components/ScoreBoard.js +1 -0
  198. package/lib/module/games/perfect-circle/components/ScoreBoard.js.map +1 -0
  199. package/lib/module/games/perfect-circle/index.js +1 -0
  200. package/lib/module/games/perfect-circle/index.js.map +1 -0
  201. package/lib/module/games/popit-fidget/PopitFidget.js +1 -285
  202. package/lib/module/games/popit-fidget/PopitFidget.js.map +1 -1
  203. package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -113
  204. package/lib/module/games/popit-fidget/PopitFidgetConstants.js.map +1 -1
  205. package/lib/module/games/popit-fidget/PopitFidgetService.js +1 -132
  206. package/lib/module/games/popit-fidget/PopitFidgetStore.js +1 -125
  207. package/lib/module/games/popit-fidget/components/BubbleComponent.js +1 -198
  208. package/lib/module/games/popit-fidget/components/FidgetGrid.js +1 -165
  209. package/lib/module/games/popit-fidget/components/GameBackground.js +1 -177
  210. package/lib/module/games/popit-fidget/components/ScoreBoard.js +1 -61
  211. package/lib/module/games/popit-fidget/components/index.js +1 -7
  212. package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -159
  213. package/lib/module/games/sliding-numbers/SlidingNumbers.js.map +1 -1
  214. package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -207
  215. package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js.map +1 -1
  216. package/lib/module/games/sliding-numbers/SlidingNumbersService.js +1 -248
  217. package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +1 -274
  218. package/lib/module/games/sliding-numbers/components/GameBackground.js +1 -259
  219. package/lib/module/games/sliding-numbers/components/NumbersGrid.js +1 -174
  220. package/lib/module/games/sliding-numbers/components/NumbersTile.js +1 -116
  221. package/lib/module/games/sliding-numbers/components/ScoreBoard.js +1 -64
  222. package/lib/module/games/sliding-numbers/components/index.js +1 -7
  223. package/lib/module/games/snake/Snake.js +1 -189
  224. package/lib/module/games/snake/Snake.js.map +1 -1
  225. package/lib/module/games/snake/SnakeConstants.js +1 -138
  226. package/lib/module/games/snake/SnakeConstants.js.map +1 -1
  227. package/lib/module/games/snake/SnakeService.js +1 -148
  228. package/lib/module/games/snake/SnakeStore.js +1 -182
  229. package/lib/module/games/snake/SnakeStore.js.map +1 -1
  230. package/lib/module/games/snake/components/GameBackground.js +1 -221
  231. package/lib/module/games/snake/components/GameGrid.js +1 -153
  232. package/lib/module/games/snake/components/ScoreBoard.js +1 -51
  233. package/lib/module/games/snake/components/ScoreBoard.js.map +1 -1
  234. package/lib/module/games/snake/components/index.js +1 -6
  235. package/lib/module/games/snake/index.js +1 -6
  236. package/lib/module/games/space-fighter/SpaceFighter.js +1 -165
  237. package/lib/module/games/space-fighter/SpaceFighter.js.map +1 -1
  238. package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -108
  239. package/lib/module/games/space-fighter/SpaceFighterConstants.js.map +1 -1
  240. package/lib/module/games/space-fighter/SpaceFighterService.js +1 -326
  241. package/lib/module/games/space-fighter/SpaceFighterStore.js +1 -209
  242. package/lib/module/games/space-fighter/components/AsteroidComponent.js +1 -113
  243. package/lib/module/games/space-fighter/components/GameArea.js +1 -289
  244. package/lib/module/games/space-fighter/components/GameBackground.js +1 -239
  245. package/lib/module/games/space-fighter/components/ScoreBoard.js +1 -136
  246. package/lib/module/games/space-fighter/components/Spacecraft3D.js +1 -202
  247. package/lib/module/games/space-fighter/components/SpacecraftPath.js +1 -52
  248. package/lib/module/games/space-fighter/components/index.js +1 -9
  249. package/lib/module/games/whack-a-mole/WhackAMole.js +1 -270
  250. package/lib/module/games/whack-a-mole/WhackAMole.js.map +1 -1
  251. package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -115
  252. package/lib/module/games/whack-a-mole/WhackAMoleConstants.js.map +1 -1
  253. package/lib/module/games/whack-a-mole/WhackAMoleService.js +1 -120
  254. package/lib/module/games/whack-a-mole/WhackAMoleStore.js +1 -172
  255. package/lib/module/games/whack-a-mole/components/GameBackground.js +1 -477
  256. package/lib/module/games/whack-a-mole/components/GameGrid.js +1 -97
  257. package/lib/module/games/whack-a-mole/components/GameHole.js +1 -196
  258. package/lib/module/games/whack-a-mole/components/MoleCharacter.js +1 -241
  259. package/lib/module/games/whack-a-mole/components/ScoreBoard.js +1 -67
  260. package/lib/module/games/whack-a-mole/components/ScoreBoard.js.map +1 -1
  261. package/lib/module/games/whack-a-mole/components/index.js +1 -8
  262. package/lib/module/helpers/AnimationFrame.js +1 -120
  263. package/lib/module/helpers/AnimationTracker.js +1 -89
  264. package/lib/module/helpers/ErrorHandler.js +1 -269
  265. package/lib/module/helpers/GameControlButton.js +1 -219
  266. package/lib/module/helpers/GameOverModal.js +1 -144
  267. package/lib/module/helpers/GameOverModal.js.map +1 -1
  268. package/lib/module/helpers/GameSettingsModal.js +1 -287
  269. package/lib/module/helpers/GameSettingsModal.js.map +1 -1
  270. package/lib/module/helpers/ParticleBlast.js +1 -134
  271. package/lib/module/helpers/ScoreBoardContainer.js +1 -34
  272. package/lib/module/helpers/ScoreBoardContainer.js.map +1 -1
  273. package/lib/module/helpers/index.js +1 -12
  274. package/lib/module/index.js +1 -22
  275. package/lib/module/index.js.map +1 -1
  276. package/lib/module/services/GamesConstants.js +1 -178
  277. package/lib/module/services/GamesConstants.js.map +1 -1
  278. package/lib/module/services/GamesService.js +1 -112
  279. package/lib/module/services/GamesService.js.map +1 -1
  280. package/lib/module/services/HapticsService.js +1 -77
  281. package/lib/module/services/ScoringService.js +1 -0
  282. package/lib/module/services/ScoringService.js.map +1 -0
  283. package/lib/module/services/SoundsService.js +1 -302
  284. package/lib/module/services/SoundsService.js.map +1 -1
  285. package/lib/module/services/UtilsService.js +1 -32
  286. package/lib/module/services/UtilsService.js.map +1 -1
  287. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -1
  288. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +1 -1
  289. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts.map +1 -1
  290. package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts +4 -0
  291. package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts.map +1 -0
  292. package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts +76 -0
  293. package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts.map +1 -0
  294. package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +22 -0
  295. package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts.map +1 -0
  296. package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +72 -0
  297. package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts.map +1 -0
  298. package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +12 -0
  299. package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts.map +1 -0
  300. package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +9 -0
  301. package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts.map +1 -0
  302. package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +7 -0
  303. package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts.map +1 -0
  304. package/lib/typescript/src/games/bike-racing/components/index.d.ts +4 -0
  305. package/lib/typescript/src/games/bike-racing/components/index.d.ts.map +1 -0
  306. package/lib/typescript/src/games/bike-racing/index.d.ts +5 -0
  307. package/lib/typescript/src/games/bike-racing/index.d.ts.map +1 -0
  308. package/lib/typescript/src/games/block-blast/BlockBlast.d.ts +4 -0
  309. package/lib/typescript/src/games/block-blast/BlockBlast.d.ts.map +1 -0
  310. package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts +82 -0
  311. package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts.map +1 -0
  312. package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +17 -0
  313. package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts.map +1 -0
  314. package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +62 -0
  315. package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts.map +1 -0
  316. package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +14 -0
  317. package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts.map +1 -0
  318. package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +12 -0
  319. package/lib/typescript/src/games/block-blast/components/GameArea.d.ts.map +1 -0
  320. package/lib/typescript/src/games/block-blast/components/GameBackground.d.ts +7 -0
  321. package/lib/typescript/src/games/block-blast/components/GameBackground.d.ts.map +1 -0
  322. package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +17 -0
  323. package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts.map +1 -0
  324. package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +7 -0
  325. package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts.map +1 -0
  326. package/lib/typescript/src/games/block-blast/components/index.d.ts +6 -0
  327. package/lib/typescript/src/games/block-blast/components/index.d.ts.map +1 -0
  328. package/lib/typescript/src/games/block-blast/index.d.ts +5 -0
  329. package/lib/typescript/src/games/block-blast/index.d.ts.map +1 -0
  330. package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts +4 -0
  331. package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts.map +1 -0
  332. package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts +61 -0
  333. package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts.map +1 -0
  334. package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +26 -0
  335. package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts.map +1 -0
  336. package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +62 -0
  337. package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts.map +1 -0
  338. package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +9 -0
  339. package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts.map +1 -0
  340. package/lib/typescript/src/games/bubble-shooter/components/GameBackground.d.ts +8 -0
  341. package/lib/typescript/src/games/bubble-shooter/components/GameBackground.d.ts.map +1 -0
  342. package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +7 -0
  343. package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts.map +1 -0
  344. package/lib/typescript/src/games/bubble-shooter/components/index.d.ts +4 -0
  345. package/lib/typescript/src/games/bubble-shooter/components/index.d.ts.map +1 -0
  346. package/lib/typescript/src/games/bubble-shooter/index.d.ts +3 -0
  347. package/lib/typescript/src/games/bubble-shooter/index.d.ts.map +1 -0
  348. package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts.map +1 -1
  349. package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +7 -7
  350. package/lib/typescript/src/games/car-racing/CarRacing.d.ts +4 -0
  351. package/lib/typescript/src/games/car-racing/CarRacing.d.ts.map +1 -0
  352. package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts +76 -0
  353. package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts.map +1 -0
  354. package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +22 -0
  355. package/lib/typescript/src/games/car-racing/CarRacingService.d.ts.map +1 -0
  356. package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +72 -0
  357. package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts.map +1 -0
  358. package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +13 -0
  359. package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts.map +1 -0
  360. package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +9 -0
  361. package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts.map +1 -0
  362. package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +7 -0
  363. package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts.map +1 -0
  364. package/lib/typescript/src/games/car-racing/components/index.d.ts +4 -0
  365. package/lib/typescript/src/games/car-racing/components/index.d.ts.map +1 -0
  366. package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts.map +1 -1
  367. package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts.map +1 -1
  368. package/lib/typescript/src/games/dino-jump/DinoJump.d.ts.map +1 -1
  369. package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts.map +1 -1
  370. package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts.map +1 -1
  371. package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts.map +1 -1
  372. package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts.map +1 -1
  373. package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts.map +1 -1
  374. package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts.map +1 -1
  375. package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts.map +1 -1
  376. package/lib/typescript/src/games/game-2048/Game2048.d.ts.map +1 -1
  377. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -1
  378. package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts +4 -0
  379. package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts.map +1 -0
  380. package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts +81 -0
  381. package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts.map +1 -0
  382. package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +14 -0
  383. package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts.map +1 -0
  384. package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +40 -0
  385. package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts.map +1 -0
  386. package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +9 -0
  387. package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts.map +1 -0
  388. package/lib/typescript/src/games/perfect-circle/components/GameBackground.d.ts +8 -0
  389. package/lib/typescript/src/games/perfect-circle/components/GameBackground.d.ts.map +1 -0
  390. package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +7 -0
  391. package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts.map +1 -0
  392. package/lib/typescript/src/games/perfect-circle/index.d.ts +3 -0
  393. package/lib/typescript/src/games/perfect-circle/index.d.ts.map +1 -0
  394. package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts.map +1 -1
  395. package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts.map +1 -1
  396. package/lib/typescript/src/games/snake/Snake.d.ts.map +1 -1
  397. package/lib/typescript/src/games/snake/SnakeStore.d.ts +4 -0
  398. package/lib/typescript/src/games/snake/SnakeStore.d.ts.map +1 -1
  399. package/lib/typescript/src/games/snake/components/ScoreBoard.d.ts.map +1 -1
  400. package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts.map +1 -1
  401. package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts.map +1 -1
  402. package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +1 -1
  403. package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts.map +1 -1
  404. package/lib/typescript/src/helpers/GameOverModal.d.ts +3 -0
  405. package/lib/typescript/src/helpers/GameOverModal.d.ts.map +1 -1
  406. package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts.map +1 -1
  407. package/lib/typescript/src/index.d.ts +6 -1
  408. package/lib/typescript/src/index.d.ts.map +1 -1
  409. package/lib/typescript/src/services/GamesConstants.d.ts +57 -7
  410. package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -1
  411. package/lib/typescript/src/services/GamesService.d.ts +2 -1
  412. package/lib/typescript/src/services/GamesService.d.ts.map +1 -1
  413. package/lib/typescript/src/services/ScoringService.d.ts +2 -0
  414. package/lib/typescript/src/services/ScoringService.d.ts.map +1 -0
  415. package/lib/typescript/src/services/SoundsService.d.ts +88 -0
  416. package/lib/typescript/src/services/SoundsService.d.ts.map +1 -1
  417. package/lib/typescript/src/services/UtilsService.d.ts +12 -1
  418. package/lib/typescript/src/services/UtilsService.d.ts.map +1 -1
  419. package/package.json +2 -2
@@ -1,134 +1 @@
1
- "use strict";
2
-
3
- import React, { useEffect, useRef } from 'react';
4
- import { View, StyleSheet } from 'react-native';
5
- import { GestureHandlerRootView } from 'react-native-gesture-handler';
6
- import { useFruitNinjaStore, registerGameService } from "./FruitNinjaStore.js";
7
- import { createFruitNinjaService, getDifficultySpawnInterval } from "./FruitNinjaService.js";
8
- import { ScoreBoard, GameArea, GameBackground } from "./components/index.js";
9
- import { GameControlButton, GameOverModal, useAnimationTrackers, useGameErrorHandler, GameErrorType } from "../../helpers/index.js";
10
- import { GameSettingsModal } from "../../helpers/index.js";
11
- import { GAME_IDS, DEFAULT_GAME_SETTINGS } from "../../services/UtilsService.js";
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- export const FruitNinja = ({
14
- settings,
15
- onSettingsChange
16
- }) => {
17
- // Read UI-critical state independently to minimize re-renders
18
- const isPlaying = useFruitNinjaStore(state => state.isPlaying);
19
- const gameOver = useFruitNinjaStore(state => state.gameOver);
20
- const score = useFruitNinjaStore(state => state.score);
21
-
22
- // Get store actions independently (these don't cause re-renders)
23
- const startGame = useFruitNinjaStore(state => state.startGame);
24
- const stopGame = useFruitNinjaStore(state => state.stopGame);
25
- const resetGame = useFruitNinjaStore(state => state.resetGame);
26
- const decrementTime = useFruitNinjaStore(state => state.decrementTime);
27
- const addFruit = useFruitNinjaStore(state => state.addFruit);
28
- const removeFruit = useFruitNinjaStore(state => state.removeFruit);
29
- const updateFruit = useFruitNinjaStore(state => state.updateFruit);
30
-
31
- // Use shared animation tracking utility
32
- const {
33
- fruitAnimations,
34
- particleAnimations
35
- } = useAnimationTrackers(['fruitAnimations', 'particleAnimations']);
36
-
37
- // Error handling for the game
38
- const {
39
- wrapFunction,
40
- safeExecute
41
- } = useGameErrorHandler(GAME_IDS.FRUIT_NINJA);
42
-
43
- // Game service for main game control only with error handling
44
- const gameService = useRef(safeExecute(() => createFruitNinjaService(fruitAnimations, particleAnimations), createFruitNinjaService(fruitAnimations, particleAnimations),
45
- // Fallback to direct creation
46
- GameErrorType.INITIALIZATION_ERROR)).current;
47
-
48
- // Register game service with store for automatic cleanup
49
- useEffect(() => {
50
- registerGameService(gameService);
51
- return () => {
52
- handleResetGame();
53
- };
54
- }, [gameService]);
55
-
56
- // Game control functions with error handling
57
- const handleStartGame = wrapFunction(() => {
58
- startGame(); // Store uses fixed 60s duration internally
59
- if (gameService) {
60
- gameService.resetAnimations();
61
- gameService.startGameTimer(decrementTime);
62
- gameService.startFruitSpawning(spawnFruit, getDifficultySpawnInterval(settings?.difficulty || 'medium'));
63
- gameService.startPhysicsLoop(updateFruit, removeFruit, () => useFruitNinjaStore.getState().fruits);
64
- }
65
- }, GameErrorType.INITIALIZATION_ERROR);
66
- const handleStopGame = wrapFunction(() => {
67
- stopGame();
68
- if (gameService) {
69
- gameService.cleanup();
70
- gameService.resetAnimations();
71
- }
72
- }, GameErrorType.UNKNOWN_ERROR);
73
- const handleResetGame = wrapFunction(() => {
74
- if (gameService) {
75
- gameService.cleanup();
76
- }
77
- resetGame();
78
- if (gameService) {
79
- gameService.resetAnimations();
80
- }
81
- }, GameErrorType.UNKNOWN_ERROR);
82
-
83
- // Fruit spawning
84
- const spawnFruit = fruit => {
85
- addFruit(fruit);
86
- };
87
-
88
- // Get offset from settings
89
- const offset = settings?.offset ?? 0;
90
- return /*#__PURE__*/_jsx(View, {
91
- style: styles.container,
92
- children: /*#__PURE__*/_jsx(GestureHandlerRootView, {
93
- children: /*#__PURE__*/_jsxs(GameBackground, {
94
- offset: offset,
95
- children: [/*#__PURE__*/_jsx(GameArea, {}), /*#__PURE__*/_jsx(ScoreBoard, {
96
- offset: offset
97
- }), /*#__PURE__*/_jsx(GameControlButton, {
98
- isPlaying: isPlaying,
99
- gameOver: gameOver,
100
- onStartGame: handleStartGame,
101
- onStopGame: handleStopGame,
102
- startButtonText: "START SLICING",
103
- stopButtonText: "STOP GAME",
104
- startButtonSubtext: "Slice fruits to score!",
105
- stopButtonSubtext: "End current game",
106
- startButtonColor: "#10b981",
107
- stopButtonColor: "#dc2626",
108
- startButtonBorderColor: "#34d399",
109
- stopButtonBorderColor: "#f87171"
110
- }), /*#__PURE__*/_jsx(GameOverModal, {
111
- isVisible: gameOver,
112
- score: score,
113
- onPlayAgain: handleResetGame,
114
- buttonText: "Slice Again!",
115
- primaryColor: "rgba(34, 139, 34, 0.8)" // Green theme for Fruit Ninja
116
- ,
117
- borderColor: "rgba(34, 139, 34, 0.9)",
118
- buttonColor: "#10b981",
119
- buttonBorderColor: "#34d399"
120
- }), /*#__PURE__*/_jsx(GameSettingsModal, {
121
- gameId: GAME_IDS.FRUIT_NINJA,
122
- settings: settings || DEFAULT_GAME_SETTINGS,
123
- onSettingsChange: onSettingsChange
124
- })]
125
- })
126
- })
127
- });
128
- };
129
- const styles = StyleSheet.create({
130
- container: {
131
- flex: 1
132
- }
133
- });
134
- //# sourceMappingURL=FruitNinja.js.map
1
+ "use strict";import React,{useEffect,useRef}from 'react';import{View,StyleSheet}from 'react-native';import{GestureHandlerRootView}from 'react-native-gesture-handler';import{useFruitNinjaStore,registerGameService}from "./FruitNinjaStore.js";import{createFruitNinjaService,getDifficultySpawnInterval}from "./FruitNinjaService.js";import{ScoreBoard,GameArea,GameBackground}from "./components/index.js";import{GameControlButton,GameOverModal,useAnimationTrackers,useGameErrorHandler,GameErrorType}from "../../helpers/index.js";import{GameSettingsModal}from "../../helpers/index.js";import{GAME_IDS,DEFAULT_GAME_SETTINGS}from "../../services/UtilsService.js";import{jsx as _jsx,jsxs as _jsxs}from "react/jsx-runtime";export const FruitNinja =({settings,onSettingsChange,onEndGame})=>{const isPlaying = useFruitNinjaStore(state => state.isPlaying);const gameOver = useFruitNinjaStore(state => state.gameOver);const score = useFruitNinjaStore(state => state.score);const startGame = useFruitNinjaStore(state => state.startGame);const stopGame = useFruitNinjaStore(state => state.stopGame);const resetGame = useFruitNinjaStore(state => state.resetGame);const decrementTime = useFruitNinjaStore(state => state.decrementTime);const addFruit = useFruitNinjaStore(state => state.addFruit);const removeFruit = useFruitNinjaStore(state => state.removeFruit);const updateFruit = useFruitNinjaStore(state => state.updateFruit);const gameReportedRef = useRef(false);const reportGameEnd = status =>{if(onEndGame && !gameReportedRef.current){const currentState = useFruitNinjaStore.getState();onEndGame({status,score:currentState.score.toString()});gameReportedRef.current = true;}};const{fruitAnimations,particleAnimations}= useAnimationTrackers(['fruitAnimations','particleAnimations']);const{wrapFunction,safeExecute}= useGameErrorHandler(GAME_IDS.FRUIT_NINJA);const gameService = useRef(safeExecute(()=> createFruitNinjaService(fruitAnimations,particleAnimations),createFruitNinjaService(fruitAnimations,particleAnimations),GameErrorType.INITIALIZATION_ERROR)).current;useEffect(()=>{registerGameService(gameService);return()=>{handleResetGame();};},[gameService]);useEffect(()=>{if(gameOver && !gameReportedRef.current){const currentState = useFruitNinjaStore.getState();const status = currentState.lives <= 0 ? 'lose':'win';reportGameEnd(status);}if(!gameOver){gameReportedRef.current = false;}},[gameOver]);const handleStartGame = wrapFunction(()=>{gameReportedRef.current = false;startGame();if(gameService){gameService.resetAnimations();gameService.startGameTimer(decrementTime);gameService.startFruitSpawning(spawnFruit,getDifficultySpawnInterval(settings?.difficulty || 'medium'));gameService.startPhysicsLoop(updateFruit,removeFruit,()=> useFruitNinjaStore.getState().fruits);}},GameErrorType.INITIALIZATION_ERROR);const handleStopGame = wrapFunction(()=>{reportGameEnd('cancel');stopGame();if(gameService){gameService.cleanup();gameService.resetAnimations();}},GameErrorType.UNKNOWN_ERROR);const handleResetGame = wrapFunction(()=>{if(gameService){gameService.cleanup();}resetGame();if(gameService){gameService.resetAnimations();}},GameErrorType.UNKNOWN_ERROR);const spawnFruit = fruit =>{addFruit(fruit);};const offset = settings?.offset ?? 0;return _jsx(View,{style:styles.container,children:_jsx(GestureHandlerRootView,{children:_jsxs(GameBackground,{offset:offset,children:[_jsx(GameArea,{}),_jsx(ScoreBoard,{offset:offset}),_jsx(GameControlButton,{isPlaying:isPlaying,gameOver:gameOver,onStartGame:handleStartGame,onStopGame:handleStopGame,startButtonText:"START SLICING",stopButtonText:"STOP GAME",startButtonSubtext:"Slice fruits to score!",stopButtonSubtext:"End current game",startButtonColor:"#10b981",stopButtonColor:"#dc2626",startButtonBorderColor:"#34d399",stopButtonBorderColor:"#f87171"}),_jsx(GameOverModal,{isVisible:gameOver,score:score,onPlayAgain:handleResetGame,buttonText:"Slice Again!",primaryColor:"rgba(16,185,129,0.5)",borderColor:"rgba(16,185,129,0.5)",buttonColor:"#ffffff",buttonBorderColor:"#ffffff",buttonTextColor:"#10b981"}),_jsx(GameSettingsModal,{gameId:GAME_IDS.FRUIT_NINJA,settings:settings || DEFAULT_GAME_SETTINGS,onSettingsChange:onSettingsChange})]})})});};const styles = StyleSheet.create({container:{flex:1}});
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","useRef","View","StyleSheet","GestureHandlerRootView","useFruitNinjaStore","registerGameService","createFruitNinjaService","getDifficultySpawnInterval","ScoreBoard","GameArea","GameBackground","GameControlButton","GameOverModal","useAnimationTrackers","useGameErrorHandler","GameErrorType","GameSettingsModal","GAME_IDS","DEFAULT_GAME_SETTINGS","jsx","_jsx","jsxs","_jsxs","FruitNinja","settings","onSettingsChange","isPlaying","state","gameOver","score","startGame","stopGame","resetGame","decrementTime","addFruit","removeFruit","updateFruit","fruitAnimations","particleAnimations","wrapFunction","safeExecute","FRUIT_NINJA","gameService","INITIALIZATION_ERROR","current","handleResetGame","handleStartGame","resetAnimations","startGameTimer","startFruitSpawning","spawnFruit","difficulty","startPhysicsLoop","getState","fruits","handleStopGame","cleanup","UNKNOWN_ERROR","fruit","offset","style","styles","container","children","onStartGame","onStopGame","startButtonText","stopButtonText","startButtonSubtext","stopButtonSubtext","startButtonColor","stopButtonColor","startButtonBorderColor","stopButtonBorderColor","isVisible","onPlayAgain","buttonText","primaryColor","borderColor","buttonColor","buttonBorderColor","gameId","create","flex"],"sourceRoot":"../../../../src","sources":["games/fruit-ninja/FruitNinja.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAChD,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,kBAAkB,EAAEC,mBAAmB,QAAQ,sBAAmB;AAC3E,SAASC,uBAAuB,EAAEC,0BAA0B,QAAQ,wBAAqB;AACzF,SAASC,UAAU,EAAEC,QAAQ,EAAEC,cAAc,QAAQ,uBAAc;AACnE,SAASC,iBAAiB,EAAEC,aAAa,EAAEC,oBAAoB,EAAEC,mBAAmB,EAAEC,aAAa,QAAQ,wBAAe;AAC1H,SAASC,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B,EAAC;QAAS,CAC5B,CAAC,eAGF5D,IAAA,CAACJ,iBAAiB;UAChBiE,MAAM,EAAEhE,QAAQ,CAACwB,WAAY;UAC7BjB,QAAQ,EAAEA,QAAQ,IAAIN,qBAAsB;UAC5CO,gBAAgB,EAAEA;QAAiB,CACpC,CAAC;MAAA,CACc;IAAC,CACK;EAAC,CACrB,CAAC;AAEX,CAAC;AAED,MAAMoC,MAAM,GAAG3D,UAAU,CAACgF,MAAM,CAAC;EAC/BpB,SAAS,EAAE;IACTqB,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useEffect","useRef","View","StyleSheet","GestureHandlerRootView","useFruitNinjaStore","registerGameService","createFruitNinjaService","getDifficultySpawnInterval","ScoreBoard","GameArea","GameBackground","GameControlButton","GameOverModal","useAnimationTrackers","useGameErrorHandler","GameErrorType","GameSettingsModal","GAME_IDS","DEFAULT_GAME_SETTINGS","jsx","_jsx","jsxs","_jsxs","FruitNinja","settings","onSettingsChange","onEndGame","isPlaying","state","gameOver","score","startGame","stopGame","resetGame","decrementTime","addFruit","removeFruit","updateFruit","gameReportedRef","reportGameEnd","status","current","currentState","getState","toString","fruitAnimations","particleAnimations","wrapFunction","safeExecute","FRUIT_NINJA","gameService","INITIALIZATION_ERROR","handleResetGame","lives","handleStartGame","resetAnimations","startGameTimer","startFruitSpawning","spawnFruit","difficulty","startPhysicsLoop","fruits","handleStopGame","cleanup","UNKNOWN_ERROR","fruit","offset","style","styles","container","children","onStartGame","onStopGame","startButtonText","stopButtonText","startButtonSubtext","stopButtonSubtext","startButtonColor","stopButtonColor","startButtonBorderColor","stopButtonBorderColor","isVisible","onPlayAgain","buttonText","primaryColor","borderColor","buttonColor","buttonBorderColor","buttonTextColor","gameId","create","flex"],"sourceRoot":"../../../../src","sources":["games/fruit-ninja/FruitNinja.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAChD,SA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,iBAAiB,EAAC,SAAS,CAAC;UAAA;UAC5BC,eAAe,EAAC,SAAS,CAAC;QAAA,CAC3B,CAAC,eAGFpE,IAAA,CAACJ,iBAAiB;UAChByE,MAAM,EAAExE,QAAQ,CAACgC,WAAY;UAC7BzB,QAAQ,EAAEA,QAAQ,IAAIN,qBAAsB;UAC5CO,gBAAgB,EAAEA;QAAiB,CACpC,CAAC;MAAA,CACc;IAAC,CACK;EAAC,CACrB,CAAC;AAEX,CAAC;AAED,MAAM2C,MAAM,GAAGlE,UAAU,CAACwF,MAAM,CAAC;EAC/BrB,SAAS,EAAE;IACTsB,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,148 +1 @@
1
- "use strict";
2
-
3
- // Fruit Ninja Game Constants
4
- export const FRUIT_NINJA_GAME_CONFIG = {
5
- GAME_DURATION: 60,
6
- // seconds
7
- MAX_LIVES: 3,
8
- FRUIT_SPAWN_INTERVAL: 1500,
9
- // ms - even slower spawning for better gameplay
10
- FRUIT_FALL_SPEED: 2,
11
- // pixels per frame
12
- GRAVITY: 0.12,
13
- // acceleration - further reduced for even slower movement
14
- INITIAL_VELOCITY_Y: -10,
15
- // upward velocity - further reduced for slower, more manageable arc
16
- INITIAL_VELOCITY_X_RANGE: 1.5,
17
- // horizontal velocity range - further reduced for slower horizontal movement
18
- FRUIT_SIZE: 60,
19
- SLICE_TRAIL_LENGTH: 10,
20
- SLICE_TRAIL_WIDTH: 8,
21
- COMBO_TIMEOUT: 2000,
22
- // ms
23
- PARTICLE_COUNT: 6,
24
- PARTICLE_LIFETIME: 1000 // ms
25
- };
26
- export const FRUIT_NINJA_ANIMATION_CONFIG = {
27
- FRUIT_SPRING: {
28
- damping: 15,
29
- stiffness: 200
30
- },
31
- SLICE_SPRING: {
32
- damping: 20,
33
- stiffness: 300
34
- },
35
- PARTICLE_SPRING: {
36
- damping: 25,
37
- stiffness: 400
38
- }
39
- };
40
- export const FRUIT_NINJA_COLORS = {
41
- BACKGROUND: '#87CEEB',
42
- // Sky blue
43
- SCORE_BOARD: '#4169E1',
44
- SLICE_TRAIL: '#FFD700',
45
- PARTICLE_COLORS: ['#FF6B6B', '#4ECDC4', '#45B7D1', '#96CEB4', '#FFEAA7', '#DDA0DD'],
46
- PARTICLE_GLOW: 'rgba(255,255,255,0.9)',
47
- COMBO_TEXT: '#FF4757',
48
- LIVES_COLOR: '#FF6B6B',
49
- SCORE: '#FFFFFF',
50
- UI: '#FF6347',
51
- BUTTON_ACTIVE: '#FF7F50',
52
- BUTTON_INACTIVE: '#FFA07A',
53
- TEXT_PRIMARY: '#FFFFFF',
54
- TEXT_SECONDARY: '#F0F8FF',
55
- WHITE: '#FFFFFF',
56
- START_BUTTON: '#4CAF50',
57
- GAME_OVER_OVERLAY: 'rgba(0, 0, 0, 0.85)'
58
- };
59
-
60
- // Fruit types and their properties
61
- export const FRUIT_TYPES = [{
62
- emoji: '🍎',
63
- points: 10,
64
- name: 'apple'
65
- }, {
66
- emoji: '🍊',
67
- points: 10,
68
- name: 'orange'
69
- }, {
70
- emoji: '🍌',
71
- points: 15,
72
- name: 'banana'
73
- }, {
74
- emoji: '🍇',
75
- points: 20,
76
- name: 'grapes'
77
- }, {
78
- emoji: '🥝',
79
- points: 25,
80
- name: 'kiwi'
81
- }, {
82
- emoji: '🍓',
83
- points: 15,
84
- name: 'strawberry'
85
- }, {
86
- emoji: '🥭',
87
- points: 30,
88
- name: 'mango'
89
- }, {
90
- emoji: '🍑',
91
- points: 25,
92
- name: 'cherry'
93
- }, {
94
- emoji: '🍒',
95
- points: 35,
96
- name: 'cherries'
97
- }, {
98
- emoji: '🥥',
99
- points: 40,
100
- name: 'coconut'
101
- }];
102
- export const FRUIT_SPECIAL_ITEMS = [{
103
- emoji: '💣',
104
- points: -50,
105
- name: 'bomb',
106
- isBomb: true
107
- }, {
108
- emoji: '⭐',
109
- points: 50,
110
- name: 'star',
111
- isBonus: true
112
- }, {
113
- emoji: '❄️',
114
- points: 0,
115
- name: 'freeze',
116
- isFreeze: true
117
- }];
118
-
119
- // Fruit Ninja Game Theme - Matches scoreboard forest green
120
- export const FRUIT_NINJA_THEME = {
121
- backgroundColor: '#87CEEB',
122
- // Sky blue background
123
- headerBackgroundColor: 'rgba(34, 139, 34, 0.9)',
124
- // Forest green header to match scoreboard
125
- headerTextColor: '#ffffff',
126
- sectionBackgroundColor: 'rgba(34, 139, 34, 0.3)',
127
- // Match scoreboard transparency
128
- sectionTitleColor: '#ffffff',
129
- // White text on green sections
130
- buttonSelectedColor: '#166534',
131
- // Darker green for better contrast
132
- buttonUnselectedColor: 'rgba(255, 255, 255, 0.3)',
133
- buttonSelectedTextColor: '#ffffff',
134
- buttonUnselectedTextColor: '#1f2937',
135
- switchTrackColorFalse: 'rgba(34, 139, 34, 0.5)',
136
- switchTrackColorTrue: '#166534',
137
- // Darker green for better contrast
138
- switchThumbColor: '#ffffff',
139
- infoTextColor: '#1f2937' // Dark text for readability
140
- };
141
-
142
- // Fruit Ninja Difficulty Descriptions
143
- export const FRUIT_NINJA_DIFFICULTY_DESCRIPTIONS = {
144
- easy: 'Fruits spawn slower, more forgiving',
145
- medium: 'Balanced gameplay and fruit speed',
146
- hard: 'Fast fruits, quick reflexes needed!'
147
- };
148
- //# sourceMappingURL=FruitNinjaConstants.js.map
1
+ "use strict";export const FRUIT_NINJA_GAME_CONFIG ={GAME_DURATION:60,MAX_LIVES:3,FRUIT_SPAWN_INTERVAL:1500,FRUIT_FALL_SPEED:2,GRAVITY:0.12,INITIAL_VELOCITY_Y:-10,INITIAL_VELOCITY_X_RANGE:1.5,FRUIT_SIZE:60,SLICE_TRAIL_LENGTH:10,SLICE_TRAIL_WIDTH:8,COMBO_TIMEOUT:2000,PARTICLE_COUNT:6,PARTICLE_LIFETIME:1000};export const FRUIT_NINJA_ANIMATION_CONFIG ={FRUIT_SPRING:{damping:15,stiffness:200},SLICE_SPRING:{damping:20,stiffness:300},PARTICLE_SPRING:{damping:25,stiffness:400}};export const FRUIT_NINJA_COLORS ={BACKGROUND:'#87CEEB',SCORE_BOARD:'#4169E1',SLICE_TRAIL:'#FFD700',PARTICLE_COLORS:['#FF6B6B','#4ECDC4','#45B7D1','#96CEB4','#FFEAA7','#DDA0DD'],PARTICLE_GLOW:'rgba(255,255,255,0.9)',COMBO_TEXT:'#FF4757',LIVES_COLOR:'#FF6B6B',SCORE:'#FFFFFF',UI:'#FF6347',BUTTON_ACTIVE:'#FF7F50',BUTTON_INACTIVE:'#FFA07A',TEXT_PRIMARY:'#FFFFFF',TEXT_SECONDARY:'#F0F8FF',WHITE:'#FFFFFF',START_BUTTON:'#4CAF50',GAME_OVER_OVERLAY:'rgba(0,0,0,0.85)'};export const FRUIT_TYPES = [{emoji:'🍎',points:10,name:'apple'},{emoji:'🍊',points:10,name:'orange'},{emoji:'🍌',points:15,name:'banana'},{emoji:'🍇',points:20,name:'grapes'},{emoji:'🥝',points:25,name:'kiwi'},{emoji:'🍓',points:15,name:'strawberry'},{emoji:'🥭',points:30,name:'mango'},{emoji:'🍑',points:25,name:'cherry'},{emoji:'🍒',points:35,name:'cherries'},{emoji:'🥥',points:40,name:'coconut'}];export const FRUIT_SPECIAL_ITEMS = [{emoji:'💣',points:-50,name:'bomb',isBomb:true},{emoji:'⭐',points:50,name:'star',isBonus:true},{emoji:'❄️',points:0,name:'freeze',isFreeze:true}];export const FRUIT_NINJA_THEME ={backgroundColor:'rgba(0,0,0,0.7)',headerBackgroundColor:'#10b981',headerTextColor:'#ffffff',sectionBackgroundColor:'rgba(16,185,129,0.15)',sectionTitleColor:'#10b981',buttonSelectedColor:'#10b981',buttonUnselectedColor:'rgba(255,255,255,0.2)',buttonSelectedTextColor:'#ffffff',buttonUnselectedTextColor:'rgba(255,255,255,0.7)',switchTrackColorFalse:'rgba(16,185,129,0.3)',switchTrackColorTrue:'#10b981',switchThumbColor:'#ffffff',infoTextColor:'rgba(255,255,255,0.9)'};export const FRUIT_NINJA_DIFFICULTY_DESCRIPTIONS ={easy:'Fruits spawn slower,more forgiving',medium:'Balanced gameplay and fruit speed',hard:'Fast fruits,quick reflexes needed!'};
@@ -1 +1 @@
1
- {"version":3,"names":["FRUIT_NINJA_GAME_CONFIG","GAME_DURATION","MAX_LIVES","FRUIT_SPAWN_INTERVAL","FRUIT_FALL_SPEED","GRAVITY","INITIAL_VELOCITY_Y","INITIAL_VELOCITY_X_RANGE","FRUIT_SIZE","SLICE_TRAIL_LENGTH","SLICE_TRAIL_WIDTH","COMBO_TIMEOUT","PARTICLE_COUNT","PARTICLE_LIFETIME","FRUIT_NINJA_ANIMATION_CONFIG","FRUIT_SPRING","damping","stiffness","SLICE_SPRING","PARTICLE_SPRING","FRUIT_NINJA_COLORS","BACKGROUND","SCORE_BOARD","SLICE_TRAIL","PARTICLE_COLORS","PARTICLE_GLOW","COMBO_TEXT","LIVES_COLOR","SCORE","UI","BUTTON_ACTIVE","BUTTON_INACTIVE","TEXT_PRIMARY","TEXT_SECONDARY","WHITE","START_BUTTON","GAME_OVER_OVERLAY","FRUIT_TYPES","emoji","points","name","FRUIT_SPECIAL_ITEMS","isBomb","isBonus","isFreeze","FRUIT_NINJA_THEME","backgroundColor","headerBackgroundColor","headerTextColor","sectionBackgroundColor","sectionTitleColor","buttonSelectedColor","buttonUnselectedColor","buttonSelectedTextColor","buttonUnselectedTextColor","switchTrackColorFalse","switchTrackColorTrue","switchThumbColor","infoTextColor","FRUIT_NINJA_DIFFICULTY_DESCRIPTIONS","easy","medium","hard"],"sourceRoot":"../../../../src","sources":["games/fruit-ninja/FruitNinjaConstants.ts"],"mappings":";;AAEA;AACA,OAAO,MAAMA,uBAAuB,GAAG;EACrCC,aAAa,EAAE,EAAE;EAAE;EACnBC,SAAS,EAAE,CAAC;EACZC,oBAAoB,EAAE,IAAI;EAAE;EAC5BC,gBAAgB,EAAE,CAAC;EAAE;EACrBC,OAAO,EAAE,IAAI;EAAE;EACfC,kBAAkB,EAAE,CAAC,EAAE;EAAE;EACzBC,wBAAwB,EAAE,GAAG;EAAE;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,iBAAiB,EAAE,SAAS;EAAE;EAC9BC,mBAAmB,EAAE,SAAS;EAAE;EAChCC,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,mCAAmC,GAAG;EACjDC,IAAI,EAAE,qCAAqC;EAC3CC,MAAM,EAAE,mCAAmC;EAC3CC,IAAI,EAAE;AACR,CAAU","ignoreList":[]}
1
+ {"version":3,"names":["FRUIT_NINJA_GAME_CONFIG","GAME_DURATION","MAX_LIVES","FRUIT_SPAWN_INTERVAL","FRUIT_FALL_SPEED","GRAVITY","INITIAL_VELOCITY_Y","INITIAL_VELOCITY_X_RANGE","FRUIT_SIZE","SLICE_TRAIL_LENGTH","SLICE_TRAIL_WIDTH","COMBO_TIMEOUT","PARTICLE_COUNT","PARTICLE_LIFETIME","FRUIT_NINJA_ANIMATION_CONFIG","FRUIT_SPRING","damping","stiffness","SLICE_SPRING","PARTICLE_SPRING","FRUIT_NINJA_COLORS","BACKGROUND","SCORE_BOARD","SLICE_TRAIL","PARTICLE_COLORS","PARTICLE_GLOW","COMBO_TEXT","LIVES_COLOR","SCORE","UI","BUTTON_ACTIVE","BUTTON_INACTIVE","TEXT_PRIMARY","TEXT_SECONDARY","WHITE","START_BUTTON","GAME_OVER_OVERLAY","FRUIT_TYPES","emoji","points","name","FRUIT_SPECIAL_ITEMS","isBomb","isBonus","isFreeze","FRUIT_NINJA_THEME","backgroundColor","headerBackgroundColor","headerTextColor","sectionBackgroundColor","sectionTitleColor","buttonSelectedColor","buttonUnselectedColor","buttonSelectedTextColor","buttonUnselectedTextColor","switchTrackColorFalse","switchTrackColorTrue","switchThumbColor","infoTextColor","FRUIT_NINJA_DIFFICULTY_D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