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,174 +1 @@
1
- "use strict";
2
-
3
- import React, { useMemo } from 'react';
4
- import { View, StyleSheet, Dimensions } from 'react-native';
5
- import Animated, { useAnimatedStyle, withSpring, useSharedValue, withSequence } from 'react-native-reanimated';
6
- import { NumbersTile } from "./NumbersTile.js";
7
- import { useTiles, useGridSize, useEmptyPosition, useSlidingNumbersStore } from "../SlidingNumbersStore.js";
8
- import { SLIDING_NUMBERS_GAME_CONFIG, SLIDING_NUMBERS_ANIMATION_CONFIG } from "../SlidingNumbersConstants.js";
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
- export const NumbersGrid = /*#__PURE__*/React.memo(({
11
- difficulty
12
- }) => {
13
- const tiles = useTiles();
14
- const gridSize = useGridSize();
15
- const emptyPosition = useEmptyPosition();
16
- const isPlaying = useSlidingNumbersStore(state => state.isPlaying);
17
- const isCompleted = useSlidingNumbersStore(state => state.isCompleted);
18
- const moveTile = useSlidingNumbersStore(state => state.moveTile);
19
- const checkCompletion = useSlidingNumbersStore(state => state.checkCompletion);
20
- const completionScale = useSharedValue(1);
21
-
22
- // Calculate grid dimensions
23
- const gridDimensions = useMemo(() => {
24
- const gap = SLIDING_NUMBERS_GAME_CONFIG.TILE_GAP;
25
- const padding = (gap + 8) * 2; // padding from grid container
26
-
27
- // Calculate available space for the grid content
28
- const {
29
- width: screenWidth
30
- } = Dimensions.get('window');
31
- const maxAvailableWidth = screenWidth - padding - 40; // Leave margin for screen edges
32
-
33
- // Calculate optimal tile size based on grid size
34
- const availableForTiles = maxAvailableWidth - gap * (gridSize - 1);
35
- const optimalTileSize = Math.floor(availableForTiles / gridSize);
36
-
37
- // Ensure minimum tile size for usability
38
- const minTileSize = 45;
39
- const maxTileSize = 80;
40
- const tileSize = Math.max(minTileSize, Math.min(maxTileSize, optimalTileSize));
41
-
42
- // Calculate actual content size: tiles + gaps between them
43
- const tilesWidth = tileSize * gridSize;
44
- const gapsWidth = gap * (gridSize - 1);
45
- const contentSize = tilesWidth + gapsWidth;
46
- const totalSize = contentSize + padding;
47
- return {
48
- width: totalSize,
49
- height: totalSize,
50
- contentWidth: contentSize,
51
- contentHeight: contentSize,
52
- tileSize,
53
- gap
54
- };
55
- }, [gridSize]);
56
-
57
- // Create grid layout
58
- const gridLayout = useMemo(() => {
59
- const layout = [];
60
-
61
- // Initialize empty grid
62
- for (let row = 0; row < gridSize; row++) {
63
- layout[row] = [];
64
- for (let col = 0; col < gridSize; col++) {
65
- const rowArray = layout[row];
66
- if (rowArray) {
67
- rowArray[col] = null;
68
- }
69
- }
70
- }
71
-
72
- // Place tiles in their current positions
73
- tiles.forEach(tile => {
74
- const {
75
- row,
76
- col
77
- } = tile.position;
78
- if (row >= 0 && row < gridSize && col >= 0 && col < gridSize && layout[row]) {
79
- layout[row][col] = tile;
80
- }
81
- });
82
- return layout;
83
- }, [tiles, gridSize]);
84
-
85
- // Memoized tile press handler with useCallback
86
- const handleTilePress = React.useCallback(tileId => {
87
- if (!isPlaying || isCompleted) return;
88
- const success = moveTile(tileId);
89
- if (success) {
90
- // Check completion after successful move
91
- checkCompletion(difficulty);
92
- }
93
- }, [isPlaying, isCompleted, moveTile, checkCompletion, difficulty]);
94
-
95
- // Memoized tile movability checker with useCallback
96
- const isTileMovable = React.useCallback(tile => {
97
- if (!tile || tile.value === 0 || !isPlaying || isCompleted) return false;
98
- const emptyPos = emptyPosition;
99
- const rowDiff = Math.abs(tile.position.row - emptyPos.row);
100
- const colDiff = Math.abs(tile.position.col - emptyPos.col);
101
- return rowDiff === 1 && colDiff === 0 || rowDiff === 0 && colDiff === 1;
102
- }, [emptyPosition, isPlaying, isCompleted]);
103
-
104
- // Animated style for completion celebration
105
- const animatedGridStyle = useAnimatedStyle(() => ({
106
- transform: [{
107
- scale: completionScale.value
108
- }]
109
- }));
110
-
111
- // Trigger completion animation
112
- React.useEffect(() => {
113
- if (isCompleted) {
114
- completionScale.value = withSequence(withSpring(1.1, SLIDING_NUMBERS_ANIMATION_CONFIG.COMPLETION_CELEBRATION), withSpring(1, SLIDING_NUMBERS_ANIMATION_CONFIG.COMPLETION_CELEBRATION));
115
- }
116
- }, [isCompleted]);
117
-
118
- // Memoize grid container style
119
- const gridContainerStyle = useMemo(() => [styles.gridContainer, {
120
- width: gridDimensions.width,
121
- height: gridDimensions.height
122
- }, animatedGridStyle], [gridDimensions.width, gridDimensions.height, animatedGridStyle]);
123
-
124
- // Memoize tile slot style factory
125
- const getTileSlotStyle = React.useCallback(tileSize => [styles.tileSlot, {
126
- width: tileSize,
127
- height: tileSize
128
- }], []);
129
- return /*#__PURE__*/_jsx(Animated.View, {
130
- style: gridContainerStyle,
131
- children: gridLayout.map((row, rowIndex) => /*#__PURE__*/_jsx(View, {
132
- style: styles.row,
133
- children: row.map((tile, colIndex) => /*#__PURE__*/_jsx(View, {
134
- style: getTileSlotStyle(gridDimensions.tileSize),
135
- children: tile && tile.value !== 0 && /*#__PURE__*/_jsx(NumbersTile, {
136
- tile: tile,
137
- onPress: handleTilePress,
138
- isMovable: isTileMovable(tile),
139
- tileSize: gridDimensions.tileSize
140
- })
141
- }, `${rowIndex}-${colIndex}`))
142
- }, rowIndex))
143
- });
144
- });
145
- const styles = StyleSheet.create({
146
- gridContainer: {
147
- backgroundColor: '#FFFFFF',
148
- borderRadius: 20,
149
- padding: SLIDING_NUMBERS_GAME_CONFIG.TILE_GAP + 8,
150
- // Clean shadow like the physical puzzle frame
151
- shadowColor: '#000',
152
- shadowOffset: {
153
- width: 0,
154
- height: 4
155
- },
156
- shadowOpacity: 0.1,
157
- shadowRadius: 8,
158
- elevation: 8,
159
- // Ensure the container fits its content properly
160
- alignSelf: 'center'
161
- },
162
- row: {
163
- flexDirection: 'row',
164
- justifyContent: 'center',
165
- alignItems: 'center'
166
- },
167
- tileSlot: {
168
- justifyContent: 'center',
169
- alignItems: 'center',
170
- margin: SLIDING_NUMBERS_GAME_CONFIG.TILE_GAP / 2
171
- }
172
- });
173
- NumbersGrid.displayName = 'NumbersGrid';
174
- //# sourceMappingURL=NumbersGrid.js.map
1
+ "use strict";import React,{useMemo}from 'react';import{View,StyleSheet,Dimensions}from 'react-native';import Animated,{useAnimatedStyle,withSpring,useSharedValue,withSequence}from 'react-native-reanimated';import{NumbersTile}from "./NumbersTile.js";import{useTiles,useGridSize,useEmptyPosition,useSlidingNumbersStore}from "../SlidingNumbersStore.js";import{SLIDING_NUMBERS_GAME_CONFIG,SLIDING_NUMBERS_ANIMATION_CONFIG}from "../SlidingNumbersConstants.js";import{jsx as _jsx}from "react/jsx-runtime";export const NumbersGrid = React.memo(({difficulty})=>{const tiles = useTiles();const gridSize = useGridSize();const emptyPosition = useEmptyPosition();const isPlaying = useSlidingNumbersStore(state => state.isPlaying);const isCompleted = useSlidingNumbersStore(state => state.isCompleted);const moveTile = useSlidingNumbersStore(state => state.moveTile);const checkCompletion = useSlidingNumbersStore(state => state.checkCompletion);const completionScale = useSharedValue(1);const gridDimensions = useMemo(()=>{const gap = SLIDING_NUMBERS_GAME_CONFIG.TILE_GAP;const padding =(gap + 8)* 2;const{width:screenWidth}= Dimensions.get('window');const maxAvailableWidth = screenWidth - padding - 40;const availableForTiles = maxAvailableWidth - gap *(gridSize - 1);const optimalTileSize = Math.floor(availableForTiles / gridSize);const minTileSize = 45;const maxTileSize = 80;const tileSize = Math.max(minTileSize,Math.min(maxTileSize,optimalTileSize));const tilesWidth = tileSize * gridSize;const gapsWidth = gap *(gridSize - 1);const contentSize = tilesWidth + gapsWidth;const totalSize = contentSize + padding;return{width:totalSize,height:totalSize,contentWidth:contentSize,contentHeight:contentSize,tileSize,gap};},[gridSize]);const gridLayout = useMemo(()=>{const layout = [];for(let row = 0;row < gridSize;row++){layout[row] = [];for(let col = 0;col < gridSize;col++){const rowArray = layout[row];if(rowArray){rowArray[col] = null;}}}tiles.forEach(tile =>{const{row,col}= tile.position;if(row >= 0 && row < gridSize && col >= 0 && col < gridSize && layout[row]){layout[row][col] = tile;}});return layout;},[tiles,gridSize]);const handleTilePress = React.useCallback(tileId =>{if(!isPlaying || isCompleted)return;const success = moveTile(tileId);if(success){checkCompletion(difficulty);}},[isPlaying,isCompleted,moveTile,checkCompletion,difficulty]);const isTileMovable = React.useCallback(tile =>{if(!tile || tile.value === 0 || !isPlaying || isCompleted)return false;const emptyPos = emptyPosition;const rowDiff = Math.abs(tile.position.row - emptyPos.row);const colDiff = Math.abs(tile.position.col - emptyPos.col);return rowDiff === 1 && colDiff === 0 || rowDiff === 0 && colDiff === 1;},[emptyPosition,isPlaying,isCompleted]);const animatedGridStyle = useAnimatedStyle(()=>({transform:[{scale:completionScale.value}]}));React.useEffect(()=>{if(isCompleted){completionScale.value = withSequence(withSpring(1.1,SLIDING_NUMBERS_ANIMATION_CONFIG.COMPLETION_CELEBRATION),withSpring(1,SLIDING_NUMBERS_ANIMATION_CONFIG.COMPLETION_CELEBRATION));}},[isCompleted]);const gridContainerStyle = useMemo(()=> [styles.gridContainer,{width:gridDimensions.width,height:gridDimensions.height},animatedGridStyle],[gridDimensions.width,gridDimensions.height,animatedGridStyle]);const getTileSlotStyle = React.useCallback(tileSize => [styles.tileSlot,{width:tileSize,height:tileSize}],[]);return _jsx(Animated.View,{style:gridContainerStyle,children:gridLayout.map((row,rowIndex)=> _jsx(View,{style:styles.row,children:row.map((tile,colIndex)=> _jsx(View,{style:getTileSlotStyle(gridDimensions.tileSize),children:tile && tile.value !== 0 && _jsx(NumbersTile,{tile:tile,onPress:handleTilePress,isMovable:isTileMovable(tile),tileSize:gridDimensions.tileSize})},`${rowIndex}-${colIndex}`))},rowIndex))});});const styles = StyleSheet.create({gridContainer:{backgroundColor:'#FFFFFF',borderRadius:20,padding:SLIDING_NUMBERS_GAME_CONFIG.TILE_GAP + 8,shadowColor:'#000',shadowOffset:{width:0,height:4},shadowOpacity:0.1,shadowRadius:8,elevation:8,alignSelf:'center'},row:{flexDirection:'row',justifyContent:'center',alignItems:'center'},tileSlot:{justifyContent:'center',alignItems:'center',margin:SLIDING_NUMBERS_GAME_CONFIG.TILE_GAP / 2}});NumbersGrid.displayName = 'NumbersGrid';
@@ -1,116 +1 @@
1
- "use strict";
2
-
3
- import React from 'react';
4
- import { StyleSheet, TouchableOpacity, Text } from 'react-native';
5
- import Animated, { useSharedValue, useAnimatedStyle, withSpring, runOnJS } from 'react-native-reanimated';
6
- import { SLIDING_NUMBERS_COLORS, SLIDING_NUMBERS_GAME_CONFIG, SLIDING_NUMBERS_ANIMATION_CONFIG, NUMBER_WORDS } from "../SlidingNumbersConstants.js";
7
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
- const AnimatedTouchableOpacity = Animated.createAnimatedComponent(TouchableOpacity);
9
- export const NumbersTile = /*#__PURE__*/React.memo(({
10
- tile,
11
- onPress,
12
- isMovable,
13
- tileSize
14
- }) => {
15
- const scale = useSharedValue(1);
16
- const opacity = useSharedValue(tile.value === 0 ? 0 : 1);
17
- const handlePress = React.useCallback(() => {
18
- if (tile.value !== 0 && isMovable) {
19
- // Animate press feedback
20
- scale.value = withSpring(0.95, SLIDING_NUMBERS_ANIMATION_CONFIG.TILE_PRESS, () => {
21
- scale.value = withSpring(1, SLIDING_NUMBERS_ANIMATION_CONFIG.TILE_PRESS);
22
- });
23
- runOnJS(onPress)(tile.id);
24
- }
25
- }, [tile.value, tile.id, isMovable, onPress, scale]);
26
- const animatedStyle = useAnimatedStyle(() => ({
27
- transform: [{
28
- scale: scale.value
29
- }],
30
- opacity: opacity.value
31
- }));
32
-
33
- // Don't render empty tile
34
- if (tile.value === 0) {
35
- return null;
36
- }
37
-
38
- // Memoized tile color and word
39
- const {
40
- tileColor,
41
- numberWord
42
- } = React.useMemo(() => {
43
- const colorIndex = (tile.value - 1) % SLIDING_NUMBERS_COLORS.TILE_COLORS.length;
44
- const color = SLIDING_NUMBERS_COLORS.TILE_COLORS[colorIndex] || SLIDING_NUMBERS_COLORS.TILE_COLORS[0];
45
- const word = NUMBER_WORDS[tile.value] || '';
46
- return {
47
- tileColor: color,
48
- numberWord: word
49
- };
50
- }, [tile.value]);
51
-
52
- // Memoized font sizes
53
- const {
54
- numberFontSize,
55
- wordFontSize
56
- } = React.useMemo(() => ({
57
- numberFontSize: Math.max(16, tileSize * 0.4),
58
- wordFontSize: Math.max(8, tileSize * 0.15)
59
- }), [tileSize]);
60
- return /*#__PURE__*/_jsxs(AnimatedTouchableOpacity, {
61
- style: [styles.tile, {
62
- width: tileSize,
63
- height: tileSize,
64
- backgroundColor: tileColor,
65
- borderColor: tile.isCorrect ? 'transparent' : '#FF4444',
66
- borderWidth: tile.isCorrect ? 0 : 2
67
- }, animatedStyle],
68
- onPress: handlePress,
69
- activeOpacity: 0.8,
70
- disabled: !isMovable || tile.value === 0,
71
- children: [/*#__PURE__*/_jsx(Text, {
72
- style: [styles.number, {
73
- fontSize: numberFontSize
74
- }],
75
- children: tile.value
76
- }), /*#__PURE__*/_jsx(Text, {
77
- style: [styles.word, {
78
- fontSize: wordFontSize
79
- }],
80
- children: numberWord
81
- })]
82
- });
83
- }, (prevProps, nextProps) => {
84
- // Custom comparison for better memoization
85
- return prevProps.tile.id === nextProps.tile.id && prevProps.tile.value === nextProps.tile.value && prevProps.tile.isCorrect === nextProps.tile.isCorrect && prevProps.tile.position.row === nextProps.tile.position.row && prevProps.tile.position.col === nextProps.tile.position.col && prevProps.isMovable === nextProps.isMovable && prevProps.tileSize === nextProps.tileSize;
86
- });
87
- const styles = StyleSheet.create({
88
- tile: {
89
- margin: SLIDING_NUMBERS_GAME_CONFIG.TILE_GAP / 2,
90
- justifyContent: 'center',
91
- alignItems: 'center',
92
- borderRadius: 16,
93
- // Soft shadow like in the image
94
- shadowColor: '#000',
95
- shadowOffset: {
96
- width: 0,
97
- height: 3
98
- },
99
- shadowOpacity: 0.15,
100
- shadowRadius: 6,
101
- elevation: 6
102
- },
103
- number: {
104
- fontWeight: 'bold',
105
- color: '#000000',
106
- textAlign: 'center',
107
- marginBottom: 2
108
- },
109
- word: {
110
- fontWeight: 'normal',
111
- color: '#000000',
112
- textAlign: 'center'
113
- }
114
- });
115
- NumbersTile.displayName = 'NumbersTile';
116
- //# sourceMappingURL=NumbersTile.js.map
1
+ "use strict";import React from 'react';import{StyleSheet,TouchableOpacity,Text}from 'react-native';import Animated,{useSharedValue,useAnimatedStyle,withSpring,runOnJS}from 'react-native-reanimated';import{SLIDING_NUMBERS_COLORS,SLIDING_NUMBERS_GAME_CONFIG,SLIDING_NUMBERS_ANIMATION_CONFIG,NUMBER_WORDS}from "../SlidingNumbersConstants.js";import{jsx as _jsx,jsxs as _jsxs}from "react/jsx-runtime";const AnimatedTouchableOpacity = Animated.createAnimatedComponent(TouchableOpacity);export const NumbersTile = React.memo(({tile,onPress,isMovable,tileSize})=>{const scale = useSharedValue(1);const opacity = useSharedValue(tile.value === 0 ? 0:1);const handlePress = React.useCallback(()=>{if(tile.value !== 0 && isMovable){scale.value = withSpring(0.95,SLIDING_NUMBERS_ANIMATION_CONFIG.TILE_PRESS,()=>{scale.value = withSpring(1,SLIDING_NUMBERS_ANIMATION_CONFIG.TILE_PRESS);});runOnJS(onPress)(tile.id);}},[tile.value,tile.id,isMovable,onPress,scale]);const animatedStyle = useAnimatedStyle(()=>({transform:[{scale:scale.value}],opacity:opacity.value}));if(tile.value === 0){return null;}const{tileColor,numberWord}= React.useMemo(()=>{const colorIndex =(tile.value - 1)% SLIDING_NUMBERS_COLORS.TILE_COLORS.length;const color = SLIDING_NUMBERS_COLORS.TILE_COLORS[colorIndex] || SLIDING_NUMBERS_COLORS.TILE_COLORS[0];const word = NUMBER_WORDS[tile.value] || '';return{tileColor:color,numberWord:word};},[tile.value]);const{numberFontSize,wordFontSize}= React.useMemo(()=>({numberFontSize:Math.max(16,tileSize * 0.4),wordFontSize:Math.max(8,tileSize * 0.15)}),[tileSize]);return _jsxs(AnimatedTouchableOpacity,{style:[styles.tile,{width:tileSize,height:tileSize,backgroundColor:tileColor,borderColor:tile.isCorrect ? 'transparent':'#FF4444',borderWidth:tile.isCorrect ? 0:2},animatedStyle],onPress:handlePress,activeOpacity:0.8,disabled:!isMovable || tile.value === 0,children:[_jsx(Text,{style:[styles.number,{fontSize:numberFontSize}],children:tile.value}),_jsx(Text,{style:[styles.word,{fontSize:wordFontSize}],children:numberWord})]});},(prevProps,nextProps)=>{return prevProps.tile.id === nextProps.tile.id && prevProps.tile.value === nextProps.tile.value && prevProps.tile.isCorrect === nextProps.tile.isCorrect && prevProps.tile.position.row === nextProps.tile.position.row && prevProps.tile.position.col === nextProps.tile.position.col && prevProps.isMovable === nextProps.isMovable && prevProps.tileSize === nextProps.tileSize;});const styles = StyleSheet.create({tile:{margin:SLIDING_NUMBERS_GAME_CONFIG.TILE_GAP / 2,justifyContent:'center',alignItems:'center',borderRadius:16,shadowColor:'#000',shadowOffset:{width:0,height:3},shadowOpacity:0.15,shadowRadius:6,elevation:6},number:{fontWeight:'bold',color:'#000000',textAlign:'center',marginBottom:2},word:{fontWeight:'normal',color:'#000000',textAlign:'center'}});NumbersTile.displayName = 'NumbersTile';
@@ -1,64 +1 @@
1
- "use strict";
2
-
3
- import React, { useMemo } from 'react';
4
- import { View, Text, StyleSheet } from 'react-native';
5
- import { useTimeElapsed } from "../SlidingNumbersStore.js";
6
- import { SlidingNumbersService } from "../SlidingNumbersService.js";
7
- import { ScoreBoardContainer } from "../../../helpers/index.js";
8
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
- export const ScoreBoard = /*#__PURE__*/React.memo(({
10
- offset = 0
11
- }) => {
12
- const gameService = useMemo(() => new SlidingNumbersService(), []);
13
- const timeElapsed = useTimeElapsed();
14
- const formattedTime = useMemo(() => gameService.formatTime(timeElapsed), [gameService, timeElapsed]);
15
- return /*#__PURE__*/_jsx(ScoreBoardContainer, {
16
- offset: offset,
17
- backgroundColor: "rgba(245, 245, 220, 0.6)",
18
- borderColor: "rgba(255, 255, 255, 0.3)",
19
- children: /*#__PURE__*/_jsx(View, {
20
- style: styles.scoreBoard,
21
- children: /*#__PURE__*/_jsxs(View, {
22
- style: styles.scoreSection,
23
- children: [/*#__PURE__*/_jsx(Text, {
24
- style: styles.scoreLabel,
25
- children: "Time Elapsed"
26
- }), /*#__PURE__*/_jsx(Text, {
27
- style: [styles.timeValue, {
28
- color: '#3b82f6'
29
- }],
30
- children: formattedTime
31
- })]
32
- })
33
- })
34
- });
35
- });
36
- const styles = StyleSheet.create({
37
- scoreBoard: {
38
- flexDirection: 'row',
39
- justifyContent: 'space-between',
40
- alignItems: 'center'
41
- },
42
- scoreSection: {
43
- alignItems: 'center',
44
- flex: 1
45
- },
46
- scoreLabel: {
47
- fontSize: 18,
48
- fontWeight: 'bold',
49
- color: '#4a5568',
50
- // Dark gray for better contrast
51
- marginBottom: 4
52
- },
53
- timeValue: {
54
- fontSize: 30,
55
- fontWeight: 'bold'
56
- },
57
- hintText: {
58
- fontSize: 18,
59
- fontWeight: '600',
60
- color: '#10b981' // Green color for motivation
61
- }
62
- });
63
- ScoreBoard.displayName = 'ScoreBoard';
64
- //# sourceMappingURL=ScoreBoard.js.map
1
+ "use strict";import React,{useMemo}from 'react';import{View,Text,StyleSheet}from 'react-native';import{useTimeElapsed}from "../SlidingNumbersStore.js";import{SlidingNumbersService}from "../SlidingNumbersService.js";import{ScoreBoardContainer}from "../../../helpers/index.js";import{jsx as _jsx,jsxs as _jsxs}from "react/jsx-runtime";export const ScoreBoard = React.memo(({offset = 0})=>{const gameService = useMemo(()=> new SlidingNumbersService(),[]);const timeElapsed = useTimeElapsed();const formattedTime = useMemo(()=> gameService.formatTime(timeElapsed),[gameService,timeElapsed]);return _jsx(ScoreBoardContainer,{offset:offset,backgroundColor:"rgba(245,245,220,0.6)",borderColor:"rgba(255,255,255,0.3)",children:_jsx(View,{style:styles.scoreBoard,children:_jsxs(View,{style:styles.scoreSection,children:[_jsx(Text,{style:styles.scoreLabel,children:"Time Elapsed"}),_jsx(Text,{style:[styles.timeValue,{color:'#3b82f6'}],children:formattedTime})]})})});});const styles = StyleSheet.create({scoreBoard:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},scoreSection:{alignItems:'center',flex:1},scoreLabel:{fontSize:16,fontWeight:'bold',color:'#4a5568',marginBottom:4},timeValue:{fontSize:25,fontWeight:'bold'},hintText:{fontSize:18,fontWeight:'600',color:'#10b981'}});ScoreBoard.displayName = 'ScoreBoard';
@@ -1,7 +1 @@
1
- "use strict";
2
-
3
- export { NumbersTile } from "./NumbersTile.js";
4
- export { NumbersGrid } from "./NumbersGrid.js";
5
- export { ScoreBoard } from "./ScoreBoard.js";
6
- export { GameBackground } from "./GameBackground.js";
7
- //# sourceMappingURL=index.js.map
1
+ "use strict";export{NumbersTile}from "./NumbersTile.js";export{NumbersGrid}from "./NumbersGrid.js";export{ScoreBoard}from "./ScoreBoard.js";export{GameBackground}from "./GameBackground.js";
@@ -1,189 +1 @@
1
- "use strict";
2
-
3
- import React from 'react';
4
- import { View, StyleSheet } from 'react-native';
5
- import { GestureHandlerRootView, Gesture, GestureDetector } from 'react-native-gesture-handler';
6
- import { runOnJS } from 'react-native-reanimated';
7
- import { GameControlButton, GameOverModal, GameSettingsModal } from "../../helpers/index.js";
8
- import { DEFAULT_GAME_SETTINGS, GAME_IDS } from "../../services/UtilsService.js";
9
- import { GameBackground, GameGrid, ScoreBoard } from "./components/index.js";
10
- import { useSnakeStore, useScore, useIsPlaying, useIsGameOver } from "./SnakeStore.js";
11
- import { SNAKE_COLORS } from "./SnakeConstants.js";
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- export const Snake = /*#__PURE__*/React.memo(({
14
- settings,
15
- onSettingsChange
16
- }) => {
17
- // Zustand store selectors for optimal re-renders
18
- const score = useScore();
19
- const isPlaying = useIsPlaying();
20
- const isGameOver = useIsGameOver();
21
-
22
- // Store actions - use stable references to prevent re-renders
23
- const startGame = useSnakeStore(state => state.startGame);
24
- const stopGame = useSnakeStore(state => state.stopGame);
25
- const resetGame = useSnakeStore(state => state.resetGame);
26
- const initializeGame = useSnakeStore(state => state.initializeGame);
27
- const updateSettings = useSnakeStore(state => state.updateSettings);
28
- const changeDirection = useSnakeStore(state => state.changeDirection);
29
-
30
- // Track previous values to prevent unnecessary updates
31
- const prevSettingsRef = React.useRef({
32
- enableSounds: true,
33
- enableHaptics: true
34
- });
35
- const prevDifficultyRef = React.useRef('easy');
36
-
37
- // Update settings when they change
38
- React.useEffect(() => {
39
- const enableSounds = settings?.enableSounds ?? true;
40
- const enableHaptics = settings?.enableHaptics ?? true;
41
-
42
- // Only update if values actually changed
43
- if (prevSettingsRef.current.enableSounds !== enableSounds || prevSettingsRef.current.enableHaptics !== enableHaptics) {
44
- prevSettingsRef.current = {
45
- enableSounds,
46
- enableHaptics
47
- };
48
- updateSettings(enableSounds, enableHaptics);
49
- }
50
- }, [updateSettings, settings?.enableSounds, settings?.enableHaptics]);
51
-
52
- // Initialize on mount and when difficulty changes
53
- React.useEffect(() => {
54
- const difficulty = settings?.difficulty || 'easy';
55
-
56
- // Only initialize if difficulty actually changed
57
- if (prevDifficultyRef.current !== difficulty) {
58
- prevDifficultyRef.current = difficulty;
59
- initializeGame(difficulty);
60
- }
61
- }, [initializeGame, settings?.difficulty]);
62
-
63
- // Game control handlers
64
- const handleStartGame = React.useCallback(() => {
65
- startGame();
66
- }, [startGame]);
67
- const handleResetGame = React.useCallback(() => {
68
- resetGame();
69
- }, [resetGame]);
70
- const handleStopGame = React.useCallback(() => {
71
- stopGame();
72
- }, [stopGame]);
73
-
74
- // Gesture handler for swipe controls with safe state updates
75
- const handleSwipe = React.useCallback(direction => {
76
- try {
77
- if (!isPlaying) return;
78
-
79
- // Use requestAnimationFrame for safer state updates
80
- requestAnimationFrame(() => {
81
- try {
82
- changeDirection(direction);
83
- } catch (error) {
84
- console.error('Direction change error:', error);
85
- }
86
- });
87
- } catch (error) {
88
- console.error('Swipe handler error:', error);
89
- }
90
- }, [isPlaying, changeDirection]);
91
-
92
- // Pan gesture for swipe detection
93
- const panGesture = React.useMemo(() => Gesture.Pan().onEnd(event => {
94
- const threshold = 30; // Minimum swipe distance
95
- const absX = Math.abs(event.translationX);
96
- const absY = Math.abs(event.translationY);
97
- if (absX > threshold || absY > threshold) {
98
- if (absX > absY) {
99
- // Horizontal swipe
100
- if (event.translationX > 0) {
101
- runOnJS(handleSwipe)('RIGHT');
102
- } else {
103
- runOnJS(handleSwipe)('LEFT');
104
- }
105
- } else {
106
- // Vertical swipe
107
- if (event.translationY > 0) {
108
- runOnJS(handleSwipe)('DOWN');
109
- } else {
110
- runOnJS(handleSwipe)('UP');
111
- }
112
- }
113
- }
114
- }), [handleSwipe]);
115
-
116
- // Memoized GameControlButton props
117
- const gameControlButtonProps = React.useMemo(() => ({
118
- isPlaying,
119
- gameOver: isGameOver,
120
- onStartGame: handleStartGame,
121
- onStopGame: handleStopGame,
122
- onResetGame: handleResetGame,
123
- startButtonText: 'Start Slithering!',
124
- startButtonSubtext: 'Swipe to move or turn.',
125
- startButtonColor: SNAKE_COLORS.BUTTON_PRIMARY,
126
- startButtonBorderColor: SNAKE_COLORS.BUTTON_SECONDARY
127
- }), [isPlaying, isGameOver, handleStartGame, handleStopGame, handleResetGame]);
128
-
129
- // Memoized GameOverModal props
130
- const gameOverModalProps = React.useMemo(() => ({
131
- isVisible: isGameOver,
132
- score,
133
- onPlayAgain: handleResetGame,
134
- buttonText: 'Play Again!',
135
- primaryColor: SNAKE_COLORS.MODAL_PRIMARY,
136
- borderColor: SNAKE_COLORS.MODAL_BORDER,
137
- buttonColor: SNAKE_COLORS.MODAL_BUTTON,
138
- buttonBorderColor: SNAKE_COLORS.MODAL_BUTTON_BORDER,
139
- scoreFormatter: s => `${s}`,
140
- additionalInfo: 'Great slithering!'
141
- }), [isGameOver, score, handleResetGame]);
142
-
143
- // Memoized GameSettingsModal props
144
- const gameSettingsModalProps = React.useMemo(() => ({
145
- gameId: GAME_IDS.SNAKE,
146
- settings: settings || DEFAULT_GAME_SETTINGS,
147
- onSettingsChange
148
- }), [settings, onSettingsChange]);
149
-
150
- // Get offset from settings
151
- const offset = settings?.offset ?? 0;
152
- return /*#__PURE__*/_jsx(GameBackground, {
153
- children: /*#__PURE__*/_jsxs(GestureHandlerRootView, {
154
- style: styles.container,
155
- children: [/*#__PURE__*/_jsx(GestureDetector, {
156
- gesture: panGesture,
157
- children: /*#__PURE__*/_jsx(View, {
158
- style: styles.container,
159
- children: /*#__PURE__*/_jsx(View, {
160
- style: [styles.gridContainer, {
161
- paddingTop: offset
162
- }],
163
- children: /*#__PURE__*/_jsx(GameGrid, {})
164
- })
165
- })
166
- }), /*#__PURE__*/_jsx(ScoreBoard, {
167
- offset: offset
168
- }), /*#__PURE__*/_jsx(GameControlButton, {
169
- ...gameControlButtonProps
170
- }), /*#__PURE__*/_jsx(GameOverModal, {
171
- ...gameOverModalProps
172
- }), /*#__PURE__*/_jsx(GameSettingsModal, {
173
- ...gameSettingsModalProps
174
- })]
175
- })
176
- });
177
- });
178
- Snake.displayName = 'Snake';
179
- const styles = StyleSheet.create({
180
- container: {
181
- flex: 1
182
- },
183
- gridContainer: {
184
- flex: 1,
185
- justifyContent: 'center',
186
- alignItems: 'center'
187
- }
188
- });
189
- //# sourceMappingURL=Snake.js.map
1
+ "use strict";import React from 'react';import{View,StyleSheet}from 'react-native';import{GestureHandlerRootView,Gesture,GestureDetector}from 'react-native-gesture-handler';import{runOnJS}from 'react-native-reanimated';import{GameControlButton,GameOverModal,GameSettingsModal}from "../../helpers/index.js";import{DEFAULT_GAME_SETTINGS,GAME_IDS}from "../../services/UtilsService.js";import{GameBackground,GameGrid,ScoreBoard}from "./components/index.js";import{useSnakeStore,useScore,useIsPlaying,useIsGameOver}from "./SnakeStore.js";import{SNAKE_COLORS}from "./SnakeConstants.js";import{jsx as _jsx,jsxs as _jsxs}from "react/jsx-runtime";export const Snake = React.memo(({settings,onSettingsChange,onEndGame})=>{const score = useScore();const isPlaying = useIsPlaying();const isGameOver = useIsGameOver();const gameReportedRef = React.useRef(false);const reportGameEnd = React.useCallback(status =>{if(onEndGame && !gameReportedRef.current){onEndGame({status,score:score.toString()});gameReportedRef.current = true;}},[onEndGame,score]);const startGame = useSnakeStore(state => state.startGame);const stopGame = useSnakeStore(state => state.stopGame);const resetGame = useSnakeStore(state => state.resetGame);const initializeGame = useSnakeStore(state => state.initializeGame);const updateSettings = useSnakeStore(state => state.updateSettings);const changeDirection = useSnakeStore(state => state.changeDirection);const prevSettingsRef = React.useRef({enableSounds:true,enableHaptics:true});const prevDifficultyRef = React.useRef('easy');React.useEffect(()=>{const enableSounds = settings?.enableSounds ?? true;const enableHaptics = settings?.enableHaptics ?? true;if(prevSettingsRef.current.enableSounds !== enableSounds || prevSettingsRef.current.enableHaptics !== enableHaptics){prevSettingsRef.current ={enableSounds,enableHaptics};updateSettings(enableSounds,enableHaptics);}},[updateSettings,settings?.enableSounds,settings?.enableHaptics]);React.useEffect(()=>{const difficulty = settings?.difficulty || 'easy';if(prevDifficultyRef.current !== difficulty){prevDifficultyRef.current = difficulty;initializeGame(difficulty);}},[initializeGame,settings?.difficulty]);React.useEffect(()=>{if(isGameOver && !gameReportedRef.current){reportGameEnd('lose');}if(!isGameOver){gameReportedRef.current = false;}},[isGameOver,reportGameEnd]);const handleStartGame = React.useCallback(()=>{gameReportedRef.current = false;startGame();},[startGame]);const handleResetGame = React.useCallback(()=>{resetGame();},[resetGame]);const handleStopGame = React.useCallback(()=>{reportGameEnd('cancel');stopGame();},[stopGame,reportGameEnd]);const handleSwipe = React.useCallback(direction =>{try{if(!isPlaying)return;requestAnimationFrame(()=>{try{changeDirection(direction);}catch(error){console.error('Direction change error:',error);}});}catch(error){console.error('Swipe handler error:',error);}},[isPlaying,changeDirection]);const panGesture = React.useMemo(()=> Gesture.Pan().onEnd(event =>{const threshold = 30;const absX = Math.abs(event.translationX);const absY = Math.abs(event.translationY);if(absX > threshold || absY > threshold){if(absX > absY){if(event.translationX > 0){runOnJS(handleSwipe)('RIGHT');}else{runOnJS(handleSwipe)('LEFT');}}else{if(event.translationY > 0){runOnJS(handleSwipe)('DOWN');}else{runOnJS(handleSwipe)('UP');}}}}),[handleSwipe]);const gameControlButtonProps = React.useMemo(()=>({isPlaying,gameOver:isGameOver,onStartGame:handleStartGame,onStopGame:handleStopGame,onResetGame:handleResetGame,startButtonText:'Start Slithering!',startButtonSubtext:'Swipe to move or turn.',startButtonColor:SNAKE_COLORS.BUTTON_PRIMARY,startButtonBorderColor:SNAKE_COLORS.BUTTON_SECONDARY}),[isPlaying,isGameOver,handleStartGame,handleStopGame,handleResetGame]);const gameOverModalProps = React.useMemo(()=>({isVisible:isGameOver,score,onPlayAgain:handleResetGame,buttonText:'Play Again!',primaryColor:"rgba(0,204,106,0.5)",borderColor:"rgba(0,204,106,0.5)",buttonColor:"#ffffff",buttonBorderColor:"#ffffff",buttonTextColor:"#00cc6a",scoreFormatter:s => `${s}`}),[isGameOver,score,handleResetGame]);const gameSettingsModalProps = React.useMemo(()=>({gameId:GAME_IDS.SNAKE,settings:settings || DEFAULT_GAME_SETTINGS,onSettingsChange}),[settings,onSettingsChange]);const offset = settings?.offset ?? 0;return _jsx(GameBackground,{children:_jsxs(GestureHandlerRootView,{style:styles.container,children:[_jsx(GestureDetector,{gesture:panGesture,children:_jsx(View,{style:styles.container,children:_jsx(View,{style:[styles.gridContainer,{paddingTop:offset}],children:_jsx(GameGrid,{})})})}),_jsx(ScoreBoard,{offset:offset}),_jsx(GameControlButton,{...gameControlButtonProps}),_jsx(GameOverModal,{...gameOverModalProps}),_jsx(GameSettingsModal,{...gameSettingsModalProps})]})});});Snake.displayName = 'Snake';const styles = StyleSheet.create({container:{flex:1},gridContainer:{flex:1,justifyContent:'center',alignItems:'center'}});
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","StyleSheet","GestureHandlerRootView","Gesture","GestureDetector","runOnJS","GameControlButton","GameOverModal","GameSettingsModal","DEFAULT_GAME_SETTINGS","GAME_IDS","GameBackground","GameGrid","ScoreBoard","useSnakeStore","useScore","useIsPlaying","useIsGameOver","SNAKE_COLORS","jsx","_jsx","jsxs","_jsxs","Snake","memo","settings","onSettingsChange","score","isPlaying","isGameOver","startGame","state","stopGame","resetGame","initializeGame","updateSettings","changeDirection","prevSettingsRef","useRef","enableSounds","enableHaptics","prevDifficultyRef","useEffect","current","difficulty","handleStartGame","useCallback","handleResetGame","handleStopGame","handleSwipe","direction","requestAnimationFrame","error","console","panGesture","useMemo","Pan","onEnd","event","threshold","absX","Math","abs","translationX","absY","translationY","gameControlButtonProps","gameOver","onStartGame","onStopGame","onResetGame","startButtonText","startButtonSubtext","startButtonColor","BUTTON_PRIMARY","startButtonBorderColor","BUTTON_SECONDARY","gameOverModalProps","isVisible","onPlayAgain","buttonText","primaryColor","MODAL_PRIMARY","borderColor","MODAL_BORDER","buttonColor","MODAL_BUTTON","buttonBorderColor","MODAL_BUTTON_BORDER","scoreFormatter","s","additionalInfo","gameSettingsModalProps","gameId","SNAKE","offset","children","style","styles","container","gesture","gridContainer","paddingTop","displayName","create","flex","justifyContent","alignItems"],"sourceRoot":"../../../../src","sources":["games/snake/Snake.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,sBAAsB,EAAEC,OAAO,EAAEC,eAAe,QAAQ,8BAA8B;AAC/F,SAASC,OAAO,QAAQ,yBAAyB;AACjD,SAASC,iBAAiB,EAAEC,aAAa,EAAEC,iBAAiB,QAAQ,wBAAe;AACnF,SAAyBC,qBAAqB,EAAEC,QAAQ,QAAQ,gCAA6B;AAC7F,SAASC,cAAc,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,uBAAc;AACnE,SACEC,aAAa,EACbC,QAAQ,EACRC,YAAY,EACZC,aAAa,QACR,iBAAc;AACrB,SAASC,YAAY,QAAwB,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGhE,OAAO,MAAMC,KAA0B,gBAAGxB,KAAK,CAACyB,IAAI,CAAC,CAAC;EAAEC,QAAQ;EAAEC;AAAiB,CAAC,KAAK;EACvF;EACA,MAAMC,KAAK,GAAGZ,QAAQ,CAAC,CAAC;EACxB,MAAMa,SAAS,GAAGZ,YAAY,CAAC,CAAC;EAChC,MAAMa,UAAU,GAAGZ,aAAa,CAAC,CAAC;;EAElC;EACA,MAAMa,SAAS,GAAGhB,aAAa,CAACiB,KAAK,IAAIA,KAAK,CAACD,SAAS,CAAC;EACzD,MAAME,QAAQ,GAAGlB,aAAa,CAACiB,KAAK,IAAIA,KAAK,CAACC,QAAQ,CAAC;EACvD,MAAMC,SAAS,GAAGnB,aAAa,CAACiB,KAAK,IAAIA,KAAK,CAACE,SAAS,CAAC;EACzD,MAAMC,cAAc,GAAG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B,CAAG,CAAC;IAAA,CAC3B;EAAC,CACX,CAAC;AAErB,CAAC,CAAC;AAEFrE,KAAK,CAACgF,WAAW,GAAG,OAAO;AAE3B,MAAML,MAAM,GAAGjG,UAAU,CAACuG,MAAM,CAAC;EAC/BL,SAAS,EAAE;IACTM,IAAI,EAAE;EACR,CAAC;EACDJ,aAAa,EAAE;IACbI,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","View","StyleSheet","GestureHandlerRootView","Gesture","GestureDetector","runOnJS","GameControlButton","GameOverModal","GameSettingsModal","DEFAULT_GAME_SETTINGS","GAME_IDS","GameBackground","GameGrid","ScoreBoard","useSnakeStore","useScore","useIsPlaying","useIsGameOver","SNAKE_COLORS","jsx","_jsx","jsxs","_jsxs","Snake","memo","settings","onSettingsChange","onEndGame","score","isPlaying","isGameOver","gameReportedRef","useRef","reportGameEnd","useCallback","status","current","toString","startGame","state","stopGame","resetGame","initializeGame","updateSettings","changeDirection","prevSettingsRef","enableSounds","enableHaptics","prevDifficultyRef","useEffect","difficulty","handleStartGame","handleResetGame","handleStopGame","handleSwipe","direction","requestAnimationFrame","error","console","panGesture","useMemo","Pan","onEnd","event","threshold","absX","Math","abs","translationX","absY","translationY","gameControlButtonProps","gameOver","onStartGame","onStopGame","onResetGame","startButtonText","startButtonSubtext","startButtonColor","BUTTON_PRIMARY","startButtonBorderColor","BUTTON_SECONDARY","gameOverModalProps","isVisible","onPlayAgain","buttonText","primaryColor","borderColor","buttonColor","buttonBorderColor","buttonTextColor","scoreFormatter","s","gameSettingsModalProps","gameId","SNAKE","offset","children","style","styles","container","gesture","gridContainer","paddingTop","displayName","create","flex","justifyContent","alignItems"],"sourceRoot":"../../../../src","sources":["games/snake/Snake.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;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