react-native-games 0.7.0 → 1.0.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 (459) hide show
  1. package/README.md +507 -84
  2. package/lib/module/games/balloon-blaster/BalloonBlaster.js +13 -21
  3. package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -1
  4. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +1 -1
  5. package/lib/module/games/balloon-blaster/components/GameArea.js +1 -1
  6. package/lib/module/games/balloon-blaster/components/GameArea.js.map +1 -1
  7. package/lib/module/games/balloon-blaster/components/GameBackground.js +24 -17
  8. package/lib/module/games/balloon-blaster/components/GameBackground.js.map +1 -1
  9. package/lib/module/games/balloon-blaster/components/ScoreBoard.js +47 -47
  10. package/lib/module/games/balloon-blaster/components/ScoreBoard.js.map +1 -1
  11. package/lib/module/games/candy-crush/CandyCrush.js +131 -0
  12. package/lib/module/games/candy-crush/CandyCrush.js.map +1 -0
  13. package/lib/module/games/candy-crush/CandyCrushConstants.js +125 -0
  14. package/lib/module/games/candy-crush/CandyCrushConstants.js.map +1 -0
  15. package/lib/module/games/candy-crush/CandyCrushService.js +370 -0
  16. package/lib/module/games/candy-crush/CandyCrushService.js.map +1 -0
  17. package/lib/module/games/candy-crush/CandyCrushStore.js +303 -0
  18. package/lib/module/games/candy-crush/CandyCrushStore.js.map +1 -0
  19. package/lib/module/games/candy-crush/components/CandyItem.js +191 -0
  20. package/lib/module/games/candy-crush/components/CandyItem.js.map +1 -0
  21. package/lib/module/games/candy-crush/components/GameBackground.js +85 -0
  22. package/lib/module/games/candy-crush/components/GameBackground.js.map +1 -0
  23. package/lib/module/games/candy-crush/components/GameGrid.js +314 -0
  24. package/lib/module/games/candy-crush/components/GameGrid.js.map +1 -0
  25. package/lib/module/games/candy-crush/components/ScoreBoard.js +79 -0
  26. package/lib/module/games/candy-crush/components/ScoreBoard.js.map +1 -0
  27. package/lib/module/games/candy-crush/components/index.js +7 -0
  28. package/lib/module/games/candy-crush/components/index.js.map +1 -0
  29. package/lib/module/games/candy-crush/index.js +6 -0
  30. package/lib/module/games/candy-crush/index.js.map +1 -0
  31. package/lib/module/games/colors-sort/ColorsSort.js +143 -0
  32. package/lib/module/games/colors-sort/ColorsSort.js.map +1 -0
  33. package/lib/module/games/colors-sort/ColorsSortConstants.js +72 -0
  34. package/lib/module/games/colors-sort/ColorsSortConstants.js.map +1 -0
  35. package/lib/module/games/colors-sort/ColorsSortService.js +255 -0
  36. package/lib/module/games/colors-sort/ColorsSortService.js.map +1 -0
  37. package/lib/module/games/colors-sort/ColorsSortStore.js +257 -0
  38. package/lib/module/games/colors-sort/ColorsSortStore.js.map +1 -0
  39. package/lib/module/games/colors-sort/components/ColorContainer.js +140 -0
  40. package/lib/module/games/colors-sort/components/ColorContainer.js.map +1 -0
  41. package/lib/module/games/colors-sort/components/GameBackground.js +135 -0
  42. package/lib/module/games/colors-sort/components/GameBackground.js.map +1 -0
  43. package/lib/module/games/colors-sort/components/ScoreBoard.js +70 -0
  44. package/lib/module/games/colors-sort/components/ScoreBoard.js.map +1 -0
  45. package/lib/module/games/colors-sort/components/index.js +6 -0
  46. package/lib/module/games/colors-sort/components/index.js.map +1 -0
  47. package/lib/module/games/dino-jump/DinoJump.js +209 -0
  48. package/lib/module/games/dino-jump/DinoJump.js.map +1 -0
  49. package/lib/module/games/dino-jump/DinoJumpConstants.js +189 -0
  50. package/lib/module/games/dino-jump/DinoJumpConstants.js.map +1 -0
  51. package/lib/module/games/dino-jump/DinoJumpService.js +270 -0
  52. package/lib/module/games/dino-jump/DinoJumpService.js.map +1 -0
  53. package/lib/module/games/dino-jump/DinoJumpStore.js +381 -0
  54. package/lib/module/games/dino-jump/DinoJumpStore.js.map +1 -0
  55. package/lib/module/games/dino-jump/components/DinoSprite.js +418 -0
  56. package/lib/module/games/dino-jump/components/DinoSprite.js.map +1 -0
  57. package/lib/module/games/dino-jump/components/GameArea.js +68 -0
  58. package/lib/module/games/dino-jump/components/GameArea.js.map +1 -0
  59. package/lib/module/games/dino-jump/components/GameBackground.js +444 -0
  60. package/lib/module/games/dino-jump/components/GameBackground.js.map +1 -0
  61. package/lib/module/games/dino-jump/components/ObstacleSprite.js +306 -0
  62. package/lib/module/games/dino-jump/components/ObstacleSprite.js.map +1 -0
  63. package/lib/module/games/dino-jump/components/ScoreBoard.js +105 -0
  64. package/lib/module/games/dino-jump/components/ScoreBoard.js.map +1 -0
  65. package/lib/module/games/dino-jump/components/StarSprite.js +45 -0
  66. package/lib/module/games/dino-jump/components/StarSprite.js.map +1 -0
  67. package/lib/module/games/dino-jump/components/index.js +9 -0
  68. package/lib/module/games/dino-jump/components/index.js.map +1 -0
  69. package/lib/module/games/flappy-bird/FlappyBird.js +126 -0
  70. package/lib/module/games/flappy-bird/FlappyBird.js.map +1 -0
  71. package/lib/module/games/flappy-bird/FlappyBirdConstants.js +90 -0
  72. package/lib/module/games/flappy-bird/FlappyBirdConstants.js.map +1 -0
  73. package/lib/module/games/flappy-bird/FlappyBirdStore.js +300 -0
  74. package/lib/module/games/flappy-bird/FlappyBirdStore.js.map +1 -0
  75. package/lib/module/games/flappy-bird/components/Bird.js +87 -0
  76. package/lib/module/games/flappy-bird/components/Bird.js.map +1 -0
  77. package/lib/module/games/flappy-bird/components/GameArea.js +87 -0
  78. package/lib/module/games/flappy-bird/components/GameArea.js.map +1 -0
  79. package/lib/module/games/flappy-bird/components/GameBackground.js +79 -0
  80. package/lib/module/games/flappy-bird/components/GameBackground.js.map +1 -0
  81. package/lib/module/games/flappy-bird/components/Pipes.js +172 -0
  82. package/lib/module/games/flappy-bird/components/Pipes.js.map +1 -0
  83. package/lib/module/games/flappy-bird/components/ScoreBoard.js +73 -0
  84. package/lib/module/games/flappy-bird/components/ScoreBoard.js.map +1 -0
  85. package/lib/module/games/flappy-bird/components/index.js +8 -0
  86. package/lib/module/games/flappy-bird/components/index.js.map +1 -0
  87. package/lib/module/games/fruit-merger/FruitMerger.js +120 -0
  88. package/lib/module/games/fruit-merger/FruitMerger.js.map +1 -0
  89. package/lib/module/games/fruit-merger/FruitMergerConstants.js +119 -0
  90. package/lib/module/games/fruit-merger/FruitMergerConstants.js.map +1 -0
  91. package/lib/module/games/fruit-merger/FruitMergerService.js +13 -0
  92. package/lib/module/games/fruit-merger/FruitMergerService.js.map +1 -0
  93. package/lib/module/games/fruit-merger/FruitMergerStore.js +315 -0
  94. package/lib/module/games/fruit-merger/FruitMergerStore.js.map +1 -0
  95. package/lib/module/games/fruit-merger/components/FruitItem.js +102 -0
  96. package/lib/module/games/fruit-merger/components/FruitItem.js.map +1 -0
  97. package/lib/module/games/fruit-merger/components/GameArea.js +103 -0
  98. package/lib/module/games/fruit-merger/components/GameArea.js.map +1 -0
  99. package/lib/module/games/fruit-merger/components/GameBackground.js +498 -0
  100. package/lib/module/games/fruit-merger/components/GameBackground.js.map +1 -0
  101. package/lib/module/games/fruit-merger/components/ScoreBoard.js +58 -0
  102. package/lib/module/games/fruit-merger/components/ScoreBoard.js.map +1 -0
  103. package/lib/module/games/fruit-merger/components/index.js +7 -0
  104. package/lib/module/games/fruit-merger/components/index.js.map +1 -0
  105. package/lib/module/games/fruit-ninja/FruitNinja.js +14 -22
  106. package/lib/module/games/fruit-ninja/FruitNinja.js.map +1 -1
  107. package/lib/module/games/fruit-ninja/FruitNinjaStore.js +1 -1
  108. package/lib/module/games/fruit-ninja/components/GameArea.js +1 -1
  109. package/lib/module/games/fruit-ninja/components/GameArea.js.map +1 -1
  110. package/lib/module/games/fruit-ninja/components/GameBackground.js +70 -45
  111. package/lib/module/games/fruit-ninja/components/GameBackground.js.map +1 -1
  112. package/lib/module/games/fruit-ninja/components/ScoreBoard.js +47 -46
  113. package/lib/module/games/fruit-ninja/components/ScoreBoard.js.map +1 -1
  114. package/lib/module/games/game-2048/Game2048.js +149 -0
  115. package/lib/module/games/game-2048/Game2048.js.map +1 -0
  116. package/lib/module/games/game-2048/Game2048Constants.js +263 -0
  117. package/lib/module/games/game-2048/Game2048Constants.js.map +1 -0
  118. package/lib/module/games/game-2048/Game2048Service.js +457 -0
  119. package/lib/module/games/game-2048/Game2048Service.js.map +1 -0
  120. package/lib/module/games/game-2048/Game2048Store.js +236 -0
  121. package/lib/module/games/game-2048/Game2048Store.js.map +1 -0
  122. package/lib/module/games/game-2048/components/GameBackground.js +247 -0
  123. package/lib/module/games/game-2048/components/GameBackground.js.map +1 -0
  124. package/lib/module/games/game-2048/components/GameGrid.js +139 -0
  125. package/lib/module/games/game-2048/components/GameGrid.js.map +1 -0
  126. package/lib/module/games/game-2048/components/GameTile.js +72 -0
  127. package/lib/module/games/game-2048/components/GameTile.js.map +1 -0
  128. package/lib/module/games/game-2048/components/ScoreBoard.js +52 -0
  129. package/lib/module/games/game-2048/components/ScoreBoard.js.map +1 -0
  130. package/lib/module/games/game-2048/components/index.js +7 -0
  131. package/lib/module/games/game-2048/components/index.js.map +1 -0
  132. package/lib/module/games/maze-runner/MazeRunner.js +51 -41
  133. package/lib/module/games/maze-runner/MazeRunner.js.map +1 -1
  134. package/lib/module/games/maze-runner/MazeRunnerService.js +19 -17
  135. package/lib/module/games/maze-runner/MazeRunnerService.js.map +1 -1
  136. package/lib/module/games/maze-runner/components/ScoreBoard.js +32 -42
  137. package/lib/module/games/maze-runner/components/ScoreBoard.js.map +1 -1
  138. package/lib/module/games/popit-fidget/PopitFidget.js +57 -66
  139. package/lib/module/games/popit-fidget/PopitFidget.js.map +1 -1
  140. package/lib/module/games/popit-fidget/PopitFidgetStore.js +6 -44
  141. package/lib/module/games/popit-fidget/PopitFidgetStore.js.map +1 -1
  142. package/lib/module/games/popit-fidget/components/ScoreBoard.js +31 -45
  143. package/lib/module/games/popit-fidget/components/ScoreBoard.js.map +1 -1
  144. package/lib/module/games/sliding-numbers/SlidingNumbers.js +159 -0
  145. package/lib/module/games/sliding-numbers/SlidingNumbers.js.map +1 -0
  146. package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +207 -0
  147. package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js.map +1 -0
  148. package/lib/module/games/sliding-numbers/SlidingNumbersService.js +248 -0
  149. package/lib/module/games/sliding-numbers/SlidingNumbersService.js.map +1 -0
  150. package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +274 -0
  151. package/lib/module/games/sliding-numbers/SlidingNumbersStore.js.map +1 -0
  152. package/lib/module/games/sliding-numbers/components/GameBackground.js +259 -0
  153. package/lib/module/games/sliding-numbers/components/GameBackground.js.map +1 -0
  154. package/lib/module/games/sliding-numbers/components/NumbersGrid.js +174 -0
  155. package/lib/module/games/sliding-numbers/components/NumbersGrid.js.map +1 -0
  156. package/lib/module/games/sliding-numbers/components/NumbersTile.js +116 -0
  157. package/lib/module/games/sliding-numbers/components/NumbersTile.js.map +1 -0
  158. package/lib/module/games/sliding-numbers/components/ScoreBoard.js +64 -0
  159. package/lib/module/games/sliding-numbers/components/ScoreBoard.js.map +1 -0
  160. package/lib/module/games/sliding-numbers/components/index.js +7 -0
  161. package/lib/module/games/sliding-numbers/components/index.js.map +1 -0
  162. package/lib/module/games/snake/Snake.js +189 -0
  163. package/lib/module/games/snake/Snake.js.map +1 -0
  164. package/lib/module/games/snake/SnakeConstants.js +138 -0
  165. package/lib/module/games/snake/SnakeConstants.js.map +1 -0
  166. package/lib/module/games/snake/SnakeService.js +148 -0
  167. package/lib/module/games/snake/SnakeService.js.map +1 -0
  168. package/lib/module/games/snake/SnakeStore.js +182 -0
  169. package/lib/module/games/snake/SnakeStore.js.map +1 -0
  170. package/lib/module/games/snake/components/GameBackground.js +221 -0
  171. package/lib/module/games/snake/components/GameBackground.js.map +1 -0
  172. package/lib/module/games/snake/components/GameGrid.js +153 -0
  173. package/lib/module/games/snake/components/GameGrid.js.map +1 -0
  174. package/lib/module/games/snake/components/ScoreBoard.js +51 -0
  175. package/lib/module/games/snake/components/ScoreBoard.js.map +1 -0
  176. package/lib/module/games/snake/components/index.js +6 -0
  177. package/lib/module/games/snake/components/index.js.map +1 -0
  178. package/lib/module/games/snake/index.js +6 -0
  179. package/lib/module/games/snake/index.js.map +1 -0
  180. package/lib/module/games/space-fighter/SpaceFighter.js +22 -26
  181. package/lib/module/games/space-fighter/SpaceFighter.js.map +1 -1
  182. package/lib/module/games/space-fighter/SpaceFighterService.js +7 -6
  183. package/lib/module/games/space-fighter/SpaceFighterService.js.map +1 -1
  184. package/lib/module/games/space-fighter/SpaceFighterStore.js +25 -11
  185. package/lib/module/games/space-fighter/SpaceFighterStore.js.map +1 -1
  186. package/lib/module/games/space-fighter/components/GameArea.js +1 -7
  187. package/lib/module/games/space-fighter/components/GameArea.js.map +1 -1
  188. package/lib/module/games/space-fighter/components/ScoreBoard.js +47 -48
  189. package/lib/module/games/space-fighter/components/ScoreBoard.js.map +1 -1
  190. package/lib/module/games/whack-a-mole/WhackAMole.js +17 -10
  191. package/lib/module/games/whack-a-mole/WhackAMole.js.map +1 -1
  192. package/lib/module/games/whack-a-mole/WhackAMoleStore.js +1 -1
  193. package/lib/module/games/whack-a-mole/components/GameBackground.js +37 -30
  194. package/lib/module/games/whack-a-mole/components/GameBackground.js.map +1 -1
  195. package/lib/module/games/whack-a-mole/components/ScoreBoard.js +32 -38
  196. package/lib/module/games/whack-a-mole/components/ScoreBoard.js.map +1 -1
  197. package/lib/module/helpers/AnimationFrame.js.map +1 -0
  198. package/lib/module/helpers/AnimationTracker.js.map +1 -0
  199. package/lib/module/helpers/ErrorHandler.js.map +1 -0
  200. package/lib/module/helpers/GameControlButton.js.map +1 -0
  201. package/lib/module/{shared/helpers → helpers}/GameOverModal.js +6 -3
  202. package/lib/module/helpers/GameOverModal.js.map +1 -0
  203. package/lib/module/{shared/helpers → helpers}/GameSettingsModal.js +5 -5
  204. package/lib/module/helpers/GameSettingsModal.js.map +1 -0
  205. package/lib/module/{shared/helpers → helpers}/ParticleBlast.js +3 -2
  206. package/lib/module/helpers/ParticleBlast.js.map +1 -0
  207. package/lib/module/helpers/ScoreBoardContainer.js +34 -0
  208. package/lib/module/helpers/ScoreBoardContainer.js.map +1 -0
  209. package/lib/module/{shared/helpers → helpers}/index.js +1 -1
  210. package/lib/module/helpers/index.js.map +1 -0
  211. package/lib/module/index.js +9 -0
  212. package/lib/module/index.js.map +1 -1
  213. package/lib/module/services/GamesConstants.js +100 -5
  214. package/lib/module/services/GamesConstants.js.map +1 -1
  215. package/lib/module/services/GamesService.js +108 -42
  216. package/lib/module/services/GamesService.js.map +1 -1
  217. package/lib/module/services/SoundsService.js +132 -1
  218. package/lib/module/services/SoundsService.js.map +1 -1
  219. package/lib/module/services/UtilsService.js +32 -0
  220. package/lib/module/services/UtilsService.js.map +1 -0
  221. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +1 -1
  222. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -1
  223. package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +1 -0
  224. package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts.map +1 -1
  225. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +5 -1
  226. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts.map +1 -1
  227. package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts +4 -0
  228. package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts.map +1 -0
  229. package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +104 -0
  230. package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts.map +1 -0
  231. package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts +40 -0
  232. package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts.map +1 -0
  233. package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts +48 -0
  234. package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts.map +1 -0
  235. package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts +13 -0
  236. package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts.map +1 -0
  237. package/lib/typescript/src/games/candy-crush/components/GameBackground.d.ts +5 -0
  238. package/lib/typescript/src/games/candy-crush/components/GameBackground.d.ts.map +1 -0
  239. package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts +3 -0
  240. package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts.map +1 -0
  241. package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts +6 -0
  242. package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts.map +1 -0
  243. package/lib/typescript/src/games/candy-crush/components/index.d.ts +5 -0
  244. package/lib/typescript/src/games/candy-crush/components/index.d.ts.map +1 -0
  245. package/lib/typescript/src/games/candy-crush/index.d.ts +4 -0
  246. package/lib/typescript/src/games/candy-crush/index.d.ts.map +1 -0
  247. package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts +4 -0
  248. package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts.map +1 -0
  249. package/lib/typescript/src/games/colors-sort/ColorsSortConstants.d.ts +54 -0
  250. package/lib/typescript/src/games/colors-sort/ColorsSortConstants.d.ts.map +1 -0
  251. package/lib/typescript/src/games/colors-sort/ColorsSortService.d.ts +66 -0
  252. package/lib/typescript/src/games/colors-sort/ColorsSortService.d.ts.map +1 -0
  253. package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts +48 -0
  254. package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts.map +1 -0
  255. package/lib/typescript/src/games/colors-sort/components/ColorContainer.d.ts +11 -0
  256. package/lib/typescript/src/games/colors-sort/components/ColorContainer.d.ts.map +1 -0
  257. package/lib/typescript/src/games/colors-sort/components/GameBackground.d.ts +7 -0
  258. package/lib/typescript/src/games/colors-sort/components/GameBackground.d.ts.map +1 -0
  259. package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts +7 -0
  260. package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts.map +1 -0
  261. package/lib/typescript/src/games/colors-sort/components/index.d.ts +4 -0
  262. package/lib/typescript/src/games/colors-sort/components/index.d.ts.map +1 -0
  263. package/lib/typescript/src/games/dino-jump/DinoJump.d.ts +4 -0
  264. package/lib/typescript/src/games/dino-jump/DinoJump.d.ts.map +1 -0
  265. package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts +97 -0
  266. package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts.map +1 -0
  267. package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts +40 -0
  268. package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts.map +1 -0
  269. package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts +103 -0
  270. package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts.map +1 -0
  271. package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts +3 -0
  272. package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts.map +1 -0
  273. package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts +8 -0
  274. package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts.map +1 -0
  275. package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts +8 -0
  276. package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts.map +1 -0
  277. package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts +3 -0
  278. package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts.map +1 -0
  279. package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts +7 -0
  280. package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts.map +1 -0
  281. package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts +3 -0
  282. package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts.map +1 -0
  283. package/lib/typescript/src/games/dino-jump/components/index.d.ts +7 -0
  284. package/lib/typescript/src/games/dino-jump/components/index.d.ts.map +1 -0
  285. package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts +4 -0
  286. package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts.map +1 -0
  287. package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts +83 -0
  288. package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts.map +1 -0
  289. package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts +53 -0
  290. package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts.map +1 -0
  291. package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts +8 -0
  292. package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts.map +1 -0
  293. package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts +8 -0
  294. package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts.map +1 -0
  295. package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts +8 -0
  296. package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts.map +1 -0
  297. package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts +9 -0
  298. package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts.map +1 -0
  299. package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts +7 -0
  300. package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts.map +1 -0
  301. package/lib/typescript/src/games/flappy-bird/components/index.d.ts +6 -0
  302. package/lib/typescript/src/games/flappy-bird/components/index.d.ts.map +1 -0
  303. package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts +4 -0
  304. package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts.map +1 -0
  305. package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts +115 -0
  306. package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts.map +1 -0
  307. package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts +5 -0
  308. package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts.map +1 -0
  309. package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts +43 -0
  310. package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts.map +1 -0
  311. package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts +10 -0
  312. package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts.map +1 -0
  313. package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts +8 -0
  314. package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts.map +1 -0
  315. package/lib/typescript/src/games/fruit-merger/components/GameBackground.d.ts +8 -0
  316. package/lib/typescript/src/games/fruit-merger/components/GameBackground.d.ts.map +1 -0
  317. package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts +7 -0
  318. package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts.map +1 -0
  319. package/lib/typescript/src/games/fruit-merger/components/index.d.ts +5 -0
  320. package/lib/typescript/src/games/fruit-merger/components/index.d.ts.map +1 -0
  321. package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts +1 -1
  322. package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts.map +1 -1
  323. package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts +1 -0
  324. package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts.map +1 -1
  325. package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +5 -1
  326. package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts.map +1 -1
  327. package/lib/typescript/src/games/game-2048/Game2048.d.ts +4 -0
  328. package/lib/typescript/src/games/game-2048/Game2048.d.ts.map +1 -0
  329. package/lib/typescript/src/games/game-2048/Game2048Constants.d.ts +163 -0
  330. package/lib/typescript/src/games/game-2048/Game2048Constants.d.ts.map +1 -0
  331. package/lib/typescript/src/games/game-2048/Game2048Service.d.ts +113 -0
  332. package/lib/typescript/src/games/game-2048/Game2048Service.d.ts.map +1 -0
  333. package/lib/typescript/src/games/game-2048/Game2048Store.d.ts +48 -0
  334. package/lib/typescript/src/games/game-2048/Game2048Store.d.ts.map +1 -0
  335. package/lib/typescript/src/games/game-2048/components/GameBackground.d.ts +7 -0
  336. package/lib/typescript/src/games/game-2048/components/GameBackground.d.ts.map +1 -0
  337. package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts +7 -0
  338. package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts.map +1 -0
  339. package/lib/typescript/src/games/game-2048/components/GameTile.d.ts +13 -0
  340. package/lib/typescript/src/games/game-2048/components/GameTile.d.ts.map +1 -0
  341. package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts +7 -0
  342. package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts.map +1 -0
  343. package/lib/typescript/src/games/game-2048/components/index.d.ts +5 -0
  344. package/lib/typescript/src/games/game-2048/components/index.d.ts.map +1 -0
  345. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +1 -1
  346. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -1
  347. package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts +1 -0
  348. package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts.map +1 -1
  349. package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +1 -0
  350. package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts.map +1 -1
  351. package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts +1 -1
  352. package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts.map +1 -1
  353. package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +2 -5
  354. package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts.map +1 -1
  355. package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +2 -2
  356. package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts.map +1 -1
  357. package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts +4 -0
  358. package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts.map +1 -0
  359. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersConstants.d.ts +108 -0
  360. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersConstants.d.ts.map +1 -0
  361. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts +34 -0
  362. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts.map +1 -0
  363. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts +56 -0
  364. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts.map +1 -0
  365. package/lib/typescript/src/games/sliding-numbers/components/GameBackground.d.ts +7 -0
  366. package/lib/typescript/src/games/sliding-numbers/components/GameBackground.d.ts.map +1 -0
  367. package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts +7 -0
  368. package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts.map +1 -0
  369. package/lib/typescript/src/games/sliding-numbers/components/NumbersTile.d.ts +11 -0
  370. package/lib/typescript/src/games/sliding-numbers/components/NumbersTile.d.ts.map +1 -0
  371. package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts +7 -0
  372. package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts.map +1 -0
  373. package/lib/typescript/src/games/sliding-numbers/components/index.d.ts +5 -0
  374. package/lib/typescript/src/games/sliding-numbers/components/index.d.ts.map +1 -0
  375. package/lib/typescript/src/games/snake/Snake.d.ts +4 -0
  376. package/lib/typescript/src/games/snake/Snake.d.ts.map +1 -0
  377. package/lib/typescript/src/games/snake/SnakeConstants.d.ts +93 -0
  378. package/lib/typescript/src/games/snake/SnakeConstants.d.ts.map +1 -0
  379. package/lib/typescript/src/games/snake/SnakeService.d.ts +30 -0
  380. package/lib/typescript/src/games/snake/SnakeService.d.ts.map +1 -0
  381. package/lib/typescript/src/games/snake/SnakeStore.d.ts +43 -0
  382. package/lib/typescript/src/games/snake/SnakeStore.d.ts.map +1 -0
  383. package/lib/typescript/src/games/snake/components/GameBackground.d.ts +5 -0
  384. package/lib/typescript/src/games/snake/components/GameBackground.d.ts.map +1 -0
  385. package/lib/typescript/src/games/snake/components/GameGrid.d.ts +3 -0
  386. package/lib/typescript/src/games/snake/components/GameGrid.d.ts.map +1 -0
  387. package/lib/typescript/src/games/snake/components/ScoreBoard.d.ts +7 -0
  388. package/lib/typescript/src/games/snake/components/ScoreBoard.d.ts.map +1 -0
  389. package/lib/typescript/src/games/snake/components/index.d.ts +4 -0
  390. package/lib/typescript/src/games/snake/components/index.d.ts.map +1 -0
  391. package/lib/typescript/src/games/snake/index.d.ts +4 -0
  392. package/lib/typescript/src/games/snake/index.d.ts.map +1 -0
  393. package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts +1 -1
  394. package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts.map +1 -1
  395. package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts.map +1 -1
  396. package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts +2 -0
  397. package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts.map +1 -1
  398. package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts.map +1 -1
  399. package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +5 -1
  400. package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts.map +1 -1
  401. package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts +1 -1
  402. package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts.map +1 -1
  403. package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts +1 -0
  404. package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts.map +1 -1
  405. package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts +1 -0
  406. package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts.map +1 -1
  407. package/lib/typescript/src/helpers/AnimationFrame.d.ts.map +1 -0
  408. package/lib/typescript/src/helpers/AnimationTracker.d.ts.map +1 -0
  409. package/lib/typescript/src/helpers/ErrorHandler.d.ts.map +1 -0
  410. package/lib/typescript/src/helpers/GameControlButton.d.ts.map +1 -0
  411. package/lib/typescript/src/{shared/helpers → helpers}/GameOverModal.d.ts +2 -0
  412. package/lib/typescript/src/helpers/GameOverModal.d.ts.map +1 -0
  413. package/lib/typescript/src/{shared/helpers → helpers}/GameSettingsModal.d.ts +1 -1
  414. package/lib/typescript/src/helpers/GameSettingsModal.d.ts.map +1 -0
  415. package/lib/typescript/src/helpers/ParticleBlast.d.ts.map +1 -0
  416. package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts +9 -0
  417. package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts.map +1 -0
  418. package/lib/typescript/src/{shared/helpers → helpers}/index.d.ts +2 -1
  419. package/lib/typescript/src/helpers/index.d.ts.map +1 -0
  420. package/lib/typescript/src/index.d.ts +9 -0
  421. package/lib/typescript/src/index.d.ts.map +1 -1
  422. package/lib/typescript/src/services/GamesConstants.d.ts +162 -0
  423. package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -1
  424. package/lib/typescript/src/services/GamesService.d.ts +3 -25
  425. package/lib/typescript/src/services/GamesService.d.ts.map +1 -1
  426. package/lib/typescript/src/services/SoundsService.d.ts +103 -0
  427. package/lib/typescript/src/services/SoundsService.d.ts.map +1 -1
  428. package/lib/typescript/src/services/UtilsService.d.ts +38 -0
  429. package/lib/typescript/src/services/UtilsService.d.ts.map +1 -0
  430. package/package.json +1 -1
  431. package/lib/module/shared/helpers/AnimationFrame.js.map +0 -1
  432. package/lib/module/shared/helpers/AnimationTracker.js.map +0 -1
  433. package/lib/module/shared/helpers/ErrorHandler.js.map +0 -1
  434. package/lib/module/shared/helpers/GameControlButton.js.map +0 -1
  435. package/lib/module/shared/helpers/GameOverModal.js.map +0 -1
  436. package/lib/module/shared/helpers/GameSettingsModal.js.map +0 -1
  437. package/lib/module/shared/helpers/ParticleBlast.js.map +0 -1
  438. package/lib/module/shared/helpers/ResponsiveScoreBoard.js +0 -81
  439. package/lib/module/shared/helpers/ResponsiveScoreBoard.js.map +0 -1
  440. package/lib/module/shared/helpers/index.js.map +0 -1
  441. package/lib/typescript/src/shared/helpers/AnimationFrame.d.ts.map +0 -1
  442. package/lib/typescript/src/shared/helpers/AnimationTracker.d.ts.map +0 -1
  443. package/lib/typescript/src/shared/helpers/ErrorHandler.d.ts.map +0 -1
  444. package/lib/typescript/src/shared/helpers/GameControlButton.d.ts.map +0 -1
  445. package/lib/typescript/src/shared/helpers/GameOverModal.d.ts.map +0 -1
  446. package/lib/typescript/src/shared/helpers/GameSettingsModal.d.ts.map +0 -1
  447. package/lib/typescript/src/shared/helpers/ParticleBlast.d.ts.map +0 -1
  448. package/lib/typescript/src/shared/helpers/ResponsiveScoreBoard.d.ts +0 -42
  449. package/lib/typescript/src/shared/helpers/ResponsiveScoreBoard.d.ts.map +0 -1
  450. package/lib/typescript/src/shared/helpers/index.d.ts.map +0 -1
  451. /package/lib/module/{shared/helpers → helpers}/AnimationFrame.js +0 -0
  452. /package/lib/module/{shared/helpers → helpers}/AnimationTracker.js +0 -0
  453. /package/lib/module/{shared/helpers → helpers}/ErrorHandler.js +0 -0
  454. /package/lib/module/{shared/helpers → helpers}/GameControlButton.js +0 -0
  455. /package/lib/typescript/src/{shared/helpers → helpers}/AnimationFrame.d.ts +0 -0
  456. /package/lib/typescript/src/{shared/helpers → helpers}/AnimationTracker.d.ts +0 -0
  457. /package/lib/typescript/src/{shared/helpers → helpers}/ErrorHandler.d.ts +0 -0
  458. /package/lib/typescript/src/{shared/helpers → helpers}/GameControlButton.d.ts +0 -0
  459. /package/lib/typescript/src/{shared/helpers → helpers}/ParticleBlast.d.ts +0 -0
