react-native-games 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (419) hide show
  1. package/README.md +101 -30
  2. package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -167
  3. package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -1
  4. package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -182
  5. package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js.map +1 -1
  6. package/lib/module/games/balloon-blaster/BalloonBlasterService.js +1 -318
  7. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +1 -183
  8. package/lib/module/games/balloon-blaster/components/BalloonComponent.js +1 -237
  9. package/lib/module/games/balloon-blaster/components/GameArea.js +1 -156
  10. package/lib/module/games/balloon-blaster/components/GameBackground.js +1 -476
  11. package/lib/module/games/balloon-blaster/components/ScoreBoard.js +1 -112
  12. package/lib/module/games/balloon-blaster/components/ScoreBoard.js.map +1 -1
  13. package/lib/module/games/balloon-blaster/components/index.js +1 -7
  14. package/lib/module/games/bike-racing/BikeRacing.js +1 -0
  15. package/lib/module/games/bike-racing/BikeRacing.js.map +1 -0
  16. package/lib/module/games/bike-racing/BikeRacingConstants.js +1 -0
  17. package/lib/module/games/bike-racing/BikeRacingConstants.js.map +1 -0
  18. package/lib/module/games/bike-racing/BikeRacingService.js +1 -0
  19. package/lib/module/games/bike-racing/BikeRacingService.js.map +1 -0
  20. package/lib/module/games/bike-racing/BikeRacingStore.js +1 -0
  21. package/lib/module/games/bike-racing/BikeRacingStore.js.map +1 -0
  22. package/lib/module/games/bike-racing/components/BikeComponent.js +1 -0
  23. package/lib/module/games/bike-racing/components/BikeComponent.js.map +1 -0
  24. package/lib/module/games/bike-racing/components/GameBackground.js +1 -0
  25. package/lib/module/games/bike-racing/components/GameBackground.js.map +1 -0
  26. package/lib/module/games/bike-racing/components/ScoreBoard.js +1 -0
  27. package/lib/module/games/bike-racing/components/ScoreBoard.js.map +1 -0
  28. package/lib/module/games/bike-racing/components/index.js +1 -0
  29. package/lib/module/games/bike-racing/components/index.js.map +1 -0
  30. package/lib/module/games/bike-racing/index.js +1 -0
  31. package/lib/module/games/bike-racing/index.js.map +1 -0
  32. package/lib/module/games/block-blast/BlockBlast.js +1 -0
  33. package/lib/module/games/block-blast/BlockBlast.js.map +1 -0
  34. package/lib/module/games/block-blast/BlockBlastConstants.js +1 -0
  35. package/lib/module/games/block-blast/BlockBlastConstants.js.map +1 -0
  36. package/lib/module/games/block-blast/BlockBlastService.js +1 -0
  37. package/lib/module/games/block-blast/BlockBlastService.js.map +1 -0
  38. package/lib/module/games/block-blast/BlockBlastStore.js +1 -0
  39. package/lib/module/games/block-blast/BlockBlastStore.js.map +1 -0
  40. package/lib/module/games/block-blast/components/BlockPieceComponent.js +1 -0
  41. package/lib/module/games/block-blast/components/BlockPieceComponent.js.map +1 -0
  42. package/lib/module/games/block-blast/components/GameArea.js +1 -0
  43. package/lib/module/games/block-blast/components/GameArea.js.map +1 -0
  44. package/lib/module/games/block-blast/components/GameBackground.js +1 -0
  45. package/lib/module/games/block-blast/components/GameBackground.js.map +1 -0
  46. package/lib/module/games/block-blast/components/GridComponent.js +1 -0
  47. package/lib/module/games/block-blast/components/GridComponent.js.map +1 -0
  48. package/lib/module/games/block-blast/components/ScoreBoard.js +1 -0
  49. package/lib/module/games/block-blast/components/ScoreBoard.js.map +1 -0
  50. package/lib/module/games/block-blast/components/index.js +1 -0
  51. package/lib/module/games/block-blast/components/index.js.map +1 -0
  52. package/lib/module/games/block-blast/index.js +1 -0
  53. package/lib/module/games/block-blast/index.js.map +1 -0
  54. package/lib/module/games/bubble-shooter/BubbleShooter.js +1 -0
  55. package/lib/module/games/bubble-shooter/BubbleShooter.js.map +1 -0
  56. package/lib/module/games/bubble-shooter/BubbleShooterConstants.js +1 -0
  57. package/lib/module/games/bubble-shooter/BubbleShooterConstants.js.map +1 -0
  58. package/lib/module/games/bubble-shooter/BubbleShooterService.js +1 -0
  59. package/lib/module/games/bubble-shooter/BubbleShooterService.js.map +1 -0
  60. package/lib/module/games/bubble-shooter/BubbleShooterStore.js +1 -0
  61. package/lib/module/games/bubble-shooter/BubbleShooterStore.js.map +1 -0
  62. package/lib/module/games/bubble-shooter/components/GameArea.js +1 -0
  63. package/lib/module/games/bubble-shooter/components/GameArea.js.map +1 -0
  64. package/lib/module/games/bubble-shooter/components/GameBackground.js +1 -0
  65. package/lib/module/games/bubble-shooter/components/GameBackground.js.map +1 -0
  66. package/lib/module/games/bubble-shooter/components/ScoreBoard.js +1 -0
  67. package/lib/module/games/bubble-shooter/components/ScoreBoard.js.map +1 -0
  68. package/lib/module/games/bubble-shooter/components/index.js +1 -0
  69. package/lib/module/games/bubble-shooter/components/index.js.map +1 -0
  70. package/lib/module/games/bubble-shooter/index.js +1 -0
  71. package/lib/module/games/bubble-shooter/index.js.map +1 -0
  72. package/lib/module/games/candy-crush/CandyCrush.js +1 -131
  73. package/lib/module/games/candy-crush/CandyCrush.js.map +1 -1
  74. package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -125
  75. package/lib/module/games/candy-crush/CandyCrushConstants.js.map +1 -1
  76. package/lib/module/games/candy-crush/CandyCrushService.js +1 -370
  77. package/lib/module/games/candy-crush/CandyCrushStore.js +1 -303
  78. package/lib/module/games/candy-crush/components/CandyItem.js +1 -191
  79. package/lib/module/games/candy-crush/components/GameBackground.js +1 -85
  80. package/lib/module/games/candy-crush/components/GameGrid.js +1 -314
  81. package/lib/module/games/candy-crush/components/ScoreBoard.js +1 -79
  82. package/lib/module/games/candy-crush/components/index.js +1 -7
  83. package/lib/module/games/candy-crush/index.js +1 -6
  84. package/lib/module/games/car-racing/CarRacing.js +1 -0
  85. package/lib/module/games/car-racing/CarRacing.js.map +1 -0
  86. package/lib/module/games/car-racing/CarRacingConstants.js +1 -0
  87. package/lib/module/games/car-racing/CarRacingConstants.js.map +1 -0
  88. package/lib/module/games/car-racing/CarRacingService.js +1 -0
  89. package/lib/module/games/car-racing/CarRacingService.js.map +1 -0
  90. package/lib/module/games/car-racing/CarRacingStore.js +1 -0
  91. package/lib/module/games/car-racing/CarRacingStore.js.map +1 -0
  92. package/lib/module/games/car-racing/components/CarComponent.js +1 -0
  93. package/lib/module/games/car-racing/components/CarComponent.js.map +1 -0
  94. package/lib/module/games/car-racing/components/GameBackground.js +1 -0
  95. package/lib/module/games/car-racing/components/GameBackground.js.map +1 -0
  96. package/lib/module/games/car-racing/components/ScoreBoard.js +1 -0
  97. package/lib/module/games/car-racing/components/ScoreBoard.js.map +1 -0
  98. package/lib/module/games/car-racing/components/index.js +1 -0
  99. package/lib/module/games/car-racing/components/index.js.map +1 -0
  100. package/lib/module/games/colors-sort/ColorsSort.js +1 -143
  101. package/lib/module/games/colors-sort/ColorsSort.js.map +1 -1
  102. package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -72
  103. package/lib/module/games/colors-sort/ColorsSortConstants.js.map +1 -1
  104. package/lib/module/games/colors-sort/ColorsSortService.js +1 -255
  105. package/lib/module/games/colors-sort/ColorsSortStore.js +1 -257
  106. package/lib/module/games/colors-sort/ColorsSortStore.js.map +1 -1
  107. package/lib/module/games/colors-sort/components/ColorContainer.js +1 -140
  108. package/lib/module/games/colors-sort/components/GameBackground.js +1 -135
  109. package/lib/module/games/colors-sort/components/ScoreBoard.js +1 -70
  110. package/lib/module/games/colors-sort/components/index.js +1 -6
  111. package/lib/module/games/dino-jump/DinoJump.js +1 -209
  112. package/lib/module/games/dino-jump/DinoJump.js.map +1 -1
  113. package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -189
  114. package/lib/module/games/dino-jump/DinoJumpConstants.js.map +1 -1
  115. package/lib/module/games/dino-jump/DinoJumpService.js +1 -270
  116. package/lib/module/games/dino-jump/DinoJumpStore.js +1 -381
  117. package/lib/module/games/dino-jump/components/DinoSprite.js +1 -418
  118. package/lib/module/games/dino-jump/components/DinoSprite.js.map +1 -1
  119. package/lib/module/games/dino-jump/components/GameArea.js +1 -68
  120. package/lib/module/games/dino-jump/components/GameBackground.js +1 -444
  121. package/lib/module/games/dino-jump/components/ObstacleSprite.js +1 -306
  122. package/lib/module/games/dino-jump/components/ScoreBoard.js +1 -105
  123. package/lib/module/games/dino-jump/components/ScoreBoard.js.map +1 -1
  124. package/lib/module/games/dino-jump/components/StarSprite.js +1 -45
  125. package/lib/module/games/dino-jump/components/index.js +1 -9
  126. package/lib/module/games/flappy-bird/FlappyBird.js +1 -126
  127. package/lib/module/games/flappy-bird/FlappyBird.js.map +1 -1
  128. package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -90
  129. package/lib/module/games/flappy-bird/FlappyBirdConstants.js.map +1 -1
  130. package/lib/module/games/flappy-bird/FlappyBirdStore.js +1 -300
  131. package/lib/module/games/flappy-bird/components/Bird.js +1 -87
  132. package/lib/module/games/flappy-bird/components/GameArea.js +1 -87
  133. package/lib/module/games/flappy-bird/components/GameBackground.js +1 -79
  134. package/lib/module/games/flappy-bird/components/Pipes.js +1 -172
  135. package/lib/module/games/flappy-bird/components/ScoreBoard.js +1 -73
  136. package/lib/module/games/flappy-bird/components/index.js +1 -8
  137. package/lib/module/games/fruit-merger/FruitMerger.js +1 -120
  138. package/lib/module/games/fruit-merger/FruitMerger.js.map +1 -1
  139. package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -119
  140. package/lib/module/games/fruit-merger/FruitMergerConstants.js.map +1 -1
  141. package/lib/module/games/fruit-merger/FruitMergerService.js +1 -13
  142. package/lib/module/games/fruit-merger/FruitMergerStore.js +1 -315
  143. package/lib/module/games/fruit-merger/components/FruitItem.js +1 -102
  144. package/lib/module/games/fruit-merger/components/GameArea.js +1 -103
  145. package/lib/module/games/fruit-merger/components/GameBackground.js +1 -498
  146. package/lib/module/games/fruit-merger/components/ScoreBoard.js +1 -58
  147. package/lib/module/games/fruit-merger/components/index.js +1 -7
  148. package/lib/module/games/fruit-ninja/FruitNinja.js +1 -134
  149. package/lib/module/games/fruit-ninja/FruitNinja.js.map +1 -1
  150. package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -148
  151. package/lib/module/games/fruit-ninja/FruitNinjaConstants.js.map +1 -1
  152. package/lib/module/games/fruit-ninja/FruitNinjaService.js +1 -311
  153. package/lib/module/games/fruit-ninja/FruitNinjaStore.js +1 -191
  154. package/lib/module/games/fruit-ninja/FruitNinjaStore.js.map +1 -1
  155. package/lib/module/games/fruit-ninja/components/FruitComponent.js +1 -99
  156. package/lib/module/games/fruit-ninja/components/GameArea.js +1 -215
  157. package/lib/module/games/fruit-ninja/components/GameBackground.js +1 -1267
  158. package/lib/module/games/fruit-ninja/components/ScoreBoard.js +1 -92
  159. package/lib/module/games/fruit-ninja/components/ScoreBoard.js.map +1 -1
  160. package/lib/module/games/fruit-ninja/components/index.js +1 -7
  161. package/lib/module/games/game-2048/Game2048.js +1 -149
  162. package/lib/module/games/game-2048/Game2048.js.map +1 -1
  163. package/lib/module/games/game-2048/Game2048Constants.js +1 -263
  164. package/lib/module/games/game-2048/Game2048Constants.js.map +1 -1
  165. package/lib/module/games/game-2048/Game2048Service.js +1 -457
  166. package/lib/module/games/game-2048/Game2048Store.js +1 -236
  167. package/lib/module/games/game-2048/components/GameBackground.js +1 -247
  168. package/lib/module/games/game-2048/components/GameGrid.js +1 -139
  169. package/lib/module/games/game-2048/components/GameTile.js +1 -72
  170. package/lib/module/games/game-2048/components/ScoreBoard.js +1 -52
  171. package/lib/module/games/game-2048/components/index.js +1 -7
  172. package/lib/module/games/maze-runner/MazeRunner.js +1 -267
  173. package/lib/module/games/maze-runner/MazeRunner.js.map +1 -1
  174. package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -100
  175. package/lib/module/games/maze-runner/MazeRunnerConstants.js.map +1 -1
  176. package/lib/module/games/maze-runner/MazeRunnerService.js +1 -586
  177. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +1 -150
  178. package/lib/module/games/maze-runner/components/EnhancedGameArea.js +1 -370
  179. package/lib/module/games/maze-runner/components/GameBackground.js +1 -175
  180. package/lib/module/games/maze-runner/components/ScoreBoard.js +1 -61
  181. package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +1 -209
  182. package/lib/module/games/maze-runner/components/StaticGameBackground.js +1 -169
  183. package/lib/module/games/maze-runner/components/WallComponent.js +1 -91
  184. package/lib/module/games/maze-runner/components/index.js +1 -8
  185. package/lib/module/games/perfect-circle/PerfectCircle.js +1 -0
  186. package/lib/module/games/perfect-circle/PerfectCircle.js.map +1 -0
  187. package/lib/module/games/perfect-circle/PerfectCircleConstants.js +1 -0
  188. package/lib/module/games/perfect-circle/PerfectCircleConstants.js.map +1 -0
  189. package/lib/module/games/perfect-circle/PerfectCircleService.js +1 -0
  190. package/lib/module/games/perfect-circle/PerfectCircleService.js.map +1 -0
  191. package/lib/module/games/perfect-circle/PerfectCircleStore.js +1 -0
  192. package/lib/module/games/perfect-circle/PerfectCircleStore.js.map +1 -0
  193. package/lib/module/games/perfect-circle/components/DrawingCanvas.js +1 -0
  194. package/lib/module/games/perfect-circle/components/DrawingCanvas.js.map +1 -0
  195. package/lib/module/games/perfect-circle/components/GameBackground.js +1 -0
  196. package/lib/module/games/perfect-circle/components/GameBackground.js.map +1 -0
  197. package/lib/module/games/perfect-circle/components/ScoreBoard.js +1 -0
  198. package/lib/module/games/perfect-circle/components/ScoreBoard.js.map +1 -0
  199. package/lib/module/games/perfect-circle/index.js +1 -0
  200. package/lib/module/games/perfect-circle/index.js.map +1 -0
  201. package/lib/module/games/popit-fidget/PopitFidget.js +1 -285
  202. package/lib/module/games/popit-fidget/PopitFidget.js.map +1 -1
  203. package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -113
  204. package/lib/module/games/popit-fidget/PopitFidgetConstants.js.map +1 -1
  205. package/lib/module/games/popit-fidget/PopitFidgetService.js +1 -132
  206. package/lib/module/games/popit-fidget/PopitFidgetStore.js +1 -125
  207. package/lib/module/games/popit-fidget/components/BubbleComponent.js +1 -198
  208. package/lib/module/games/popit-fidget/components/FidgetGrid.js +1 -165
  209. package/lib/module/games/popit-fidget/components/GameBackground.js +1 -177
  210. package/lib/module/games/popit-fidget/components/ScoreBoard.js +1 -61
  211. package/lib/module/games/popit-fidget/components/index.js +1 -7
  212. package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -159
  213. package/lib/module/games/sliding-numbers/SlidingNumbers.js.map +1 -1
  214. package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -207
  215. package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js.map +1 -1
  216. package/lib/module/games/sliding-numbers/SlidingNumbersService.js +1 -248
  217. package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +1 -274
  218. package/lib/module/games/sliding-numbers/components/GameBackground.js +1 -259
  219. package/lib/module/games/sliding-numbers/components/NumbersGrid.js +1 -174
  220. package/lib/module/games/sliding-numbers/components/NumbersTile.js +1 -116
  221. package/lib/module/games/sliding-numbers/components/ScoreBoard.js +1 -64
  222. package/lib/module/games/sliding-numbers/components/index.js +1 -7
  223. package/lib/module/games/snake/Snake.js +1 -189
  224. package/lib/module/games/snake/Snake.js.map +1 -1
  225. package/lib/module/games/snake/SnakeConstants.js +1 -138
  226. package/lib/module/games/snake/SnakeConstants.js.map +1 -1
  227. package/lib/module/games/snake/SnakeService.js +1 -148
  228. package/lib/module/games/snake/SnakeStore.js +1 -182
  229. package/lib/module/games/snake/SnakeStore.js.map +1 -1
  230. package/lib/module/games/snake/components/GameBackground.js +1 -221
  231. package/lib/module/games/snake/components/GameGrid.js +1 -153
  232. package/lib/module/games/snake/components/ScoreBoard.js +1 -51
  233. package/lib/module/games/snake/components/ScoreBoard.js.map +1 -1
  234. package/lib/module/games/snake/components/index.js +1 -6
  235. package/lib/module/games/snake/index.js +1 -6
  236. package/lib/module/games/space-fighter/SpaceFighter.js +1 -165
  237. package/lib/module/games/space-fighter/SpaceFighter.js.map +1 -1
  238. package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -108
  239. package/lib/module/games/space-fighter/SpaceFighterConstants.js.map +1 -1
  240. package/lib/module/games/space-fighter/SpaceFighterService.js +1 -326
  241. package/lib/module/games/space-fighter/SpaceFighterStore.js +1 -209
  242. package/lib/module/games/space-fighter/components/AsteroidComponent.js +1 -113
  243. package/lib/module/games/space-fighter/components/GameArea.js +1 -289
  244. package/lib/module/games/space-fighter/components/GameBackground.js +1 -239
  245. package/lib/module/games/space-fighter/components/ScoreBoard.js +1 -136
  246. package/lib/module/games/space-fighter/components/Spacecraft3D.js +1 -202
  247. package/lib/module/games/space-fighter/components/SpacecraftPath.js +1 -52
  248. package/lib/module/games/space-fighter/components/index.js +1 -9
  249. package/lib/module/games/whack-a-mole/WhackAMole.js +1 -270
  250. package/lib/module/games/whack-a-mole/WhackAMole.js.map +1 -1
  251. package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -115
  252. package/lib/module/games/whack-a-mole/WhackAMoleConstants.js.map +1 -1
  253. package/lib/module/games/whack-a-mole/WhackAMoleService.js +1 -120
  254. package/lib/module/games/whack-a-mole/WhackAMoleStore.js +1 -172
  255. package/lib/module/games/whack-a-mole/components/GameBackground.js +1 -477
  256. package/lib/module/games/whack-a-mole/components/GameGrid.js +1 -97
  257. package/lib/module/games/whack-a-mole/components/GameHole.js +1 -196
  258. package/lib/module/games/whack-a-mole/components/MoleCharacter.js +1 -241
  259. package/lib/module/games/whack-a-mole/components/ScoreBoard.js +1 -67
  260. package/lib/module/games/whack-a-mole/components/ScoreBoard.js.map +1 -1
  261. package/lib/module/games/whack-a-mole/components/index.js +1 -8
  262. package/lib/module/helpers/AnimationFrame.js +1 -120
  263. package/lib/module/helpers/AnimationTracker.js +1 -89
  264. package/lib/module/helpers/ErrorHandler.js +1 -269
  265. package/lib/module/helpers/GameControlButton.js +1 -219
  266. package/lib/module/helpers/GameOverModal.js +1 -144
  267. package/lib/module/helpers/GameOverModal.js.map +1 -1
  268. package/lib/module/helpers/GameSettingsModal.js +1 -287
  269. package/lib/module/helpers/GameSettingsModal.js.map +1 -1
  270. package/lib/module/helpers/ParticleBlast.js +1 -134
  271. package/lib/module/helpers/ScoreBoardContainer.js +1 -34
  272. package/lib/module/helpers/ScoreBoardContainer.js.map +1 -1
  273. package/lib/module/helpers/index.js +1 -12
  274. package/lib/module/index.js +1 -22
  275. package/lib/module/index.js.map +1 -1
  276. package/lib/module/services/GamesConstants.js +1 -178
  277. package/lib/module/services/GamesConstants.js.map +1 -1
  278. package/lib/module/services/GamesService.js +1 -112
  279. package/lib/module/services/GamesService.js.map +1 -1
  280. package/lib/module/services/HapticsService.js +1 -77
  281. package/lib/module/services/ScoringService.js +1 -0
  282. package/lib/module/services/ScoringService.js.map +1 -0
  283. package/lib/module/services/SoundsService.js +1 -302
  284. package/lib/module/services/SoundsService.js.map +1 -1
  285. package/lib/module/services/UtilsService.js +1 -32
  286. package/lib/module/services/UtilsService.js.map +1 -1
  287. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -1
  288. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +1 -1
  289. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts.map +1 -1
  290. package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts +4 -0
  291. package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts.map +1 -0
  292. package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts +76 -0
  293. package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts.map +1 -0
  294. package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +22 -0
  295. package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts.map +1 -0
  296. package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +72 -0
  297. package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts.map +1 -0
  298. package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +12 -0
  299. package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts.map +1 -0
  300. package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +9 -0
  301. package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts.map +1 -0
  302. package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +7 -0
  303. package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts.map +1 -0
  304. package/lib/typescript/src/games/bike-racing/components/index.d.ts +4 -0
  305. package/lib/typescript/src/games/bike-racing/components/index.d.ts.map +1 -0
  306. package/lib/typescript/src/games/bike-racing/index.d.ts +5 -0
  307. package/lib/typescript/src/games/bike-racing/index.d.ts.map +1 -0
  308. package/lib/typescript/src/games/block-blast/BlockBlast.d.ts +4 -0
  309. package/lib/typescript/src/games/block-blast/BlockBlast.d.ts.map +1 -0
  310. package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts +82 -0
  311. package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts.map +1 -0
  312. package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +17 -0
  313. package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts.map +1 -0
  314. package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +62 -0
  315. package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts.map +1 -0
  316. package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +14 -0
  317. package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts.map +1 -0
  318. package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +12 -0
  319. package/lib/typescript/src/games/block-blast/components/GameArea.d.ts.map +1 -0
  320. package/lib/typescript/src/games/block-blast/components/GameBackground.d.ts +7 -0
  321. package/lib/typescript/src/games/block-blast/components/GameBackground.d.ts.map +1 -0
  322. package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +17 -0
  323. package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts.map +1 -0
  324. package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +7 -0
  325. package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts.map +1 -0
  326. package/lib/typescript/src/games/block-blast/components/index.d.ts +6 -0
  327. package/lib/typescript/src/games/block-blast/components/index.d.ts.map +1 -0
  328. package/lib/typescript/src/games/block-blast/index.d.ts +5 -0
  329. package/lib/typescript/src/games/block-blast/index.d.ts.map +1 -0
  330. package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts +4 -0
  331. package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts.map +1 -0
  332. package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts +61 -0
  333. package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts.map +1 -0
  334. package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +26 -0
  335. package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts.map +1 -0
  336. package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +62 -0
  337. package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts.map +1 -0
  338. package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +9 -0
  339. package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts.map +1 -0
  340. package/lib/typescript/src/games/bubble-shooter/components/GameBackground.d.ts +8 -0
  341. package/lib/typescript/src/games/bubble-shooter/components/GameBackground.d.ts.map +1 -0
  342. package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +7 -0
  343. package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts.map +1 -0
  344. package/lib/typescript/src/games/bubble-shooter/components/index.d.ts +4 -0
  345. package/lib/typescript/src/games/bubble-shooter/components/index.d.ts.map +1 -0
  346. package/lib/typescript/src/games/bubble-shooter/index.d.ts +3 -0
  347. package/lib/typescript/src/games/bubble-shooter/index.d.ts.map +1 -0
  348. package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts.map +1 -1
  349. package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +7 -7
  350. package/lib/typescript/src/games/car-racing/CarRacing.d.ts +4 -0
  351. package/lib/typescript/src/games/car-racing/CarRacing.d.ts.map +1 -0
  352. package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts +76 -0
  353. package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts.map +1 -0
  354. package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +22 -0
  355. package/lib/typescript/src/games/car-racing/CarRacingService.d.ts.map +1 -0
  356. package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +72 -0
  357. package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts.map +1 -0
  358. package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +13 -0
  359. package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts.map +1 -0
  360. package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +9 -0
  361. package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts.map +1 -0
  362. package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +7 -0
  363. package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts.map +1 -0
  364. package/lib/typescript/src/games/car-racing/components/index.d.ts +4 -0
  365. package/lib/typescript/src/games/car-racing/components/index.d.ts.map +1 -0
  366. package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts.map +1 -1
  367. package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts.map +1 -1
  368. package/lib/typescript/src/games/dino-jump/DinoJump.d.ts.map +1 -1
  369. package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts.map +1 -1
  370. package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts.map +1 -1
  371. package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts.map +1 -1
  372. package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts.map +1 -1
  373. package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts.map +1 -1
  374. package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts.map +1 -1
  375. package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts.map +1 -1
  376. package/lib/typescript/src/games/game-2048/Game2048.d.ts.map +1 -1
  377. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -1
  378. package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts +4 -0
  379. package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts.map +1 -0
  380. package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts +81 -0
  381. package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts.map +1 -0
  382. package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +14 -0
  383. package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts.map +1 -0
  384. package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +40 -0
  385. package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts.map +1 -0
  386. package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +9 -0
  387. package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts.map +1 -0
  388. package/lib/typescript/src/games/perfect-circle/components/GameBackground.d.ts +8 -0
  389. package/lib/typescript/src/games/perfect-circle/components/GameBackground.d.ts.map +1 -0
  390. package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +7 -0
  391. package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts.map +1 -0
  392. package/lib/typescript/src/games/perfect-circle/index.d.ts +3 -0
  393. package/lib/typescript/src/games/perfect-circle/index.d.ts.map +1 -0
  394. package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts.map +1 -1
  395. package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts.map +1 -1
  396. package/lib/typescript/src/games/snake/Snake.d.ts.map +1 -1
  397. package/lib/typescript/src/games/snake/SnakeStore.d.ts +4 -0
  398. package/lib/typescript/src/games/snake/SnakeStore.d.ts.map +1 -1
  399. package/lib/typescript/src/games/snake/components/ScoreBoard.d.ts.map +1 -1
  400. package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts.map +1 -1
  401. package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts.map +1 -1
  402. package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +1 -1
  403. package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts.map +1 -1
  404. package/lib/typescript/src/helpers/GameOverModal.d.ts +3 -0
  405. package/lib/typescript/src/helpers/GameOverModal.d.ts.map +1 -1
  406. package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts.map +1 -1
  407. package/lib/typescript/src/index.d.ts +6 -1
  408. package/lib/typescript/src/index.d.ts.map +1 -1
  409. package/lib/typescript/src/services/GamesConstants.d.ts +57 -7
  410. package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -1
  411. package/lib/typescript/src/services/GamesService.d.ts +2 -1
  412. package/lib/typescript/src/services/GamesService.d.ts.map +1 -1
  413. package/lib/typescript/src/services/ScoringService.d.ts +2 -0
  414. package/lib/typescript/src/services/ScoringService.d.ts.map +1 -0
  415. package/lib/typescript/src/services/SoundsService.d.ts +88 -0
  416. package/lib/typescript/src/services/SoundsService.d.ts.map +1 -1
  417. package/lib/typescript/src/services/UtilsService.d.ts +12 -1
  418. package/lib/typescript/src/services/UtilsService.d.ts.map +1 -1
  419. package/package.json +2 -2
