react-native-games 0.7.0 → 0.8.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 (341) hide show
  1. package/README.md +148 -23
  2. package/lib/module/games/balloon-blaster/BalloonBlaster.js +5 -8
  3. package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -1
  4. package/lib/module/games/candy-crush/CandyCrush.js +121 -0
  5. package/lib/module/games/candy-crush/CandyCrush.js.map +1 -0
  6. package/lib/module/games/candy-crush/CandyCrushConstants.js +125 -0
  7. package/lib/module/games/candy-crush/CandyCrushConstants.js.map +1 -0
  8. package/lib/module/games/candy-crush/CandyCrushService.js +370 -0
  9. package/lib/module/games/candy-crush/CandyCrushService.js.map +1 -0
  10. package/lib/module/games/candy-crush/CandyCrushStore.js +305 -0
  11. package/lib/module/games/candy-crush/CandyCrushStore.js.map +1 -0
  12. package/lib/module/games/candy-crush/components/CandyItem.js +191 -0
  13. package/lib/module/games/candy-crush/components/CandyItem.js.map +1 -0
  14. package/lib/module/games/candy-crush/components/GameBackground.js +85 -0
  15. package/lib/module/games/candy-crush/components/GameBackground.js.map +1 -0
  16. package/lib/module/games/candy-crush/components/GameGrid.js +314 -0
  17. package/lib/module/games/candy-crush/components/GameGrid.js.map +1 -0
  18. package/lib/module/games/candy-crush/components/ScoreBoard.js +112 -0
  19. package/lib/module/games/candy-crush/components/ScoreBoard.js.map +1 -0
  20. package/lib/module/games/candy-crush/components/index.js +7 -0
  21. package/lib/module/games/candy-crush/components/index.js.map +1 -0
  22. package/lib/module/games/candy-crush/index.js +6 -0
  23. package/lib/module/games/candy-crush/index.js.map +1 -0
  24. package/lib/module/games/color-sort/ColorSort.js +130 -0
  25. package/lib/module/games/color-sort/ColorSort.js.map +1 -0
  26. package/lib/module/games/color-sort/ColorSortConstants.js +68 -0
  27. package/lib/module/games/color-sort/ColorSortConstants.js.map +1 -0
  28. package/lib/module/games/color-sort/ColorSortService.js +255 -0
  29. package/lib/module/games/color-sort/ColorSortService.js.map +1 -0
  30. package/lib/module/games/color-sort/ColorSortStore.js +258 -0
  31. package/lib/module/games/color-sort/ColorSortStore.js.map +1 -0
  32. package/lib/module/games/color-sort/components/ColorContainer.js +140 -0
  33. package/lib/module/games/color-sort/components/ColorContainer.js.map +1 -0
  34. package/lib/module/games/color-sort/components/GameBackground.js +135 -0
  35. package/lib/module/games/color-sort/components/GameBackground.js.map +1 -0
  36. package/lib/module/games/color-sort/components/ScoreBoard.js +78 -0
  37. package/lib/module/games/color-sort/components/ScoreBoard.js.map +1 -0
  38. package/lib/module/games/color-sort/components/index.js +6 -0
  39. package/lib/module/games/color-sort/components/index.js.map +1 -0
  40. package/lib/module/games/dino-jump/DinoJump.js +209 -0
  41. package/lib/module/games/dino-jump/DinoJump.js.map +1 -0
  42. package/lib/module/games/dino-jump/DinoJumpConstants.js +179 -0
  43. package/lib/module/games/dino-jump/DinoJumpConstants.js.map +1 -0
  44. package/lib/module/games/dino-jump/DinoJumpService.js +268 -0
  45. package/lib/module/games/dino-jump/DinoJumpService.js.map +1 -0
  46. package/lib/module/games/dino-jump/DinoJumpStore.js +387 -0
  47. package/lib/module/games/dino-jump/DinoJumpStore.js.map +1 -0
  48. package/lib/module/games/dino-jump/components/DinoSprite.js +409 -0
  49. package/lib/module/games/dino-jump/components/DinoSprite.js.map +1 -0
  50. package/lib/module/games/dino-jump/components/GameArea.js +68 -0
  51. package/lib/module/games/dino-jump/components/GameArea.js.map +1 -0
  52. package/lib/module/games/dino-jump/components/GameBackground.js +421 -0
  53. package/lib/module/games/dino-jump/components/GameBackground.js.map +1 -0
  54. package/lib/module/games/dino-jump/components/ObstacleSprite.js +306 -0
  55. package/lib/module/games/dino-jump/components/ObstacleSprite.js.map +1 -0
  56. package/lib/module/games/dino-jump/components/ScoreBoard.js +107 -0
  57. package/lib/module/games/dino-jump/components/ScoreBoard.js.map +1 -0
  58. package/lib/module/games/dino-jump/components/StarSprite.js +45 -0
  59. package/lib/module/games/dino-jump/components/StarSprite.js.map +1 -0
  60. package/lib/module/games/dino-jump/components/index.js +9 -0
  61. package/lib/module/games/dino-jump/components/index.js.map +1 -0
  62. package/lib/module/games/flappy-bird/FlappyBird.js +131 -0
  63. package/lib/module/games/flappy-bird/FlappyBird.js.map +1 -0
  64. package/lib/module/games/flappy-bird/FlappyBirdConstants.js +90 -0
  65. package/lib/module/games/flappy-bird/FlappyBirdConstants.js.map +1 -0
  66. package/lib/module/games/flappy-bird/FlappyBirdStore.js +276 -0
  67. package/lib/module/games/flappy-bird/FlappyBirdStore.js.map +1 -0
  68. package/lib/module/games/flappy-bird/components/Bird.js +87 -0
  69. package/lib/module/games/flappy-bird/components/Bird.js.map +1 -0
  70. package/lib/module/games/flappy-bird/components/GameArea.js +86 -0
  71. package/lib/module/games/flappy-bird/components/GameArea.js.map +1 -0
  72. package/lib/module/games/flappy-bird/components/GameBackground.js +112 -0
  73. package/lib/module/games/flappy-bird/components/GameBackground.js.map +1 -0
  74. package/lib/module/games/flappy-bird/components/Pipes.js +175 -0
  75. package/lib/module/games/flappy-bird/components/Pipes.js.map +1 -0
  76. package/lib/module/games/flappy-bird/components/ScoreBoard.js +72 -0
  77. package/lib/module/games/flappy-bird/components/ScoreBoard.js.map +1 -0
  78. package/lib/module/games/flappy-bird/components/index.js +8 -0
  79. package/lib/module/games/flappy-bird/components/index.js.map +1 -0
  80. package/lib/module/games/fruit-merger/FruitMerger.js +112 -0
  81. package/lib/module/games/fruit-merger/FruitMerger.js.map +1 -0
  82. package/lib/module/games/fruit-merger/FruitMergerConstants.js +119 -0
  83. package/lib/module/games/fruit-merger/FruitMergerConstants.js.map +1 -0
  84. package/lib/module/games/fruit-merger/FruitMergerService.js +13 -0
  85. package/lib/module/games/fruit-merger/FruitMergerService.js.map +1 -0
  86. package/lib/module/games/fruit-merger/FruitMergerStore.js +318 -0
  87. package/lib/module/games/fruit-merger/FruitMergerStore.js.map +1 -0
  88. package/lib/module/games/fruit-merger/components/FruitItem.js +102 -0
  89. package/lib/module/games/fruit-merger/components/FruitItem.js.map +1 -0
  90. package/lib/module/games/fruit-merger/components/GameArea.js +123 -0
  91. package/lib/module/games/fruit-merger/components/GameArea.js.map +1 -0
  92. package/lib/module/games/fruit-merger/components/GameBackground.js +477 -0
  93. package/lib/module/games/fruit-merger/components/GameBackground.js.map +1 -0
  94. package/lib/module/games/fruit-merger/components/ScoreBoard.js +66 -0
  95. package/lib/module/games/fruit-merger/components/ScoreBoard.js.map +1 -0
  96. package/lib/module/games/fruit-merger/components/index.js +7 -0
  97. package/lib/module/games/fruit-merger/components/index.js.map +1 -0
  98. package/lib/module/games/fruit-ninja/FruitNinja.js +6 -9
  99. package/lib/module/games/fruit-ninja/FruitNinja.js.map +1 -1
  100. package/lib/module/games/game-2048/Game2048.js +120 -0
  101. package/lib/module/games/game-2048/Game2048.js.map +1 -0
  102. package/lib/module/games/game-2048/Game2048Constants.js +263 -0
  103. package/lib/module/games/game-2048/Game2048Constants.js.map +1 -0
  104. package/lib/module/games/game-2048/Game2048Service.js +457 -0
  105. package/lib/module/games/game-2048/Game2048Service.js.map +1 -0
  106. package/lib/module/games/game-2048/Game2048Store.js +238 -0
  107. package/lib/module/games/game-2048/Game2048Store.js.map +1 -0
  108. package/lib/module/games/game-2048/components/GameBackground.js +247 -0
  109. package/lib/module/games/game-2048/components/GameBackground.js.map +1 -0
  110. package/lib/module/games/game-2048/components/GameGrid.js +139 -0
  111. package/lib/module/games/game-2048/components/GameGrid.js.map +1 -0
  112. package/lib/module/games/game-2048/components/GameTile.js +72 -0
  113. package/lib/module/games/game-2048/components/GameTile.js.map +1 -0
  114. package/lib/module/games/game-2048/components/ScoreBoard.js +70 -0
  115. package/lib/module/games/game-2048/components/ScoreBoard.js.map +1 -0
  116. package/lib/module/games/game-2048/components/index.js +7 -0
  117. package/lib/module/games/game-2048/components/index.js.map +1 -0
  118. package/lib/module/games/maze-runner/MazeRunner.js +33 -31
  119. package/lib/module/games/maze-runner/MazeRunner.js.map +1 -1
  120. package/lib/module/games/popit-fidget/PopitFidget.js +34 -32
  121. package/lib/module/games/popit-fidget/PopitFidget.js.map +1 -1
  122. package/lib/module/games/sliding-numbers/SlidingNumbers.js +161 -0
  123. package/lib/module/games/sliding-numbers/SlidingNumbers.js.map +1 -0
  124. package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +207 -0
  125. package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js.map +1 -0
  126. package/lib/module/games/sliding-numbers/SlidingNumbersService.js +248 -0
  127. package/lib/module/games/sliding-numbers/SlidingNumbersService.js.map +1 -0
  128. package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +275 -0
  129. package/lib/module/games/sliding-numbers/SlidingNumbersStore.js.map +1 -0
  130. package/lib/module/games/sliding-numbers/components/GameBackground.js +259 -0
  131. package/lib/module/games/sliding-numbers/components/GameBackground.js.map +1 -0
  132. package/lib/module/games/sliding-numbers/components/NumbersGrid.js +174 -0
  133. package/lib/module/games/sliding-numbers/components/NumbersGrid.js.map +1 -0
  134. package/lib/module/games/sliding-numbers/components/NumbersTile.js +116 -0
  135. package/lib/module/games/sliding-numbers/components/NumbersTile.js.map +1 -0
  136. package/lib/module/games/sliding-numbers/components/ScoreBoard.js +66 -0
  137. package/lib/module/games/sliding-numbers/components/ScoreBoard.js.map +1 -0
  138. package/lib/module/games/sliding-numbers/components/index.js +7 -0
  139. package/lib/module/games/sliding-numbers/components/index.js.map +1 -0
  140. package/lib/module/games/snake/Snake.js +192 -0
  141. package/lib/module/games/snake/Snake.js.map +1 -0
  142. package/lib/module/games/snake/SnakeConstants.js +138 -0
  143. package/lib/module/games/snake/SnakeConstants.js.map +1 -0
  144. package/lib/module/games/snake/SnakeService.js +148 -0
  145. package/lib/module/games/snake/SnakeService.js.map +1 -0
  146. package/lib/module/games/snake/SnakeStore.js +184 -0
  147. package/lib/module/games/snake/SnakeStore.js.map +1 -0
  148. package/lib/module/games/snake/components/GameBackground.js +221 -0
  149. package/lib/module/games/snake/components/GameBackground.js.map +1 -0
  150. package/lib/module/games/snake/components/GameGrid.js +153 -0
  151. package/lib/module/games/snake/components/GameGrid.js.map +1 -0
  152. package/lib/module/games/snake/components/ScoreBoard.js +57 -0
  153. package/lib/module/games/snake/components/ScoreBoard.js.map +1 -0
  154. package/lib/module/games/snake/components/index.js +6 -0
  155. package/lib/module/games/snake/components/index.js.map +1 -0
  156. package/lib/module/games/snake/index.js +6 -0
  157. package/lib/module/games/snake/index.js.map +1 -0
  158. package/lib/module/games/space-fighter/SpaceFighter.js +7 -10
  159. package/lib/module/games/space-fighter/SpaceFighter.js.map +1 -1
  160. package/lib/module/games/whack-a-mole/WhackAMole.js +6 -6
  161. package/lib/module/games/whack-a-mole/WhackAMole.js.map +1 -1
  162. package/lib/module/index.js +8 -0
  163. package/lib/module/index.js.map +1 -1
  164. package/lib/module/services/GamesConstants.js +58 -2
  165. package/lib/module/services/GamesConstants.js.map +1 -1
  166. package/lib/module/services/GamesService.js +40 -0
  167. package/lib/module/services/GamesService.js.map +1 -1
  168. package/lib/module/services/SoundsService.js +132 -1
  169. package/lib/module/services/SoundsService.js.map +1 -1
  170. package/lib/module/shared/helpers/GameOverModal.js +6 -3
  171. package/lib/module/shared/helpers/GameOverModal.js.map +1 -1
  172. package/lib/module/shared/helpers/GameSettingsModal.js +3 -3
  173. package/lib/module/shared/helpers/GameSettingsModal.js.map +1 -1
  174. package/lib/module/shared/helpers/ParticleBlast.js +3 -2
  175. package/lib/module/shared/helpers/ParticleBlast.js.map +1 -1
  176. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -1
  177. package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts +4 -0
  178. package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts.map +1 -0
  179. package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +104 -0
  180. package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts.map +1 -0
  181. package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts +40 -0
  182. package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts.map +1 -0
  183. package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts +48 -0
  184. package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts.map +1 -0
  185. package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts +13 -0
  186. package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts.map +1 -0
  187. package/lib/typescript/src/games/candy-crush/components/GameBackground.d.ts +5 -0
  188. package/lib/typescript/src/games/candy-crush/components/GameBackground.d.ts.map +1 -0
  189. package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts +3 -0
  190. package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts.map +1 -0
  191. package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts +3 -0
  192. package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts.map +1 -0
  193. package/lib/typescript/src/games/candy-crush/components/index.d.ts +5 -0
  194. package/lib/typescript/src/games/candy-crush/components/index.d.ts.map +1 -0
  195. package/lib/typescript/src/games/candy-crush/index.d.ts +4 -0
  196. package/lib/typescript/src/games/candy-crush/index.d.ts.map +1 -0
  197. package/lib/typescript/src/games/color-sort/ColorSort.d.ts +4 -0
  198. package/lib/typescript/src/games/color-sort/ColorSort.d.ts.map +1 -0
  199. package/lib/typescript/src/games/color-sort/ColorSortConstants.d.ts +52 -0
  200. package/lib/typescript/src/games/color-sort/ColorSortConstants.d.ts.map +1 -0
  201. package/lib/typescript/src/games/color-sort/ColorSortService.d.ts +66 -0
  202. package/lib/typescript/src/games/color-sort/ColorSortService.d.ts.map +1 -0
  203. package/lib/typescript/src/games/color-sort/ColorSortStore.d.ts +48 -0
  204. package/lib/typescript/src/games/color-sort/ColorSortStore.d.ts.map +1 -0
  205. package/lib/typescript/src/games/color-sort/components/ColorContainer.d.ts +11 -0
  206. package/lib/typescript/src/games/color-sort/components/ColorContainer.d.ts.map +1 -0
  207. package/lib/typescript/src/games/color-sort/components/GameBackground.d.ts +7 -0
  208. package/lib/typescript/src/games/color-sort/components/GameBackground.d.ts.map +1 -0
  209. package/lib/typescript/src/games/color-sort/components/ScoreBoard.d.ts +3 -0
  210. package/lib/typescript/src/games/color-sort/components/ScoreBoard.d.ts.map +1 -0
  211. package/lib/typescript/src/games/color-sort/components/index.d.ts +4 -0
  212. package/lib/typescript/src/games/color-sort/components/index.d.ts.map +1 -0
  213. package/lib/typescript/src/games/dino-jump/DinoJump.d.ts +4 -0
  214. package/lib/typescript/src/games/dino-jump/DinoJump.d.ts.map +1 -0
  215. package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts +95 -0
  216. package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts.map +1 -0
  217. package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts +40 -0
  218. package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts.map +1 -0
  219. package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts +103 -0
  220. package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts.map +1 -0
  221. package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts +3 -0
  222. package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts.map +1 -0
  223. package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts +8 -0
  224. package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts.map +1 -0
  225. package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts +7 -0
  226. package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts.map +1 -0
  227. package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts +3 -0
  228. package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts.map +1 -0
  229. package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts +3 -0
  230. package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts.map +1 -0
  231. package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts +3 -0
  232. package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts.map +1 -0
  233. package/lib/typescript/src/games/dino-jump/components/index.d.ts +7 -0
  234. package/lib/typescript/src/games/dino-jump/components/index.d.ts.map +1 -0
  235. package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts +4 -0
  236. package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts.map +1 -0
  237. package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts +83 -0
  238. package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts.map +1 -0
  239. package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts +53 -0
  240. package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts.map +1 -0
  241. package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts +8 -0
  242. package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts.map +1 -0
  243. package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts +8 -0
  244. package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts.map +1 -0
  245. package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts +7 -0
  246. package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts.map +1 -0
  247. package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts +8 -0
  248. package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts.map +1 -0
  249. package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts +3 -0
  250. package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts.map +1 -0
  251. package/lib/typescript/src/games/flappy-bird/components/index.d.ts +6 -0
  252. package/lib/typescript/src/games/flappy-bird/components/index.d.ts.map +1 -0
  253. package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts +4 -0
  254. package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts.map +1 -0
  255. package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts +115 -0
  256. package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts.map +1 -0
  257. package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts +5 -0
  258. package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts.map +1 -0
  259. package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts +43 -0
  260. package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts.map +1 -0
  261. package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts +10 -0
  262. package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts.map +1 -0
  263. package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts +8 -0
  264. package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts.map +1 -0
  265. package/lib/typescript/src/games/fruit-merger/components/GameBackground.d.ts +7 -0
  266. package/lib/typescript/src/games/fruit-merger/components/GameBackground.d.ts.map +1 -0
  267. package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts +3 -0
  268. package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts.map +1 -0
  269. package/lib/typescript/src/games/fruit-merger/components/index.d.ts +5 -0
  270. package/lib/typescript/src/games/fruit-merger/components/index.d.ts.map +1 -0
  271. package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts.map +1 -1
  272. package/lib/typescript/src/games/game-2048/Game2048.d.ts +4 -0
  273. package/lib/typescript/src/games/game-2048/Game2048.d.ts.map +1 -0
  274. package/lib/typescript/src/games/game-2048/Game2048Constants.d.ts +163 -0
  275. package/lib/typescript/src/games/game-2048/Game2048Constants.d.ts.map +1 -0
  276. package/lib/typescript/src/games/game-2048/Game2048Service.d.ts +113 -0
  277. package/lib/typescript/src/games/game-2048/Game2048Service.d.ts.map +1 -0
  278. package/lib/typescript/src/games/game-2048/Game2048Store.d.ts +48 -0
  279. package/lib/typescript/src/games/game-2048/Game2048Store.d.ts.map +1 -0
  280. package/lib/typescript/src/games/game-2048/components/GameBackground.d.ts +7 -0
  281. package/lib/typescript/src/games/game-2048/components/GameBackground.d.ts.map +1 -0
  282. package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts +7 -0
  283. package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts.map +1 -0
  284. package/lib/typescript/src/games/game-2048/components/GameTile.d.ts +13 -0
  285. package/lib/typescript/src/games/game-2048/components/GameTile.d.ts.map +1 -0
  286. package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts +3 -0
  287. package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts.map +1 -0
  288. package/lib/typescript/src/games/game-2048/components/index.d.ts +5 -0
  289. package/lib/typescript/src/games/game-2048/components/index.d.ts.map +1 -0
  290. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -1
  291. package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts.map +1 -1
  292. package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts +4 -0
  293. package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts.map +1 -0
  294. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersConstants.d.ts +108 -0
  295. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersConstants.d.ts.map +1 -0
  296. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts +34 -0
  297. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts.map +1 -0
  298. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts +56 -0
  299. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts.map +1 -0
  300. package/lib/typescript/src/games/sliding-numbers/components/GameBackground.d.ts +7 -0
  301. package/lib/typescript/src/games/sliding-numbers/components/GameBackground.d.ts.map +1 -0
  302. package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts +7 -0
  303. package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts.map +1 -0
  304. package/lib/typescript/src/games/sliding-numbers/components/NumbersTile.d.ts +11 -0
  305. package/lib/typescript/src/games/sliding-numbers/components/NumbersTile.d.ts.map +1 -0
  306. package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts +3 -0
  307. package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts.map +1 -0
  308. package/lib/typescript/src/games/sliding-numbers/components/index.d.ts +5 -0
  309. package/lib/typescript/src/games/sliding-numbers/components/index.d.ts.map +1 -0
  310. package/lib/typescript/src/games/snake/Snake.d.ts +4 -0
  311. package/lib/typescript/src/games/snake/Snake.d.ts.map +1 -0
  312. package/lib/typescript/src/games/snake/SnakeConstants.d.ts +93 -0
  313. package/lib/typescript/src/games/snake/SnakeConstants.d.ts.map +1 -0
  314. package/lib/typescript/src/games/snake/SnakeService.d.ts +30 -0
  315. package/lib/typescript/src/games/snake/SnakeService.d.ts.map +1 -0
  316. package/lib/typescript/src/games/snake/SnakeStore.d.ts +43 -0
  317. package/lib/typescript/src/games/snake/SnakeStore.d.ts.map +1 -0
  318. package/lib/typescript/src/games/snake/components/GameBackground.d.ts +5 -0
  319. package/lib/typescript/src/games/snake/components/GameBackground.d.ts.map +1 -0
  320. package/lib/typescript/src/games/snake/components/GameGrid.d.ts +3 -0
  321. package/lib/typescript/src/games/snake/components/GameGrid.d.ts.map +1 -0
  322. package/lib/typescript/src/games/snake/components/ScoreBoard.d.ts +3 -0
  323. package/lib/typescript/src/games/snake/components/ScoreBoard.d.ts.map +1 -0
  324. package/lib/typescript/src/games/snake/components/index.d.ts +4 -0
  325. package/lib/typescript/src/games/snake/components/index.d.ts.map +1 -0
  326. package/lib/typescript/src/games/snake/index.d.ts +4 -0
  327. package/lib/typescript/src/games/snake/index.d.ts.map +1 -0
  328. package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts.map +1 -1
  329. package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts.map +1 -1
  330. package/lib/typescript/src/index.d.ts +8 -0
  331. package/lib/typescript/src/index.d.ts.map +1 -1
  332. package/lib/typescript/src/services/GamesConstants.d.ts +156 -0
  333. package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -1
  334. package/lib/typescript/src/services/GamesService.d.ts +10 -2
  335. package/lib/typescript/src/services/GamesService.d.ts.map +1 -1
  336. package/lib/typescript/src/services/SoundsService.d.ts +103 -0
  337. package/lib/typescript/src/services/SoundsService.d.ts.map +1 -1
  338. package/lib/typescript/src/shared/helpers/GameOverModal.d.ts +2 -0
  339. package/lib/typescript/src/shared/helpers/GameOverModal.d.ts.map +1 -1
  340. package/lib/typescript/src/shared/helpers/ParticleBlast.d.ts.map +1 -1
  341. package/package.json +1 -1
