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,72 +1 @@
1
- "use strict";
2
-
3
- import React from 'react';
4
- import { Text, StyleSheet, Animated } from 'react-native';
5
- import { Game2048Service } from "../Game2048Service.js";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- // Memoized service instance for better performance
8
- const gameService = new Game2048Service();
9
- export const GameTile = /*#__PURE__*/React.memo(({
10
- tile,
11
- position,
12
- size
13
- }) => {
14
- // Memoize style calculations for better performance
15
- const tileStyles = React.useMemo(() => {
16
- const backgroundColor = gameService.getTileBackgroundColor(tile.value);
17
- return {
18
- left: position.x,
19
- top: position.y,
20
- width: size,
21
- height: size,
22
- backgroundColor,
23
- shadowColor: backgroundColor,
24
- transform: [{
25
- scale: tile.scaleValue || 1
26
- }]
27
- };
28
- }, [tile.value, tile.scaleValue, position.x, position.y, size]);
29
- const textStyles = React.useMemo(() => ({
30
- fontSize: gameService.getTileTextSize(tile.value),
31
- color: gameService.getTileTextColor(tile.value),
32
- fontWeight: '800'
33
- }), [tile.value]);
34
- return /*#__PURE__*/_jsx(Animated.View, {
35
- style: [styles.tile, tileStyles, styles.shadow],
36
- children: /*#__PURE__*/_jsx(Text, {
37
- style: [styles.tileText, textStyles],
38
- children: tile.value
39
- })
40
- });
41
- }, (prevProps, nextProps) => {
42
- // Custom comparison for better memoization
43
- return prevProps.tile.id === nextProps.tile.id && prevProps.tile.value === nextProps.tile.value && prevProps.position.x === nextProps.position.x && prevProps.position.y === nextProps.position.y && prevProps.size === nextProps.size && prevProps.tile.scaleValue === nextProps.tile.scaleValue;
44
- });
45
- const styles = StyleSheet.create({
46
- tile: {
47
- position: 'absolute',
48
- borderRadius: 8,
49
- justifyContent: 'center',
50
- alignItems: 'center'
51
- },
52
- shadow: {
53
- shadowOffset: {
54
- width: 0,
55
- height: 4
56
- },
57
- shadowOpacity: 0.3,
58
- shadowRadius: 8,
59
- elevation: 8
60
- },
61
- tileText: {
62
- textAlign: 'center',
63
- textShadowColor: 'rgba(0, 0, 0, 0.3)',
64
- textShadowOffset: {
65
- width: 1,
66
- height: 1
67
- },
68
- textShadowRadius: 2
69
- }
70
- });
71
- GameTile.displayName = 'GameTile';
72
- //# sourceMappingURL=GameTile.js.map
1
+ "use strict";import React from 'react';import{Text,StyleSheet,Animated}from 'react-native';import{Game2048Service}from "../Game2048Service.js";import{jsx as _jsx}from "react/jsx-runtime";const gameService = new Game2048Service();export const GameTile = React.memo(({tile,position,size})=>{const tileStyles = React.useMemo(()=>{const backgroundColor = gameService.getTileBackgroundColor(tile.value);return{left:position.x,top:position.y,width:size,height:size,backgroundColor,shadowColor:backgroundColor,transform:[{scale:tile.scaleValue || 1}]};},[tile.value,tile.scaleValue,position.x,position.y,size]);const textStyles = React.useMemo(()=>({fontSize:gameService.getTileTextSize(tile.value),color:gameService.getTileTextColor(tile.value),fontWeight:'800'}),[tile.value]);return _jsx(Animated.View,{style:[styles.tile,tileStyles,styles.shadow],children:_jsx(Text,{style:[styles.tileText,textStyles],children:tile.value})});},(prevProps,nextProps)=>{return prevProps.tile.id === nextProps.tile.id && prevProps.tile.value === nextProps.tile.value && prevProps.position.x === nextProps.position.x && prevProps.position.y === nextProps.position.y && prevProps.size === nextProps.size && prevProps.tile.scaleValue === nextProps.tile.scaleValue;});const styles = StyleSheet.create({tile:{position:'absolute',borderRadius:8,justifyContent:'center',alignItems:'center'},shadow:{shadowOffset:{width:0,height:4},shadowOpacity:0.3,shadowRadius:8,elevation:8},tileText:{textAlign:'center',textShadowColor:'rgba(0,0,0,0.3)',textShadowOffset:{width:1,height:1},textShadowRadius:2}});GameTile.displayName = 'GameTile';
@@ -1,52 +1 @@
1
- "use strict";
2
-
3
- import React from 'react';
4
- import { View, Text, StyleSheet } from 'react-native';
5
- import { useTimeElapsed } from "../Game2048Store.js";
6
- import { ScoreBoardContainer } from "../../../helpers/index.js";
7
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
- export const ScoreBoard = /*#__PURE__*/React.memo(({
9
- offset = 0
10
- }) => {
11
- const timeElapsed = useTimeElapsed();
12
-
13
- // Format time as MM:SS
14
- const formattedTime = React.useMemo(() => {
15
- const minutes = Math.floor(timeElapsed / 60);
16
- const seconds = timeElapsed % 60;
17
- return `${minutes}:${seconds.toString().padStart(2, '0')}`;
18
- }, [timeElapsed]);
19
- return /*#__PURE__*/_jsx(ScoreBoardContainer, {
20
- offset: offset,
21
- backgroundColor: "rgba(187, 173, 160, 0.4)",
22
- borderColor: "rgba(119, 110, 101, 0.6)",
23
- children: /*#__PURE__*/_jsxs(View, {
24
- style: styles.scoreBoard,
25
- children: [/*#__PURE__*/_jsx(Text, {
26
- style: styles.scoreLabel,
27
- children: "Time Elapsed"
28
- }), /*#__PURE__*/_jsx(Text, {
29
- style: styles.scoreValue,
30
- children: formattedTime
31
- })]
32
- })
33
- });
34
- });
35
- const styles = StyleSheet.create({
36
- scoreBoard: {
37
- alignItems: 'center'
38
- },
39
- scoreLabel: {
40
- fontSize: 18,
41
- fontWeight: 'bold',
42
- color: '#ffffff',
43
- marginBottom: 4
44
- },
45
- scoreValue: {
46
- fontSize: 30,
47
- fontWeight: 'bold',
48
- color: '#ffffff'
49
- }
50
- });
51
- ScoreBoard.displayName = 'ScoreBoard';
52
- //# sourceMappingURL=ScoreBoard.js.map
1
+ "use strict";import React from 'react';import{View,Text,StyleSheet}from 'react-native';import{useTimeElapsed}from "../Game2048Store.js";import{ScoreBoardContainer}from "../../../helpers/index.js";import{jsx as _jsx,jsxs as _jsxs}from "react/jsx-runtime";export const ScoreBoard = React.memo(({offset = 0})=>{const timeElapsed = useTimeElapsed();const formattedTime = React.useMemo(()=>{const minutes = Math.floor(timeElapsed / 60);const seconds = timeElapsed % 60;return `${minutes}:${seconds.toString().padStart(2,'0')}`;},[timeElapsed]);return _jsx(ScoreBoardContainer,{offset:offset,backgroundColor:"rgba(187,173,160,0.4)",borderColor:"rgba(119,110,101,0.6)",children:_jsxs(View,{style:styles.scoreBoard,children:[_jsx(Text,{style:styles.scoreLabel,children:"Time Elapsed"}),_jsx(Text,{style:styles.scoreValue,children:formattedTime})]})});});const styles = StyleSheet.create({scoreBoard:{alignItems:'center'},scoreLabel:{fontSize:16,fontWeight:'bold',color:'#ffffff',marginBottom:4},scoreValue:{fontSize:25,fontWeight:'bold',color:'#ffffff'}});ScoreBoard.displayName = 'ScoreBoard';
@@ -1,7 +1 @@
1
- "use strict";
2
-
3
- export { GameGrid } from "./GameGrid.js";
4
- export { GameTile } from "./GameTile.js";
5
- export { ScoreBoard } from "./ScoreBoard.js";
6
- export { GameBackground } from "./GameBackground.js";
7
- //# sourceMappingURL=index.js.map
1
+ "use strict";export{GameGrid}from "./GameGrid.js";export{GameTile}from "./GameTile.js";export{ScoreBoard}from "./ScoreBoard.js";export{GameBackground}from "./GameBackground.js";
@@ -1,267 +1 @@
1
- "use strict";
2
-
3
- import React, { useState, useEffect, useCallback, useRef, useMemo } from 'react';
4
- import { View, StyleSheet, Dimensions } from 'react-native';
5
- import { GestureHandlerRootView } from 'react-native-gesture-handler';
6
- import { playSound, GAME_SOUNDS } from "../../services/SoundsService.js";
7
- import { playHaptic, HapticType } from "../../services/HapticsService.js";
8
- import { MazeRunnerService } from "./MazeRunnerService.js";
9
- import { DEFAULT_MAZE_RUNNER_SETTINGS, MAZE_RUNNER_DIFFICULTY_CONFIG } from "./MazeRunnerConstants.js";
10
- import { GameBackground, ScoreBoard, EnhancedGameArea } from "./components/index.js";
11
- import { GameControlButton, GameOverModal } from "../../helpers/index.js";
12
- import { GameSettingsModal } from "../../helpers/index.js";
13
- import { GAME_IDS, DEFAULT_GAME_SETTINGS } from "../../services/UtilsService.js";
14
-
15
- // Optimized hook to handle responsive dimensions with memoization
16
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
- const useResponsiveDimensions = () => {
18
- const [dimensions, setDimensions] = useState(() => {
19
- const {
20
- width,
21
- height
22
- } = Dimensions.get('window');
23
- return {
24
- width,
25
- height
26
- };
27
- });
28
- useEffect(() => {
29
- const handleDimensionChange = ({
30
- window
31
- }) => {
32
- setDimensions(prev => {
33
- // Only update if dimensions actually changed to prevent unnecessary re-renders
34
- if (prev.width !== window.width || prev.height !== window.height) {
35
- return {
36
- width: window.width,
37
- height: window.height
38
- };
39
- }
40
- return prev;
41
- });
42
- };
43
- const subscription = Dimensions.addEventListener('change', handleDimensionChange);
44
- return () => subscription?.remove();
45
- }, []);
46
- return dimensions;
47
- };
48
- export const MazeRunner = ({
49
- settings = DEFAULT_GAME_SETTINGS,
50
- onSettingsChange
51
- }) => {
52
- // Use responsive dimensions hook inside the component
53
- const {
54
- width: screenWidth,
55
- height: screenHeight
56
- } = useResponsiveDimensions();
57
-
58
- // Memoize responsive game area dimensions calculation
59
- const responsiveDimensions = useMemo(() => {
60
- // Reserve space for scoreboard (~80px), control button (~100px), and padding (~40px)
61
- const reservedHeight = 220;
62
- const availableHeight = screenHeight - reservedHeight;
63
- const availableWidth = screenWidth - 40; // 20px padding on each side
64
-
65
- // Use the smaller dimension to ensure the maze fits on screen
66
- const maxDimension = Math.min(availableWidth, availableHeight);
67
-
68
- // Ensure minimum size for playability and maximum size for tablets
69
- const gameAreaSize = Math.max(300, Math.min(maxDimension, 600));
70
- return {
71
- width: gameAreaSize,
72
- height: gameAreaSize
73
- };
74
- }, [screenWidth, screenHeight]);
75
-
76
- // Memoized game service initialization to prevent recreation
77
- const gameService = useMemo(() => {
78
- const currentSettings = {
79
- ...DEFAULT_MAZE_RUNNER_SETTINGS,
80
- ...settings
81
- };
82
- // Calculate initial dimensions for service creation
83
- const {
84
- width: initialWidth,
85
- height: initialHeight
86
- } = Dimensions.get('window');
87
- const reservedHeight = 220;
88
- const availableHeight = initialHeight - reservedHeight;
89
- const availableWidth = initialWidth - 40;
90
- const maxDimension = Math.min(availableWidth, availableHeight);
91
- const gameAreaSize = Math.max(300, Math.min(maxDimension, 600));
92
- return new MazeRunnerService(currentSettings.gridSize, gameAreaSize, gameAreaSize, currentSettings.gameDuration // Pass game duration for countdown timer
93
- );
94
- }, []); // Empty dependency array to create only once
95
-
96
- // Game state
97
- const [gameState, setGameState] = useState(gameService.getGameState());
98
- const [showGameOverModal, setShowGameOverModal] = useState(false);
99
- const [walls, setWalls] = useState(() => gameService.getWalls());
100
- const completionHandledRef = useRef(false);
101
-
102
- // Settings are already available from the global store hook above
103
-
104
- // Memoize game config (updates when dimensions change)
105
- const gameConfig = useMemo(() => gameService.getGameConfig(), [gameService, responsiveDimensions]);
106
-
107
- // Memoize game control button props to prevent unnecessary re-renders
108
- const gameControlButtonProps = useMemo(() => ({
109
- isPlaying: gameState.isPlaying,
110
- gameOver: gameState.isCompleted || gameState.gameOver,
111
- startButtonText: "START MAZE",
112
- stopButtonText: "STOP GAME",
113
- startButtonSubtext: "Navigate the maze!",
114
- stopButtonSubtext: "End current game",
115
- startButtonColor: "#8b4513",
116
- stopButtonColor: "#dc2626",
117
- startButtonBorderColor: "#cd853f",
118
- stopButtonBorderColor: "#f87171"
119
- }), [gameState.isPlaying, gameState.isCompleted, gameState.gameOver]);
120
-
121
- // Memoize game over modal props to prevent unnecessary re-renders
122
- const gameOverModalProps = useMemo(() => ({
123
- isVisible: showGameOverModal,
124
- score: gameState.timeElapsed,
125
- scoreLabel: "Completion Time",
126
- scoreFormatter: time => {
127
- const minutes = Math.floor(time / 60);
128
- const seconds = time % 60;
129
- return `${minutes}:${seconds.toString().padStart(2, '0')}`;
130
- },
131
- buttonText: gameState.isCompleted ? "Navigate Again!" : "Try Again!",
132
- primaryColor: "rgba(139, 69, 19, 0.8)",
133
- borderColor: "rgba(139, 69, 19, 0.9)",
134
- buttonColor: "#8b4513",
135
- buttonBorderColor: "#cd853f"
136
- }), [showGameOverModal, gameState.timeElapsed, gameState.isCompleted]);
137
-
138
- // Generate new maze on component mount
139
- useEffect(() => {
140
- gameService.resetGame(); // Generate fresh maze on launch
141
- }, [gameService]);
142
-
143
- // Update game service when settings change or screen dimensions change
144
- useEffect(() => {
145
- const difficultyConfig = MAZE_RUNNER_DIFFICULTY_CONFIG[settings.difficulty];
146
- const gridSize = difficultyConfig.gridSize;
147
- const gameDuration = difficultyConfig.gameDuration; // Get from difficulty config
148
-
149
- gameService.updateSettings(gridSize, gameDuration, responsiveDimensions.width, responsiveDimensions.height);
150
- }, [settings.difficulty, gameService, responsiveDimensions]);
151
-
152
- // Memoized state change callback to prevent recreation
153
- const handleStateChange = useCallback(newState => {
154
- setGameState(() => {
155
- // Handle game completion (only once per level)
156
- if (newState.isCompleted && !completionHandledRef.current) {
157
- completionHandledRef.current = true;
158
- handleGameCompleted();
159
- // Show game over modal immediately when maze is completed
160
- setTimeout(() => {
161
- setShowGameOverModal(true);
162
- }, 500); // Short delay to let completion animation/feedback finish
163
- }
164
-
165
- // Don't show modal when stop button is clicked - only show on completion
166
-
167
- return newState;
168
- });
169
-
170
- // Update walls whenever game state changes (maze might have been regenerated)
171
- setWalls(gameService.getWalls());
172
- }, [gameService]);
173
-
174
- // Set up game state change callback
175
- useEffect(() => {
176
- gameService.setGameStateChangeCallback(handleStateChange);
177
- return () => {
178
- // Fully reset game when unmounting (navigate back)
179
- try {
180
- gameService.stopGame();
181
- } catch {}
182
- try {
183
- gameService.resetGame();
184
- } catch {}
185
- gameService.cleanup();
186
- };
187
- }, [gameService, handleStateChange]);
188
- const handleGameCompleted = useCallback(() => {
189
- playSound(GAME_SOUNDS.MAZE_RUNNER.COMPLETE, settings.enableSounds);
190
- playHaptic(HapticType.SUCCESS, settings.enableHaptics);
191
- }, [settings.enableSounds, settings.enableHaptics]);
192
- const handleStartGame = useCallback(() => {
193
- completionHandledRef.current = false; // Reset completion flag
194
- gameService.startGame();
195
- setShowGameOverModal(false);
196
- playSound(GAME_SOUNDS.MAZE_RUNNER.START, settings.enableSounds);
197
- playHaptic(HapticType.MEDIUM, settings.enableHaptics);
198
- }, [gameService, settings.enableSounds, settings.enableHaptics]);
199
- const handleStopGame = useCallback(() => {
200
- gameService.stopGame();
201
- playSound(GAME_SOUNDS.MAZE_RUNNER.STOP, settings.enableSounds);
202
- }, [gameService, settings.enableSounds]);
203
- const handleBallPositionChange = useCallback(position => {
204
- return gameService.updateBallPosition(position);
205
- }, [gameService]);
206
- const handlePlayAgain = useCallback(() => {
207
- completionHandledRef.current = false; // Reset completion flag
208
- setShowGameOverModal(false);
209
- gameService.resetGame(); // Reset without auto-starting
210
- }, [gameService]);
211
-
212
- // Get offset from settings
213
- const offset = settings?.offset ?? 0;
214
- return /*#__PURE__*/_jsx(View, {
215
- style: styles.container,
216
- children: /*#__PURE__*/_jsx(GestureHandlerRootView, {
217
- children: /*#__PURE__*/_jsxs(View, {
218
- style: styles.gameContainer,
219
- children: [/*#__PURE__*/_jsx(GameBackground, {
220
- width: screenWidth,
221
- height: screenHeight
222
- }), /*#__PURE__*/_jsx(ScoreBoard, {
223
- gameState: gameState,
224
- offset: offset
225
- }), /*#__PURE__*/_jsx(View, {
226
- style: [styles.gameAreaContainer, {
227
- marginTop: offset
228
- }],
229
- children: /*#__PURE__*/_jsx(EnhancedGameArea, {
230
- gameState: gameState,
231
- gameConfig: gameConfig,
232
- walls: walls,
233
- onBallPositionChange: handleBallPositionChange,
234
- hapticEnabled: settings.enableHaptics
235
- })
236
- }), /*#__PURE__*/_jsx(GameControlButton, {
237
- ...gameControlButtonProps,
238
- onStartGame: handleStartGame,
239
- onStopGame: handleStopGame
240
- }), /*#__PURE__*/_jsx(GameOverModal, {
241
- ...gameOverModalProps,
242
- onPlayAgain: handlePlayAgain
243
- }), /*#__PURE__*/_jsx(GameSettingsModal, {
244
- gameId: GAME_IDS.MAZE_RUNNER,
245
- settings: settings || DEFAULT_GAME_SETTINGS,
246
- onSettingsChange: onSettingsChange
247
- })]
248
- })
249
- })
250
- });
251
- };
252
- const styles = StyleSheet.create({
253
- container: {
254
- flex: 1
255
- },
256
- gameContainer: {
257
- flex: 1
258
- },
259
- gameAreaContainer: {
260
- flex: 1,
261
- justifyContent: 'center',
262
- alignItems: 'center',
263
- paddingHorizontal: 10,
264
- paddingVertical: 5
265
- }
266
- });
267
- //# sourceMappingURL=MazeRunner.js.map
1
+ "use strict";import React,{useState,useEffect,useCallback,useRef,useMemo}from 'react';import{View,StyleSheet,Dimensions}from 'react-native';import{GestureHandlerRootView}from 'react-native-gesture-handler';import{playSound,GAME_SOUNDS}from "../../services/SoundsService.js";import{playHaptic,HapticType}from "../../services/HapticsService.js";import{calculateTimeBasedScore}from "../../services/ScoringService.js";import{MazeRunnerService}from "./MazeRunnerService.js";import{DEFAULT_MAZE_RUNNER_SETTINGS,MAZE_RUNNER_DIFFICULTY_CONFIG}from "./MazeRunnerConstants.js";import{GameBackground,ScoreBoard,EnhancedGameArea}from "./components/index.js";import{GameControlButton,GameOverModal}from "../../helpers/index.js";import{GameSettingsModal}from "../../helpers/index.js";import{GAME_IDS,DEFAULT_GAME_SETTINGS}from "../../services/UtilsService.js";import{jsx as _jsx,jsxs as _jsxs}from "react/jsx-runtime";const useResponsiveDimensions =()=>{const [dimensions,setDimensions] = useState(()=>{const{width,height}= Dimensions.get('window');return{width,height};});useEffect(()=>{const handleDimensionChange =({window})=>{setDimensions(prev =>{if(prev.width !== window.width || prev.height !== window.height){return{width:window.width,height:window.height};}return prev;});};const subscription = Dimensions.addEventListener('change',handleDimensionChange);return()=> subscription?.remove();},[]);return dimensions;};export const MazeRunner =({settings = DEFAULT_GAME_SETTINGS,onSettingsChange,onEndGame})=>{const{width:screenWidth,height:screenHeight}= useResponsiveDimensions();const gameReportedRef = useRef(false);const reportGameEnd = useCallback((status,currentScore)=>{if(onEndGame && !gameReportedRef.current){const difficultyConfig = MAZE_RUNNER_DIFFICULTY_CONFIG[settings.difficulty];const expectedTime = difficultyConfig.gameDuration;const calculatedScore = status === 'win' ? calculateTimeBasedScore(currentScore,expectedTime):0;onEndGame({status,score:calculatedScore.toString()});gameReportedRef.current = true;}},[onEndGame,settings.difficulty]);const responsiveDimensions = useMemo(()=>{const reservedHeight = 220;const availableHeight = screenHeight - reservedHeight;const availableWidth = screenWidth - 40;const maxDimension = Math.min(availableWidth,availableHeight);const gameAreaSize = Math.max(300,Math.min(maxDimension,600));return{width:gameAreaSize,height:gameAreaSize};},[screenWidth,screenHeight]);const gameService = useMemo(()=>{const currentSettings ={...DEFAULT_MAZE_RUNNER_SETTINGS,...settings};const{width:initialWidth,height:initialHeight}= Dimensions.get('window');const reservedHeight = 220;const availableHeight = initialHeight - reservedHeight;const availableWidth = initialWidth - 40;const maxDimension = Math.min(availableWidth,availableHeight);const gameAreaSize = Math.max(300,Math.min(maxDimension,600));return new MazeRunnerService(currentSettings.gridSize,gameAreaSize,gameAreaSize,currentSettings.gameDuration);},[]);const [gameState,setGameState] = useState(gameService.getGameState());const [showGameOverModal,setShowGameOverModal] = useState(false);const [walls,setWalls] = useState(()=> gameService.getWalls());const completionHandledRef = useRef(false);const gameConfig = useMemo(()=> gameService.getGameConfig(),[gameService,responsiveDimensions]);const gameControlButtonProps = useMemo(()=>({isPlaying:gameState.isPlaying,gameOver:gameState.isCompleted || gameState.gameOver,startButtonText:"START MAZE",stopButtonText:"STOP GAME",startButtonSubtext:"Navigate the maze!",stopButtonSubtext:"End current game",startButtonColor:"#8b4513",stopButtonColor:"#dc2626",startButtonBorderColor:"#cd853f",stopButtonBorderColor:"#f87171"}),[gameState.isPlaying,gameState.isCompleted,gameState.gameOver]);const gameOverModalProps = useMemo(()=>({isVisible:showGameOverModal,score:gameState.timeElapsed,scoreLabel:"Completion Time",scoreFormatter:time =>{const minutes = Math.floor(time / 60);const seconds = time % 60;return `${minutes}:${seconds.toString().padStart(2,'0')}`;},buttonText:gameState.isCompleted ? "Navigate Again!":"Try Again!",primaryColor:"rgba(139,69,19,0.5)",borderColor:"rgba(139,69,19,0.5)",buttonColor:"#ffffff",buttonBorderColor:"#ffffff",buttonTextColor:"#8b4513"}),[showGameOverModal,gameState.timeElapsed,gameState.isCompleted]);useEffect(()=>{gameService.resetGame();},[gameService]);useEffect(()=>{const difficultyConfig = MAZE_RUNNER_DIFFICULTY_CONFIG[settings.difficulty];const gridSize = difficultyConfig.gridSize;const gameDuration = difficultyConfig.gameDuration;gameService.updateSettings(gridSize,gameDuration,responsiveDimensions.width,responsiveDimensions.height);},[settings.difficulty,gameService,responsiveDimensions]);const handleStateChange = useCallback(newState =>{setGameState(()=>{if(newState.isCompleted && !completionHandledRef.current){completionHandledRef.current = true;handleGameCompleted();reportGameEnd('win',newState.timeElapsed);setTimeout(()=>{setShowGameOverModal(true);},500);}return newState;});setWalls(gameService.getWalls());},[gameService,reportGameEnd]);useEffect(()=>{gameService.setGameStateChangeCallback(handleStateChange);return()=>{try{gameService.stopGame();}catch{}try{gameService.resetGame();}catch{}gameService.cleanup();};},[gameService,handleStateChange]);const handleGameCompleted = useCallback(()=>{playSound(GAME_SOUNDS.MAZE_RUNNER.COMPLETE,settings.enableSounds);playHaptic(HapticType.SUCCESS,settings.enableHaptics);},[settings.enableSounds,settings.enableHaptics]);const handleStartGame = useCallback(()=>{gameReportedRef.current = false;completionHandledRef.current = false;gameService.startGame();setShowGameOverModal(false);playSound(GAME_SOUNDS.MAZE_RUNNER.START,settings.enableSounds);playHaptic(HapticType.MEDIUM,settings.enableHaptics);},[gameService,settings.enableSounds,settings.enableHaptics]);const handleStopGame = useCallback(()=>{reportGameEnd('cancel',gameState.timeElapsed);gameService.stopGame();playSound(GAME_SOUNDS.MAZE_RUNNER.STOP,settings.enableSounds);},[gameService,settings.enableSounds,reportGameEnd,gameState.timeElapsed]);const handleBallPositionChange = useCallback(position =>{return gameService.updateBallPosition(position);},[gameService]);const handlePlayAgain = useCallback(()=>{completionHandledRef.current = false;setShowGameOverModal(false);gameService.resetGame();},[gameService]);const offset = settings?.offset ?? 0;return _jsx(View,{style:styles.container,children:_jsx(GestureHandlerRootView,{children:_jsxs(View,{style:styles.gameContainer,children:[_jsx(GameBackground,{width:screenWidth,height:screenHeight}),_jsx(ScoreBoard,{gameState:gameState,offset:offset}),_jsx(View,{style:[styles.gameAreaContainer,{marginTop:offset}],children:_jsx(EnhancedGameArea,{gameState:gameState,gameConfig:gameConfig,walls:walls,onBallPositionChange:handleBallPositionChange,hapticEnabled:settings.enableHaptics})}),_jsx(GameControlButton,{...gameControlButtonProps,onStartGame:handleStartGame,onStopGame:handleStopGame}),_jsx(GameOverModal,{...gameOverModalProps,onPlayAgain:handlePlayAgain}),_jsx(GameSettingsModal,{gameId:GAME_IDS.MAZE_RUNNER,settings:settings || DEFAULT_GAME_SETTINGS,onSettingsChange:onSettingsChange})]})})});};const styles = StyleSheet.create({container:{flex:1},gameContainer:{flex:1},gameAreaContainer:{flex:1,justifyContent:'center',alignItems:'center',paddingHorizontal:10,paddingVertical:5}});
@@ -1 +1 @@
1
- {"version":3,"names":["React","useState","useEffect","useCallback","useRef","useMemo","View","StyleSheet","Dimensions","GestureHandlerRootView","playSound","GAME_SOUNDS","playHaptic","HapticType","MazeRunnerService","DEFAULT_MAZE_RUNNER_SETTINGS","MAZE_RUNNER_DIFFICULTY_CONFIG","GameBackground","ScoreBoard","EnhancedGameArea","GameControlButton","GameOverModal","GameSettingsModal","GAME_IDS","DEFAULT_GAME_SETTINGS","jsx","_jsx","jsxs","_jsxs","useResponsiveDimensions","dimensions","setDimensions","width","height","get","handleDimensionChange","window","prev","subscription","addEventListener","remove","MazeRunner","settings","onSettingsChange","screenWidth","screenHeight","responsiveDimensions","reservedHeight","availableHeight","availableWidth","maxDimension","Math","min","gameAreaSize","max","gameService","currentSettings","initialWidth","initialHeight","gridSize","gameDuration","gameState","setGameState","getGameState","showGameOverModal","setShowGameOverModal","walls","setWalls","getWalls","completionHandledRef","gameConfig","getGameConfig","gameControlButtonProps","isPlaying","gameOver","isCompleted","startButtonText","stopButtonText","startButtonSubtext","stopButtonSubtext","startButtonColor","stopButtonColor","startButtonBorderColor","stopButtonBorderColor","gameOverModalProps","isVisible","score","timeElapsed","scoreLabel","scoreFormatter","time","minutes","floor","seconds","toString","padStart","buttonText","primaryColor","borderColor","buttonColor","buttonBorderColor","resetGame","difficultyConfig","difficulty","updateSettings","handleStateChange","newState","current","handleGameCompleted","setTimeout","setGameStateChangeCallback","stopGame","cleanup","MAZE_RUNNER","COMPLETE","enableSounds","SUCCESS","enableHaptics","handleStartGame","startGame","START","MEDIUM","handleStopGame","STOP","handleBallPositionChange","position","updateBallPosition","handlePlayAgain","offset","style","styles","container","children","gameContainer","gameAreaContainer","marginTop","onBallPositionChange","hapticEnabled","onStartGame","onStopGame","onPlayAgain","gameId","create","flex","justifyContent","alignItems","paddingHorizontal","paddingVertical"],"sourceRoot":"../../../../src","sources":["games/maze-runner/MazeRunner.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,EAAEC,WAAW,EAAEC,MAAM,EAAEC,OA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;MAAA,CACI;IAAC,CACe;EAAC,CACrB,CAAC;AAEX,CAAC;AAED,MAAMuF,MAAM,GAAG3H,UAAU,CAACuI,MAAM,CAAC;EAC/BX,SAAS,EAAE;IACTY,IAAI,EAAE;EACR,CAAC;EACDV,aAAa,EAAE;IACbU,IAAI,EAAE;EACR,CAAC;EACDT,iBAAiB,EAAE;IACjBS,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useState","useEffect","useCallback","useRef","useMemo","View","StyleSheet","Dimensions","GestureHandlerRootView","playSound","GAME_SOUNDS","playHaptic","HapticType","calculateTimeBasedScore","MazeRunnerService","DEFAULT_MAZE_RUNNER_SETTINGS","MAZE_RUNNER_DIFFICULTY_CONFIG","GameBackground","ScoreBoard","EnhancedGameArea","GameControlButton","GameOverModal","GameSettingsModal","GAME_IDS","DEFAULT_GAME_SETTINGS","jsx","_jsx","jsxs","_jsxs","useResponsiveDimensions","dimensions","setDimensions","width","height","get","handleDimensionChange","window","prev","subscription","addEventListener","remove","MazeRunner","settings","onSettingsChange","onEndGame","screenWidth","screenHeight","gameReportedRef","reportGameEnd","status","currentScore","current","difficultyConfig","difficulty","expectedTime","gameDuration","calculatedScore","score","toString","responsiveDimensions","reservedHeight","availableHeight","availableWidth","maxDimension","Math","min","gameAreaSize","max","gameService","currentSettings","initialWidth","initialHeight","gridSize","gameState","setGameState","getGameState","showGameOverModal","setShowGameOverModal","walls","setWalls","getWalls","completionHandledRef","gameConfig","getGameConfig","gameControlButtonProps","isPlaying","gameOver","isCompleted","startButtonText","stopButtonText","startButtonSubtext","stopButtonSubtext","startButtonColor","stopButtonColor","startButtonBorderColor","stopButtonBorderColor","gameOverModalProps","isVisible","timeElapsed","scoreLabel","scoreFormatter","time","minutes","floor","seconds","padStart","buttonText","primaryColor","borderColor","buttonColor","buttonBorderColor","buttonTextColor","resetGame","updateSettings","handleStateChange","newState","handleGameCompleted","setTimeout","setGameStateChangeCallback","stopGame","cleanup","MAZE_RUNNER","COMPLETE","enableSounds","SUCCESS","enableHaptics","handleStartGame","startGame","START","MEDIUM","handleStopGame","STOP","handleBallPositionChange","position","updateBallPosition","handlePlayAgain","offset","style","styles","container","children","gameContainer","gameAreaContainer","marginTop","onBallPositionChange","hapticEnabled","onStartGame","onStopGame","onPlayAgain","gameId","create","flex","justifyContent","alignItems","paddingHorizontal","paddingVertical"],"sourceRoot":"../../../../src","sources":["games/maze-runner/MazeRunner.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,EAAEC,WAAW,EAAEC,MAAM,EAAEC,OAAO,QAAQ,OAAO;AAChF,SAASC,IAAI,EAAEC,UAAU,EAAEC,UAAU,QAAQ,cAAc;AAC3D,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,SAAS,EAAEC,WAAW,QAAQ,iCAA8B;AACrE,SAASC,UAAU,EAAEC,UAAU,QAAQ,kCAA+B;AACtE,SAASC,uBAAuB,QAAQ,kCAA+B;AACvE,SAASC,iBAAiB,QAAuC,wBAAqB;AACtF,SACEC,4BAA4B,EAC5BC,6BAA6B,QACxB,0BAAuB;AAC9B,SACEC,cAAc,EACdC,UAAU,EACVC,gBAAgB,QACX,uBAAc;AACrB,SAASC,iBAAiB,EAAEC,aAAa,QAAQ,wBAAe;AAChE,SAASC,iBAAiB,QAAQ,wBAAe;AACjD,SAASC,QAAQ,EAAkBC,qBAAqB,QAAQ,gCAA6B;;AAE7F;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACA,MAAMC,uBAAuB,GAAGA,CAAA,KAAM;EACpC,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAG/B,QAAQ,CAAC,MAAM;IACjD,MAAM;MAAEgC,KAAK;MAAEC;IAAO,CA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eAGFxG,IAAA,CAACL,aAAa;UAAA,GACR2E,kBAAkB;UACtBoD,WAAW,EAAEb;QAAgB,CAC9B,CAAC,eAGF7G,IAAA,CAACJ,iBAAiB;UAChB+H,MAAM,EAAE9H,QAAQ,CAACkG,WAAY;UAC7B/E,QAAQ,EAAEA,QAAQ,IAAIlB,qBAAsB;UAC5CmB,gBAAgB,EAAEA;QAAiB,CACpC,CAAC;MAAA,CACI;IAAC,CACe;EAAC,CACrB,CAAC;AAEX,CAAC;AAED,MAAM+F,MAAM,GAAGpI,UAAU,CAACgJ,MAAM,CAAC;EAC/BX,SAAS,EAAE;IACTY,IAAI,EAAE;EACR,CAAC;EACDV,aAAa,EAAE;IACbU,IAAI,EAAE;EACR,CAAC;EACDT,iBAAiB,EAAE;IACjBS,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,100 +1 @@
1
- "use strict";
2
-
3
- // Maze Runner Game Constants
4
-
5
- export const DEFAULT_MAZE_RUNNER_SETTINGS = {
6
- difficulty: 'medium',
7
- gameDuration: 120,
8
- soundEnabled: true,
9
- hapticEnabled: true,
10
- gridSize: 10,
11
- showHints: false
12
- };
13
- export const MAZE_RUNNER_DIFFICULTY_CONFIG = {
14
- easy: {
15
- gridSize: 8,
16
- timeBonus: 1.5,
17
- scoreMultiplier: 1.0,
18
- hintAvailable: true,
19
- gameDuration: 60
20
- },
21
- medium: {
22
- gridSize: 10,
23
- timeBonus: 1.2,
24
- scoreMultiplier: 1.2,
25
- hintAvailable: false,
26
- gameDuration: 120
27
- },
28
- hard: {
29
- gridSize: 12,
30
- timeBonus: 1.0,
31
- scoreMultiplier: 1.5,
32
- hintAvailable: false,
33
- gameDuration: 180
34
- }
35
- };
36
-
37
- // Maze Runner Game Theme - Matches scoreboard brown
38
- export const MAZE_RUNNER_THEME = {
39
- backgroundColor: '#f5f5dc',
40
- // Beige background to match maze theme
41
- headerBackgroundColor: 'rgba(139, 69, 19, 0.9)',
42
- // Brown header to match scoreboard
43
- headerTextColor: '#ffffff',
44
- sectionBackgroundColor: 'rgba(139, 69, 19, 0.4)',
45
- // Match scoreboard transparency
46
- sectionTitleColor: '#ffffff',
47
- // White text on brown sections
48
- buttonSelectedColor: '#8b4513',
49
- // Match start button brown
50
- buttonUnselectedColor: 'rgba(255, 255, 255, 0.3)',
51
- buttonSelectedTextColor: '#ffffff',
52
- buttonUnselectedTextColor: '#1f2937',
53
- switchTrackColorFalse: 'rgba(139, 69, 19, 0.5)',
54
- switchTrackColorTrue: '#8b4513',
55
- // Match start button
56
- switchThumbColor: '#ffffff',
57
- infoTextColor: '#1f2937' // Dark text for readability
58
- };
59
-
60
- // Maze Runner Difficulty Descriptions
61
- export const MAZE_RUNNER_DIFFICULTY_DESCRIPTIONS = {
62
- easy: 'Small maze, more forgiving maze',
63
- medium: 'Balanced maze, balanced challenge',
64
- hard: 'Complex maze, maximum challenge!'
65
- };
66
-
67
- // Vibrant color palette for Maze Runner background (inspired by adventure themes)
68
- export const MAZE_ADVENTURE_COLORS = ['#FF6B6B',
69
- // Vibrant coral red
70
- '#4ECDC4',
71
- // Vibrant teal
72
- '#45B7D1',
73
- // Vibrant sky blue
74
- '#96CEB4',
75
- // Vibrant mint green
76
- '#FFEAA7',
77
- // Vibrant golden yellow
78
- '#DDA0DD',
79
- // Vibrant plum
80
- '#98D8C8',
81
- // Vibrant seafoam
82
- '#F7DC6F',
83
- // Vibrant lemon
84
- '#BB8FCE',
85
- // Vibrant lavender
86
- '#85C1E9',
87
- // Vibrant light blue
88
- '#82E0AA',
89
- // Vibrant light green
90
- '#F8C471',
91
- // Vibrant peach
92
- '#D7BDE2',
93
- // Vibrant light purple
94
- '#A9DFBF',
95
- // Vibrant pale green
96
- '#FAD7A0',
97
- // Vibrant cream
98
- '#D5A6BD' // Vibrant dusty rose
99
- ];
100
- //# sourceMappingURL=MazeRunnerConstants.js.map
1
+ "use strict";export const DEFAULT_MAZE_RUNNER_SETTINGS ={difficulty:'medium',gameDuration:120,soundEnabled:true,hapticEnabled:true,gridSize:10,showHints:false};export const MAZE_RUNNER_DIFFICULTY_CONFIG ={easy:{gridSize:8,timeBonus:1.5,scoreMultiplier:1.0,hintAvailable:true,gameDuration:60},medium:{gridSize:10,timeBonus:1.2,scoreMultiplier:1.2,hintAvailable:false,gameDuration:120},hard:{gridSize:12,timeBonus:1.0,scoreMultiplier:1.5,hintAvailable:false,gameDuration:180}};export const MAZE_RUNNER_THEME ={backgroundColor:'rgba(0,0,0,0.7)',headerBackgroundColor:'#8b4513',headerTextColor:'#ffffff',sectionBackgroundColor:'rgba(139,69,19,0.15)',sectionTitleColor:'#8b4513',buttonSelectedColor:'#8b4513',buttonUnselectedColor:'rgba(255,255,255,0.2)',buttonSelectedTextColor:'#ffffff',buttonUnselectedTextColor:'rgba(255,255,255,0.7)',switchTrackColorFalse:'rgba(139,69,19,0.3)',switchTrackColorTrue:'#8b4513',switchThumbColor:'#ffffff',infoTextColor:'rgba(255,255,255,0.9)'};export const MAZE_RUNNER_DIFFICULTY_DESCRIPTIONS ={easy:'Small maze,more forgiving maze',medium:'Balanced maze,balanced challenge',hard:'Complex maze,maximum challenge!'};export const MAZE_ADVENTURE_COLORS = ['#FF6B6B','#4ECDC4','#45B7D1','#96CEB4','#FFEAA7','#DDA0DD','#98D8C8','#F7DC6F','#BB8FCE','#85C1E9','#82E0AA','#F8C471','#D7BDE2','#A9DFBF','#FAD7A0','#D5A6BD' ];
@@ -1 +1 @@
1
- {"version":3,"names":["DEFAULT_MAZE_RUNNER_SETTINGS","difficulty","gameDuration","soundEnabled","hapticEnabled","gridSize","showHints","MAZE_RUNNER_DIFFICULTY_CONFIG","easy","timeBonus","scoreMultiplier","hintAvailable","medium","hard","MAZE_RUNNER_THEME","backgroundColor","headerBackgroundColor","headerTextColor","sectionBackgroundColor","sectionTitleColor","buttonSelectedColor","buttonUnselectedColor","buttonSelectedTextColor","buttonUnselectedTextColor","switchTrackColorFalse","switchTrackColorTrue","switchThumbColor","infoTextColor","MAZE_RUNNER_DIFFICULTY_DESCRIPTIONS","MAZE_ADVENTURE_COLORS"],"sourceRoot":"../../../../src","sources":["games/maze-runner/MazeRunnerConstants.ts"],"mappings":";;AAEA;;AAUA,OAAO,MAAMA,4BAAgD,GAAG;EAC9DC,UAAU,EAAE,QAAQ;EACpBC,YAAY,EAAE,GAAG;EACjBC,YAAY,EAAE,IAAI;EAClBC,aAAa,EAAE,IAAI;EACnBC,QAAQ,EAAE,EAAE;EACZC,SAAS,EAAE;AACb,CAAC;AAED,OAAO,MAAMC,6BAA6B,GAAG;EAC3CC,IAAI,EAAE;IACJH,QAAQ,EAAE,CAAC;IACXI,SAAS,EAAE,GAAG;IACdC,eAAe,EAAE,GAAG;IACpBC,aAAa,EAAE,IAAI;IACnBT,YAAY,EAAE;EAChB,CAAC;EACDU,MAAM,EAAE;IACNP,QAAQ,EAAE,EAAE;IACZI,SAAS,EAAE,GAAG;IACdC,eAAe,EAAE,GAAG;IACpBC,aAAa,EAAE,KAAK;IACpBT,YAAY,EAAE;EAChB,CAAC;EACDW,IAAI,EAAE;IACJR,QAAQ,EAAE,EAAE;IACZI,SAAS,EAAE,GAAG;IACdC,eAAe,EAAE,GAAG;IACpBC,aAAa,EAAE,KAAK;IACpBT,YAAY,EAAE;EAChB;AACF,CAAU;;AAEV;AACA,OAAO,MAAMY,iBAAoC,GAAG;EAClDC,eAAe,EAAE,SAAS;EAAE;EAC5BC,qBAAqB,EAAE,wBAAwB;EAAE;EACjDC,eAAe,EAAE,SAAS;EAC1BC,sBAAsB,EAAE,wBAAwB;EAAE;EAClDC,iBAAiB,EAAE,SAAS;EAAE;EAC9BC,mBAAmB,EAAE,SAAS;EAAE;EAChCC,qBAAqB,EAAE,0BAA0B;EACjDC,uBAAuB,EAAE,SAAS;EAClCC,yBAAyB,EAAE,SAAS;EACpCC,qBAAqB,EAAE,wBAAwB;EAC/CC,oBAAoB,EAAE,SAAS;EAAE;EACjCC,gBAAgB,EAAE,SAAS;EAC3BC,aAAa,EAAE,SAAS,CAAE;AAC5B,CAAC;;AAED;AACA,OAAO,MAAMC,mCAAmC,GAAG;EACjDpB,IAAI,EAAE,iCAAiC;EACvCI,MAAM,EAAE,mCAAmC;EAC3CC,IAAI,EAAE;AACR,CAAU;;AAEV;AACA,OAAO,MAAMgB,qBAAqB,GAAG,CACnC,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS,CAAE;AAAA,CACH","ignoreList":[]}
1
+ {"version":3,"names":["DEFAULT_MAZE_RUNNER_SETTINGS","difficulty","gameDuration","soundEnabled","hapticEnabled","gridSize","showHints","MAZE_RUNNER_DIFFICULTY_CONFIG","easy","timeBonus","scoreMultiplier","hintAvailable","medium","hard","MAZE_RUNNER_THEME","backgroundColor","headerBackgroundColor","headerTextColor","sectionBackgroundColor","sectionTitleColor","buttonSelectedColor","buttonUnselectedColor","buttonSelectedTextColor","buttonUnselectedTextColor","switchTrackColorFalse","switchTrackColorTrue","switchThumbColor","infoTextColor","MAZE_RUNNER_DIFFICULTY_DESCRIPTIONS","MAZE_ADVENTURE_COLORS"],"sourceRoot":"../../../../src","sources":["games/maze-runner/MazeRunnerConstants.ts"],"mappings":";;AAEA;;AAUA,OAAO,MAAMA,4BAAgD,GAAG;EAC9DC,UAAU,EAAE,QAAQ;EACpBC,YAAY,EAAE,GAAG;EACjBC,YAAY,EAAE,IAAI;EAClBC,aAAa,EAAE,IAAI;EACnBC,QAAQ,EAAE,EAAE;EACZC,SAAS,EAAE;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