@@ -0,0 +1,306 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { View, StyleSheet } from 'react-native';
5
+ import { useObstacles } from "../DinoJumpStore.js";
6
+ import { DINO_JUMP_COLORS } from "../DinoJumpConstants.js";
7
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
8
+ const SingleObstacle = /*#__PURE__*/React.memo(({
9
+ obstacle
10
+ }) => {
11
+ // Safety check
12
+ if (!obstacle || typeof obstacle.x !== 'number' || typeof obstacle.y !== 'number') {
13
+ return null;
14
+ }
15
+
16
+ // Memoize render functions to avoid recreating on every render
17
+ const renderCactusSmall = React.useMemo(() => /*#__PURE__*/_jsxs(View, {
18
+ style: [styles.obstacleContainer, {
19
+ left: obstacle.x,
20
+ top: obstacle.y,
21
+ width: obstacle.width,
22
+ height: obstacle.height
23
+ }],
24
+ children: [/*#__PURE__*/_jsx(View, {
25
+ style: [styles.cactusBody, {
26
+ width: obstacle.width,
27
+ height: obstacle.height,
28
+ backgroundColor: DINO_JUMP_COLORS.OBSTACLE_PRIMARY
29
+ }]
30
+ }), /*#__PURE__*/_jsx(View, {
31
+ style: [styles.cactusSpike, {
32
+ left: 2,
33
+ top: 6,
34
+ width: 3,
35
+ height: 3
36
+ }]
37
+ }), /*#__PURE__*/_jsx(View, {
38
+ style: [styles.cactusSpike, {
39
+ right: 2,
40
+ top: 10,
41
+ width: 3,
42
+ height: 3
43
+ }]
44
+ }), /*#__PURE__*/_jsx(View, {
45
+ style: [styles.cactusSpike, {
46
+ left: obstacle.width / 2 - 1,
47
+ top: 15,
48
+ width: 3,
49
+ height: 3
50
+ }]
51
+ }), /*#__PURE__*/_jsx(View, {
52
+ style: [styles.cactusPlantedBase, {
53
+ left: obstacle.width / 4,
54
+ bottom: -6,
55
+ width: obstacle.width / 2,
56
+ height: 8,
57
+ backgroundColor: '#654321',
58
+ // Brown dirt color
59
+ borderRadius: 4
60
+ }]
61
+ }), /*#__PURE__*/_jsx(View, {
62
+ style: [styles.cactusRoot, {
63
+ left: obstacle.width / 3,
64
+ bottom: -4,
65
+ width: obstacle.width / 3,
66
+ height: 4,
67
+ backgroundColor: DINO_JUMP_COLORS.OBSTACLE_PRIMARY
68
+ }]
69
+ })]
70
+ }), [obstacle.x, obstacle.y, obstacle.width, obstacle.height]);
71
+ const renderCactusLarge = React.useMemo(() => /*#__PURE__*/_jsxs(View, {
72
+ style: [styles.obstacleContainer, {
73
+ left: obstacle.x,
74
+ top: obstacle.y,
75
+ width: obstacle.width,
76
+ height: obstacle.height
77
+ }],
78
+ children: [/*#__PURE__*/_jsx(View, {
79
+ style: [styles.cactusBody, {
80
+ width: obstacle.width,
81
+ height: obstacle.height,
82
+ backgroundColor: DINO_JUMP_COLORS.OBSTACLE_PRIMARY
83
+ }]
84
+ }), /*#__PURE__*/_jsx(View, {
85
+ style: [styles.cactusArm, {
86
+ left: -6,
87
+ top: 15,
88
+ width: 8,
89
+ height: 15,
90
+ backgroundColor: DINO_JUMP_COLORS.OBSTACLE_SECONDARY
91
+ }]
92
+ }), /*#__PURE__*/_jsx(View, {
93
+ style: [styles.cactusArm, {
94
+ right: -2,
95
+ top: 10,
96
+ width: 8,
97
+ height: 20,
98
+ backgroundColor: DINO_JUMP_COLORS.OBSTACLE_SECONDARY
99
+ }]
100
+ }), Array.from({
101
+ length: 6
102
+ }, (_, i) => /*#__PURE__*/_jsx(View, {
103
+ style: [styles.cactusSpike, {
104
+ left: 2 + i % 3 * 7,
105
+ top: 8 + Math.floor(i / 3) * 15
106
+ }]
107
+ }, i)), /*#__PURE__*/_jsx(View, {
108
+ style: [styles.cactusPlantedBase, {
109
+ left: obstacle.width / 4,
110
+ bottom: -8,
111
+ width: obstacle.width / 2,
112
+ height: 10,
113
+ backgroundColor: '#654321',
114
+ // Brown dirt color
115
+ borderRadius: 5
116
+ }]
117
+ }), /*#__PURE__*/_jsx(View, {
118
+ style: [styles.cactusRoot, {
119
+ left: obstacle.width / 3,
120
+ bottom: -5,
121
+ width: obstacle.width / 3,
122
+ height: 5,
123
+ backgroundColor: DINO_JUMP_COLORS.OBSTACLE_PRIMARY
124
+ }]
125
+ })]
126
+ }), [obstacle.x, obstacle.y, obstacle.width, obstacle.height]);
127
+ const renderBird = React.useMemo(() => /*#__PURE__*/_jsxs(View, {
128
+ style: [styles.obstacleContainer, {
129
+ left: obstacle.x,
130
+ top: obstacle.y,
131
+ width: obstacle.width,
132
+ height: obstacle.height
133
+ }],
134
+ children: [/*#__PURE__*/_jsx(View, {
135
+ style: [styles.birdBody, {
136
+ left: 10,
137
+ top: 15,
138
+ width: 20,
139
+ height: 10
140
+ }]
141
+ }), /*#__PURE__*/_jsx(View, {
142
+ style: [styles.birdHead, {
143
+ left: 29,
144
+ top: 12
145
+ }]
146
+ }), /*#__PURE__*/_jsx(View, {
147
+ style: [styles.birdBeak, {
148
+ left: 40,
149
+ top: 17
150
+ }]
151
+ }), /*#__PURE__*/_jsx(View, {
152
+ style: [styles.birdWing, {
153
+ left: 5,
154
+ top: 10,
155
+ width: 15,
156
+ height: 6
157
+ }]
158
+ }), /*#__PURE__*/_jsx(View, {
159
+ style: [styles.birdWing, {
160
+ left: 15,
161
+ top: 8,
162
+ width: 15,
163
+ height: 6
164
+ }]
165
+ }), /*#__PURE__*/_jsx(View, {
166
+ style: [styles.birdTail, {
167
+ left: 0,
168
+ top: 18
169
+ }]
170
+ })]
171
+ }), [obstacle.x, obstacle.y, obstacle.width, obstacle.height]);
172
+ switch (obstacle.type) {
173
+ case 'cactus_small':
174
+ return renderCactusSmall;
175
+ case 'cactus_large':
176
+ return renderCactusLarge;
177
+ case 'bird':
178
+ return renderBird;
179
+ default:
180
+ return null;
181
+ }
182
+ }, (prevProps, nextProps) => {
183
+ // Custom comparison: only re-render if obstacle position or type changes
184
+ return prevProps.obstacle.x === nextProps.obstacle.x && prevProps.obstacle.y === nextProps.obstacle.y && prevProps.obstacle.type === nextProps.obstacle.type && prevProps.obstacle.id === nextProps.obstacle.id;
185
+ });
186
+ export const ObstacleSprite = /*#__PURE__*/React.memo(() => {
187
+ const obstacles = useObstacles();
188
+
189
+ // Memoize visible obstacles to prevent infinite re-renders
190
+ const visibleObstacles = React.useMemo(() => {
191
+ if (!Array.isArray(obstacles) || obstacles.length === 0) {
192
+ return [];
193
+ }
194
+
195
+ // Limit obstacles to prevent layout issues and only show visible ones
196
+ return obstacles.filter(obstacle => obstacle && obstacle.x > -100 && obstacle.x < 500).slice(0, 5);
197
+ }, [obstacles]);
198
+
199
+ // Early return if no visible obstacles
200
+ if (visibleObstacles.length === 0) {
201
+ return null;
202
+ }
203
+ return /*#__PURE__*/_jsx(_Fragment, {
204
+ children: visibleObstacles.map(obstacle => /*#__PURE__*/_jsx(SingleObstacle, {
205
+ obstacle: obstacle
206
+ }, obstacle.id))
207
+ });
208
+ });
209
+ const styles = StyleSheet.create({
210
+ obstacleContainer: {
211
+ position: 'absolute',
212
+ // Enhanced shadow for better depth
213
+ shadowColor: '#000',
214
+ shadowOffset: {
215
+ width: 0,
216
+ height: 2
217
+ },
218
+ shadowOpacity: 0.25,
219
+ shadowRadius: 3,
220
+ elevation: 4
221
+ },
222
+ cactusBody: {
223
+ borderRadius: 6,
224
+ borderWidth: 1,
225
+ borderColor: DINO_JUMP_COLORS.OBSTACLE_OUTLINE
226
+ // Subtle gradient effect with border
227
+ },
228
+ cactusArm: {
229
+ position: 'absolute',
230
+ borderRadius: 4,
231
+ borderWidth: 1,
232
+ borderColor: DINO_JUMP_COLORS.OBSTACLE_OUTLINE
233
+ },
234
+ cactusSpike: {
235
+ position: 'absolute',
236
+ width: 2,
237
+ height: 2,
238
+ borderRadius: 1,
239
+ backgroundColor: DINO_JUMP_COLORS.OBSTACLE_OUTLINE
240
+ },
241
+ cactusBase: {
242
+ position: 'absolute',
243
+ borderRadius: 2,
244
+ borderWidth: 1,
245
+ borderColor: DINO_JUMP_COLORS.OBSTACLE_OUTLINE
246
+ },
247
+ cactusPlantedBase: {
248
+ position: 'absolute',
249
+ borderWidth: 1,
250
+ borderColor: '#4a2c1a',
251
+ shadowColor: '#000',
252
+ shadowOffset: {
253
+ width: 0,
254
+ height: 1
255
+ },
256
+ shadowOpacity: 0.3,
257
+ shadowRadius: 2,
258
+ elevation: 2
259
+ },
260
+ cactusRoot: {
261
+ position: 'absolute',
262
+ borderRadius: 2
263
+ },
264
+ birdBody: {
265
+ position: 'absolute',
266
+ backgroundColor: '#8B4513',
267
+ borderRadius: 5,
268
+ borderWidth: 1,
269
+ borderColor: '#654321'
270
+ },
271
+ birdHead: {
272
+ position: 'absolute',
273
+ width: 12,
274
+ height: 12,
275
+ backgroundColor: '#8B4513',
276
+ borderRadius: 6,
277
+ borderWidth: 1,
278
+ borderColor: '#654321'
279
+ },
280
+ birdBeak: {
281
+ position: 'absolute',
282
+ width: 4,
283
+ height: 2,
284
+ backgroundColor: '#FFD700',
285
+ borderRadius: 1
286
+ },
287
+ birdWing: {
288
+ position: 'absolute',
289
+ backgroundColor: '#A0522D',
290
+ borderRadius: 3,
291
+ borderWidth: 1,
292
+ borderColor: '#654321'
293
+ },
294
+ birdTail: {
295
+ position: 'absolute',
296
+ width: 12,
297
+ height: 4,
298
+ backgroundColor: '#8B4513',
299
+ borderRadius: 2,
300
+ borderWidth: 1,
301
+ borderColor: '#654321'
302
+ }
303
+ });
304
+ SingleObstacle.displayName = 'SingleObstacle';
305
+ ObstacleSprite.displayName = 'ObstacleSprite';
306
+ //# sourceMappingURL=ObstacleSprite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","StyleSheet","useObstacles","DINO_JUMP_COLORS","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SingleObstacle","memo","obstacle","x","y","renderCactusSmall","useMemo","style","styles","obstacleContainer","left","top","width","height","children","cactusBody","backgroundColor","OBSTACLE_PRIMARY","cactusSpike","right","cactusPlantedBase","bottom","borderRadius","cactusRoot","renderCactusLarge","cactusArm","OBSTACLE_SECONDARY","Array","from","length","_","i","Math","floor","renderBird","birdBody","birdHead","birdBeak","birdWing","birdTail","type","prevProps","nextProps","id","ObstacleSprite","obstacles","visibleObstacles","isArray","filter","slice","map","create","position","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderWidth","borderColor","OBSTACLE_OUTLINE","cactusBase","displayName"],"sourceRoot":"../../../../../src","sources":["games/dino-jump/components/ObstacleSprite.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,YAAY,QAAQ,qB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AAE,UAAU;IACpBpC,eAAe,EAAE,SAAS;IAC1BM,YAAY,EAAE,CAAC;IACfoC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE;EACf,CAAC;EACDvB,QAAQ,EAAE;IACRgB,QAAQ,EAAE,UAAU;IACpBxC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVG,eAAe,EAAE,SAAS;IAC1BM,YAAY,EAAE,CAAC;IACfoC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE;EACf,CAAC;EACDtB,QAAQ,EAAE;IACRe,QAAQ,EAAE,UAAU;IACpBxC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTG,eAAe,EAAE,SAAS;IAC1BM,YAAY,EAAE;EAChB,CAAC;EACDgB,QAAQ,EAAE;IACRc,QAAQ,EAAE,UAAU;IACpBpC,eAAe,EAAE,SAAS;IAC1BM,YAAY,EAAE,CAAC;IACfoC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE;EACf,CAAC;EACDpB,QAAQ,EAAE;IACRa,QAAQ,EAAE,UAAU;IACpBxC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,CAAC;IACTG,eAAe,EAAE,SAAS;IAC1BM,YAAY,EAAE,CAAC;IACfoC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE;EACf;AACF,CAAC,CAAC;AAEF3D,cAAc,CAAC8D,WAAW,GAAG,gBAAgB;AAC7ClB,cAAc,CAACkB,WAAW,GAAG,gBAAgB","ignoreList":[]}
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+
3
+ import React, { useMemo } from 'react';
4
+ import { View, Text, StyleSheet } from 'react-native';
5
+ import { useScore, useTimeLeft, useLives } from "../DinoJumpStore.js";
6
+ import { DinoJumpService } from "../DinoJumpService.js";
7
+ import { ScoreBoardContainer } from "../../../helpers/index.js";
8
+ import { DINO_JUMP_COLORS } from "../DinoJumpConstants.js";
9
+
10
+ // Memoize gameService outside component to avoid recreation
11
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
+ const gameService = new DinoJumpService();
13
+ export const ScoreBoard = /*#__PURE__*/React.memo(({
14
+ offset = 0
15
+ }) => {
16
+ const score = useScore();
17
+ const timeLeft = useTimeLeft();
18
+ const lives = useLives();
19
+ const formattedTime = useMemo(() => gameService.formatTime(timeLeft), [timeLeft]);
20
+
21
+ // Generate hearts display: red for remaining lives, black for lost lives
22
+ const heartsDisplay = useMemo(() => {
23
+ const maxLives = 3; // Max lives increased to 5 (can collect stars for extra lives)
24
+ const currentLives = Math.max(0, Math.min(lives, maxLives)); // Clamp between 0 and maxLives
25
+ const lostLives = Math.max(0, maxLives - currentLives); // Ensure non-negative
26
+
27
+ const redHearts = '❤️'.repeat(currentLives); // Remaining lives
28
+ const blackHearts = '🖤'.repeat(lostLives); // Lost lives
29
+ return redHearts + blackHearts;
30
+ }, [lives]);
31
+ return /*#__PURE__*/_jsx(ScoreBoardContainer, {
32
+ offset: offset,
33
+ backgroundColor: "rgba(255, 99, 71, 0.4)",
34
+ borderColor: "rgba(255, 99, 71, 0.4)",
35
+ children: /*#__PURE__*/_jsxs(View, {
36
+ style: styles.scoreBoard,
37
+ children: [/*#__PURE__*/_jsxs(View, {
38
+ style: styles.scoreSection,
39
+ children: [/*#__PURE__*/_jsx(Text, {
40
+ style: styles.scoreLabel,
41
+ children: "Score"
42
+ }), /*#__PURE__*/_jsx(Text, {
43
+ style: styles.scoreValue,
44
+ children: score.toLocaleString()
45
+ })]
46
+ }), /*#__PURE__*/_jsxs(View, {
47
+ style: styles.scoreSection,
48
+ children: [/*#__PURE__*/_jsx(Text, {
49
+ style: styles.scoreLabel,
50
+ children: "Time"
51
+ }), /*#__PURE__*/_jsx(Text, {
52
+ style: [styles.timeValue, {
53
+ color: timeLeft < 60 ? '#ef4444' : DINO_JUMP_COLORS.SCORE_TEXT
54
+ }],
55
+ children: formattedTime
56
+ })]
57
+ }), /*#__PURE__*/_jsxs(View, {
58
+ style: styles.scoreSection,
59
+ children: [/*#__PURE__*/_jsx(Text, {
60
+ style: styles.scoreLabel,
61
+ children: "Lives"
62
+ }), /*#__PURE__*/_jsx(Text, {
63
+ style: styles.livesValue,
64
+ numberOfLines: 1,
65
+ children: heartsDisplay
66
+ })]
67
+ })]
68
+ })
69
+ });
70
+ });
71
+ const styles = StyleSheet.create({
72
+ scoreBoard: {
73
+ flexDirection: 'row',
74
+ justifyContent: 'space-between',
75
+ alignItems: 'center'
76
+ },
77
+ scoreSection: {
78
+ alignItems: 'center',
79
+ flex: 1
80
+ },
81
+ scoreLabel: {
82
+ fontSize: 18,
83
+ fontWeight: 'bold',
84
+ color: '#ffffff',
85
+ // White label
86
+ marginBottom: 4,
87
+ letterSpacing: 0.5
88
+ },
89
+ scoreValue: {
90
+ fontSize: 30,
91
+ fontWeight: 'bold',
92
+ color: '#ffffff' // White for score
93
+ },
94
+ timeValue: {
95
+ fontSize: 30,
96
+ fontWeight: 'bold'
97
+ // Color is set dynamically in the component
98
+ },
99
+ livesValue: {
100
+ fontSize: 20,
101
+ fontWeight: 'bold'
102
+ }
103
+ });
104
+ ScoreBoard.displayName = 'ScoreBoard';
105
+ //# sourceMappingURL=ScoreBoard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useMemo","View","Text","StyleSheet","useScore","useTimeLeft","useLives","DinoJumpService","ScoreBoardContainer","DINO_JUMP_COLORS","jsx","_jsx","jsxs","_jsxs","gameService","ScoreBoard","memo","offset","score","timeLeft","lives","formattedTime","formatTime","heartsDisplay","maxLives","currentLives","Math","max","min","lostLives","redHearts","repeat","blackHearts","backgroundColor","borderColor","children","style","styles","scoreBoard","scoreSection","scoreLabel","scoreValue","toLocaleString","timeValue","color","SCORE_TEXT","livesValue","numberOfLines","create","flexDirection","justifyContent","alignItems","flex","fontSize","fontWeight","marginBottom","letterSpacing","displayName"],"sourceRoot":"../../../../../src","sources":["games/dino-jump/components/ScoreBoard.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAA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AEC,MAAM,CAACS,UAAW;UAACC,aAAa,EAAE,CAAE;UAAAZ,QAAA,EAAEZ;QAAa,CAAO,CAAC;MAAA,CACpE,CAAC;IAAA,CACH;EAAC,CACc,CAAC;AAE1B,CAAC,CAAC;AAEF,MAAMc,MAAM,GAAGlC,UAAU,CAAC6C,MAAM,CAAC;EAC/BV,UAAU,EAAE;IACVW,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE;EACd,CAAC;EACDZ,YAAY,EAAE;IACZY,UAAU,EAAE,QAAQ;IACpBC,IAAI,EAAE;EACR,CAAC;EACDZ,UAAU,EAAE;IACVa,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBV,KAAK,EAAE,SAAS;IAAE;IAClBW,YAAY,EAAE,CAAC;IACfC,aAAa,EAAE;EACjB,CAAC;EACDf,UAAU,EAAE;IACVY,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBV,KAAK,EAAE,SAAS,CAAE;EACpB,CAAC;EACDD,SAAS,EAAE;IACTU,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;IACZ;EACF,CAAC;EACDR,UAAU,EAAE;IACVO,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEFvC,UAAU,CAAC0C,WAAW,GAAG,YAAY","ignoreList":[]}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { View, Text, StyleSheet } from 'react-native';
5
+ import { useStars } from "../DinoJumpStore.js";
6
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
7
+ // Memoized single star component
8
+ const SingleStar = /*#__PURE__*/React.memo(({
9
+ star
10
+ }) => /*#__PURE__*/_jsx(View, {
11
+ style: [styles.starContainer, {
12
+ left: star.x,
13
+ top: star.y,
14
+ width: star.width,
15
+ height: star.height
16
+ }],
17
+ children: /*#__PURE__*/_jsx(Text, {
18
+ style: styles.mushroom,
19
+ children: "\uD83C\uDF44"
20
+ })
21
+ }), (prev, next) => prev.star.id === next.star.id && prev.star.x === next.star.x);
22
+ export const StarSprite = /*#__PURE__*/React.memo(() => {
23
+ const stars = useStars();
24
+ if (!stars || stars.length === 0) {
25
+ return null;
26
+ }
27
+ return /*#__PURE__*/_jsx(_Fragment, {
28
+ children: stars.map(star => /*#__PURE__*/_jsx(SingleStar, {
29
+ star: star
30
+ }, star.id))
31
+ });
32
+ });
33
+ const styles = StyleSheet.create({
34
+ starContainer: {
35
+ position: 'absolute',
36
+ justifyContent: 'center',
37
+ alignItems: 'center'
38
+ },
39
+ mushroom: {
40
+ fontSize: 40,
41
+ lineHeight: 40
42
+ }
43
+ });
44
+ StarSprite.displayName = 'StarSprite';
45
+ //# sourceMappingURL=StarSprite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","Text","StyleSheet","useStars","jsx","_jsx","Fragment","_Fragment","SingleStar","memo","star","style","styles","starContainer","left","x","top","y","width","height","children","mushroom","prev","next","id","StarSprite","stars","length","map","create","position","justifyContent","alignItems","fontSize","lineHeight","displayName"],"sourceRoot":"../../../../../src","sources":["games/dino-jump/components/StarSprite.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AACrD,SAASC,QAAQ,QAAQ,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA;AAG5C;AACA,MAAMC,UAAoC,gBAAGT,KAAK,CAACU,IAAI,CAAC,CAAC;EAAEC;AAAK,CAAC,kBAC/DL,IAAA,CAACL,IAAI;EACHW,KAAK,EAAE,CACLC,MAAM,CAACC,aAAa,EACpB;IACEC,IAAI,EAAEJ,IAAI,CAACK,CAAC;IACZC,GAAG,EAAEN,IAAI,CAACO,CAAC;IACXC,KAAK,EAAER,IAAI,CAACQ,KAAK;IACjBC,MAAM,EAAET,IAAI,CAACS;EACf,CAAC,CACD;EAAAC,QAAA,eAEFf,IAAA,CAACJ,IAAI;IAACU,KAAK,EAAEC,MAAM,CAACS,QAAS;IAAAD,QAAA,EAAC;EAAE,CAAM;AAAC,CACnC,CACP,EAAE,CAACE,IAAI,EAAEC,IAAI,KAAKD,IAAI,CAACZ,IAAI,CAACc,EAAE,KAAKD,IAAI,CAACb,IAAI,CAACc,EAAE,IAAIF,IAAI,CAACZ,IAAI,CAACK,CAAC,KAAKQ,IAAI,CAACb,IAAI,CAACK,CAAC,CAAC;AAEhF,OAAO,MAAMU,UAAoB,gBAAG1B,KAAK,CAACU,IAAI,CAAC,MAAM;EACnD,MAAMiB,KAAK,GAAGvB,QAAQ,CAAC,CAAC;EAExB,IAAI,CAACuB,KAAK,IAAIA,KAAK,CAACC,MAAM,KAAK,CAAC,EAAE;IAChC,OAAO,IAAI;EACb;EAEA,oBACEtB,IAAA,CAAAE,SAAA;IAAAa,QAAA,EACGM,KAAK,CAACE,GAAG,CAAElB,IAAI,iBACdL,IAAA,CAACG,UAAU;MAAeE,IAAI,EAAEA;IAAK,GAApBA,IAAI,CAACc,EAAiB,CACxC;EAAC,CACF,CAAC;AAEP,CAAC,CAAC;AAEF,MAAMZ,MAAM,GAAGV,UAAU,CAAC2B,MAAM,CAAC;EAC/BhB,aAAa,EAAE;IACbiB,QAAQ,EAAE,UAAU;IACpBC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDX,QAAQ,EAAE;IACRY,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEFT,UAAU,CAACU,WAAW,GAAG,YAAY","ignoreList":[]}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ export { GameBackground } from "./GameBackground.js";
4
+ export { GameArea } from "./GameArea.js";
5
+ export { DinoSprite } from "./DinoSprite.js";
6
+ export { ObstacleSprite } from "./ObstacleSprite.js";
7
+ export { StarSprite } from "./StarSprite.js";
8
+ export { ScoreBoard } from "./ScoreBoard.js";
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GameBackground","GameArea","DinoSprite","ObstacleSprite","StarSprite","ScoreBoard"],"sourceRoot":"../../../../../src","sources":["games/dino-jump/components/index.ts"],"mappings":";;AAAA,SAASA,cAAc,QAAQ,qBAAkB;AACjD,SAASC,QAAQ,QAAQ,eAAY;AACrC,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,cAAc,QAAQ,qBAAkB;AACjD,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,UAAU,QAAQ,iBAAc","ignoreList":[]}
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+
3
+ import React, { useEffect, useCallback, useMemo, useRef } from 'react';
4
+ import { View, StyleSheet } from 'react-native';
5
+ import { GestureHandlerRootView } from 'react-native-gesture-handler';
6
+ import { useFlappyBirdStore } from "./FlappyBirdStore.js";
7
+ import { ScoreBoard, GameArea, GameBackground } from "./components/index.js";
8
+ import { GameControlButton, GameOverModal } from "../../helpers/index.js";
9
+ import { GameSettingsModal } from "../../helpers/index.js";
10
+ import { FLAPPY_BIRD_COLORS } from "./FlappyBirdConstants.js";
11
+ import { GAME_IDS, DEFAULT_GAME_SETTINGS } from "../../services/UtilsService.js";
12
+ import { playSound, GAME_SOUNDS } from "../../services/SoundsService.js";
13
+ import { playHaptic, HapticType } from "../../services/HapticsService.js";
14
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
+ const formatTime = seconds => {
16
+ const mins = Math.floor(seconds / 60);
17
+ const secs = seconds % 60;
18
+ return `${mins.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`;
19
+ };
20
+ export const FlappyBird = /*#__PURE__*/React.memo(({
21
+ settings = DEFAULT_GAME_SETTINGS,
22
+ onSettingsChange
23
+ }) => {
24
+ // Only subscribe to non-animation state (CRITICAL: prevents 60fps re-renders)
25
+ const isPlaying = useFlappyBirdStore(state => state.isPlaying);
26
+ const isGameOver = useFlappyBirdStore(state => state.isGameOver);
27
+ const survivalTime = useFlappyBirdStore(state => state.survivalTime);
28
+ const initializeGame = useFlappyBirdStore(state => state.initializeGame);
29
+ const startGame = useFlappyBirdStore(state => state.startGame);
30
+ const stopGame = useFlappyBirdStore(state => state.stopGame);
31
+ const resetGame = useFlappyBirdStore(state => state.resetGame);
32
+ useEffect(() => {
33
+ initializeGame();
34
+ return () => {
35
+ stopGame();
36
+ };
37
+ }, [initializeGame, stopGame]);
38
+ const prevGameOverRef = useRef(false);
39
+ useEffect(() => {
40
+ if (isGameOver && !prevGameOverRef.current) {
41
+ playSound(GAME_SOUNDS.FLAPPY_BIRD.HIT, settings.enableSounds);
42
+ playHaptic(HapticType.HEAVY, settings.enableHaptics);
43
+ }
44
+ prevGameOverRef.current = isGameOver;
45
+ }, [isGameOver, settings.enableSounds, settings.enableHaptics]);
46
+ const handleStartGame = useCallback(() => {
47
+ initializeGame();
48
+ startGame(settings);
49
+ playSound(GAME_SOUNDS.FLAPPY_BIRD.START, settings.enableSounds);
50
+ playHaptic(HapticType.MEDIUM, settings.enableHaptics);
51
+ }, [initializeGame, startGame, settings]);
52
+ const handleStopGame = useCallback(() => {
53
+ stopGame();
54
+ }, [stopGame]);
55
+ const handleResetGame = useCallback(() => {
56
+ resetGame();
57
+ initializeGame();
58
+ }, [resetGame, initializeGame]);
59
+
60
+ // Memoize modal props to prevent unnecessary re-renders
61
+ const gameOverModalProps = useMemo(() => ({
62
+ isVisible: isGameOver,
63
+ score: survivalTime,
64
+ onPlayAgain: handleResetGame,
65
+ buttonText: "Fly Again!",
66
+ primaryColor: FLAPPY_BIRD_COLORS.GAME_OVER_BG,
67
+ borderColor: FLAPPY_BIRD_COLORS.BUTTON_PRIMARY,
68
+ buttonColor: FLAPPY_BIRD_COLORS.BUTTON_PRIMARY,
69
+ buttonBorderColor: FLAPPY_BIRD_COLORS.BUTTON_SECONDARY,
70
+ scoreLabel: "Survival Time",
71
+ scoreFormatter: formatTime
72
+ }), [isGameOver, survivalTime, handleResetGame]);
73
+ const gameSettingsModalProps = useMemo(() => ({
74
+ gameId: GAME_IDS.FLAPPY_BIRD,
75
+ settings,
76
+ onSettingsChange
77
+ }), [settings, onSettingsChange]);
78
+
79
+ // Get offset from settings
80
+ const offset = settings?.offset ?? 0;
81
+
82
+ // Memoize GameControlButton props to prevent re-renders (CRITICAL)
83
+ const gameControlButtonProps = useMemo(() => ({
84
+ isPlaying,
85
+ gameOver: isGameOver,
86
+ onStartGame: handleStartGame,
87
+ onStopGame: handleStopGame,
88
+ startButtonText: "START FLYING",
89
+ stopButtonText: "STOP GAME",
90
+ startButtonSubtext: "Tap to flap!",
91
+ startButtonColor: FLAPPY_BIRD_COLORS.BUTTON_PRIMARY,
92
+ startButtonBorderColor: FLAPPY_BIRD_COLORS.BUTTON_SECONDARY
93
+ }), [isPlaying, isGameOver, handleStartGame, handleStopGame]);
94
+ return /*#__PURE__*/_jsx(View, {
95
+ style: styles.root,
96
+ children: /*#__PURE__*/_jsx(GestureHandlerRootView, {
97
+ children: /*#__PURE__*/_jsx(GameBackground, {
98
+ offset: offset,
99
+ children: /*#__PURE__*/_jsxs(View, {
100
+ style: styles.container,
101
+ children: [/*#__PURE__*/_jsx(GameArea, {
102
+ settings: settings
103
+ }), /*#__PURE__*/_jsx(ScoreBoard, {
104
+ offset: offset
105
+ }), /*#__PURE__*/_jsx(GameControlButton, {
106
+ ...gameControlButtonProps
107
+ }), /*#__PURE__*/_jsx(GameOverModal, {
108
+ ...gameOverModalProps
109
+ }), /*#__PURE__*/_jsx(GameSettingsModal, {
110
+ ...gameSettingsModalProps
111
+ })]
112
+ })
113
+ })
114
+ })
115
+ });
116
+ });
117
+ const styles = StyleSheet.create({
118
+ root: {
119
+ flex: 1
120
+ },
121
+ container: {
122
+ flex: 1
123
+ }
124
+ });
125
+ FlappyBird.displayName = 'FlappyBird';
126
+ //# sourceMappingURL=FlappyBird.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useEffect","useCallback","useMemo","useRef","View","StyleSheet","GestureHandlerRootView","useFlappyBirdStore","ScoreBoard","GameArea","GameBackground","GameControlButton","GameOverModal","GameSettingsModal","FLAPPY_BIRD_COLORS","GAME_IDS","DEFAULT_GAME_SETTINGS","playSound","GAME_SOUNDS","playHaptic","HapticType","jsx","_jsx","jsxs","_jsxs","formatTime","seconds","mins","Math","floor","secs","toString","padStart","FlappyBird","memo","settings","onSettingsChange","isPlaying","state","isGameOver","survivalTime","initializeGame","startGame","stopGame","resetGame","prevGameOverRef","current","FLAPPY_BIRD","HIT","enableSounds","HEAVY","enableHaptics","handleStartGame","START","MEDIUM","handleStopGame","handleResetGame","gameOverModalProps","isVisible","score","onPlayAgain","buttonText","primaryColor","GAME_OVER_BG","borderColor","BUTTON_PRIMARY","buttonColor","buttonBorderColor","BUTTON_SECONDARY","scoreLabel","scoreFormatter","gameSettingsModalProps","gameId","offset","gameControlButtonProps","gameOver","onStartGame","onStopGame","startButtonText","stopButtonText","startButtonSubtext","startButtonColor","startButtonBorderColor","style","styles","root","children","container","create","flex","displayName"],"sourceRoot":"../../../../src","sources":["games/flappy-bird/FlappyBird.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,WAAW,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AACtE,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,kBAAkB,QAAQ,sBAAmB;AACtD,SAASC,UAAU,EAAEC,QAAQ,EAAEC,cAAc,QAAQ,uBAAc;AACnE,SAASC,iBAAiB,EAAEC,aAAa,QAAQ,wBAAe;AAChE,SAASC,iBAAiB,QAAQ,wBAAe;AACjD,SAASC,kBAAkB,QAAQ,0BAAuB;AAC1D,SAASC,QAAQ,EAAkBC,qBAAqB,QAAQ,gCAA6B;AAC7F,SAASC,SAAS,EAAEC,WAAW,QAAQ,iCAA8B;AACrE,SAASC,U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