@@ -0,0 +1,238 @@
1
+ "use strict";
2
+
3
+ import { create } from 'zustand';
4
+ import { subscribeWithSelector } from 'zustand/middleware';
5
+ import { Game2048Service } from "./Game2048Service.js";
6
+ import { GAME_CONFIG, GAME_2048_SOUNDS, GAME_2048_SETTINGS } from "./Game2048Constants.js";
7
+ import { immerMiddleware } from "../../services/GamesService.js";
8
+ import { playSound } from "../../services/SoundsService.js";
9
+ import { playHaptic, HapticType } from "../../services/HapticsService.js";
10
+ // Ultra-minimal store with memory-safe implementation
11
+ export const useGame2048Store = create()(subscribeWithSelector(immerMiddleware((set, get) => {
12
+ const gameService = new Game2048Service();
13
+ return {
14
+ // Initial state - minimal for memory efficiency
15
+ score: 0,
16
+ isPlaying: false,
17
+ isGameOver: false,
18
+ isWon: false,
19
+ isAnimating: false,
20
+ grid: gameService.createGrid(),
21
+ nextTileId: 1,
22
+ difficulty: 'easy',
23
+ targetValue: 2048,
24
+ gridSize: 4,
25
+ enableSounds: true,
26
+ enableHaptics: true,
27
+ // Actions
28
+ startGame: () => {
29
+ set(state => {
30
+ state.isPlaying = true;
31
+ });
32
+ },
33
+ stopGame: () => {
34
+ set(state => {
35
+ state.isPlaying = false;
36
+ });
37
+ },
38
+ resetGame: () => {
39
+ const state = get();
40
+ state.initializeGame(state.difficulty);
41
+ },
42
+ initializeGame: (difficulty = 'easy') => {
43
+ set(state => {
44
+ // Get difficulty settings
45
+ const difficultySettings = GAME_2048_SETTINGS.DIFFICULTY_SETTINGS[difficulty];
46
+
47
+ // Clear existing grid to prevent memory leaks
48
+ state.grid = gameService.createGrid();
49
+
50
+ // Add initial tiles with animations
51
+ let tileId = 1;
52
+ const tile1 = gameService.addRandomTile(state.grid, tileId++);
53
+ const tile2 = gameService.addRandomTile(state.grid, tileId++);
54
+
55
+ // Reset state with difficulty settings
56
+ state.score = 0;
57
+ state.isPlaying = false;
58
+ state.isGameOver = false;
59
+ state.isWon = false;
60
+ state.isAnimating = false;
61
+ state.nextTileId = tileId;
62
+ state.difficulty = difficulty;
63
+ state.targetValue = difficultySettings.targetTile;
64
+ state.gridSize = difficultySettings.gridSize;
65
+
66
+ // Animate initial tiles
67
+ [tile1, tile2].forEach(tile => {
68
+ if (tile?.scaleValue) {
69
+ setTimeout(() => {
70
+ tile.scaleValue?.setValue(0);
71
+ // Use React Native's Animated API
72
+ const {
73
+ Animated
74
+ } = require('react-native');
75
+ Animated.spring(tile.scaleValue, {
76
+ toValue: 1,
77
+ useNativeDriver: true,
78
+ tension: GAME_CONFIG.ANIMATION_CONFIG.TENSION,
79
+ friction: GAME_CONFIG.ANIMATION_CONFIG.FRICTION
80
+ }).start();
81
+ }, 100);
82
+ }
83
+ });
84
+ });
85
+ },
86
+ updateGrid: newGrid => {
87
+ set(state => {
88
+ state.grid = newGrid;
89
+ });
90
+ },
91
+ updateScore: newScore => {
92
+ set(state => {
93
+ state.score = newScore;
94
+ });
95
+ },
96
+ setIsAnimating: animating => {
97
+ set(state => {
98
+ state.isAnimating = animating;
99
+ });
100
+ },
101
+ setGameOver: gameOver => {
102
+ set(state => {
103
+ state.isGameOver = gameOver;
104
+ if (gameOver) {
105
+ state.isPlaying = false;
106
+ }
107
+ });
108
+ },
109
+ setWon: won => {
110
+ set(state => {
111
+ state.isWon = won;
112
+ });
113
+ },
114
+ incrementTileId: () => {
115
+ const state = get();
116
+ const newId = state.nextTileId;
117
+ set(draft => {
118
+ draft.nextTileId = newId + 1;
119
+ });
120
+ return newId;
121
+ },
122
+ handleMove: direction => {
123
+ const state = get();
124
+
125
+ // Early returns for better performance
126
+ if (state.isGameOver || state.isWon || state.isAnimating) {
127
+ return false;
128
+ }
129
+
130
+ // Batch state updates for better performance
131
+ set(draft => {
132
+ // Auto-start the game if not playing
133
+ if (!draft.isPlaying) {
134
+ draft.isPlaying = true;
135
+ }
136
+ draft.isAnimating = true;
137
+ });
138
+
139
+ // Create a shallow copy for better memory performance
140
+ const gridCopy = state.grid.map(row => row.slice());
141
+ const {
142
+ moved,
143
+ score: moveScore
144
+ } = gameService.moveTiles(gridCopy, direction);
145
+ if (moved) {
146
+ // Batch all state updates together
147
+ const newTileId = state.nextTileId;
148
+ const newTile = gameService.addRandomTile(gridCopy, newTileId);
149
+ const multiplier = GAME_2048_SETTINGS.SCORE_MULTIPLIER[state.difficulty];
150
+ const newScore = state.score + moveScore * multiplier;
151
+
152
+ // Check game state before updating
153
+ const hasWon = gameService.hasWon(gridCopy, state.targetValue);
154
+ const isGameOver = gameService.checkGameOver(gridCopy);
155
+
156
+ // Single state update for all changes
157
+ set(draft => {
158
+ draft.grid = gridCopy;
159
+ draft.score = newScore;
160
+ draft.nextTileId = newTileId + 1;
161
+ if (hasWon) draft.isWon = true;
162
+ if (isGameOver) draft.isGameOver = true;
163
+ });
164
+
165
+ // Async sound/haptic feedback (non-blocking)
166
+ Promise.resolve().then(() => {
167
+ playSound(GAME_2048_SOUNDS.TILE_MOVE, state.enableSounds);
168
+ playHaptic(HapticType.LIGHT, state.enableHaptics);
169
+ if (moveScore > 0) {
170
+ playSound(GAME_2048_SOUNDS.TILE_MERGE, state.enableSounds);
171
+ playHaptic(HapticType.MEDIUM, state.enableHaptics);
172
+ }
173
+ if (newTile) {
174
+ playSound(GAME_2048_SOUNDS.NEW_TILE, state.enableSounds);
175
+ }
176
+ if (hasWon) {
177
+ playSound(GAME_2048_SOUNDS.GAME_WIN, state.enableSounds);
178
+ playHaptic(HapticType.SUCCESS, state.enableHaptics);
179
+ } else if (isGameOver) {
180
+ playSound(GAME_2048_SOUNDS.GAME_OVER, state.enableSounds);
181
+ playHaptic(HapticType.ERROR, state.enableHaptics);
182
+ }
183
+ });
184
+
185
+ // Optimized animation handling
186
+ if (newTile?.scaleValue) {
187
+ const {
188
+ Animated
189
+ } = require('react-native');
190
+ newTile.scaleValue.setValue(0);
191
+ Animated.spring(newTile.scaleValue, {
192
+ toValue: 1,
193
+ useNativeDriver: true,
194
+ tension: GAME_CONFIG.ANIMATION_CONFIG.TENSION,
195
+ friction: GAME_CONFIG.ANIMATION_CONFIG.FRICTION
196
+ }).start(() => {
197
+ set(draft => {
198
+ draft.isAnimating = false;
199
+ });
200
+ });
201
+ } else {
202
+ set(draft => {
203
+ draft.isAnimating = false;
204
+ });
205
+ }
206
+ return true;
207
+ } else {
208
+ // Async invalid move feedback
209
+ Promise.resolve().then(() => {
210
+ playSound(GAME_2048_SOUNDS.INVALID_MOVE, state.enableSounds);
211
+ playHaptic(HapticType.WARNING, state.enableHaptics);
212
+ });
213
+ set(draft => {
214
+ draft.isAnimating = false;
215
+ });
216
+ return false;
217
+ }
218
+ },
219
+ updateSettings: (enableSounds, enableHaptics) => {
220
+ set(state => {
221
+ state.enableSounds = enableSounds;
222
+ state.enableHaptics = enableHaptics;
223
+ });
224
+ }
225
+ };
226
+ })));
227
+
228
+ // Selector hooks for performance optimization
229
+ export const useScore = () => useGame2048Store(state => state.score);
230
+ export const useGrid = () => useGame2048Store(state => state.grid);
231
+ export const useIsPlaying = () => useGame2048Store(state => state.isPlaying);
232
+ export const useIsGameOver = () => useGame2048Store(state => state.isGameOver);
233
+ export const useIsWon = () => useGame2048Store(state => state.isWon);
234
+ export const useIsAnimating = () => useGame2048Store(state => state.isAnimating);
235
+ export const useDifficulty = () => useGame2048Store(state => state.difficulty);
236
+ export const useTargetValue = () => useGame2048Store(state => state.targetValue);
237
+ export const useGridSize = () => useGame2048Store(state => state.gridSize);
238
+ //# sourceMappingURL=Game2048Store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["create","subscribeWithSelector","Game2048Service","GAME_CONFIG","GAME_2048_SOUNDS","GAME_2048_SETTINGS","immerMiddleware","playSound","playHaptic","HapticType","useGame2048Store","set","get","gameService","score","isPlaying","isGameOver","isWon","isAnimating","grid","createGrid","nextTileId","difficulty","targetValue","gridSize","enableSounds","enableHaptics","startGame","state","stopGame","resetGame","initializeGame","difficultySettings","DIFFICULTY_SETTINGS","tileId","tile1","addRandomTile","tile2","targetTile","forEach","tile","scaleValue","setTimeout","setValue","Animated","require","spring","toValue","useNativeDriver","tension","ANIMATION_CONFIG","TENSION","friction","FRICTION","start","updateGrid","newGrid","updateScore","newScore","setIsAnimating","animating","setGameOver","gameOver","setWon","won","incrementTileId","newId","draft","handleMove","direction","gridCopy","map","row","slice","moved","moveScore","moveTiles","newTileId","newTile","multiplier","SCORE_MULTIPLIER","hasWon","checkGameOver","Promise","resolve","then","TILE_MOVE","LIGHT","TILE_MERGE","MEDIUM","NEW_TILE","GAME_WIN","SUCCESS","GAME_OVER","ERROR","INVALID_MOVE","WARNING","updateSettings","useScore","useGrid","useIsPlaying","useIsGameOver","useIsWon","useIsAnimating","useDifficulty","useTargetValue","useGridSize"],"sourceRoot":"../../../../src","sources":["games/game-2048/Game2048Store.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,SAAS;AAChC,SAASC,qBAAqB,QAAQ,oBAAoB;AAE1D,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,WAAW,EAAEC,gBAAgB,EAAEC,kBAAkB,QAAQ,wBAAqB;AACvF,SAASC,eAAe,QAAQ,gCAA6B;AAC7D,SAASC,SAAS,QAAQ,iCAA8B;AACxD,SAASC,UAAU,EAAEC,UAAU,QAAQ,kCAA+B;AAkCtE;AACA,OAAO,MAAMC,gBAAgB,GAAGV,MAAM,CAAgB,CAAC,CACrDC,qBAAqB,CACnBK,eAAe,CAAC,CAACK,GAAQ,EAAEC,GAAQ,KAAK;EACtC,MAAMC,WAAW,GAAG,IAAIX,eAAe,CAAC,CAAC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,KAAK,CAACX,KAAK,CAAC;AACpE,OAAO,MAAMsF,cAAc,GAAGA,CAAA,KAAM7F,gBAAgB,CAACkB,KAAK,IAAIA,KAAK,CAACV,WAAW,CAAC;AAChF,OAAO,MAAMsF,aAAa,GAAGA,CAAA,KAAM9F,gBAAgB,CAACkB,KAAK,IAAIA,KAAK,CAACN,UAAU,CAAC;AAC9E,OAAO,MAAMmF,cAAc,GAAGA,CAAA,KAAM/F,gBAAgB,CAACkB,KAAK,IAAIA,KAAK,CAACL,WAAW,CAAC;AAChF,OAAO,MAAMmF,WAAW,GAAGA,CAAA,KAAMhG,gBAAgB,CAACkB,KAAK,IAAIA,KAAK,CAACJ,QAAQ,CAAC","ignoreList":[]}
@@ -0,0 +1,247 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { View, StyleSheet, Dimensions } from 'react-native';
5
+ import { Canvas, LinearGradient, Rect, vec, Circle, RoundedRect } from '@shopify/react-native-skia';
6
+ import { BACKGROUND_TILE_COLORS } from "../Game2048Constants.js";
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ const {
9
+ width,
10
+ height
11
+ } = Dimensions.get('window');
12
+ export const GameBackground = /*#__PURE__*/React.memo(({
13
+ children
14
+ }) => {
15
+ // Generate beautiful floating 2048 tiles
16
+ const generateFloatingTiles = React.useMemo(() => {
17
+ const elements = [];
18
+ const tileCount = 30;
19
+ for (let i = 0; i < tileCount; i++) {
20
+ const baseX = width / tileCount * i;
21
+ const baseY = height / tileCount * i;
22
+
23
+ // Add subtle random offset for natural look
24
+ const x = baseX + Math.sin(i * 0.5) * 60 + Math.random() * 120;
25
+ const y = baseY + Math.cos(i * 0.7) * 80 + Math.random() * 140;
26
+ const tileSize = 15 + Math.random() * 25;
27
+ const colorIndex = i % BACKGROUND_TILE_COLORS.length;
28
+ const opacity = 0.25 + Math.sin(i) * 0.15;
29
+
30
+ // 2048 tile with varied shapes to suggest numbers
31
+ const tileX = Math.max(tileSize / 2, Math.min(width - tileSize, x));
32
+ const tileY = Math.max(tileSize / 2, Math.min(height - tileSize, y));
33
+
34
+ // Create different tile patterns inspired by 2048 numbers
35
+ if (i % 5 === 0) {
36
+ // Square tiles (like 2, 4, 8)
37
+ elements.push(/*#__PURE__*/_jsx(RoundedRect, {
38
+ x: tileX,
39
+ y: tileY,
40
+ width: tileSize,
41
+ height: tileSize,
42
+ r: tileSize * 0.25,
43
+ color: `${BACKGROUND_TILE_COLORS[colorIndex]}${Math.floor(opacity * 255).toString(16).padStart(2, '0')}`
44
+ }, `square-tile-${i}`));
45
+ } else if (i % 5 === 1) {
46
+ // Rectangular tiles (like 16, 32)
47
+ elements.push(/*#__PURE__*/_jsx(RoundedRect, {
48
+ x: tileX,
49
+ y: tileY,
50
+ width: tileSize * 0.7,
51
+ height: tileSize,
52
+ r: tileSize * 0.2,
53
+ color: `${BACKGROUND_TILE_COLORS[colorIndex]}${Math.floor(opacity * 255).toString(16).padStart(2, '0')}`
54
+ }, `rect-tile-${i}`));
55
+ } else if (i % 5 === 2) {
56
+ // Wide tiles (like 64, 128)
57
+ elements.push(/*#__PURE__*/_jsx(RoundedRect, {
58
+ x: tileX,
59
+ y: tileY,
60
+ width: tileSize * 1.3,
61
+ height: tileSize * 0.8,
62
+ r: tileSize * 0.15,
63
+ color: `${BACKGROUND_TILE_COLORS[colorIndex]}${Math.floor(opacity * 255).toString(16).padStart(2, '0')}`
64
+ }, `wide-tile-${i}`));
65
+ } else if (i % 5 === 3) {
66
+ // Circular tiles (like 256, 512)
67
+ elements.push(/*#__PURE__*/_jsx(Circle, {
68
+ cx: tileX + tileSize / 2,
69
+ cy: tileY + tileSize / 2,
70
+ r: tileSize / 2,
71
+ color: `${BACKGROUND_TILE_COLORS[colorIndex]}${Math.floor(opacity * 255).toString(16).padStart(2, '0')}`
72
+ }, `circle-tile-${i}`));
73
+ } else {
74
+ // Diamond-like tiles (like 1024, 2048)
75
+ elements.push(/*#__PURE__*/_jsx(RoundedRect, {
76
+ x: tileX,
77
+ y: tileY,
78
+ width: tileSize * 0.9,
79
+ height: tileSize * 0.9,
80
+ r: tileSize * 0.3,
81
+ color: `${BACKGROUND_TILE_COLORS[colorIndex]}${Math.floor(opacity * 255).toString(16).padStart(2, '0')}`
82
+ }, `diamond-tile-${i}`));
83
+ }
84
+ }
85
+ return elements;
86
+ }, []);
87
+ return /*#__PURE__*/_jsxs(View, {
88
+ style: styles.container,
89
+ children: [/*#__PURE__*/_jsxs(Canvas, {
90
+ style: styles.backgroundCanvas,
91
+ children: [/*#__PURE__*/_jsx(Rect, {
92
+ x: 0,
93
+ y: 0,
94
+ width: width,
95
+ height: height,
96
+ children: /*#__PURE__*/_jsx(LinearGradient, {
97
+ start: vec(0, 0),
98
+ end: vec(width, height),
99
+ colors: [`${BACKGROUND_TILE_COLORS[0]}35`,
100
+ // Vibrant pink
101
+ `${BACKGROUND_TILE_COLORS[3]}30`,
102
+ // Orange
103
+ `${BACKGROUND_TILE_COLORS[6]}35`,
104
+ // Green
105
+ `${BACKGROUND_TILE_COLORS[9]}30`,
106
+ // Blue
107
+ `${BACKGROUND_TILE_COLORS[11]}35` // Purple
108
+ ]
109
+ })
110
+ }), /*#__PURE__*/_jsx(Rect, {
111
+ x: 0,
112
+ y: 0,
113
+ width: width,
114
+ height: height,
115
+ children: /*#__PURE__*/_jsx(LinearGradient, {
116
+ start: vec(0, 0),
117
+ end: vec(width / 2, height / 2),
118
+ colors: [`${BACKGROUND_TILE_COLORS[1]}25`,
119
+ // Bright red
120
+ 'transparent', `${BACKGROUND_TILE_COLORS[4]}25`,
121
+ // Yellow
122
+ 'transparent', `${BACKGROUND_TILE_COLORS[7]}25`,
123
+ // Teal
124
+ 'transparent']
125
+ })
126
+ }), /*#__PURE__*/_jsx(Rect, {
127
+ x: 0,
128
+ y: 0,
129
+ width: width,
130
+ height: height,
131
+ children: /*#__PURE__*/_jsx(LinearGradient, {
132
+ start: vec(width, 0),
133
+ end: vec(0, height),
134
+ colors: [`${BACKGROUND_TILE_COLORS[2]}20`,
135
+ // Deep orange
136
+ 'transparent', `${BACKGROUND_TILE_COLORS[5]}20`,
137
+ // Lime
138
+ 'transparent', `${BACKGROUND_TILE_COLORS[8]}20`,
139
+ // Cyan
140
+ 'transparent']
141
+ })
142
+ }), generateFloatingTiles, /*#__PURE__*/_jsx(RoundedRect, {
143
+ x: width * 0.08,
144
+ y: height * 0.12,
145
+ width: 55,
146
+ height: 55,
147
+ r: 12,
148
+ color: `${BACKGROUND_TILE_COLORS[10]}60` // Indigo
149
+ }), /*#__PURE__*/_jsx(RoundedRect, {
150
+ x: width * 0.82,
151
+ y: height * 0.78,
152
+ width: 50,
153
+ height: 50,
154
+ r: 10,
155
+ color: `${BACKGROUND_TILE_COLORS[9]}60` // Blue
156
+ }), /*#__PURE__*/_jsx(RoundedRect, {
157
+ x: width * 0.78,
158
+ y: height * 0.15,
159
+ width: 45,
160
+ height: 45,
161
+ r: 9,
162
+ color: `${BACKGROUND_TILE_COLORS[8]}60` // Cyan
163
+ }), /*#__PURE__*/_jsx(RoundedRect, {
164
+ x: width * 0.12,
165
+ y: height * 0.72,
166
+ width: 60,
167
+ height: 60,
168
+ r: 14,
169
+ color: `${BACKGROUND_TILE_COLORS[7]}60` // Teal
170
+ }), /*#__PURE__*/_jsx(RoundedRect, {
171
+ x: width * 0.45,
172
+ y: height * 0.08,
173
+ width: 40,
174
+ height: 40,
175
+ r: 8,
176
+ color: `${BACKGROUND_TILE_COLORS[6]}60` // Green
177
+ }), /*#__PURE__*/_jsx(RoundedRect, {
178
+ x: width * 0.15,
179
+ y: height * 0.45,
180
+ width: 48,
181
+ height: 48,
182
+ r: 10,
183
+ color: `${BACKGROUND_TILE_COLORS[5]}60` // Lime
184
+ }), /*#__PURE__*/_jsx(RoundedRect, {
185
+ x: width * 0.72,
186
+ y: height * 0.55,
187
+ width: 42,
188
+ height: 42,
189
+ r: 8,
190
+ color: `${BACKGROUND_TILE_COLORS[4]}60` // Yellow
191
+ }), /*#__PURE__*/_jsx(RoundedRect, {
192
+ x: width * 0.55,
193
+ y: height * 0.85,
194
+ width: 38,
195
+ height: 38,
196
+ r: 7,
197
+ color: `${BACKGROUND_TILE_COLORS[3]}60` // Orange
198
+ }), /*#__PURE__*/_jsx(Circle, {
199
+ cx: width * 0.25,
200
+ cy: height * 0.28,
201
+ r: 22,
202
+ color: `${BACKGROUND_TILE_COLORS[2]}50` // Deep orange
203
+ }), /*#__PURE__*/_jsx(Circle, {
204
+ cx: width * 0.62,
205
+ cy: height * 0.32,
206
+ r: 26,
207
+ color: `${BACKGROUND_TILE_COLORS[1]}50` // Red
208
+ }), /*#__PURE__*/_jsx(Circle, {
209
+ cx: width * 0.38,
210
+ cy: height * 0.68,
211
+ r: 20,
212
+ color: `${BACKGROUND_TILE_COLORS[0]}50` // Pink
213
+ }), Array.from({
214
+ length: Math.floor(width / 80)
215
+ }, (_, i) => /*#__PURE__*/_jsx(Rect, {
216
+ x: i * 80,
217
+ y: 0,
218
+ width: 1,
219
+ height: height,
220
+ color: "rgba(255, 255, 255, 0.08)"
221
+ }, `grid-v-${i}`)), Array.from({
222
+ length: Math.floor(height / 80)
223
+ }, (_, i) => /*#__PURE__*/_jsx(Rect, {
224
+ x: 0,
225
+ y: i * 80,
226
+ width: width,
227
+ height: 1,
228
+ color: "rgba(255, 255, 255, 0.08)"
229
+ }, `grid-h-${i}`))]
230
+ }), children]
231
+ });
232
+ });
233
+ const styles = StyleSheet.create({
234
+ container: {
235
+ flex: 1
236
+ },
237
+ backgroundCanvas: {
238
+ position: 'absolute',
239
+ top: 0,
240
+ left: 0,
241
+ right: 0,
242
+ bottom: 0,
243
+ width,
244
+ height
245
+ }
246
+ });
247
+ //# sourceMappingURL=GameBackground.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","StyleSheet","Dimensions","Canvas","LinearGradient","Rect","vec","Circle","RoundedRect","BACKGROUND_TILE_COLORS","jsx","_jsx","jsxs","_jsxs","width","height","get","GameBackground","memo","children","generateFloatingTiles","useMemo","elements","tileCount","i","baseX","baseY","x","Math","sin","random","y","cos","tileSize","colorIndex","length","opacity","tileX","max","min","tileY","push","r","color","floor","toString","padStart","cx","cy","style","styles","container","backgroundCanvas","start","end","colors","Array","from","_","create","flex","position","top","left","right","bottom"],"sourceRoot":"../../../../../src","sources":["games/game-2048/components/GameBackground.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,EAAEC,UAAU,QAAQ,cAAc;AAC3D,SACEC,MAAM,EACNC,cAAc,EACdC,IAAI,EACJC,GAAG,EACHC,MAAM,EACNC,WAAW,QACN,4BAA4B;AACnC,SAASC,sBAAsB,QAAQ,yBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE9D,MAAM;EAAEC,KAAK;EAAEC;AAAO,CAAC,GAAGb,UAAU,CAACc,GAAG,CAAC,QAAQ,CAAC;AAMlD,OAAO,MAAMC,cAA6C,gBAAGlB,KAAK,CAACmB,IAAI,CAAC,CAAC;EAAEC;AAAS,CAAC,KAAK;EACxF;EACA,MAAMC,qBAAqB,GAAGrB,KAAK,CAACsB,OAAO,CAAC,MAAM;IAChD,MAAMC,QAAQ,GAAG,EAAE;IACnB,MAAMC,SAAS,GAAG,EAAE;IAEpB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,SAAS,EAAEC,CAAC,EAAE,EAAE;MAClC,MAAMC,KAAK,GAAIX,KAAK,GAAGS,SAAS,GAAIC,CAAC;MACrC,MAAME,KAAK,GAAIX,MAAM,GAAGQ,SAAS,GAAIC,CAAC;;MAEtC;MACA,MAAMG,CAAC,GAAGF,KAAK,GAAIG,IAAI,CAACC,GAAG,CAACL,CAAC,GAAG,GAAG,CAAC,GAAG,EAAG,GAAGI,IAAI,CAACE,MAAM,CAAC,CAAC,GAAG,GAAG;MAChE,MAAMC,CAAC,GAAGL,KAAK,GAAIE,IAAI,CAACI,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R,SAAS,EAAE;IACTS,IAAI,EAAE;EACR,CAAC;EACDR,gBAAgB,EAAE;IAChBS,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTnD,KAAK;IACLC;EACF;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { View, StyleSheet, Dimensions } from 'react-native';
5
+ import { Gesture, GestureDetector } from 'react-native-gesture-handler';
6
+ import { useGrid, useGame2048Store } from "../Game2048Store.js";
7
+ import { GameTile } from "./GameTile.js";
8
+ import { GAME_CONFIG } from "../Game2048Constants.js";
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ const {
11
+ width: screenWidth
12
+ } = Dimensions.get('window');
13
+ export const GameGrid = /*#__PURE__*/React.memo(() => {
14
+ const grid = useGrid();
15
+ const {
16
+ handleMove
17
+ } = useGame2048Store();
18
+
19
+ // Memoize calculations for better performance
20
+ const gridCalculations = React.useMemo(() => {
21
+ const horizontalPadding = 40;
22
+ const availableWidth = screenWidth - horizontalPadding;
23
+ const margin = GAME_CONFIG.TILE_MARGIN;
24
+ const responsiveTileSize = Math.floor((availableWidth - margin * 5) / 4);
25
+ const tileSize = Math.max(responsiveTileSize, 60);
26
+ const gridContainerSize = tileSize * 4 + margin * 5;
27
+ return {
28
+ margin,
29
+ tileSize,
30
+ gridContainerSize
31
+ };
32
+ }, []);
33
+
34
+ // Memoized tile renderer for better performance
35
+ const renderTile = React.useCallback(tile => {
36
+ const {
37
+ margin,
38
+ tileSize
39
+ } = gridCalculations;
40
+ const x = margin + tile.col * (tileSize + margin);
41
+ const y = margin + tile.row * (tileSize + margin);
42
+ return /*#__PURE__*/_jsx(GameTile, {
43
+ tile: tile,
44
+ position: {
45
+ x,
46
+ y
47
+ },
48
+ size: tileSize
49
+ }, tile.id);
50
+ }, [gridCalculations]);
51
+
52
+ // Optimized gesture handler with memoization
53
+ const panGesture = React.useMemo(() => Gesture.Pan().onEnd(event => {
54
+ const {
55
+ translationX,
56
+ translationY
57
+ } = event;
58
+ const minDistance = 50;
59
+ const absX = Math.abs(translationX);
60
+ const absY = Math.abs(translationY);
61
+ if (absX > absY && absX > minDistance) {
62
+ handleMove(translationX > 0 ? 'right' : 'left');
63
+ } else if (absY > minDistance) {
64
+ handleMove(translationY > 0 ? 'down' : 'up');
65
+ }
66
+ }).runOnJS(true), [handleMove]);
67
+ return /*#__PURE__*/_jsx(View, {
68
+ style: styles.gameContainer,
69
+ children: /*#__PURE__*/_jsx(GestureDetector, {
70
+ gesture: panGesture,
71
+ children: /*#__PURE__*/_jsxs(View, {
72
+ style: [styles.grid, {
73
+ width: gridCalculations.gridContainerSize,
74
+ height: gridCalculations.gridContainerSize
75
+ }],
76
+ children: [React.useMemo(() => Array(16).fill(0).map((_, index) => {
77
+ const row = Math.floor(index / 4);
78
+ const col = index % 4;
79
+ const {
80
+ margin,
81
+ tileSize
82
+ } = gridCalculations;
83
+ const x = margin + col * (tileSize + margin);
84
+ const y = margin + row * (tileSize + margin);
85
+ return /*#__PURE__*/_jsx(View, {
86
+ style: [styles.cell, {
87
+ left: x,
88
+ top: y,
89
+ width: tileSize,
90
+ height: tileSize
91
+ }]
92
+ }, index);
93
+ }), [gridCalculations]), React.useMemo(() => {
94
+ const tiles = [];
95
+ for (const row of grid) {
96
+ for (const tile of row) {
97
+ if (tile) tiles.push(renderTile(tile));
98
+ }
99
+ }
100
+ return tiles;
101
+ }, [grid, renderTile])]
102
+ })
103
+ })
104
+ });
105
+ });
106
+ const styles = StyleSheet.create({
107
+ gameContainer: {
108
+ flex: 1,
109
+ justifyContent: 'center',
110
+ alignItems: 'center',
111
+ paddingHorizontal: 20,
112
+ // Responsive horizontal padding
113
+ paddingVertical: 10,
114
+ zIndex: 10,
115
+ position: 'relative'
116
+ },
117
+ grid: {
118
+ backgroundColor: 'rgba(187, 173, 160, 0.9)',
119
+ borderRadius: 15,
120
+ position: 'relative',
121
+ shadowColor: '#000',
122
+ shadowOffset: {
123
+ width: 0,
124
+ height: 8
125
+ },
126
+ shadowOpacity: 0.25,
127
+ shadowRadius: 15,
128
+ elevation: 15,
129
+ // Ensure grid doesn't overflow screen
130
+ maxWidth: screenWidth - 40
131
+ },
132
+ cell: {
133
+ position: 'absolute',
134
+ backgroundColor: 'rgba(238, 228, 218, 0.4)',
135
+ borderRadius: 6 // Slightly smaller border radius for better fit
136
+ }
137
+ });
138
+ GameGrid.displayName = 'GameGrid';
139
+ //# sourceMappingURL=GameGrid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","StyleSheet","Dimensions","Gesture","GestureDetector","useGrid","useGame2048Store","GameTile","GAME_CONFIG","jsx","_jsx","jsxs","_jsxs","width","screenWidth","get","GameGrid","memo","grid","handleMove","gridCalculations","useMemo","horizontalPadding","availableWidth","margin","TILE_MARGIN","responsiveTileSize","Math","floor","tileSize","max","gridContainerSize","renderTile","useCallback","tile","x","col","y","row","position","size","id","panGesture","Pan","onEnd","event","translationX","translationY","minDistance","absX","abs","absY","runOnJS","style","styles","gameContainer","children","gesture","height","Array","fill","map","_","index","cell","left","top","tiles","push","create","flex","justifyContent","alignItems","paddingHorizontal","paddingVertical","zIndex","backgroundColor","borderRadius","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","maxWidth","displayName"],"sourceRoot":"../../../../../src","sources":["games/game-2048/components/GameGrid.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,EAAEC,UAAU,QAAQ,cAAc;AAC3D,SAASC,OAAO,EAAEC,eAAe,QAAQ,8BAA8B;AACvE,SAASC,OAAO,EAAEC,gBAAgB,QAAQ,qBAAkB;AAC5D,SAASC,QAAQ,QAAQ,eAAY;AAErC,SAASC,WAAW,QAAQ,yBAAsB;AAAC,SAAAC,GAAA,IAAAC,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