@@ -1,97 +1 @@
1
- "use strict";
2
-
3
- import React, { useMemo } from 'react';
4
- import { View, StyleSheet, Dimensions } from 'react-native';
5
- import { GAME_CONFIG } from "../WhackAMoleService.js";
6
- import { GameHole } from "./GameHole.js";
7
-
8
- // Highly optimized GameHole that only re-renders when its specific hole changes
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
- const MemoizedGameHole = /*#__PURE__*/React.memo(GameHole, (prevProps, nextProps) => {
11
- // Only re-render if this specific hole's state changes
12
- return prevProps.hole.id === nextProps.hole.id && prevProps.hole.isActive === nextProps.hole.isActive && prevProps.moleAnimation === nextProps.moleAnimation && prevProps.hitAnimation === nextProps.hitAnimation && prevProps.onPress === nextProps.onPress && prevProps.holeSize === nextProps.holeSize;
13
- });
14
- export const GameGrid = /*#__PURE__*/React.memo(({
15
- holes,
16
- moleAnimations,
17
- hitAnimations,
18
- onHolePress,
19
- gridSize = 3
20
- }) => {
21
- // Calculate responsive dimensions with maximum width for tablets
22
- const responsiveDimensions = useMemo(() => {
23
- const {
24
- width: screenWidth
25
- } = Dimensions.get('window');
26
-
27
- // Maximum container width for tablets (600px max)
28
- const maxContainerWidth = Math.min(screenWidth * 0.9, 600);
29
-
30
- // Calculate hole size based on grid size and container width
31
- const availableWidth = maxContainerWidth - gridSize * 8; // Account for gaps
32
- const maxHoleSize = availableWidth / gridSize;
33
-
34
- // Use smaller of calculated size or original size, with minimum of 60px
35
- const holeSize = Math.max(Math.min(maxHoleSize, GAME_CONFIG.HOLE_SIZE), 60);
36
- return {
37
- containerWidth: maxContainerWidth,
38
- holeSize,
39
- gridWidth: gridSize * (holeSize + 8) // Account for gaps
40
- };
41
- }, [gridSize]);
42
-
43
- // Memoize style calculations to prevent re-computation on every render
44
- const gridStyle = useMemo(() => ({
45
- width: responsiveDimensions.gridWidth,
46
- maxWidth: responsiveDimensions.containerWidth
47
- }), [responsiveDimensions]);
48
- const paddingStyle = useMemo(() => gridSize === 4 ? styles.smallPadding : styles.largePadding, [gridSize]);
49
- const gapStyle = useMemo(() => gridSize === 4 ? styles.smallGap : styles.largeGap, [gridSize]);
50
- return /*#__PURE__*/_jsx(View, {
51
- style: [styles.gameArea, paddingStyle],
52
- children: /*#__PURE__*/_jsx(View, {
53
- style: [styles.gameGrid, gapStyle, gridStyle],
54
- children: holes.map((hole, index) => {
55
- const moleAnimation = moleAnimations[index];
56
- const hitAnimation = hitAnimations[index];
57
- if (!moleAnimation || !hitAnimation) {
58
- return null;
59
- }
60
- return /*#__PURE__*/_jsx(MemoizedGameHole, {
61
- hole: hole,
62
- moleAnimation: moleAnimation,
63
- hitAnimation: hitAnimation,
64
- onPress: onHolePress,
65
- holeSize: responsiveDimensions.holeSize
66
- }, hole.id);
67
- })
68
- })
69
- });
70
- });
71
- const styles = StyleSheet.create({
72
- gameArea: {
73
- flex: 1,
74
- justifyContent: 'center',
75
- alignItems: 'center'
76
- },
77
- smallPadding: {
78
- paddingHorizontal: 16,
79
- paddingVertical: 20
80
- },
81
- largePadding: {
82
- paddingVertical: 20
83
- },
84
- gameGrid: {
85
- flexDirection: 'row',
86
- flexWrap: 'wrap',
87
- justifyContent: 'center',
88
- alignItems: 'center'
89
- },
90
- smallGap: {
91
- gap: 4
92
- },
93
- largeGap: {
94
- gap: 8
95
- }
96
- });
97
- //# sourceMappingURL=GameGrid.js.map
1
+ "use strict";import React,{useMemo}from 'react';import{View,StyleSheet,Dimensions}from 'react-native';import{GAME_CONFIG}from "../WhackAMoleService.js";import{GameHole}from "./GameHole.js";import{jsx as _jsx}from "react/jsx-runtime";const MemoizedGameHole = React.memo(GameHole,(prevProps,nextProps)=>{return prevProps.hole.id === nextProps.hole.id && prevProps.hole.isActive === nextProps.hole.isActive && prevProps.moleAnimation === nextProps.moleAnimation && prevProps.hitAnimation === nextProps.hitAnimation && prevProps.onPress === nextProps.onPress && prevProps.holeSize === nextProps.holeSize;});export const GameGrid = React.memo(({holes,moleAnimations,hitAnimations,onHolePress,gridSize = 3})=>{const responsiveDimensions = useMemo(()=>{const{width:screenWidth}= Dimensions.get('window');const maxContainerWidth = Math.min(screenWidth * 0.9,600);const availableWidth = maxContainerWidth - gridSize * 8;const maxHoleSize = availableWidth / gridSize;const holeSize = Math.max(Math.min(maxHoleSize,GAME_CONFIG.HOLE_SIZE),60);return{containerWidth:maxContainerWidth,holeSize,gridWidth:gridSize *(holeSize + 8)};},[gridSize]);const gridStyle = useMemo(()=>({width:responsiveDimensions.gridWidth,maxWidth:responsiveDimensions.containerWidth}),[responsiveDimensions]);const paddingStyle = useMemo(()=> gridSize === 4 ? styles.smallPadding:styles.largePadding,[gridSize]);const gapStyle = useMemo(()=> gridSize === 4 ? styles.smallGap:styles.largeGap,[gridSize]);return _jsx(View,{style:[styles.gameArea,paddingStyle],children:_jsx(View,{style:[styles.gameGrid,gapStyle,gridStyle],children:holes.map((hole,index)=>{const moleAnimation = moleAnimations[index];const hitAnimation = hitAnimations[index];if(!moleAnimation || !hitAnimation){return null;}return _jsx(MemoizedGameHole,{hole:hole,moleAnimation:moleAnimation,hitAnimation:hitAnimation,onPress:onHolePress,holeSize:responsiveDimensions.holeSize},hole.id);})})});});const styles = StyleSheet.create({gameArea:{flex:1,justifyContent:'center',alignItems:'center'},smallPadding:{paddingHorizontal:16,paddingVertical:20},largePadding:{paddingVertical:20},gameGrid:{flexDirection:'row',flexWrap:'wrap',justifyContent:'center',alignItems:'center'},smallGap:{gap:4},largeGap:{gap:8}});
@@ -1,196 +1 @@
1
- "use strict";
2
-
3
- import React, { useCallback, useMemo } from 'react';
4
- import { View, TouchableOpacity, StyleSheet } from 'react-native';
5
- import Animated, { useSharedValue, useAnimatedStyle, withSpring, withSequence, withTiming, interpolate, Extrapolation } from 'react-native-reanimated';
6
- import { Canvas as SkiaCanvas, Circle, Group } from '@shopify/react-native-skia';
7
- import { GAME_CONFIG, COLORS } from "../WhackAMoleService.js";
8
- import { MoleCharacter } from "./MoleCharacter.js";
9
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
- export const GameHole = /*#__PURE__*/React.memo(({
11
- hole,
12
- moleAnimation,
13
- hitAnimation,
14
- onPress,
15
- holeSize = GAME_CONFIG.HOLE_SIZE
16
- }) => {
17
- // Enhanced animation values for whack effect
18
- const whackScale = useSharedValue(1);
19
- const whackRotation = useSharedValue(0);
20
- const whackBounce = useSharedValue(0);
21
-
22
- // Memoize animation constants to prevent recalculation
23
- const animationConstants = useMemo(() => ({
24
- translateYRange: [holeSize * 0.3, holeSize * 0.1, -holeSize * 0.05],
25
- scaleRange: [0.3, 0.8, 1],
26
- maxTranslateY: -holeSize * 0.1
27
- }), [holeSize]);
28
- const moleStyle = useAnimatedStyle(() => {
29
- // Mole emerges from deep inside the hole
30
- const translateY = interpolate(moleAnimation.value, [0, 0.3, 1], animationConstants.translateYRange, Extrapolation.CLAMP);
31
-
32
- // Mole grows as it emerges from the hole
33
- const emergenceScale = interpolate(moleAnimation.value, [0, 0.4, 1], animationConstants.scaleRange, Extrapolation.CLAMP);
34
-
35
- // Constrained bounce - keep mole within hole area
36
- const bounceY = whackBounce.value * -8;
37
- const finalTranslateY = Math.max(translateY + bounceY, animationConstants.maxTranslateY);
38
- return {
39
- transform: [{
40
- translateY: finalTranslateY
41
- }, {
42
- scale: whackScale.value * emergenceScale
43
- }, {
44
- rotate: `${whackRotation.value}deg`
45
- }],
46
- opacity: moleAnimation.value
47
- };
48
- }, [animationConstants]);
49
- const hitStyle = useAnimatedStyle(() => {
50
- const scale = 1 + hitAnimation.value * 0.5;
51
- return {
52
- transform: [{
53
- scale
54
- }],
55
- opacity: hitAnimation.value
56
- };
57
- });
58
-
59
- // Memoize style calculations to prevent re-computation on every render
60
- const holeContainerStyle = useMemo(() => [styles.holeContainer, {
61
- width: holeSize,
62
- height: holeSize
63
- }], [holeSize]);
64
- const holeStyle = useMemo(() => [styles.hole, {
65
- width: holeSize * 0.8,
66
- height: holeSize * 0.8
67
- }], [holeSize]);
68
- const hitEffectContainerStyle = useMemo(() => [styles.hitEffectContainer, {
69
- width: holeSize,
70
- height: holeSize
71
- }], [holeSize]);
72
- const moleContainerStyle = useMemo(() => [styles.moleContainer, {
73
- bottom: holeSize * 0.1,
74
- zIndex: 10
75
- }], [holeSize]);
76
-
77
- // Optimized hit handler with memoized hole state check
78
- const handlePress = useCallback(() => {
79
- // Only trigger whack animation if mole is active (optimized check)
80
- if (hole.isActive || moleAnimation.value > 0) {
81
- // Whack animation sequence - constrained to hole area
82
- whackScale.value = withSequence(withSpring(1.3, {
83
- damping: 8,
84
- stiffness: 400
85
- }), withSpring(0.8, {
86
- damping: 10,
87
- stiffness: 300
88
- }), withTiming(0, {
89
- duration: 400
90
- }));
91
- whackRotation.value = withSequence(withSpring(15, {
92
- damping: 10,
93
- stiffness: 300
94
- }), withSpring(-8, {
95
- damping: 12,
96
- stiffness: 250
97
- }), withTiming(0, {
98
- duration: 300
99
- }));
100
- whackBounce.value = withSequence(withSpring(1, {
101
- damping: 8,
102
- stiffness: 400
103
- }), withSpring(0, {
104
- damping: 12,
105
- stiffness: 300
106
- }));
107
-
108
- // Delay hit effect to let mole animation show first
109
- setTimeout(() => {
110
- // Trigger hit effect after mole starts reacting
111
- onPress(hole.id);
112
- }, 150);
113
-
114
- // Reset animations after whack sequence
115
- setTimeout(() => {
116
- whackScale.value = 1;
117
- whackRotation.value = 0;
118
- whackBounce.value = 0;
119
- }, 800);
120
- } else {
121
- // No mole present, just trigger normal hit
122
- onPress(hole.id);
123
- }
124
- }, [hole.id, hole.isActive, onPress, moleAnimation]);
125
- return /*#__PURE__*/_jsxs(TouchableOpacity, {
126
- style: holeContainerStyle,
127
- onPress: handlePress,
128
- activeOpacity: 0.8,
129
- children: [/*#__PURE__*/_jsx(View, {
130
- style: holeStyle
131
- }), /*#__PURE__*/_jsx(Animated.View, {
132
- style: [hitEffectContainerStyle, hitStyle],
133
- children: /*#__PURE__*/_jsx(SkiaCanvas, {
134
- style: {
135
- width: holeSize,
136
- height: holeSize
137
- },
138
- children: /*#__PURE__*/_jsxs(Group, {
139
- children: [/*#__PURE__*/_jsx(Circle, {
140
- cx: holeSize / 2,
141
- cy: holeSize / 2,
142
- r: holeSize * 0.25,
143
- color: COLORS.HIT_EFFECT_OUTER
144
- }), /*#__PURE__*/_jsx(Circle, {
145
- cx: holeSize / 2,
146
- cy: holeSize / 2,
147
- r: holeSize * 0.17,
148
- color: COLORS.HIT_EFFECT_INNER
149
- })]
150
- })
151
- })
152
- }), hole.isActive && /*#__PURE__*/_jsx(Animated.View, {
153
- style: [moleContainerStyle, moleStyle],
154
- children: /*#__PURE__*/_jsx(MoleCharacter, {
155
- size: holeSize * 0.6
156
- })
157
- })]
158
- });
159
- });
160
- const styles = StyleSheet.create({
161
- holeContainer: {
162
- justifyContent: 'center',
163
- alignItems: 'center',
164
- position: 'relative'
165
- },
166
- hole: {
167
- backgroundColor: '#92400e',
168
- borderWidth: 4,
169
- borderColor: '#a16207',
170
- borderRadius: 9999,
171
- shadowColor: '#000',
172
- shadowOffset: {
173
- width: 0,
174
- height: 2
175
- },
176
- shadowOpacity: 0.25,
177
- shadowRadius: 3.84,
178
- elevation: 5
179
- },
180
- moleContainer: {
181
- position: 'absolute',
182
- justifyContent: 'center',
183
- alignItems: 'center',
184
- zIndex: 10,
185
- elevation: 10
186
- },
187
- hitEffectContainer: {
188
- position: 'absolute',
189
- justifyContent: 'center',
190
- alignItems: 'center',
191
- pointerEvents: 'none',
192
- zIndex: 1,
193
- elevation: 1
194
- }
195
- });
196
- //# sourceMappingURL=GameHole.js.map
1
+ "use strict";import React,{useCallback,useMemo}from 'react';import{View,TouchableOpacity,StyleSheet}from 'react-native';import Animated,{useSharedValue,useAnimatedStyle,withSpring,withSequence,withTiming,interpolate,Extrapolation}from 'react-native-reanimated';import{Canvas as SkiaCanvas,Circle,Group}from '@shopify/react-native-skia';import{GAME_CONFIG,COLORS}from "../WhackAMoleService.js";import{MoleCharacter}from "./MoleCharacter.js";import{jsx as _jsx,jsxs as _jsxs}from "react/jsx-runtime";export const GameHole = React.memo(({hole,moleAnimation,hitAnimation,onPress,holeSize = GAME_CONFIG.HOLE_SIZE})=>{const whackScale = useSharedValue(1);const whackRotation = useSharedValue(0);const whackBounce = useSharedValue(0);const animationConstants = useMemo(()=>({translateYRange:[holeSize * 0.3,holeSize * 0.1,-holeSize * 0.05],scaleRange:[0.3,0.8,1],maxTranslateY:-holeSize * 0.1}),[holeSize]);const moleStyle = useAnimatedStyle(()=>{const translateY = interpolate(moleAnimation.value,[0,0.3,1],animationConstants.translateYRange,Extrapolation.CLAMP);const emergenceScale = interpolate(moleAnimation.value,[0,0.4,1],animationConstants.scaleRange,Extrapolation.CLAMP);const bounceY = whackBounce.value * -8;const finalTranslateY = Math.max(translateY + bounceY,animationConstants.maxTranslateY);return{transform:[{translateY:finalTranslateY},{scale:whackScale.value * emergenceScale},{rotate:`${whackRotation.value}deg`}],opacity:moleAnimation.value};},[animationConstants]);const hitStyle = useAnimatedStyle(()=>{const scale = 1 + hitAnimation.value * 0.5;return{transform:[{scale}],opacity:hitAnimation.value};});const holeContainerStyle = useMemo(()=> [styles.holeContainer,{width:holeSize,height:holeSize}],[holeSize]);const holeStyle = useMemo(()=> [styles.hole,{width:holeSize * 0.8,height:holeSize * 0.8}],[holeSize]);const hitEffectContainerStyle = useMemo(()=> [styles.hitEffectContainer,{width:holeSize,height:holeSize}],[holeSize]);const moleContainerStyle = useMemo(()=> [styles.moleContainer,{bottom:holeSize * 0.1,zIndex:10}],[holeSize]);const handlePress = useCallback(()=>{if(hole.isActive || moleAnimation.value > 0){whackScale.value = withSequence(withSpring(1.3,{damping:8,stiffness:400}),withSpring(0.8,{damping:10,stiffness:300}),withTiming(0,{duration:400}));whackRotation.value = withSequence(withSpring(15,{damping:10,stiffness:300}),withSpring(-8,{damping:12,stiffness:250}),withTiming(0,{duration:300}));whackBounce.value = withSequence(withSpring(1,{damping:8,stiffness:400}),withSpring(0,{damping:12,stiffness:300}));setTimeout(()=>{onPress(hole.id);},150);setTimeout(()=>{whackScale.value = 1;whackRotation.value = 0;whackBounce.value = 0;},800);}else{onPress(hole.id);}},[hole.id,hole.isActive,onPress,moleAnimation]);return _jsxs(TouchableOpacity,{style:holeContainerStyle,onPress:handlePress,activeOpacity:0.8,children:[_jsx(View,{style:holeStyle}),_jsx(Animated.View,{style:[hitEffectContainerStyle,hitStyle],children:_jsx(SkiaCanvas,{style:{width:holeSize,height:holeSize},children:_jsxs(Group,{children:[_jsx(Circle,{cx:holeSize / 2,cy:holeSize / 2,r:holeSize * 0.25,color:COLORS.HIT_EFFECT_OUTER}),_jsx(Circle,{cx:holeSize / 2,cy:holeSize / 2,r:holeSize * 0.17,color:COLORS.HIT_EFFECT_INNER})]})})}),hole.isActive && _jsx(Animated.View,{style:[moleContainerStyle,moleStyle],children:_jsx(MoleCharacter,{size:holeSize * 0.6})})]});});const styles = StyleSheet.create({holeContainer:{justifyContent:'center',alignItems:'center',position:'relative'},hole:{backgroundColor:'#92400e',borderWidth:4,borderColor:'#a16207',borderRadius:9999,shadowColor:'#000',shadowOffset:{width:0,height:2},shadowOpacity:0.25,shadowRadius:3.84,elevation:5},moleContainer:{position:'absolute',justifyContent:'center',alignItems:'center',zIndex:10,elevation:10},hitEffectContainer:{position:'absolute',justifyContent:'center',alignItems:'center',pointerEvents:'none',zIndex:1,elevation:1}});
@@ -1,241 +1 @@
1
- "use strict";
2
-
3
- import React from 'react';
4
- import { View, StyleSheet } from 'react-native';
5
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
- export const MoleCharacter = /*#__PURE__*/React.memo(({
7
- size
8
- }) => {
9
- const moleSize = size * 0.8;
10
- const styles = createStyles(moleSize);
11
-
12
- // Static mole - no animations for better performance
13
-
14
- return /*#__PURE__*/_jsx(View, {
15
- style: [styles.container, {
16
- width: size,
17
- height: size
18
- }],
19
- children: /*#__PURE__*/_jsxs(View, {
20
- style: styles.body,
21
- children: [/*#__PURE__*/_jsxs(View, {
22
- style: styles.head,
23
- children: [/*#__PURE__*/_jsx(View, {
24
- style: styles.leftEar
25
- }), /*#__PURE__*/_jsx(View, {
26
- style: styles.rightEar
27
- }), /*#__PURE__*/_jsx(View, {
28
- style: styles.leftInnerEar
29
- }), /*#__PURE__*/_jsx(View, {
30
- style: styles.rightInnerEar
31
- }), /*#__PURE__*/_jsx(View, {
32
- style: styles.leftEye,
33
- children: /*#__PURE__*/_jsx(View, {
34
- style: styles.eyeHighlight
35
- })
36
- }), /*#__PURE__*/_jsx(View, {
37
- style: styles.rightEye,
38
- children: /*#__PURE__*/_jsx(View, {
39
- style: styles.eyeHighlight
40
- })
41
- }), /*#__PURE__*/_jsx(View, {
42
- style: styles.nose
43
- }), /*#__PURE__*/_jsxs(View, {
44
- style: styles.mouth,
45
- children: [/*#__PURE__*/_jsx(View, {
46
- style: styles.leftMouth
47
- }), /*#__PURE__*/_jsx(View, {
48
- style: styles.rightMouth
49
- })]
50
- })]
51
- }), /*#__PURE__*/_jsx(View, {
52
- style: styles.leftWhisker1
53
- }), /*#__PURE__*/_jsx(View, {
54
- style: styles.leftWhisker2
55
- }), /*#__PURE__*/_jsx(View, {
56
- style: styles.rightWhisker1
57
- }), /*#__PURE__*/_jsx(View, {
58
- style: styles.rightWhisker2
59
- })]
60
- })
61
- });
62
- });
63
- const createStyles = moleSize => StyleSheet.create({
64
- container: {
65
- justifyContent: 'center',
66
- alignItems: 'center'
67
- },
68
- body: {
69
- width: moleSize,
70
- height: moleSize * 0.9,
71
- backgroundColor: '#FF8C42',
72
- borderRadius: moleSize * 0.4,
73
- justifyContent: 'center',
74
- alignItems: 'center',
75
- shadowColor: '#000',
76
- shadowOffset: {
77
- width: 0,
78
- height: 2
79
- },
80
- shadowOpacity: 0.3,
81
- shadowRadius: 4,
82
- elevation: 5
83
- },
84
- head: {
85
- width: moleSize * 0.8,
86
- height: moleSize * 0.7,
87
- backgroundColor: '#FFA366',
88
- borderRadius: moleSize * 0.35,
89
- position: 'relative',
90
- justifyContent: 'center',
91
- alignItems: 'center',
92
- marginTop: -moleSize * 0.1
93
- },
94
- leftEar: {
95
- position: 'absolute',
96
- top: -moleSize * 0.15,
97
- left: moleSize * 0.15,
98
- width: moleSize * 0.25,
99
- height: moleSize * 0.25,
100
- backgroundColor: '#FF8C42',
101
- borderRadius: moleSize * 0.125,
102
- transform: [{
103
- rotate: '-30deg'
104
- }]
105
- },
106
- rightEar: {
107
- position: 'absolute',
108
- top: -moleSize * 0.15,
109
- right: moleSize * 0.15,
110
- width: moleSize * 0.25,
111
- height: moleSize * 0.25,
112
- backgroundColor: '#FF8C42',
113
- borderRadius: moleSize * 0.125,
114
- transform: [{
115
- rotate: '30deg'
116
- }]
117
- },
118
- leftInnerEar: {
119
- position: 'absolute',
120
- top: -moleSize * 0.12,
121
- left: moleSize * 0.18,
122
- width: moleSize * 0.15,
123
- height: moleSize * 0.15,
124
- backgroundColor: '#FF6B1A',
125
- borderRadius: moleSize * 0.075,
126
- transform: [{
127
- rotate: '-30deg'
128
- }]
129
- },
130
- rightInnerEar: {
131
- position: 'absolute',
132
- top: -moleSize * 0.12,
133
- right: moleSize * 0.18,
134
- width: moleSize * 0.15,
135
- height: moleSize * 0.15,
136
- backgroundColor: '#FF6B1A',
137
- borderRadius: moleSize * 0.075,
138
- transform: [{
139
- rotate: '30deg'
140
- }]
141
- },
142
- leftEye: {
143
- position: 'absolute',
144
- top: moleSize * 0.15,
145
- left: moleSize * 0.2,
146
- width: moleSize * 0.12,
147
- height: moleSize * 0.15,
148
- backgroundColor: '#000000',
149
- borderRadius: moleSize * 0.075,
150
- justifyContent: 'center',
151
- alignItems: 'center'
152
- },
153
- rightEye: {
154
- position: 'absolute',
155
- top: moleSize * 0.15,
156
- right: moleSize * 0.2,
157
- width: moleSize * 0.12,
158
- height: moleSize * 0.15,
159
- backgroundColor: '#000000',
160
- borderRadius: moleSize * 0.075,
161
- justifyContent: 'center',
162
- alignItems: 'center'
163
- },
164
- eyeHighlight: {
165
- width: moleSize * 0.04,
166
- height: moleSize * 0.06,
167
- backgroundColor: '#FFFFFF',
168
- borderRadius: moleSize * 0.02
169
- },
170
- nose: {
171
- position: 'absolute',
172
- top: moleSize * 0.28,
173
- width: moleSize * 0.08,
174
- height: moleSize * 0.06,
175
- backgroundColor: '#FF1493',
176
- borderRadius: moleSize * 0.04
177
- },
178
- mouth: {
179
- position: 'absolute',
180
- top: moleSize * 0.35,
181
- width: moleSize * 0.2,
182
- height: moleSize * 0.1,
183
- justifyContent: 'center',
184
- alignItems: 'center'
185
- },
186
- leftMouth: {
187
- position: 'absolute',
188
- left: 0,
189
- width: moleSize * 0.08,
190
- height: 2,
191
- backgroundColor: '#000000',
192
- borderRadius: 1,
193
- transform: [{
194
- rotate: '20deg'
195
- }]
196
- },
197
- rightMouth: {
198
- position: 'absolute',
199
- right: 0,
200
- width: moleSize * 0.08,
201
- height: 2,
202
- backgroundColor: '#000000',
203
- borderRadius: 1,
204
- transform: [{
205
- rotate: '-20deg'
206
- }]
207
- },
208
- leftWhisker1: {
209
- position: 'absolute',
210
- top: moleSize * 0.35,
211
- left: -moleSize * 0.15,
212
- width: moleSize * 0.2,
213
- height: 1,
214
- backgroundColor: '#000000'
215
- },
216
- leftWhisker2: {
217
- position: 'absolute',
218
- top: moleSize * 0.4,
219
- left: -moleSize * 0.15,
220
- width: moleSize * 0.18,
221
- height: 1,
222
- backgroundColor: '#000000'
223
- },
224
- rightWhisker1: {
225
- position: 'absolute',
226
- top: moleSize * 0.35,
227
- right: -moleSize * 0.15,
228
- width: moleSize * 0.2,
229
- height: 1,
230
- backgroundColor: '#000000'
231
- },
232
- rightWhisker2: {
233
- position: 'absolute',
234
- top: moleSize * 0.4,
235
- right: -moleSize * 0.15,
236
- width: moleSize * 0.18,
237
- height: 1,
238
- backgroundColor: '#000000'
239
- }
240
- });
241
- //# sourceMappingURL=MoleCharacter.js.map
1
+ "use strict";import React from 'react';import{View,StyleSheet}from 'react-native';import{jsx as _jsx,jsxs as _jsxs}from "react/jsx-runtime";export const MoleCharacter = React.memo(({size})=>{const moleSize = size * 0.8;const styles = createStyles(moleSize);return _jsx(View,{style:[styles.container,{width:size,height:size}],children:_jsxs(View,{style:styles.body,children:[_jsxs(View,{style:styles.head,children:[_jsx(View,{style:styles.leftEar}),_jsx(View,{style:styles.rightEar}),_jsx(View,{style:styles.leftInnerEar}),_jsx(View,{style:styles.rightInnerEar}),_jsx(View,{style:styles.leftEye,children:_jsx(View,{style:styles.eyeHighlight})}),_jsx(View,{style:styles.rightEye,children:_jsx(View,{style:styles.eyeHighlight})}),_jsx(View,{style:styles.nose}),_jsxs(View,{style:styles.mouth,children:[_jsx(View,{style:styles.leftMouth}),_jsx(View,{style:styles.rightMouth})]})]}),_jsx(View,{style:styles.leftWhisker1}),_jsx(View,{style:styles.leftWhisker2}),_jsx(View,{style:styles.rightWhisker1}),_jsx(View,{style:styles.rightWhisker2})]})});});const createStyles = moleSize => StyleSheet.create({container:{justifyContent:'center',alignItems:'center'},body:{width:moleSize,height:moleSize * 0.9,backgroundColor:'#FF8C42',borderRadius:moleSize * 0.4,justifyContent:'center',alignItems:'center',shadowColor:'#000',shadowOffset:{width:0,height:2},shadowOpacity:0.3,shadowRadius:4,elevation:5},head:{width:moleSize * 0.8,height:moleSize * 0.7,backgroundColor:'#FFA366',borderRadius:moleSize * 0.35,position:'relative',justifyContent:'center',alignItems:'center',marginTop:-moleSize * 0.1},leftEar:{position:'absolute',top:-moleSize * 0.15,left:moleSize * 0.15,width:moleSize * 0.25,height:moleSize * 0.25,backgroundColor:'#FF8C42',borderRadius:moleSize * 0.125,transform:[{rotate:'-30deg'}]},rightEar:{position:'absolute',top:-moleSize * 0.15,right:moleSize * 0.15,width:moleSize * 0.25,height:moleSize * 0.25,backgroundColor:'#FF8C42',borderRadius:moleSize * 0.125,transform:[{rotate:'30deg'}]},leftInnerEar:{position:'absolute',top:-moleSize * 0.12,left:moleSize * 0.18,width:moleSize * 0.15,height:moleSize * 0.15,backgroundColor:'#FF6B1A',borderRadius:moleSize * 0.075,transform:[{rotate:'-30deg'}]},rightInnerEar:{position:'absolute',top:-moleSize * 0.12,right:moleSize * 0.18,width:moleSize * 0.15,height:moleSize * 0.15,backgroundColor:'#FF6B1A',borderRadius:moleSize * 0.075,transform:[{rotate:'30deg'}]},leftEye:{position:'absolute',top:moleSize * 0.15,left:moleSize * 0.2,width:moleSize * 0.12,height:moleSize * 0.15,backgroundColor:'#000000',borderRadius:moleSize * 0.075,justifyContent:'center',alignItems:'center'},rightEye:{position:'absolute',top:moleSize * 0.15,right:moleSize * 0.2,width:moleSize * 0.12,height:moleSize * 0.15,backgroundColor:'#000000',borderRadius:moleSize * 0.075,justifyContent:'center',alignItems:'center'},eyeHighlight:{width:moleSize * 0.04,height:moleSize * 0.06,backgroundColor:'#FFFFFF',borderRadius:moleSize * 0.02},nose:{position:'absolute',top:moleSize * 0.28,width:moleSize * 0.08,height:moleSize * 0.06,backgroundColor:'#FF1493',borderRadius:moleSize * 0.04},mouth:{position:'absolute',top:moleSize * 0.35,width:moleSize * 0.2,height:moleSize * 0.1,justifyContent:'center',alignItems:'center'},leftMouth:{position:'absolute',left:0,width:moleSize * 0.08,height:2,backgroundColor:'#000000',borderRadius:1,transform:[{rotate:'20deg'}]},rightMouth:{position:'absolute',right:0,width:moleSize * 0.08,height:2,backgroundColor:'#000000',borderRadius:1,transform:[{rotate:'-20deg'}]},leftWhisker1:{position:'absolute',top:moleSize * 0.35,left:-moleSize * 0.15,width:moleSize * 0.2,height:1,backgroundColor:'#000000'},leftWhisker2:{position:'absolute',top:moleSize * 0.4,left:-moleSize * 0.15,width:moleSize * 0.18,height:1,backgroundColor:'#000000'},rightWhisker1:{position:'absolute',top:moleSize * 0.35,right:-moleSize * 0.15,width:moleSize * 0.2,height:1,backgroundColor:'#000000'},rightWhisker2:{position:'absolute',top:moleSize * 0.4,right:-moleSize * 0.15,width:moleSize * 0.18,height:1,backgroundColor:'#000000'}});
@@ -1,67 +1 @@
1
- "use strict";
2
-
3
- import React from 'react';
4
- import { View, Text, StyleSheet } from 'react-native';
5
- import { ScoreBoardContainer } from "../../../helpers/index.js";
6
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
- export const ScoreBoard = /*#__PURE__*/React.memo(({
8
- score,
9
- timeLeft,
10
- offset = 0
11
- }) => {
12
- return /*#__PURE__*/_jsx(ScoreBoardContainer, {
13
- offset: offset,
14
- backgroundColor: "rgba(22, 101, 52, 0.4)",
15
- borderColor: "rgba(255, 255, 255, 0.3)",
16
- children: /*#__PURE__*/_jsxs(View, {
17
- style: styles.scoreBoard,
18
- children: [/*#__PURE__*/_jsxs(View, {
19
- style: styles.scoreSection,
20
- children: [/*#__PURE__*/_jsx(Text, {
21
- style: styles.scoreLabel,
22
- children: "Score"
23
- }), /*#__PURE__*/_jsx(Text, {
24
- style: styles.scoreValue,
25
- children: score
26
- })]
27
- }), /*#__PURE__*/_jsxs(View, {
28
- style: styles.scoreSection,
29
- children: [/*#__PURE__*/_jsx(Text, {
30
- style: styles.scoreLabel,
31
- children: "Time"
32
- }), /*#__PURE__*/_jsx(Text, {
33
- style: styles.timeValue,
34
- children: timeLeft
35
- })]
36
- })]
37
- })
38
- });
39
- });
40
- const styles = StyleSheet.create({
41
- scoreBoard: {
42
- flexDirection: 'row',
43
- justifyContent: 'space-between',
44
- alignItems: 'center'
45
- },
46
- scoreSection: {
47
- alignItems: 'center',
48
- flex: 1
49
- },
50
- scoreLabel: {
51
- fontSize: 18,
52
- fontWeight: 'bold',
53
- color: '#ffffff',
54
- marginBottom: 4
55
- },
56
- scoreValue: {
57
- fontSize: 30,
58
- fontWeight: 'bold',
59
- color: '#92400e'
60
- },
61
- timeValue: {
62
- fontSize: 30,
63
- fontWeight: 'bold',
64
- color: '#92400e'
65
- }
66
- });
67
- //# sourceMappingURL=ScoreBoard.js.map
1
+ "use strict";import React from 'react';import{View,Text,StyleSheet}from 'react-native';import{ScoreBoardContainer}from "../../../helpers/index.js";import{jsx as _jsx,jsxs as _jsxs}from "react/jsx-runtime";export const ScoreBoard = React.memo(({score,timeLeft,offset = 0})=>{const formatTime = seconds =>{const mins = Math.floor(seconds / 60);const secs = seconds % 60;return `${mins.toString().padStart(2,'0')}:${secs.toString().padStart(2,'0')}`;};return _jsx(ScoreBoardContainer,{offset:offset,backgroundColor:"rgba(22,101,52,0.4)",borderColor:"rgba(255,255,255,0.3)",children:_jsxs(View,{style:styles.scoreBoard,children:[_jsxs(View,{style:styles.scoreSection,children:[_jsx(Text,{style:styles.scoreLabel,children:"Score"}),_jsx(Text,{style:styles.scoreValue,children:score})]}),_jsxs(View,{style:styles.scoreSection,children:[_jsx(Text,{style:styles.scoreLabel,children:"Time"}),_jsx(Text,{style:styles.timeValue,children:formatTime(timeLeft)})]})]})});});const styles = StyleSheet.create({scoreBoard:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},scoreSection:{alignItems:'center',flex:1},scoreLabel:{fontSize:16,fontWeight:'bold',color:'#ffffff',marginBottom:4},scoreValue:{fontSize:25,fontWeight:'bold',color:'#92400e'},timeValue:{fontSize:25,fontWeight:'bold',color:'#92400e'}});
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","StyleSheet","ScoreBoardContainer","jsx","_jsx","jsxs","_jsxs","ScoreBoard","memo","score","timeLeft","offset","backgroundColor","borderColor","children","style","styles","scoreBoard","scoreSection","scoreLabel","scoreValue","timeValue","create","flexDirection","justifyContent","alignItems","flex","fontSize","fontWeight","color","marginBottom"],"sourceRoot":"../../../../../src","sources":["games/whack-a-mole/components/ScoreBoard.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AACrD,SAASC,mBAAmB,QAAQ,2BAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQvD,OAAO,MAAMC,UAAqC,gBAAGT,KAAK,CAACU,IAAI,CAAC,CAAC;EAAEC,KAAK;EAAEC,QAAQ;EAAEC,MAAM,GAAG;AAAE,CAAC,KAAK;EACnG,oBACEP,IAAA,CAACF,mBAAmB;IAClBS,MAAM,EAAEA,MAAO;IACfC,eAAe,EAAC,wBAAwB;IACxCC,WAAW,EAAC,0BAA0B;IAAAC,QAAA,eAEtCR,KAAA,CAACP,IAAI;MAACgB,KAAK,EAAEC,MAAM,CAACC,UAAW;MAAAH,QAAA,gBAC/BR,KAAA,CAACP,IAAI;QAACgB,KAAK,EAAEC,MAAM,CAACE,YAAa;QAAAJ,QAAA,gBAC/BV,IAAA,CAACJ,IAAI;UAACe,KAAK,EAAEC,MAAM,CAACG,UAAW;UAAAL,QAAA,EAAC;QAAK,CAAM,CAAC,eAC5CV,IAAA,CAACJ,IAAI;UAACe,KAAK,EAAEC,MAAM,CAACI,UAAW;UAAAN,QAAA,EAAEL;QAAK,CAAO,CAAC;MAAA,CAC1C,CAAC,eACPH,KAAA,CAACP,IAAI;QAACgB,KAAK,EAAEC,MAAM,CAACE,YAAa;QAAAJ,QAAA,gBAC/BV,IAAA,CAACJ,IAAI;UAACe,KAAK,EAAEC,MAAM,CAACG,UAAW;UAAAL,QAAA,EAAC;QAAI,CAAM,CAAC,eAC3CV,IAAA,CAACJ,IAAI;UAACe,KAAK,EAAEC,MAAM,CAACK,SAAU;UAAAP,QAAA,EAAEJ;QAAQ,CAAO,CAAC;MAAA,CAC5C,CAAC;IAAA,CACH;EAAC,CACc,CAAC;AAE1B,CAAC,CAAC;AAEF,MAAMM,MAAM,GAAGf,UAAU,CAACqB,MAAM,CAAC;EAC/BL,UAAU,EAAE;IACVM,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE;EACd,CAAC;EACDP,YAAY,EAAE;IACZO,UAAU,EAAE,QAAQ;IACpBC,IAAI,EAAE;EACR,CAAC;EACDP,UAAU,EAAE;IACVQ,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,KAAK,EAAE,SAAS;IAChBC,YAAY,EAAE;EAChB,CAAC;EACDV,UAAU,EAAE;IACVO,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,KAAK,EAAE;EACT,CAAC;EACDR,SAAS,EAAE;IACTM,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","View","Text","StyleSheet","ScoreBoardContainer","jsx","_jsx","jsxs","_jsxs","ScoreBoard","memo","score","timeLeft","offset","formatTime","seconds","mins","Math","floor","secs","toString","padStart","backgroundColor","borderColor","children","style","styles","scoreBoard","scoreSection","scoreLabel","scoreValue","timeValue","create","flexDirection","justifyContent","alignItems","flex","fontSize","fontWeight","color","marginBottom"],"sourceRoot":"../../../../../src","sources":["games/whack-a-mole/components/ScoreBoard.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AACrD,SAASC,mBAAmB,QAAQ,2BAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQvD,OAAO,MAAMC,UAAqC,gBAAGT,KAAK,CAACU,IAAI,CAAC,CAAC;EAAEC,KAAK;EAAEC,QAAQ;EAAEC,MAAM,GAAG;AAAE,CAAC,KAAK;EACnG;EACA,MAAMC,UAAU,GAAIC,OAAe,IAAa;IAC9C,MAAMC,IAAI,GAAGC,IAAI,CAACC,KAAK,CAACH,OAAO,GAAG,EAAE,CAAC;IACrC,MAAMI,IAAI,GAAGJ,OAAO,GAAG,EAAE;IACzB,OAAO,GAAGC,IAAI,CAACI,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAIF,IAAI,CAACC,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE;EAClF,CAAC;EAED,oBACEf,IAAA,CAACF,mBAAmB;IAClBS,MAAM,EAAEA,MAAO;IACfS,eAAe,EAAC,wBAAwB;IACxCC,WAAW,EAAC,0BAA0B;IAAAC,QAAA,eAEtChB,KAAA,CAACP,IAAI;MAACwB,KAAK,EAAEC,MAAM,CAACC,UAAW;MAAAH,QAAA,gBAC/BhB,KAAA,CAACP,IAAI;QAACwB,KAAK,EAAEC,MAAM,CAACE,YAAa;QAAAJ,QAAA,gBAC/BlB,IAAA,CAACJ,IAAI;UAACuB,KAAK,EAAEC,MAAM,CAACG,UAAW;UAAAL,QAAA,EAAC;QAAK,CAAM,CAAC,eAC5ClB,IAAA,CAACJ,IAAI;UAACuB,KAAK,EAAEC,MAAM,CAACI,UAAW;UAAAN,QAAA,EAAEb;QAAK,CAAO,CAAC;MAAA,CAC1C,CAAC,eACPH,KAAA,CAACP,IAAI;QAACwB,KAAK,EAAEC,MAAM,CAACE,YAAa;QAAAJ,QAAA,gBAC/BlB,IAAA,CAACJ,IAAI;UAACuB,KAAK,EAAEC,MAAM,CAACG,UAAW;UAAAL,QAAA,EAAC;QAAI,CAAM,CAAC,eAC3ClB,IAAA,CAACJ,IAAI;UAACuB,KAAK,EAAEC,MAAM,CAACK,SAAU;UAAAP,QAAA,EAAEV,UAAU,CAACF,QAAQ;QAAC,CAAO,CAAC;MAAA,CACxD,CAAC;IAAA,CACH;EAAC,CACc,CAAC;AAE1B,CAAC,CAAC;AAEF,MAAMc,MAAM,GAAGvB,UAAU,CAAC6B,MAAM,CAAC;EAC/BL,UAAU,EAAE;IACVM,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE;EACd,CAAC;EACDP,YAAY,EAAE;IACZO,UAAU,EAAE,QAAQ;IACpBC,IAAI,EAAE;EACR,CAAC;EACDP,UAAU,EAAE;IACVQ,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,KAAK,EAAE,SAAS;IAChBC,YAAY,EAAE;EAChB,CAAC;EACDV,UAAU,EAAE;IACVO,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,KAAK,EAAE;EACT,CAAC;EACDR,SAAS,EAAE;IACTM,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,8 +1 @@
1
- "use strict";
2
-
3
- export { ScoreBoard } from "./ScoreBoard.js";
4
- export { GameHole } from "./GameHole.js";
5
- export { GameGrid } from "./GameGrid.js";
6
- export { MoleCharacter } from "./MoleCharacter.js";
7
- export { GameBackground } from "./GameBackground.js";
8
- //# sourceMappingURL=index.js.map
1
+ "use strict";export{ScoreBoard}from "./ScoreBoard.js";export{GameHole}from "./GameHole.js";export{GameGrid}from "./GameGrid.js";export{MoleCharacter}from "./MoleCharacter.js";export{GameBackground}from "./GameBackground.js";