@nayan-ui/games 1.19.0 → 1.21.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 (1392) hide show
  1. package/README.md +53 -191
  2. package/lib/module/assets/fonts/Inter-SemiBold.ttf +0 -0
  3. package/lib/module/assets/models/explorer/explorer.glb +0 -0
  4. package/lib/module/assets/models/explorer/params.json +51 -0
  5. package/lib/module/assets/models/explorer/source.json +222 -0
  6. package/lib/module/assets/models/play-with-tua/play-with-tua.glb +0 -0
  7. package/lib/module/assets/models/play-with-tua/sources.json +141 -0
  8. package/lib/module/assets/sfx/balloon_pop.wav +0 -0
  9. package/lib/module/assets/sfx/blocked.wav +0 -0
  10. package/lib/module/assets/sfx/boing.wav +0 -0
  11. package/lib/module/assets/sfx/bonus.wav +0 -0
  12. package/lib/module/assets/sfx/boom.wav +0 -0
  13. package/lib/module/assets/sfx/bump.wav +0 -0
  14. package/lib/module/assets/sfx/cannon.wav +0 -0
  15. package/lib/module/assets/sfx/capture.wav +0 -0
  16. package/lib/module/assets/sfx/card_flip.wav +0 -0
  17. package/lib/module/assets/sfx/card_place.wav +0 -0
  18. package/lib/module/assets/sfx/catch.wav +0 -0
  19. package/lib/module/assets/sfx/chime.wav +0 -0
  20. package/lib/module/assets/sfx/chomp.wav +0 -0
  21. package/lib/module/assets/sfx/chomp_alt.wav +0 -0
  22. package/lib/module/assets/sfx/clack.wav +0 -0
  23. package/lib/module/assets/sfx/clang.wav +0 -0
  24. package/lib/module/assets/sfx/clash.wav +0 -0
  25. package/lib/module/assets/sfx/click.wav +0 -0
  26. package/lib/module/assets/sfx/coin.wav +0 -0
  27. package/lib/module/assets/sfx/combo.wav +0 -0
  28. package/lib/module/assets/sfx/crash.wav +0 -0
  29. package/lib/module/assets/sfx/crunch.wav +0 -0
  30. package/lib/module/assets/sfx/dance.wav +0 -0
  31. package/lib/module/assets/sfx/deselect.wav +0 -0
  32. package/lib/module/assets/sfx/dice_roll.wav +0 -0
  33. package/lib/module/assets/sfx/die.wav +0 -0
  34. package/lib/module/assets/sfx/draw.wav +0 -0
  35. package/lib/module/assets/sfx/drop.wav +0 -0
  36. package/lib/module/assets/sfx/eat.wav +0 -0
  37. package/lib/module/assets/sfx/engine.wav +0 -0
  38. package/lib/module/assets/sfx/error.wav +0 -0
  39. package/lib/module/assets/sfx/flag.wav +0 -0
  40. package/lib/module/assets/sfx/flap.wav +0 -0
  41. package/lib/module/assets/sfx/flip_disc.wav +0 -0
  42. package/lib/module/assets/sfx/footstep_run.wav +0 -0
  43. package/lib/module/assets/sfx/footstep_walk.wav +0 -0
  44. package/lib/module/assets/sfx/game_over.wav +0 -0
  45. package/lib/module/assets/sfx/gate.wav +0 -0
  46. package/lib/module/assets/sfx/hit.wav +0 -0
  47. package/lib/module/assets/sfx/hop.wav +0 -0
  48. package/lib/module/assets/sfx/hurt.wav +0 -0
  49. package/lib/module/assets/sfx/invalid.wav +0 -0
  50. package/lib/module/assets/sfx/jump.wav +0 -0
  51. package/lib/module/assets/sfx/ladder.wav +0 -0
  52. package/lib/module/assets/sfx/land.wav +0 -0
  53. package/lib/module/assets/sfx/laugh.wav +0 -0
  54. package/lib/module/assets/sfx/lose.wav +0 -0
  55. package/lib/module/assets/sfx/merge.wav +0 -0
  56. package/lib/module/assets/sfx/miss.wav +0 -0
  57. package/lib/module/assets/sfx/nitro.wav +0 -0
  58. package/lib/module/assets/sfx/pew.wav +0 -0
  59. package/lib/module/assets/sfx/place.wav +0 -0
  60. package/lib/module/assets/sfx/pling.wav +0 -0
  61. package/lib/module/assets/sfx/point.wav +0 -0
  62. package/lib/module/assets/sfx/pop.wav +0 -0
  63. package/lib/module/assets/sfx/pop_soft.wav +0 -0
  64. package/lib/module/assets/sfx/power_up.wav +0 -0
  65. package/lib/module/assets/sfx/reveal.wav +0 -0
  66. package/lib/module/assets/sfx/robot.wav +0 -0
  67. package/lib/module/assets/sfx/rotate.wav +0 -0
  68. package/lib/module/assets/sfx/run_steps.wav +0 -0
  69. package/lib/module/assets/sfx/select.wav +0 -0
  70. package/lib/module/assets/sfx/shuffle.wav +0 -0
  71. package/lib/module/assets/sfx/six.wav +0 -0
  72. package/lib/module/assets/sfx/slice.wav +0 -0
  73. package/lib/module/assets/sfx/slide.wav +0 -0
  74. package/lib/module/assets/sfx/snake.wav +0 -0
  75. package/lib/module/assets/sfx/snap.wav +0 -0
  76. package/lib/module/assets/sfx/splash.wav +0 -0
  77. package/lib/module/assets/sfx/star.wav +0 -0
  78. package/lib/module/assets/sfx/start.wav +0 -0
  79. package/lib/module/assets/sfx/swoosh.wav +0 -0
  80. package/lib/module/assets/sfx/tap.wav +0 -0
  81. package/lib/module/assets/sfx/thud.wav +0 -0
  82. package/lib/module/assets/sfx/thunk.wav +0 -0
  83. package/lib/module/assets/sfx/tick.wav +0 -0
  84. package/lib/module/assets/sfx/time_up.wav +0 -0
  85. package/lib/module/assets/sfx/tock.wav +0 -0
  86. package/lib/module/assets/sfx/walk_steps.wav +0 -0
  87. package/lib/module/assets/sfx/warning.wav +0 -0
  88. package/lib/module/assets/sfx/whack.wav +0 -0
  89. package/lib/module/assets/sfx/whoosh.wav +0 -0
  90. package/lib/module/assets/sfx/win.wav +0 -0
  91. package/lib/module/assets/sfx/zap.wav +0 -0
  92. package/lib/module/assets/textures/ad_bolt.png +0 -0
  93. package/lib/module/assets/textures/ad_bubbles.png +0 -0
  94. package/lib/module/assets/textures/ad_chevrons.png +0 -0
  95. package/lib/module/assets/textures/asphalt.png +0 -0
  96. package/lib/module/assets/textures/bark.jpg +0 -0
  97. package/lib/module/assets/textures/explorer-atlas.png +0 -0
  98. package/lib/module/assets/textures/facade.png +0 -0
  99. package/lib/module/assets/textures/grass.png +0 -0
  100. package/lib/module/assets/textures/leaves.png +0 -0
  101. package/lib/module/assets/textures/limestone.jpg +0 -0
  102. package/lib/module/assets/textures/meadow.jpg +0 -0
  103. package/lib/module/assets/textures/nature-sources.json +87 -0
  104. package/lib/module/assets/textures/pine.png +0 -0
  105. package/lib/module/assets/textures/river.jpg +0 -0
  106. package/lib/module/assets/textures/soft_glow.png +0 -0
  107. package/lib/module/games/arrows/Arrows.js +1 -1
  108. package/lib/module/games/arrows/ArrowsConstants.js +1 -1
  109. package/lib/module/games/arrows/ArrowsGame.js +1 -0
  110. package/lib/module/games/arrows/ArrowsScene.js +1 -0
  111. package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -1
  112. package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -1
  113. package/lib/module/games/balloon-blaster/BalloonBlasterGame.js +1 -0
  114. package/lib/module/games/balloon-blaster/BalloonBlasterPhysics.js +1 -0
  115. package/lib/module/games/balloon-blaster/BalloonBlasterScene.js +1 -0
  116. package/lib/module/games/bike-racing/BikeMeshes.js +1 -0
  117. package/lib/module/games/bike-racing/BikeRacing.js +1 -1
  118. package/lib/module/games/bike-racing/BikeRacingConstants.js +1 -1
  119. package/lib/module/games/bike-racing/BikeRacingGame.js +1 -0
  120. package/lib/module/games/bike-racing/BikeRacingScene.js +1 -0
  121. package/lib/module/games/block-blast/BlockBlast.js +1 -1
  122. package/lib/module/games/block-blast/BlockBlastConstants.js +1 -1
  123. package/lib/module/games/block-blast/BlockBlastGame.js +1 -0
  124. package/lib/module/games/block-blast/BlockBlastScene.js +1 -0
  125. package/lib/module/games/block-breaker/BlockBreaker.js +1 -1
  126. package/lib/module/games/block-breaker/BlockBreakerConstants.js +1 -1
  127. package/lib/module/games/block-breaker/BlockBreakerGame.js +1 -0
  128. package/lib/module/games/block-breaker/BlockBreakerScene.js +1 -0
  129. package/lib/module/games/bluk/Bluk.js +1 -1
  130. package/lib/module/games/bluk/BlukConstants.js +1 -1
  131. package/lib/module/games/bluk/BlukGame.js +1 -0
  132. package/lib/module/games/bluk/BlukRules.js +1 -0
  133. package/lib/module/games/bluk/BlukScene.js +1 -0
  134. package/lib/module/games/bubble-shooter/BubbleShooter.js +1 -1
  135. package/lib/module/games/bubble-shooter/BubbleShooterConstants.js +1 -1
  136. package/lib/module/games/bubble-shooter/BubbleShooterGame.js +1 -0
  137. package/lib/module/games/bubble-shooter/BubbleShooterScene.js +1 -0
  138. package/lib/module/games/candy-crush/CandyCrush.js +1 -1
  139. package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -1
  140. package/lib/module/games/candy-crush/CandyCrushGame.js +1 -0
  141. package/lib/module/games/candy-crush/CandyCrushScene.js +1 -0
  142. package/lib/module/games/car-racing/CarMeshes.js +1 -0
  143. package/lib/module/games/car-racing/CarRacing.js +1 -1
  144. package/lib/module/games/car-racing/CarRacingConstants.js +1 -1
  145. package/lib/module/games/car-racing/CarRacingFacade.js +1 -0
  146. package/lib/module/games/car-racing/CarRacingGame.js +1 -0
  147. package/lib/module/games/car-racing/CarRacingScene.js +1 -0
  148. package/lib/module/games/car-racing/CarRacingScenery.js +1 -0
  149. package/lib/module/games/chameleon-run/ChameleonRun.js +1 -1
  150. package/lib/module/games/chameleon-run/ChameleonRunBackdrop.js +1 -0
  151. package/lib/module/games/chameleon-run/ChameleonRunConstants.js +1 -1
  152. package/lib/module/games/chameleon-run/ChameleonRunGame.js +1 -0
  153. package/lib/module/games/chameleon-run/ChameleonRunMeshes.js +1 -0
  154. package/lib/module/games/chameleon-run/ChameleonRunRules.js +1 -0
  155. package/lib/module/games/chameleon-run/ChameleonRunScene.js +1 -0
  156. package/lib/module/games/checkers/Checkers.js +1 -1
  157. package/lib/module/games/checkers/CheckersAI.js +1 -0
  158. package/lib/module/games/checkers/CheckersConstants.js +1 -1
  159. package/lib/module/games/checkers/CheckersGame.js +1 -0
  160. package/lib/module/games/checkers/CheckersRules.js +1 -0
  161. package/lib/module/games/checkers/CheckersScene.js +1 -0
  162. package/lib/module/games/color-switch/ColorSwitch.js +1 -1
  163. package/lib/module/games/color-switch/ColorSwitchConstants.js +1 -1
  164. package/lib/module/games/color-switch/ColorSwitchGame.js +1 -0
  165. package/lib/module/games/color-switch/ColorSwitchScene.js +1 -0
  166. package/lib/module/games/colors-sort/ColorsSort.js +1 -1
  167. package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -1
  168. package/lib/module/games/colors-sort/ColorsSortGame.js +1 -0
  169. package/lib/module/games/colors-sort/ColorsSortScene.js +1 -0
  170. package/lib/module/games/connect-em-all/ConnectEmAll.js +1 -1
  171. package/lib/module/games/connect-em-all/ConnectEmAllConstants.js +1 -1
  172. package/lib/module/games/connect-em-all/ConnectEmAllGame.js +1 -0
  173. package/lib/module/games/connect-em-all/ConnectEmAllScene.js +1 -0
  174. package/lib/module/games/crossy-road/CrossyRoad.js +1 -1
  175. package/lib/module/games/crossy-road/CrossyRoadCamera.js +1 -0
  176. package/lib/module/games/crossy-road/CrossyRoadConstants.js +1 -1
  177. package/lib/module/games/crossy-road/CrossyRoadGame.js +1 -0
  178. package/lib/module/games/crossy-road/CrossyRoadMeshes.js +1 -0
  179. package/lib/module/games/crossy-road/CrossyRoadPerson.js +1 -0
  180. package/lib/module/games/crossy-road/CrossyRoadRules.js +1 -0
  181. package/lib/module/games/crossy-road/CrossyRoadScene.js +1 -0
  182. package/lib/module/games/dino-jump/DinoJump.js +1 -1
  183. package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -1
  184. package/lib/module/games/dino-jump/DinoJumpGame.js +1 -0
  185. package/lib/module/games/dino-jump/DinoJumpScene.js +1 -0
  186. package/lib/module/games/dots-and-boxes/DotsAndBoxes.js +1 -1
  187. package/lib/module/games/dots-and-boxes/DotsAndBoxesConstants.js +1 -1
  188. package/lib/module/games/dots-and-boxes/DotsAndBoxesGame.js +1 -0
  189. package/lib/module/games/dots-and-boxes/DotsAndBoxesScene.js +1 -0
  190. package/lib/module/games/falling-sticks/FallingSticks.js +1 -1
  191. package/lib/module/games/falling-sticks/FallingSticksConstants.js +1 -1
  192. package/lib/module/games/falling-sticks/FallingSticksGame.js +1 -0
  193. package/lib/module/games/falling-sticks/FallingSticksRules.js +1 -0
  194. package/lib/module/games/falling-sticks/FallingSticksScene.js +1 -0
  195. package/lib/module/games/find-different-number/FindDifferentNumber.js +1 -1
  196. package/lib/module/games/find-different-number/FindDifferentNumberConstants.js +1 -1
  197. package/lib/module/games/find-different-number/FindDifferentNumberGame.js +1 -0
  198. package/lib/module/games/find-different-number/FindDifferentNumberRules.js +1 -0
  199. package/lib/module/games/find-different-number/FindDifferentNumberScene.js +1 -0
  200. package/lib/module/games/flappy-bird/FlappyBird.js +1 -1
  201. package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -1
  202. package/lib/module/games/flappy-bird/FlappyBirdGame.js +1 -0
  203. package/lib/module/games/flappy-bird/FlappyBirdScene.js +1 -0
  204. package/lib/module/games/fruit-merger/FruitMerger.js +1 -1
  205. package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -1
  206. package/lib/module/games/fruit-merger/FruitMergerGame.js +1 -0
  207. package/lib/module/games/fruit-merger/FruitMergerRules.js +1 -0
  208. package/lib/module/games/fruit-merger/FruitMergerScene.js +1 -0
  209. package/lib/module/games/fruit-ninja/FruitNinja.js +1 -1
  210. package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -1
  211. package/lib/module/games/fruit-ninja/FruitNinjaGame.js +1 -0
  212. package/lib/module/games/fruit-ninja/FruitNinjaScene.js +1 -0
  213. package/lib/module/games/fruit-ninja/FruitNinjaWorld.js +1 -0
  214. package/lib/module/games/game-2048/Game2048.js +1 -1
  215. package/lib/module/games/game-2048/Game2048Constants.js +1 -1
  216. package/lib/module/games/game-2048/Game2048Game.js +1 -0
  217. package/lib/module/games/game-2048/Game2048Rules.js +1 -0
  218. package/lib/module/games/game-2048/Game2048Scene.js +1 -0
  219. package/lib/module/games/knife-hit/KnifeHit.js +1 -1
  220. package/lib/module/games/knife-hit/KnifeHitConstants.js +1 -1
  221. package/lib/module/games/knife-hit/KnifeHitGame.js +1 -0
  222. package/lib/module/games/knife-hit/KnifeHitScene.js +1 -0
  223. package/lib/module/games/ludo-king/LudoKing.js +1 -1
  224. package/lib/module/games/ludo-king/LudoKingConstants.js +1 -1
  225. package/lib/module/games/ludo-king/LudoKingGame.js +1 -0
  226. package/lib/module/games/ludo-king/LudoKingRules.js +1 -0
  227. package/lib/module/games/ludo-king/LudoKingScene.js +1 -0
  228. package/lib/module/games/maze-runner/MazeRunner.js +1 -1
  229. package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -1
  230. package/lib/module/games/maze-runner/MazeRunnerGame.js +1 -0
  231. package/lib/module/games/maze-runner/MazeRunnerRules.js +1 -0
  232. package/lib/module/games/maze-runner/MazeRunnerScene.js +1 -0
  233. package/lib/module/games/memory-match/MemoryMatch.js +1 -1
  234. package/lib/module/games/memory-match/MemoryMatchConstants.js +1 -1
  235. package/lib/module/games/memory-match/MemoryMatchGame.js +1 -0
  236. package/lib/module/games/memory-match/MemoryMatchRules.js +1 -0
  237. package/lib/module/games/memory-match/MemoryMatchScene.js +1 -0
  238. package/lib/module/games/mine-sweeper/MineSweeper.js +1 -1
  239. package/lib/module/games/mine-sweeper/MineSweeperConstants.js +1 -1
  240. package/lib/module/games/mine-sweeper/MineSweeperGame.js +1 -0
  241. package/lib/module/games/mine-sweeper/MineSweeperRules.js +1 -0
  242. package/lib/module/games/mine-sweeper/MineSweeperScene.js +1 -0
  243. package/lib/module/games/mob-control/MobControl.js +1 -1
  244. package/lib/module/games/mob-control/MobControlConstants.js +1 -1
  245. package/lib/module/games/mob-control/MobControlGame.js +1 -0
  246. package/lib/module/games/mob-control/MobControlMeshes.js +1 -0
  247. package/lib/module/games/mob-control/MobControlRenderer.js +1 -0
  248. package/lib/module/games/mob-control/MobControlRules.js +1 -0
  249. package/lib/module/games/mob-control/MobControlScene.js +1 -0
  250. package/lib/module/games/number-search/NumberSearch.js +1 -1
  251. package/lib/module/games/number-search/NumberSearchNumbers.js +1 -0
  252. package/lib/module/games/nuts-and-bolts/NutsAndBolts.js +1 -1
  253. package/lib/module/games/nuts-and-bolts/NutsAndBoltsConstants.js +1 -1
  254. package/lib/module/games/nuts-and-bolts/NutsAndBoltsGame.js +1 -0
  255. package/lib/module/games/nuts-and-bolts/NutsAndBoltsRules.js +1 -0
  256. package/lib/module/games/nuts-and-bolts/NutsAndBoltsScene.js +1 -0
  257. package/lib/module/games/pac-man/PacMan.js +1 -1
  258. package/lib/module/games/pac-man/PacManConstants.js +1 -1
  259. package/lib/module/games/pac-man/PacManGame.js +1 -0
  260. package/lib/module/games/pac-man/PacManRules.js +1 -0
  261. package/lib/module/games/pac-man/PacManScene.js +1 -0
  262. package/lib/module/games/paper-io/PaperIo.js +1 -1
  263. package/lib/module/games/paper-io/PaperIoConstants.js +1 -1
  264. package/lib/module/games/paper-io/PaperIoGame.js +1 -0
  265. package/lib/module/games/paper-io/PaperIoMeshes.js +1 -0
  266. package/lib/module/games/paper-io/PaperIoRules.js +1 -0
  267. package/lib/module/games/paper-io/PaperIoScene.js +1 -0
  268. package/lib/module/games/penguin-run/PenguinMeshes.js +1 -0
  269. package/lib/module/games/penguin-run/PenguinModel.js +1 -0
  270. package/lib/module/games/penguin-run/PenguinRun.js +1 -0
  271. package/lib/module/games/penguin-run/PenguinRunConstants.js +1 -0
  272. package/lib/module/games/penguin-run/PenguinRunGame.js +1 -0
  273. package/lib/module/games/penguin-run/PenguinRunScene.js +1 -0
  274. package/lib/module/games/perfect-circle/PerfectCircle.js +1 -1
  275. package/lib/module/games/perfect-circle/PerfectCircleConstants.js +1 -1
  276. package/lib/module/games/perfect-circle/PerfectCircleGame.js +1 -0
  277. package/lib/module/games/perfect-circle/PerfectCircleRules.js +1 -0
  278. package/lib/module/games/perfect-circle/PerfectCircleScene.js +1 -0
  279. package/lib/module/games/pipe-connect/PipeConnect.js +1 -1
  280. package/lib/module/games/pipe-connect/PipeConnectConstants.js +1 -1
  281. package/lib/module/games/pipe-connect/PipeConnectGame.js +1 -0
  282. package/lib/module/games/pipe-connect/PipeConnectRules.js +1 -0
  283. package/lib/module/games/pipe-connect/PipeConnectScene.js +1 -0
  284. package/lib/module/games/play-with-tua/PlayWithTua.js +1 -0
  285. package/lib/module/games/play-with-tua/PlayWithTuaConstants.js +1 -0
  286. package/lib/module/games/play-with-tua/PlayWithTuaGame.js +1 -0
  287. package/lib/module/games/play-with-tua/PlayWithTuaModel.js +1 -0
  288. package/lib/module/games/play-with-tua/PlayWithTuaScene.js +1 -0
  289. package/lib/module/games/popit-fidget/PopitFidget.js +1 -1
  290. package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -1
  291. package/lib/module/games/popit-fidget/PopitFidgetGame.js +1 -0
  292. package/lib/module/games/popit-fidget/PopitFidgetScene.js +1 -0
  293. package/lib/module/games/reversi/Reversi.js +1 -1
  294. package/lib/module/games/reversi/ReversiConstants.js +1 -1
  295. package/lib/module/games/reversi/ReversiGame.js +1 -0
  296. package/lib/module/games/reversi/ReversiRules.js +1 -0
  297. package/lib/module/games/reversi/ReversiScene.js +1 -0
  298. package/lib/module/games/search-grid/SearchGrid.js +1 -0
  299. package/lib/module/games/search-grid/SearchGridConstants.js +1 -0
  300. package/lib/module/games/search-grid/SearchGridGame.js +1 -0
  301. package/lib/module/games/search-grid/SearchGridScene.js +1 -0
  302. package/lib/module/games/shared/BackdropCard.js +1 -0
  303. package/lib/module/games/shared/EngineBackdrop.js +1 -0
  304. package/lib/module/games/shared/EngineBlasts.js +1 -0
  305. package/lib/module/games/shared/EngineBlocks.js +1 -0
  306. package/lib/module/games/shared/EngineControlText.js +1 -0
  307. package/lib/module/games/shared/EngineDice.js +1 -0
  308. package/lib/module/games/shared/EngineFootprint.js +1 -0
  309. package/lib/module/games/shared/EngineFruits.js +1 -0
  310. package/lib/module/games/shared/EngineGameLoader.js +1 -0
  311. package/lib/module/games/shared/EngineGameScreen.js +1 -0
  312. package/lib/module/games/shared/EngineGameWidth.js +1 -0
  313. package/lib/module/games/shared/EngineGameWidth.web.js +1 -0
  314. package/lib/module/games/shared/EngineGlyphs.js +1 -0
  315. package/lib/module/games/shared/EngineHud.js +1 -0
  316. package/lib/module/games/shared/EngineLoading.js +1 -0
  317. package/lib/module/games/shared/EngineMeadow.js +1 -0
  318. package/lib/module/games/shared/EngineMeshCache.js +1 -0
  319. package/lib/module/games/shared/EngineMeshes.js +1 -0
  320. package/lib/module/games/shared/EngineRacingChase.js +1 -0
  321. package/lib/module/games/shared/EngineRacingHandling.js +1 -0
  322. package/lib/module/games/shared/EngineReadyContext.js +1 -0
  323. package/lib/module/games/shared/EngineTilt.js +1 -0
  324. package/lib/module/games/shared/EngineTouchSurface.js +1 -0
  325. package/lib/module/games/shared/EngineUtils.js +1 -0
  326. package/lib/module/games/shared/GameActivity.js +1 -0
  327. package/lib/module/games/shared/GameLoading.js +1 -0
  328. package/lib/module/games/shared/GameLoadingTransition.js +1 -0
  329. package/lib/module/games/shared/ProceduralCacheVersion.js +1 -0
  330. package/lib/module/games/shared/useEngineGame.js +1 -0
  331. package/lib/module/games/shared/useGameResource.js +1 -0
  332. package/lib/module/games/shared/useLiveState.js +1 -0
  333. package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -1
  334. package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -1
  335. package/lib/module/games/sliding-numbers/SlidingNumbersGame.js +1 -0
  336. package/lib/module/games/sliding-numbers/SlidingNumbersRules.js +1 -0
  337. package/lib/module/games/sliding-numbers/SlidingNumbersScene.js +1 -0
  338. package/lib/module/games/snake-3d/Snake3D.js +1 -1
  339. package/lib/module/games/snake-3d/Snake3DConstants.js +1 -1
  340. package/lib/module/games/snake-3d/Snake3DGame.js +1 -0
  341. package/lib/module/games/snake-3d/Snake3DMotion.js +1 -0
  342. package/lib/module/games/snake-3d/Snake3DRules.js +1 -0
  343. package/lib/module/games/snake-3d/Snake3DScene.js +1 -0
  344. package/lib/module/games/snakes-and-ladders/SnakesAndLadders.js +1 -1
  345. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersConstants.js +1 -1
  346. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersGame.js +1 -0
  347. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersScene.js +1 -0
  348. package/lib/module/games/space-fighter/SpaceFighter.js +1 -1
  349. package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -1
  350. package/lib/module/games/space-fighter/SpaceFighterGame.js +1 -0
  351. package/lib/module/games/space-fighter/SpaceFighterScene.js +1 -0
  352. package/lib/module/games/spider-solitaire/SpiderSolitaire.js +1 -1
  353. package/lib/module/games/spider-solitaire/SpiderSolitaireConstants.js +1 -1
  354. package/lib/module/games/spider-solitaire/SpiderSolitaireGame.js +1 -0
  355. package/lib/module/games/spider-solitaire/SpiderSolitaireRules.js +1 -0
  356. package/lib/module/games/spider-solitaire/SpiderSolitaireScene.js +1 -0
  357. package/lib/module/games/stack-tower/StackTower.js +1 -1
  358. package/lib/module/games/stack-tower/StackTowerConstants.js +1 -1
  359. package/lib/module/games/stack-tower/StackTowerGame.js +1 -0
  360. package/lib/module/games/stack-tower/StackTowerScene.js +1 -0
  361. package/lib/module/games/sudoku/Sudoku.js +1 -1
  362. package/lib/module/games/sudoku/SudokuConstants.js +1 -1
  363. package/lib/module/games/sudoku/SudokuGame.js +1 -0
  364. package/lib/module/games/sudoku/SudokuRules.js +1 -0
  365. package/lib/module/games/sudoku/SudokuScene.js +1 -0
  366. package/lib/module/games/tangram/Tangram.js +1 -1
  367. package/lib/module/games/tangram/TangramConstants.js +1 -1
  368. package/lib/module/games/tangram/TangramGame.js +1 -0
  369. package/lib/module/games/tangram/TangramRules.js +1 -0
  370. package/lib/module/games/tangram/TangramScene.js +1 -0
  371. package/lib/module/games/tank-1990/Tank1990.js +1 -1
  372. package/lib/module/games/tank-1990/Tank1990Constants.js +1 -1
  373. package/lib/module/games/tank-1990/Tank1990Game.js +1 -0
  374. package/lib/module/games/tank-1990/Tank1990Rules.js +1 -0
  375. package/lib/module/games/tank-1990/Tank1990Scene.js +1 -0
  376. package/lib/module/games/tic-tac-toe/TicTacToe.js +1 -1
  377. package/lib/module/games/tic-tac-toe/TicTacToeConstants.js +1 -1
  378. package/lib/module/games/tic-tac-toe/TicTacToeGame.js +1 -0
  379. package/lib/module/games/tic-tac-toe/TicTacToeRules.js +1 -0
  380. package/lib/module/games/tic-tac-toe/TicTacToeScene.js +1 -0
  381. package/lib/module/games/tile-home/TileHome.js +1 -1
  382. package/lib/module/games/tile-home/TileHomeConstants.js +1 -1
  383. package/lib/module/games/tile-home/TileHomeGame.js +1 -0
  384. package/lib/module/games/tile-home/TileHomeScene.js +1 -0
  385. package/lib/module/games/treasure-hunt/TreasureHunt.js +1 -0
  386. package/lib/module/games/treasure-hunt/TreasureHuntConstants.js +1 -0
  387. package/lib/module/games/treasure-hunt/TreasureHuntControls.js +1 -0
  388. package/lib/module/games/treasure-hunt/TreasureHuntGame.js +1 -0
  389. package/lib/module/games/treasure-hunt/TreasureHuntMeshes.js +1 -0
  390. package/lib/module/games/treasure-hunt/TreasureHuntModel.js +1 -0
  391. package/lib/module/games/treasure-hunt/TreasureHuntRules.js +1 -0
  392. package/lib/module/games/treasure-hunt/TreasureHuntScene.js +1 -0
  393. package/lib/module/games/whack-a-mole/WhackAMole.js +1 -1
  394. package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -1
  395. package/lib/module/games/whack-a-mole/WhackAMoleGame.js +1 -0
  396. package/lib/module/games/whack-a-mole/WhackAMoleScene.js +1 -0
  397. package/lib/module/games/word-search/WordSearch.js +1 -1
  398. package/lib/module/games/word-search/WordSearchWords.js +1 -0
  399. package/lib/module/helpers/GamePatternData.js +1 -0
  400. package/lib/module/helpers/GameSettingsModal.js +1 -1
  401. package/lib/module/helpers/GameTheme.js +1 -0
  402. package/lib/module/helpers/IconPaths.js +1 -0
  403. package/lib/module/helpers/index.js +1 -1
  404. package/lib/module/index.js +1 -1
  405. package/lib/module/services/GameAssetLoader.js +1 -0
  406. package/lib/module/services/GameAssets.js +1 -0
  407. package/lib/module/services/GameLoaders.js +1 -0
  408. package/lib/module/services/GamesConstants.js +1 -1
  409. package/lib/module/services/GamesMetadata.js +1 -1
  410. package/lib/module/services/GamesService.js +1 -1
  411. package/lib/module/services/HapticsService.js +1 -1
  412. package/lib/module/services/ScoringService.js +1 -1
  413. package/lib/module/services/SfxSources.js +1 -0
  414. package/lib/module/services/SoundsService.js +1 -1
  415. package/lib/module/services/ThemeService.js +1 -0
  416. package/lib/module/services/UtilsService.js +1 -1
  417. package/lib/module/services/index.js +1 -1
  418. package/lib/typescript/src/games/arrows/Arrows.d.ts +1 -3
  419. package/lib/typescript/src/games/arrows/ArrowsConstants.d.ts +48 -32
  420. package/lib/typescript/src/games/arrows/ArrowsGame.d.ts +60 -0
  421. package/lib/typescript/src/games/arrows/ArrowsScene.d.ts +67 -0
  422. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +1 -3
  423. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +39 -131
  424. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterGame.d.ts +57 -0
  425. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterPhysics.d.ts +16 -0
  426. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterScene.d.ts +31 -0
  427. package/lib/typescript/src/games/bike-racing/BikeMeshes.d.ts +14 -0
  428. package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts +2 -1
  429. package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts +38 -29
  430. package/lib/typescript/src/games/bike-racing/BikeRacingGame.d.ts +104 -0
  431. package/lib/typescript/src/games/bike-racing/BikeRacingScene.d.ts +25 -0
  432. package/lib/typescript/src/games/block-blast/BlockBlast.d.ts +1 -3
  433. package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts +48 -30
  434. package/lib/typescript/src/games/block-blast/BlockBlastGame.d.ts +77 -0
  435. package/lib/typescript/src/games/block-blast/BlockBlastScene.d.ts +36 -0
  436. package/lib/typescript/src/games/block-breaker/BlockBreaker.d.ts +1 -3
  437. package/lib/typescript/src/games/block-breaker/BlockBreakerConstants.d.ts +88 -35
  438. package/lib/typescript/src/games/block-breaker/BlockBreakerGame.d.ts +82 -0
  439. package/lib/typescript/src/games/block-breaker/BlockBreakerScene.d.ts +48 -0
  440. package/lib/typescript/src/games/bluk/Bluk.d.ts +1 -3
  441. package/lib/typescript/src/games/bluk/BlukConstants.d.ts +65 -54
  442. package/lib/typescript/src/games/bluk/BlukGame.d.ts +65 -0
  443. package/lib/typescript/src/games/bluk/BlukRules.d.ts +51 -0
  444. package/lib/typescript/src/games/bluk/BlukScene.d.ts +54 -0
  445. package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts +1 -3
  446. package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts +56 -24
  447. package/lib/typescript/src/games/bubble-shooter/BubbleShooterGame.d.ts +70 -0
  448. package/lib/typescript/src/games/bubble-shooter/BubbleShooterScene.d.ts +26 -0
  449. package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts +1 -3
  450. package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +63 -32
  451. package/lib/typescript/src/games/candy-crush/CandyCrushGame.d.ts +65 -0
  452. package/lib/typescript/src/games/candy-crush/CandyCrushScene.d.ts +28 -0
  453. package/lib/typescript/src/games/car-racing/CarMeshes.d.ts +44 -0
  454. package/lib/typescript/src/games/car-racing/CarRacing.d.ts +2 -1
  455. package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts +60 -29
  456. package/lib/typescript/src/games/car-racing/CarRacingFacade.d.ts +5 -0
  457. package/lib/typescript/src/games/car-racing/CarRacingGame.d.ts +96 -0
  458. package/lib/typescript/src/games/car-racing/CarRacingScene.d.ts +97 -0
  459. package/lib/typescript/src/games/car-racing/CarRacingScenery.d.ts +22 -0
  460. package/lib/typescript/src/games/chameleon-run/ChameleonRun.d.ts +1 -3
  461. package/lib/typescript/src/games/chameleon-run/ChameleonRunBackdrop.d.ts +14 -0
  462. package/lib/typescript/src/games/chameleon-run/ChameleonRunConstants.d.ts +44 -42
  463. package/lib/typescript/src/games/chameleon-run/ChameleonRunGame.d.ts +60 -0
  464. package/lib/typescript/src/games/chameleon-run/ChameleonRunMeshes.d.ts +20 -0
  465. package/lib/typescript/src/games/chameleon-run/ChameleonRunRules.d.ts +52 -0
  466. package/lib/typescript/src/games/chameleon-run/ChameleonRunScene.d.ts +44 -0
  467. package/lib/typescript/src/games/checkers/Checkers.d.ts +1 -3
  468. package/lib/typescript/src/games/checkers/CheckersAI.d.ts +11 -0
  469. package/lib/typescript/src/games/checkers/CheckersConstants.d.ts +32 -72
  470. package/lib/typescript/src/games/checkers/CheckersGame.d.ts +56 -0
  471. package/lib/typescript/src/games/checkers/CheckersRules.d.ts +48 -0
  472. package/lib/typescript/src/games/checkers/CheckersScene.d.ts +41 -0
  473. package/lib/typescript/src/games/color-switch/ColorSwitch.d.ts +1 -3
  474. package/lib/typescript/src/games/color-switch/ColorSwitchConstants.d.ts +27 -31
  475. package/lib/typescript/src/games/color-switch/ColorSwitchGame.d.ts +61 -0
  476. package/lib/typescript/src/games/color-switch/ColorSwitchScene.d.ts +43 -0
  477. package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts +1 -3
  478. package/lib/typescript/src/games/colors-sort/ColorsSortConstants.d.ts +37 -44
  479. package/lib/typescript/src/games/colors-sort/ColorsSortGame.d.ts +41 -0
  480. package/lib/typescript/src/games/colors-sort/ColorsSortScene.d.ts +33 -0
  481. package/lib/typescript/src/games/connect-em-all/ConnectEmAll.d.ts +1 -3
  482. package/lib/typescript/src/games/connect-em-all/ConnectEmAllConstants.d.ts +43 -17
  483. package/lib/typescript/src/games/connect-em-all/ConnectEmAllGame.d.ts +54 -0
  484. package/lib/typescript/src/games/connect-em-all/ConnectEmAllScene.d.ts +49 -0
  485. package/lib/typescript/src/games/crossy-road/CrossyRoad.d.ts +1 -3
  486. package/lib/typescript/src/games/crossy-road/CrossyRoadCamera.d.ts +14 -0
  487. package/lib/typescript/src/games/crossy-road/CrossyRoadConstants.d.ts +82 -50
  488. package/lib/typescript/src/games/crossy-road/CrossyRoadGame.d.ts +64 -0
  489. package/lib/typescript/src/games/crossy-road/CrossyRoadMeshes.d.ts +16 -0
  490. package/lib/typescript/src/games/crossy-road/CrossyRoadPerson.d.ts +10 -0
  491. package/lib/typescript/src/games/crossy-road/CrossyRoadRules.d.ts +36 -0
  492. package/lib/typescript/src/games/crossy-road/CrossyRoadScene.d.ts +38 -0
  493. package/lib/typescript/src/games/dino-jump/DinoJump.d.ts +1 -3
  494. package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts +48 -72
  495. package/lib/typescript/src/games/dino-jump/DinoJumpGame.d.ts +60 -0
  496. package/lib/typescript/src/games/dino-jump/DinoJumpScene.d.ts +35 -0
  497. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxes.d.ts +1 -3
  498. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesConstants.d.ts +31 -36
  499. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesGame.d.ts +44 -0
  500. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesScene.d.ts +31 -0
  501. package/lib/typescript/src/games/falling-sticks/FallingSticks.d.ts +1 -3
  502. package/lib/typescript/src/games/falling-sticks/FallingSticksConstants.d.ts +31 -43
  503. package/lib/typescript/src/games/falling-sticks/FallingSticksGame.d.ts +42 -0
  504. package/lib/typescript/src/games/falling-sticks/FallingSticksRules.d.ts +36 -0
  505. package/lib/typescript/src/games/falling-sticks/FallingSticksScene.d.ts +26 -0
  506. package/lib/typescript/src/games/find-different-number/FindDifferentNumber.d.ts +1 -3
  507. package/lib/typescript/src/games/find-different-number/FindDifferentNumberConstants.d.ts +33 -29
  508. package/lib/typescript/src/games/find-different-number/FindDifferentNumberGame.d.ts +43 -0
  509. package/lib/typescript/src/games/find-different-number/FindDifferentNumberRules.d.ts +8 -0
  510. package/lib/typescript/src/games/find-different-number/FindDifferentNumberScene.d.ts +31 -0
  511. package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts +1 -3
  512. package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts +39 -35
  513. package/lib/typescript/src/games/flappy-bird/FlappyBirdGame.d.ts +66 -0
  514. package/lib/typescript/src/games/flappy-bird/FlappyBirdScene.d.ts +41 -0
  515. package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts +1 -3
  516. package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts +71 -44
  517. package/lib/typescript/src/games/fruit-merger/FruitMergerGame.d.ts +63 -0
  518. package/lib/typescript/src/games/fruit-merger/FruitMergerRules.d.ts +39 -0
  519. package/lib/typescript/src/games/fruit-merger/FruitMergerScene.d.ts +49 -0
  520. package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts +1 -3
  521. package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts +51 -76
  522. package/lib/typescript/src/games/fruit-ninja/FruitNinjaGame.d.ts +76 -0
  523. package/lib/typescript/src/games/fruit-ninja/FruitNinjaScene.d.ts +52 -0
  524. package/lib/typescript/src/games/fruit-ninja/FruitNinjaWorld.d.ts +8 -0
  525. package/lib/typescript/src/games/game-2048/Game2048.d.ts +1 -3
  526. package/lib/typescript/src/games/game-2048/Game2048Constants.d.ts +25 -120
  527. package/lib/typescript/src/games/game-2048/Game2048Game.d.ts +45 -0
  528. package/lib/typescript/src/games/game-2048/Game2048Rules.d.ts +32 -0
  529. package/lib/typescript/src/games/game-2048/Game2048Scene.d.ts +34 -0
  530. package/lib/typescript/src/games/knife-hit/KnifeHit.d.ts +1 -3
  531. package/lib/typescript/src/games/knife-hit/KnifeHitConstants.d.ts +41 -49
  532. package/lib/typescript/src/games/knife-hit/KnifeHitGame.d.ts +49 -0
  533. package/lib/typescript/src/games/knife-hit/KnifeHitScene.d.ts +37 -0
  534. package/lib/typescript/src/games/ludo-king/LudoKing.d.ts +1 -3
  535. package/lib/typescript/src/games/ludo-king/LudoKingConstants.d.ts +50 -28
  536. package/lib/typescript/src/games/ludo-king/LudoKingGame.d.ts +40 -0
  537. package/lib/typescript/src/games/ludo-king/LudoKingRules.d.ts +42 -0
  538. package/lib/typescript/src/games/ludo-king/LudoKingScene.d.ts +53 -0
  539. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +1 -3
  540. package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.d.ts +34 -10
  541. package/lib/typescript/src/games/maze-runner/MazeRunnerGame.d.ts +44 -0
  542. package/lib/typescript/src/games/maze-runner/MazeRunnerRules.d.ts +34 -0
  543. package/lib/typescript/src/games/maze-runner/MazeRunnerScene.d.ts +29 -0
  544. package/lib/typescript/src/games/memory-match/MemoryMatch.d.ts +1 -3
  545. package/lib/typescript/src/games/memory-match/MemoryMatchConstants.d.ts +42 -42
  546. package/lib/typescript/src/games/memory-match/MemoryMatchGame.d.ts +53 -0
  547. package/lib/typescript/src/games/memory-match/MemoryMatchRules.d.ts +14 -0
  548. package/lib/typescript/src/games/memory-match/MemoryMatchScene.d.ts +35 -0
  549. package/lib/typescript/src/games/mine-sweeper/MineSweeper.d.ts +1 -3
  550. package/lib/typescript/src/games/mine-sweeper/MineSweeperConstants.d.ts +43 -82
  551. package/lib/typescript/src/games/mine-sweeper/MineSweeperGame.d.ts +59 -0
  552. package/lib/typescript/src/games/mine-sweeper/MineSweeperRules.d.ts +18 -0
  553. package/lib/typescript/src/games/mine-sweeper/MineSweeperScene.d.ts +23 -0
  554. package/lib/typescript/src/games/mob-control/MobControl.d.ts +1 -3
  555. package/lib/typescript/src/games/mob-control/MobControlConstants.d.ts +99 -85
  556. package/lib/typescript/src/games/mob-control/MobControlGame.d.ts +45 -0
  557. package/lib/typescript/src/games/mob-control/MobControlMeshes.d.ts +2 -0
  558. package/lib/typescript/src/games/mob-control/MobControlRenderer.d.ts +20 -0
  559. package/lib/typescript/src/games/mob-control/MobControlRules.d.ts +68 -0
  560. package/lib/typescript/src/games/mob-control/MobControlScene.d.ts +58 -0
  561. package/lib/typescript/src/games/number-search/NumberSearch.d.ts +1 -3
  562. package/lib/typescript/src/games/number-search/NumberSearchNumbers.d.ts +1 -0
  563. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBolts.d.ts +1 -3
  564. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsConstants.d.ts +27 -79
  565. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsGame.d.ts +56 -0
  566. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsRules.d.ts +65 -0
  567. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsScene.d.ts +48 -0
  568. package/lib/typescript/src/games/pac-man/PacMan.d.ts +1 -3
  569. package/lib/typescript/src/games/pac-man/PacManConstants.d.ts +66 -106
  570. package/lib/typescript/src/games/pac-man/PacManGame.d.ts +48 -0
  571. package/lib/typescript/src/games/pac-man/PacManRules.d.ts +52 -0
  572. package/lib/typescript/src/games/pac-man/PacManScene.d.ts +44 -0
  573. package/lib/typescript/src/games/paper-io/PaperIo.d.ts +1 -3
  574. package/lib/typescript/src/games/paper-io/PaperIoConstants.d.ts +60 -40
  575. package/lib/typescript/src/games/paper-io/PaperIoGame.d.ts +49 -0
  576. package/lib/typescript/src/games/paper-io/PaperIoMeshes.d.ts +13 -0
  577. package/lib/typescript/src/games/paper-io/PaperIoRules.d.ts +71 -0
  578. package/lib/typescript/src/games/paper-io/PaperIoScene.d.ts +39 -0
  579. package/lib/typescript/src/games/penguin-run/PenguinMeshes.d.ts +9 -0
  580. package/lib/typescript/src/games/penguin-run/PenguinModel.d.ts +42 -0
  581. package/lib/typescript/src/games/penguin-run/PenguinRun.d.ts +1 -0
  582. package/lib/typescript/src/games/penguin-run/PenguinRunConstants.d.ts +58 -0
  583. package/lib/typescript/src/games/penguin-run/PenguinRunGame.d.ts +64 -0
  584. package/lib/typescript/src/games/penguin-run/PenguinRunScene.d.ts +65 -0
  585. package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts +1 -3
  586. package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts +23 -45
  587. package/lib/typescript/src/games/perfect-circle/PerfectCircleGame.d.ts +40 -0
  588. package/lib/typescript/src/games/perfect-circle/PerfectCircleRules.d.ts +55 -0
  589. package/lib/typescript/src/games/perfect-circle/PerfectCircleScene.d.ts +32 -0
  590. package/lib/typescript/src/games/pipe-connect/PipeConnect.d.ts +1 -3
  591. package/lib/typescript/src/games/pipe-connect/PipeConnectConstants.d.ts +36 -32
  592. package/lib/typescript/src/games/pipe-connect/PipeConnectGame.d.ts +40 -0
  593. package/lib/typescript/src/games/pipe-connect/PipeConnectRules.d.ts +16 -0
  594. package/lib/typescript/src/games/pipe-connect/PipeConnectScene.d.ts +28 -0
  595. package/lib/typescript/src/games/play-with-tua/PlayWithTua.d.ts +2 -0
  596. package/lib/typescript/src/games/play-with-tua/PlayWithTuaConstants.d.ts +64 -0
  597. package/lib/typescript/src/games/play-with-tua/PlayWithTuaGame.d.ts +34 -0
  598. package/lib/typescript/src/games/play-with-tua/PlayWithTuaModel.d.ts +9 -0
  599. package/lib/typescript/src/games/play-with-tua/PlayWithTuaScene.d.ts +13 -0
  600. package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts +1 -4
  601. package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts +25 -36
  602. package/lib/typescript/src/games/popit-fidget/PopitFidgetGame.d.ts +37 -0
  603. package/lib/typescript/src/games/popit-fidget/PopitFidgetScene.d.ts +19 -0
  604. package/lib/typescript/src/games/reversi/Reversi.d.ts +1 -3
  605. package/lib/typescript/src/games/reversi/ReversiConstants.d.ts +31 -62
  606. package/lib/typescript/src/games/reversi/ReversiGame.d.ts +54 -0
  607. package/lib/typescript/src/games/reversi/ReversiRules.d.ts +22 -0
  608. package/lib/typescript/src/games/reversi/ReversiScene.d.ts +27 -0
  609. package/lib/typescript/src/games/search-grid/SearchGrid.d.ts +20 -0
  610. package/lib/typescript/src/games/search-grid/SearchGridConstants.d.ts +60 -0
  611. package/lib/typescript/src/games/search-grid/SearchGridGame.d.ts +52 -0
  612. package/lib/typescript/src/games/search-grid/SearchGridScene.d.ts +43 -0
  613. package/lib/typescript/src/games/shared/BackdropCard.d.ts +2 -0
  614. package/lib/typescript/src/games/shared/EngineBackdrop.d.ts +19 -0
  615. package/lib/typescript/src/games/shared/EngineBlasts.d.ts +26 -0
  616. package/lib/typescript/src/games/shared/EngineBlocks.d.ts +19 -0
  617. package/lib/typescript/src/games/shared/EngineControlText.d.ts +2 -0
  618. package/lib/typescript/src/games/shared/EngineDice.d.ts +24 -0
  619. package/lib/typescript/src/games/shared/EngineFootprint.d.ts +17 -0
  620. package/lib/typescript/src/games/shared/EngineFruits.d.ts +27 -0
  621. package/lib/typescript/src/games/shared/EngineGameLoader.d.ts +4 -0
  622. package/lib/typescript/src/games/shared/EngineGameScreen.d.ts +48 -0
  623. package/lib/typescript/src/games/shared/EngineGameWidth.d.ts +3 -0
  624. package/lib/typescript/src/games/shared/EngineGameWidth.web.d.ts +3 -0
  625. package/lib/typescript/src/games/shared/EngineGlyphs.d.ts +15 -0
  626. package/lib/typescript/src/games/shared/EngineHud.d.ts +138 -0
  627. package/lib/typescript/src/games/shared/EngineLoading.d.ts +77 -0
  628. package/lib/typescript/src/games/shared/EngineMeadow.d.ts +90 -0
  629. package/lib/typescript/src/games/shared/EngineMeshCache.d.ts +3 -0
  630. package/lib/typescript/src/games/shared/EngineMeshes.d.ts +3 -0
  631. package/lib/typescript/src/games/shared/EngineRacingChase.d.ts +11 -0
  632. package/lib/typescript/src/games/shared/EngineRacingHandling.d.ts +15 -0
  633. package/lib/typescript/src/games/shared/EngineReadyContext.d.ts +2 -0
  634. package/lib/typescript/src/games/shared/EngineTilt.d.ts +19 -0
  635. package/lib/typescript/src/games/shared/EngineTouchSurface.d.ts +20 -0
  636. package/lib/typescript/src/games/shared/EngineUtils.d.ts +18 -0
  637. package/lib/typescript/src/games/shared/GameActivity.d.ts +3 -0
  638. package/lib/typescript/src/games/shared/GameLoading.d.ts +14 -0
  639. package/lib/typescript/src/games/shared/GameLoadingTransition.d.ts +9 -0
  640. package/lib/typescript/src/games/shared/ProceduralCacheVersion.d.ts +1 -0
  641. package/lib/typescript/src/games/shared/useEngineGame.d.ts +69 -0
  642. package/lib/typescript/src/games/shared/useGameResource.d.ts +2 -0
  643. package/lib/typescript/src/games/shared/useLiveState.d.ts +4 -0
  644. package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts +1 -3
  645. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersConstants.d.ts +32 -40
  646. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersGame.d.ts +48 -0
  647. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersRules.d.ts +22 -0
  648. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersScene.d.ts +30 -0
  649. package/lib/typescript/src/games/snake-3d/Snake3D.d.ts +1 -3
  650. package/lib/typescript/src/games/snake-3d/Snake3DConstants.d.ts +31 -68
  651. package/lib/typescript/src/games/snake-3d/Snake3DGame.d.ts +42 -0
  652. package/lib/typescript/src/games/snake-3d/Snake3DMotion.d.ts +3 -0
  653. package/lib/typescript/src/games/snake-3d/Snake3DRules.d.ts +42 -0
  654. package/lib/typescript/src/games/snake-3d/Snake3DScene.d.ts +35 -0
  655. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLadders.d.ts +1 -3
  656. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersConstants.d.ts +58 -50
  657. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersGame.d.ts +45 -0
  658. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersScene.d.ts +50 -0
  659. package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts +1 -3
  660. package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts +33 -23
  661. package/lib/typescript/src/games/space-fighter/SpaceFighterGame.d.ts +58 -0
  662. package/lib/typescript/src/games/space-fighter/SpaceFighterScene.d.ts +51 -0
  663. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaire.d.ts +1 -3
  664. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireConstants.d.ts +52 -35
  665. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireGame.d.ts +67 -0
  666. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireRules.d.ts +39 -0
  667. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireScene.d.ts +60 -0
  668. package/lib/typescript/src/games/stack-tower/StackTower.d.ts +1 -3
  669. package/lib/typescript/src/games/stack-tower/StackTowerConstants.d.ts +31 -23
  670. package/lib/typescript/src/games/stack-tower/StackTowerGame.d.ts +58 -0
  671. package/lib/typescript/src/games/stack-tower/StackTowerScene.d.ts +27 -0
  672. package/lib/typescript/src/games/sudoku/Sudoku.d.ts +1 -3
  673. package/lib/typescript/src/games/sudoku/SudokuConstants.d.ts +50 -55
  674. package/lib/typescript/src/games/sudoku/SudokuGame.d.ts +56 -0
  675. package/lib/typescript/src/games/sudoku/SudokuRules.d.ts +23 -0
  676. package/lib/typescript/src/games/sudoku/SudokuScene.d.ts +44 -0
  677. package/lib/typescript/src/games/tangram/Tangram.d.ts +1 -3
  678. package/lib/typescript/src/games/tangram/TangramConstants.d.ts +33 -52
  679. package/lib/typescript/src/games/tangram/TangramGame.d.ts +68 -0
  680. package/lib/typescript/src/games/tangram/TangramRules.d.ts +61 -0
  681. package/lib/typescript/src/games/tangram/TangramScene.d.ts +42 -0
  682. package/lib/typescript/src/games/tank-1990/Tank1990.d.ts +1 -3
  683. package/lib/typescript/src/games/tank-1990/Tank1990Constants.d.ts +44 -127
  684. package/lib/typescript/src/games/tank-1990/Tank1990Game.d.ts +50 -0
  685. package/lib/typescript/src/games/tank-1990/Tank1990Rules.d.ts +67 -0
  686. package/lib/typescript/src/games/tank-1990/Tank1990Scene.d.ts +38 -0
  687. package/lib/typescript/src/games/tic-tac-toe/TicTacToe.d.ts +1 -3
  688. package/lib/typescript/src/games/tic-tac-toe/TicTacToeConstants.d.ts +35 -72
  689. package/lib/typescript/src/games/tic-tac-toe/TicTacToeGame.d.ts +54 -0
  690. package/lib/typescript/src/games/tic-tac-toe/TicTacToeRules.d.ts +10 -0
  691. package/lib/typescript/src/games/tic-tac-toe/TicTacToeScene.d.ts +26 -0
  692. package/lib/typescript/src/games/tile-home/TileHome.d.ts +1 -3
  693. package/lib/typescript/src/games/tile-home/TileHomeConstants.d.ts +72 -70
  694. package/lib/typescript/src/games/tile-home/TileHomeGame.d.ts +72 -0
  695. package/lib/typescript/src/games/tile-home/TileHomeScene.d.ts +28 -0
  696. package/lib/typescript/src/games/treasure-hunt/TreasureHunt.d.ts +3 -0
  697. package/lib/typescript/src/games/treasure-hunt/TreasureHuntConstants.d.ts +144 -0
  698. package/lib/typescript/src/games/treasure-hunt/TreasureHuntControls.d.ts +75 -0
  699. package/lib/typescript/src/games/treasure-hunt/TreasureHuntGame.d.ts +41 -0
  700. package/lib/typescript/src/games/treasure-hunt/TreasureHuntMeshes.d.ts +26 -0
  701. package/lib/typescript/src/games/treasure-hunt/TreasureHuntModel.d.ts +57 -0
  702. package/lib/typescript/src/games/treasure-hunt/TreasureHuntRules.d.ts +198 -0
  703. package/lib/typescript/src/games/treasure-hunt/TreasureHuntScene.d.ts +40 -0
  704. package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts +1 -3
  705. package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +35 -45
  706. package/lib/typescript/src/games/whack-a-mole/WhackAMoleGame.d.ts +51 -0
  707. package/lib/typescript/src/games/whack-a-mole/WhackAMoleScene.d.ts +31 -0
  708. package/lib/typescript/src/games/word-search/WordSearch.d.ts +1 -3
  709. package/lib/typescript/src/games/word-search/WordSearchWords.d.ts +1 -0
  710. package/lib/typescript/src/helpers/GamePatternData.d.ts +46 -0
  711. package/lib/typescript/src/helpers/GameSettingsModal.d.ts +1 -1
  712. package/lib/typescript/src/helpers/GameTheme.d.ts +18 -0
  713. package/lib/typescript/src/helpers/IconPaths.d.ts +4 -0
  714. package/lib/typescript/src/helpers/index.d.ts +1 -19
  715. package/lib/typescript/src/index.d.ts +3 -0
  716. package/lib/typescript/src/services/GameAssetLoader.d.ts +32 -0
  717. package/lib/typescript/src/services/GameAssets.d.ts +11 -0
  718. package/lib/typescript/src/services/GameLoaders.d.ts +18 -0
  719. package/lib/typescript/src/services/GamesConstants.d.ts +11 -0
  720. package/lib/typescript/src/services/GamesMetadata.d.ts +2 -0
  721. package/lib/typescript/src/services/HapticsService.d.ts +1 -1
  722. package/lib/typescript/src/services/SfxSources.d.ts +79 -0
  723. package/lib/typescript/src/services/SoundsService.d.ts +487 -1566
  724. package/lib/typescript/src/services/ThemeService.d.ts +117 -0
  725. package/lib/typescript/src/services/UtilsService.d.ts +20 -2
  726. package/lib/typescript/src/services/index.d.ts +3 -0
  727. package/lib/web/assets/005ea2045b17-explorer.glb +0 -0
  728. package/lib/web/assets/01e2f0a0bbf6-hurt.wav +0 -0
  729. package/lib/web/assets/01fc0ecf658c-explorer-atlas.png +0 -0
  730. package/lib/web/assets/029329b2c7c0-asphalt.png +0 -0
  731. package/lib/web/assets/0376bda32be3-robot.wav +0 -0
  732. package/lib/web/assets/0719fb0bb38e-soft_glow.png +0 -0
  733. package/lib/web/assets/0b21278bffba-boing.wav +0 -0
  734. package/lib/web/assets/1333c9d1273c-flip_disc.wav +0 -0
  735. package/lib/web/assets/15785f62ee5f-time_up.wav +0 -0
  736. package/lib/web/assets/177f00502e08-bonus.wav +0 -0
  737. package/lib/web/assets/19e47dcfda1f-pling.wav +0 -0
  738. package/lib/web/assets/1a677e0f7f6c-laugh.wav +0 -0
  739. package/lib/web/assets/1ad2914478b1-eat.wav +0 -0
  740. package/lib/web/assets/1b0d703ddd1a-dance.wav +0 -0
  741. package/lib/web/assets/1e4330fddd74-chime.wav +0 -0
  742. package/lib/web/assets/2432a97b0af1-cannon.wav +0 -0
  743. package/lib/web/assets/2574370d6aa0-blocked.wav +0 -0
  744. package/lib/web/assets/2699065037ad-select.wav +0 -0
  745. package/lib/web/assets/28d30f53ad73-ladder.wav +0 -0
  746. package/lib/web/assets/2c1ec05270b2-point.wav +0 -0
  747. package/lib/web/assets/2e1dd99a0213-tick.wav +0 -0
  748. package/lib/web/assets/3084575cecdb-card_flip.wav +0 -0
  749. package/lib/web/assets/308bc31b6af5-engine.wav +0 -0
  750. package/lib/web/assets/336d63b739b5-combo.wav +0 -0
  751. package/lib/web/assets/3a369e2596e4-clash.wav +0 -0
  752. package/lib/web/assets/3a816e20212f-capture.wav +0 -0
  753. package/lib/web/assets/40240217810a-nitro.wav +0 -0
  754. package/lib/web/assets/46edaa54d1ea-crunch.wav +0 -0
  755. package/lib/web/assets/501994226995-coin.wav +0 -0
  756. package/lib/web/assets/5525d7f6a4b8-rotate.wav +0 -0
  757. package/lib/web/assets/5e816e1f0929-dice_roll.wav +0 -0
  758. package/lib/web/assets/60e2dec3cf41-deselect.wav +0 -0
  759. package/lib/web/assets/6ab86ea29e5c-six.wav +0 -0
  760. package/lib/web/assets/6da3b101926d-merge.wav +0 -0
  761. package/lib/web/assets/6e686dea513c-bark.jpg +0 -0
  762. package/lib/web/assets/6ff9a6a13714-limestone.jpg +0 -0
  763. package/lib/web/assets/735c4a1cd22e-invalid.wav +0 -0
  764. package/lib/web/assets/73f75c35ff5d-snake.wav +0 -0
  765. package/lib/web/assets/7506e3efe264-catch.wav +0 -0
  766. package/lib/web/assets/76493a2ada2d-ad_bolt.png +0 -0
  767. package/lib/web/assets/793abe620201-card_place.wav +0 -0
  768. package/lib/web/assets/7da09c57f52d-facade.png +0 -0
  769. package/lib/web/assets/7e1a902176f6-pine.png +0 -0
  770. package/lib/web/assets/7eb943b85c21-play-with-tua.glb +0 -0
  771. package/lib/web/assets/837d43c06dba-ad_bubbles.png +0 -0
  772. package/lib/web/assets/84f1a7dfa368-game_over.wav +0 -0
  773. package/lib/web/assets/850e26ce3b0a-flap.wav +0 -0
  774. package/lib/web/assets/854b31683cb2-draw.wav +0 -0
  775. package/lib/web/assets/8616150393b7-error.wav +0 -0
  776. package/lib/web/assets/87cc6d503ec6-river.jpg +0 -0
  777. package/lib/web/assets/88755845922c-hop.wav +0 -0
  778. package/lib/web/assets/8ec8f469492d-chomp_alt.wav +0 -0
  779. package/lib/web/assets/8f17f89b138c-pew.wav +0 -0
  780. package/lib/web/assets/9210a24472d1-place.wav +0 -0
  781. package/lib/web/assets/930d833ebf89-splash.wav +0 -0
  782. package/lib/web/assets/970f7c59265d-swoosh.wav +0 -0
  783. package/lib/web/assets/9900b8d1b6ad-flag.wav +0 -0
  784. package/lib/web/assets/9ab04403898b-clang.wav +0 -0
  785. package/lib/web/assets/9d8b97a10d45-drop.wav +0 -0
  786. package/lib/web/assets/9d9c02ddc7ed-boom.wav +0 -0
  787. package/lib/web/assets/9e1b5114d56d-pop_soft.wav +0 -0
  788. package/lib/web/assets/a01f22d6dbb3-thud.wav +0 -0
  789. package/lib/web/assets/a44a1cf1a1a8-bump.wav +0 -0
  790. package/lib/web/assets/a76940a48c68-hit.wav +0 -0
  791. package/lib/web/assets/a98ddb724460-leaves.png +0 -0
  792. package/lib/web/assets/aa0960e8bee6-footstep_run.wav +0 -0
  793. package/lib/web/assets/aa570c9d3e15-star.wav +0 -0
  794. package/lib/web/assets/aacb999f3c49-tock.wav +0 -0
  795. package/lib/web/assets/aae0c16c5e89-reveal.wav +0 -0
  796. package/lib/web/assets/ab37cd128509-click.wav +0 -0
  797. package/lib/web/assets/b0bc66f49005-warning.wav +0 -0
  798. package/lib/web/assets/b1edd756ac43-zap.wav +0 -0
  799. package/lib/web/assets/b3894545cf71-slice.wav +0 -0
  800. package/lib/web/assets/b3c6225d055a-meadow.jpg +0 -0
  801. package/lib/web/assets/b60ca65cdfcb-gate.wav +0 -0
  802. package/lib/web/assets/b8900bb2c5c7-win.wav +0 -0
  803. package/lib/web/assets/baff6feda846-lose.wav +0 -0
  804. package/lib/web/assets/bed31305d60d-ad_chevrons.png +0 -0
  805. package/lib/web/assets/c26f4a624e7d-shuffle.wav +0 -0
  806. package/lib/web/assets/c3a9edfad195-die.wav +0 -0
  807. package/lib/web/assets/c4aa9d773f2a-footstep_walk.wav +0 -0
  808. package/lib/web/assets/c5ab3ff0003f-crash.wav +0 -0
  809. package/lib/web/assets/c5eb07deddd4-start.wav +0 -0
  810. package/lib/web/assets/c6c58d9ae452-pop.wav +0 -0
  811. package/lib/web/assets/cea48c3cd9c7-balloon_pop.wav +0 -0
  812. package/lib/web/assets/d15591767778-tap.wav +0 -0
  813. package/lib/web/assets/d1781a52234f-slide.wav +0 -0
  814. package/lib/web/assets/d3bf2d9f793b-snap.wav +0 -0
  815. package/lib/web/assets/d8f59ebd3537-jump.wav +0 -0
  816. package/lib/web/assets/dafea2f28854-power_up.wav +0 -0
  817. package/lib/web/assets/e2e7f5ae2d1b-whoosh.wav +0 -0
  818. package/lib/web/assets/e2f90a23e1bd-chomp.wav +0 -0
  819. package/lib/web/assets/e454e56df89a-clack.wav +0 -0
  820. package/lib/web/assets/e8cbc2b88bc4-Inter-SemiBold.ttf +0 -0
  821. package/lib/web/assets/ed6496b891fc-land.wav +0 -0
  822. package/lib/web/assets/f21920200a81-thunk.wav +0 -0
  823. package/lib/web/assets/f753b43be89d-whack.wav +0 -0
  824. package/lib/web/assets/f798c4b5cf4d-miss.wav +0 -0
  825. package/lib/web/assets/fbe299716916-grass.png +0 -0
  826. package/lib/web/chunk-52ez2s9z.js +15 -0
  827. package/lib/web/chunk-8675t224.js +1 -0
  828. package/lib/web/index.js +2 -0
  829. package/lib/web/package.json +1 -0
  830. package/lib/web/services.js +2 -0
  831. package/package.json +93 -73
  832. package/lib/module/games/arrows/ArrowsService.js +0 -1
  833. package/lib/module/games/arrows/ArrowsStore.js +0 -1
  834. package/lib/module/games/arrows/components/ArrowsGrid.js +0 -1
  835. package/lib/module/games/arrows/components/ScoreBoard.js +0 -1
  836. package/lib/module/games/balloon-blaster/BalloonBlasterService.js +0 -1
  837. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +0 -1
  838. package/lib/module/games/balloon-blaster/components/BalloonComponent.js +0 -1
  839. package/lib/module/games/balloon-blaster/components/GameArea.js +0 -1
  840. package/lib/module/games/balloon-blaster/components/GameBackground.js +0 -1
  841. package/lib/module/games/balloon-blaster/components/ScoreBoard.js +0 -1
  842. package/lib/module/games/bike-racing/BikeRacingService.js +0 -1
  843. package/lib/module/games/bike-racing/BikeRacingStore.js +0 -1
  844. package/lib/module/games/bike-racing/components/BikeComponent.js +0 -1
  845. package/lib/module/games/bike-racing/components/GameBackground.js +0 -1
  846. package/lib/module/games/bike-racing/components/ScoreBoard.js +0 -1
  847. package/lib/module/games/block-blast/BlockBlastService.js +0 -1
  848. package/lib/module/games/block-blast/BlockBlastStore.js +0 -1
  849. package/lib/module/games/block-blast/components/BlockPieceComponent.js +0 -1
  850. package/lib/module/games/block-blast/components/GameArea.js +0 -1
  851. package/lib/module/games/block-blast/components/GridComponent.js +0 -1
  852. package/lib/module/games/block-blast/components/ScoreBoard.js +0 -1
  853. package/lib/module/games/block-breaker/BlockBreakerService.js +0 -1
  854. package/lib/module/games/block-breaker/BlockBreakerStore.js +0 -1
  855. package/lib/module/games/block-breaker/components/BlastAnimation.js +0 -1
  856. package/lib/module/games/block-breaker/components/GameArea.js +0 -1
  857. package/lib/module/games/block-breaker/components/ScoreBoard.js +0 -1
  858. package/lib/module/games/bluk/BlukService.js +0 -1
  859. package/lib/module/games/bluk/BlukStore.js +0 -1
  860. package/lib/module/games/bluk/components/GameArea.js +0 -1
  861. package/lib/module/games/bluk/components/GameBackground.js +0 -1
  862. package/lib/module/games/bluk/components/ScoreBoard.js +0 -1
  863. package/lib/module/games/bubble-shooter/BubbleShooterService.js +0 -1
  864. package/lib/module/games/bubble-shooter/BubbleShooterStore.js +0 -1
  865. package/lib/module/games/bubble-shooter/components/GameArea.js +0 -1
  866. package/lib/module/games/bubble-shooter/components/ScoreBoard.js +0 -1
  867. package/lib/module/games/candy-crush/CandyCrushService.js +0 -1
  868. package/lib/module/games/candy-crush/CandyCrushStore.js +0 -1
  869. package/lib/module/games/candy-crush/components/CandyItem.js +0 -1
  870. package/lib/module/games/candy-crush/components/GameGrid.js +0 -1
  871. package/lib/module/games/candy-crush/components/ScoreBoard.js +0 -1
  872. package/lib/module/games/car-racing/CarRacingService.js +0 -1
  873. package/lib/module/games/car-racing/CarRacingStore.js +0 -1
  874. package/lib/module/games/car-racing/components/CarComponent.js +0 -1
  875. package/lib/module/games/car-racing/components/GameBackground.js +0 -1
  876. package/lib/module/games/car-racing/components/ScoreBoard.js +0 -1
  877. package/lib/module/games/chameleon-run/ChameleonRunService.js +0 -1
  878. package/lib/module/games/chameleon-run/ChameleonRunStore.js +0 -1
  879. package/lib/module/games/chameleon-run/components/GameArea.js +0 -1
  880. package/lib/module/games/chameleon-run/components/GameBackground.js +0 -1
  881. package/lib/module/games/chameleon-run/components/ScoreBoard.js +0 -1
  882. package/lib/module/games/checkers/CheckersService.js +0 -1
  883. package/lib/module/games/checkers/CheckersStore.js +0 -1
  884. package/lib/module/games/checkers/components/GameBoard.js +0 -1
  885. package/lib/module/games/checkers/components/ScoreBoard.js +0 -1
  886. package/lib/module/games/color-switch/ColorSwitchService.js +0 -1
  887. package/lib/module/games/color-switch/ColorSwitchStore.js +0 -1
  888. package/lib/module/games/color-switch/components/GameArea.js +0 -1
  889. package/lib/module/games/color-switch/components/ScoreBoard.js +0 -1
  890. package/lib/module/games/colors-sort/ColorsSortService.js +0 -1
  891. package/lib/module/games/colors-sort/ColorsSortStore.js +0 -1
  892. package/lib/module/games/colors-sort/components/ColorContainer.js +0 -1
  893. package/lib/module/games/colors-sort/components/ScoreBoard.js +0 -1
  894. package/lib/module/games/connect-em-all/ConnectEmAllService.js +0 -1
  895. package/lib/module/games/connect-em-all/ConnectEmAllStore.js +0 -1
  896. package/lib/module/games/connect-em-all/components/GameBoard.js +0 -1
  897. package/lib/module/games/connect-em-all/components/ScoreBoard.js +0 -1
  898. package/lib/module/games/crossy-road/CrossyRoadService.js +0 -1
  899. package/lib/module/games/crossy-road/CrossyRoadStore.js +0 -1
  900. package/lib/module/games/crossy-road/components/GameArea.js +0 -1
  901. package/lib/module/games/crossy-road/components/ScoreBoard.js +0 -1
  902. package/lib/module/games/dino-jump/DinoJumpService.js +0 -1
  903. package/lib/module/games/dino-jump/DinoJumpStore.js +0 -1
  904. package/lib/module/games/dino-jump/components/DinoSprite.js +0 -1
  905. package/lib/module/games/dino-jump/components/GameArea.js +0 -1
  906. package/lib/module/games/dino-jump/components/GameBackground.js +0 -1
  907. package/lib/module/games/dino-jump/components/ObstacleSprite.js +0 -1
  908. package/lib/module/games/dino-jump/components/ScoreBoard.js +0 -1
  909. package/lib/module/games/dino-jump/components/StarSprite.js +0 -1
  910. package/lib/module/games/dots-and-boxes/DotsAndBoxesService.js +0 -1
  911. package/lib/module/games/dots-and-boxes/DotsAndBoxesStore.js +0 -1
  912. package/lib/module/games/dots-and-boxes/components/GameBoard.js +0 -1
  913. package/lib/module/games/dots-and-boxes/components/ScoreBoard.js +0 -1
  914. package/lib/module/games/falling-sticks/FallingSticksService.js +0 -1
  915. package/lib/module/games/falling-sticks/FallingSticksStore.js +0 -1
  916. package/lib/module/games/falling-sticks/components/GameArea.js +0 -1
  917. package/lib/module/games/falling-sticks/components/GameBackground.js +0 -1
  918. package/lib/module/games/falling-sticks/components/ScoreBoard.js +0 -1
  919. package/lib/module/games/find-different-number/FindDifferentNumberService.js +0 -1
  920. package/lib/module/games/find-different-number/FindDifferentNumberStore.js +0 -1
  921. package/lib/module/games/find-different-number/components/GameGrid.js +0 -1
  922. package/lib/module/games/find-different-number/components/ScoreBoard.js +0 -1
  923. package/lib/module/games/flappy-bird/FlappyBirdStore.js +0 -1
  924. package/lib/module/games/flappy-bird/components/Bird.js +0 -1
  925. package/lib/module/games/flappy-bird/components/GameArea.js +0 -1
  926. package/lib/module/games/flappy-bird/components/GameBackground.js +0 -1
  927. package/lib/module/games/flappy-bird/components/Pipes.js +0 -1
  928. package/lib/module/games/flappy-bird/components/ScoreBoard.js +0 -1
  929. package/lib/module/games/fruit-merger/FruitMergerService.js +0 -1
  930. package/lib/module/games/fruit-merger/FruitMergerStore.js +0 -1
  931. package/lib/module/games/fruit-merger/components/FruitItem.js +0 -1
  932. package/lib/module/games/fruit-merger/components/GameArea.js +0 -1
  933. package/lib/module/games/fruit-merger/components/ScoreBoard.js +0 -1
  934. package/lib/module/games/fruit-ninja/FruitNinjaService.js +0 -1
  935. package/lib/module/games/fruit-ninja/FruitNinjaStore.js +0 -1
  936. package/lib/module/games/fruit-ninja/components/FruitComponent.js +0 -1
  937. package/lib/module/games/fruit-ninja/components/GameArea.js +0 -1
  938. package/lib/module/games/fruit-ninja/components/GameBackground.js +0 -1
  939. package/lib/module/games/fruit-ninja/components/ScoreBoard.js +0 -1
  940. package/lib/module/games/game-2048/Game2048Service.js +0 -1
  941. package/lib/module/games/game-2048/Game2048Store.js +0 -1
  942. package/lib/module/games/game-2048/components/GameGrid.js +0 -1
  943. package/lib/module/games/game-2048/components/ScoreBoard.js +0 -1
  944. package/lib/module/games/knife-hit/KnifeHitService.js +0 -1
  945. package/lib/module/games/knife-hit/KnifeHitStore.js +0 -1
  946. package/lib/module/games/knife-hit/components/GameArea.js +0 -1
  947. package/lib/module/games/knife-hit/components/ScoreBoard.js +0 -1
  948. package/lib/module/games/ludo-king/LudoKingService.js +0 -1
  949. package/lib/module/games/ludo-king/LudoKingStore.js +0 -1
  950. package/lib/module/games/ludo-king/components/Dice.js +0 -1
  951. package/lib/module/games/ludo-king/components/GameBoard.js +0 -1
  952. package/lib/module/games/ludo-king/components/ScoreBoard.js +0 -1
  953. package/lib/module/games/maze-runner/MazeRunnerStore.js +0 -1
  954. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +0 -1
  955. package/lib/module/games/maze-runner/components/EnhancedGameArea.js +0 -1
  956. package/lib/module/games/maze-runner/components/ScoreBoard.js +0 -1
  957. package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +0 -1
  958. package/lib/module/games/maze-runner/components/WallComponent.js +0 -1
  959. package/lib/module/games/memory-match/MemoryMatchService.js +0 -1
  960. package/lib/module/games/memory-match/MemoryMatchStore.js +0 -1
  961. package/lib/module/games/memory-match/components/Card.js +0 -1
  962. package/lib/module/games/memory-match/components/GameBoard.js +0 -1
  963. package/lib/module/games/memory-match/components/ScoreBoard.js +0 -1
  964. package/lib/module/games/mine-sweeper/MineSweeperService.js +0 -1
  965. package/lib/module/games/mine-sweeper/MineSweeperStore.js +0 -1
  966. package/lib/module/games/mine-sweeper/components/GameArea.js +0 -1
  967. package/lib/module/games/mine-sweeper/components/ScoreBoard.js +0 -1
  968. package/lib/module/games/mob-control/MobControlService.js +0 -1
  969. package/lib/module/games/mob-control/MobControlStore.js +0 -1
  970. package/lib/module/games/mob-control/components/GameArea.js +0 -1
  971. package/lib/module/games/mob-control/components/ScoreBoard.js +0 -1
  972. package/lib/module/games/number-search/NumberSearchConstants.js +0 -1
  973. package/lib/module/games/number-search/NumberSearchService.js +0 -1
  974. package/lib/module/games/number-search/NumberSearchStore.js +0 -1
  975. package/lib/module/games/number-search/components/GameBoard.js +0 -1
  976. package/lib/module/games/number-search/components/NumberList.js +0 -1
  977. package/lib/module/games/number-search/components/ScoreBoard.js +0 -1
  978. package/lib/module/games/nuts-and-bolts/NutsAndBoltsService.js +0 -1
  979. package/lib/module/games/nuts-and-bolts/NutsAndBoltsStore.js +0 -1
  980. package/lib/module/games/nuts-and-bolts/components/GameBoard.js +0 -1
  981. package/lib/module/games/nuts-and-bolts/components/ScoreBoard.js +0 -1
  982. package/lib/module/games/pac-man/PacManService.js +0 -1
  983. package/lib/module/games/pac-man/PacManStore.js +0 -1
  984. package/lib/module/games/pac-man/components/GameCanvas.js +0 -1
  985. package/lib/module/games/pac-man/components/ScoreBoard.js +0 -1
  986. package/lib/module/games/paper-io/PaperIoService.js +0 -1
  987. package/lib/module/games/paper-io/PaperIoStore.js +0 -1
  988. package/lib/module/games/paper-io/components/GameArea.js +0 -1
  989. package/lib/module/games/paper-io/components/ScoreBoard.js +0 -1
  990. package/lib/module/games/perfect-circle/PerfectCircleService.js +0 -1
  991. package/lib/module/games/perfect-circle/PerfectCircleStore.js +0 -1
  992. package/lib/module/games/perfect-circle/components/DrawingCanvas.js +0 -1
  993. package/lib/module/games/perfect-circle/components/ScoreBoard.js +0 -1
  994. package/lib/module/games/pipe-connect/PipeConnectService.js +0 -1
  995. package/lib/module/games/pipe-connect/PipeConnectStore.js +0 -1
  996. package/lib/module/games/pipe-connect/components/GameArea.js +0 -1
  997. package/lib/module/games/pipe-connect/components/ScoreBoard.js +0 -1
  998. package/lib/module/games/popit-fidget/PopitFidgetService.js +0 -1
  999. package/lib/module/games/popit-fidget/PopitFidgetStore.js +0 -1
  1000. package/lib/module/games/popit-fidget/components/BubbleComponent.js +0 -1
  1001. package/lib/module/games/popit-fidget/components/FidgetGrid.js +0 -1
  1002. package/lib/module/games/popit-fidget/components/ScoreBoard.js +0 -1
  1003. package/lib/module/games/reversi/ReversiStore.js +0 -1
  1004. package/lib/module/games/reversi/components/GameBoard.js +0 -1
  1005. package/lib/module/games/reversi/components/ScoreBoard.js +0 -1
  1006. package/lib/module/games/sliding-numbers/SlidingNumbersService.js +0 -1
  1007. package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +0 -1
  1008. package/lib/module/games/sliding-numbers/components/NumbersGrid.js +0 -1
  1009. package/lib/module/games/sliding-numbers/components/ScoreBoard.js +0 -1
  1010. package/lib/module/games/snake-3d/Snake3DService.js +0 -1
  1011. package/lib/module/games/snake-3d/Snake3DStore.js +0 -1
  1012. package/lib/module/games/snake-3d/components/GameGrid.js +0 -1
  1013. package/lib/module/games/snake-3d/components/ScoreBoard.js +0 -1
  1014. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersService.js +0 -1
  1015. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersStore.js +0 -1
  1016. package/lib/module/games/snakes-and-ladders/components/Dice.js +0 -1
  1017. package/lib/module/games/snakes-and-ladders/components/GameBoard.js +0 -1
  1018. package/lib/module/games/snakes-and-ladders/components/ScoreBoard.js +0 -1
  1019. package/lib/module/games/space-fighter/SpaceFighterService.js +0 -1
  1020. package/lib/module/games/space-fighter/SpaceFighterStore.js +0 -1
  1021. package/lib/module/games/space-fighter/components/AsteroidComponent.js +0 -1
  1022. package/lib/module/games/space-fighter/components/GameArea.js +0 -1
  1023. package/lib/module/games/space-fighter/components/GameBackground.js +0 -1
  1024. package/lib/module/games/space-fighter/components/ScoreBoard.js +0 -1
  1025. package/lib/module/games/space-fighter/components/Spacecraft3D.js +0 -1
  1026. package/lib/module/games/space-fighter/components/SpacecraftPath.js +0 -1
  1027. package/lib/module/games/spider-solitaire/SpiderSolitaireService.js +0 -1
  1028. package/lib/module/games/spider-solitaire/SpiderSolitaireStore.js +0 -1
  1029. package/lib/module/games/spider-solitaire/components/Card.js +0 -1
  1030. package/lib/module/games/spider-solitaire/components/CardPile.js +0 -1
  1031. package/lib/module/games/spider-solitaire/components/ScoreBoard.js +0 -1
  1032. package/lib/module/games/stack-tower/StackTowerService.js +0 -1
  1033. package/lib/module/games/stack-tower/StackTowerStore.js +0 -1
  1034. package/lib/module/games/stack-tower/components/GameArea.js +0 -1
  1035. package/lib/module/games/stack-tower/components/ScoreBoard.js +0 -1
  1036. package/lib/module/games/sudoku/SudokuService.js +0 -1
  1037. package/lib/module/games/sudoku/SudokuStore.js +0 -1
  1038. package/lib/module/games/sudoku/components/GameArea.js +0 -1
  1039. package/lib/module/games/sudoku/components/ScoreBoard.js +0 -1
  1040. package/lib/module/games/tangram/TangramService.js +0 -1
  1041. package/lib/module/games/tangram/TangramStore.js +0 -1
  1042. package/lib/module/games/tangram/components/GameBoard.js +0 -1
  1043. package/lib/module/games/tangram/components/ScoreBoard.js +0 -1
  1044. package/lib/module/games/tank-1990/Tank1990Service.js +0 -1
  1045. package/lib/module/games/tank-1990/Tank1990Store.js +0 -1
  1046. package/lib/module/games/tank-1990/components/Controls.js +0 -1
  1047. package/lib/module/games/tank-1990/components/GameBoard.js +0 -1
  1048. package/lib/module/games/tank-1990/components/ScoreBoard.js +0 -1
  1049. package/lib/module/games/tic-tac-toe/TicTacToeService.js +0 -1
  1050. package/lib/module/games/tic-tac-toe/TicTacToeStore.js +0 -1
  1051. package/lib/module/games/tic-tac-toe/components/GameBoard.js +0 -1
  1052. package/lib/module/games/tic-tac-toe/components/ScoreBoard.js +0 -1
  1053. package/lib/module/games/tile-home/TileHomeService.js +0 -1
  1054. package/lib/module/games/tile-home/TileHomeStore.js +0 -1
  1055. package/lib/module/games/tile-home/components/AnimatingTile.js +0 -1
  1056. package/lib/module/games/tile-home/components/FlyingTile.js +0 -1
  1057. package/lib/module/games/tile-home/components/GameBoard.js +0 -1
  1058. package/lib/module/games/tile-home/components/ScoreBoard.js +0 -1
  1059. package/lib/module/games/tile-home/components/TileItem.js +0 -1
  1060. package/lib/module/games/tile-home/components/TileSlot.js +0 -1
  1061. package/lib/module/games/whack-a-mole/WhackAMoleService.js +0 -1
  1062. package/lib/module/games/whack-a-mole/WhackAMoleStore.js +0 -1
  1063. package/lib/module/games/whack-a-mole/components/GameBackground.js +0 -1
  1064. package/lib/module/games/whack-a-mole/components/GameGrid.js +0 -1
  1065. package/lib/module/games/whack-a-mole/components/GameHole.js +0 -1
  1066. package/lib/module/games/whack-a-mole/components/MoleCharacter.js +0 -1
  1067. package/lib/module/games/whack-a-mole/components/ScoreBoard.js +0 -1
  1068. package/lib/module/games/word-search/WordSearchConstants.js +0 -1
  1069. package/lib/module/games/word-search/WordSearchService.js +0 -1
  1070. package/lib/module/games/word-search/WordSearchStore.js +0 -1
  1071. package/lib/module/games/word-search/components/GameBoard.js +0 -1
  1072. package/lib/module/games/word-search/components/ScoreBoard.js +0 -1
  1073. package/lib/module/games/word-search/components/WordList.js +0 -1
  1074. package/lib/module/helpers/AnimatedScore.js +0 -1
  1075. package/lib/module/helpers/AnimationFrame.js +0 -1
  1076. package/lib/module/helpers/AnimationTracker.js +0 -1
  1077. package/lib/module/helpers/BlastAnimation.js +0 -1
  1078. package/lib/module/helpers/ErrorHandler.js +0 -1
  1079. package/lib/module/helpers/GameBackgroundPattern.js +0 -1
  1080. package/lib/module/helpers/GameControlButton.js +0 -1
  1081. package/lib/module/helpers/GameOverModal.js +0 -1
  1082. package/lib/module/helpers/GameTimer.js +0 -1
  1083. package/lib/module/helpers/Icons.js +0 -1
  1084. package/lib/module/helpers/ParticleBlast.js +0 -1
  1085. package/lib/module/helpers/ScoreBoardContainer.js +0 -1
  1086. package/lib/module/helpers/assets/apple-fruit.js +0 -1
  1087. package/lib/module/helpers/assets/avocado-item.js +0 -1
  1088. package/lib/module/helpers/assets/banana-fruit.js +0 -1
  1089. package/lib/module/helpers/assets/bomb-item.js +0 -1
  1090. package/lib/module/helpers/assets/broccoli-item.js +0 -1
  1091. package/lib/module/helpers/assets/cherries-fruit.js +0 -1
  1092. package/lib/module/helpers/assets/donut-item.js +0 -1
  1093. package/lib/module/helpers/assets/dragonfruit-item.js +0 -1
  1094. package/lib/module/helpers/assets/fries-item.js +0 -1
  1095. package/lib/module/helpers/assets/fruit-helpers.js +0 -1
  1096. package/lib/module/helpers/assets/grapes-fruit.js +0 -1
  1097. package/lib/module/helpers/assets/icecream-item.js +0 -1
  1098. package/lib/module/helpers/assets/index.js +0 -1
  1099. package/lib/module/helpers/assets/kiwi-fruit.js +0 -1
  1100. package/lib/module/helpers/assets/mango-fruit.js +0 -1
  1101. package/lib/module/helpers/assets/orange-fruit.js +0 -1
  1102. package/lib/module/helpers/assets/papaya-fruit.js +0 -1
  1103. package/lib/module/helpers/assets/papaya-full-fruit.js +0 -1
  1104. package/lib/module/helpers/assets/peach-fruit.js +0 -1
  1105. package/lib/module/helpers/assets/pineapple-fruit.js +0 -1
  1106. package/lib/module/helpers/assets/pomegranate-fruit.js +0 -1
  1107. package/lib/module/helpers/assets/pumpkin-fruit.js +0 -1
  1108. package/lib/module/helpers/assets/raspberry-item.js +0 -1
  1109. package/lib/module/helpers/assets/star-item.js +0 -1
  1110. package/lib/module/helpers/assets/strawberry-fruit.js +0 -1
  1111. package/lib/module/helpers/assets/watermelon-fruit.js +0 -1
  1112. package/lib/module/types.d.js +0 -1
  1113. package/lib/typescript/src/games/arrows/ArrowsService.d.ts +0 -6
  1114. package/lib/typescript/src/games/arrows/ArrowsStore.d.ts +0 -51
  1115. package/lib/typescript/src/games/arrows/components/ArrowsGrid.d.ts +0 -13
  1116. package/lib/typescript/src/games/arrows/components/ScoreBoard.d.ts +0 -6
  1117. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +0 -80
  1118. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +0 -30
  1119. package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts +0 -9
  1120. package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +0 -9
  1121. package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +0 -7
  1122. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +0 -6
  1123. package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +0 -44
  1124. package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +0 -68
  1125. package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +0 -12
  1126. package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +0 -7
  1127. package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +0 -6
  1128. package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +0 -16
  1129. package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +0 -70
  1130. package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +0 -11
  1131. package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +0 -11
  1132. package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +0 -8
  1133. package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +0 -6
  1134. package/lib/typescript/src/games/block-breaker/BlockBreakerService.d.ts +0 -88
  1135. package/lib/typescript/src/games/block-breaker/BlockBreakerStore.d.ts +0 -47
  1136. package/lib/typescript/src/games/block-breaker/components/BlastAnimation.d.ts +0 -15
  1137. package/lib/typescript/src/games/block-breaker/components/GameArea.d.ts +0 -8
  1138. package/lib/typescript/src/games/block-breaker/components/ScoreBoard.d.ts +0 -6
  1139. package/lib/typescript/src/games/bluk/BlukService.d.ts +0 -71
  1140. package/lib/typescript/src/games/bluk/BlukStore.d.ts +0 -52
  1141. package/lib/typescript/src/games/bluk/components/GameArea.d.ts +0 -17
  1142. package/lib/typescript/src/games/bluk/components/GameBackground.d.ts +0 -9
  1143. package/lib/typescript/src/games/bluk/components/ScoreBoard.d.ts +0 -6
  1144. package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +0 -35
  1145. package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +0 -63
  1146. package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +0 -8
  1147. package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +0 -6
  1148. package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts +0 -37
  1149. package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts +0 -53
  1150. package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts +0 -11
  1151. package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts +0 -2
  1152. package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts +0 -5
  1153. package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +0 -44
  1154. package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +0 -68
  1155. package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +0 -12
  1156. package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +0 -7
  1157. package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +0 -6
  1158. package/lib/typescript/src/games/chameleon-run/ChameleonRunService.d.ts +0 -76
  1159. package/lib/typescript/src/games/chameleon-run/ChameleonRunStore.d.ts +0 -48
  1160. package/lib/typescript/src/games/chameleon-run/components/GameArea.d.ts +0 -8
  1161. package/lib/typescript/src/games/chameleon-run/components/GameBackground.d.ts +0 -7
  1162. package/lib/typescript/src/games/chameleon-run/components/ScoreBoard.d.ts +0 -6
  1163. package/lib/typescript/src/games/checkers/CheckersService.d.ts +0 -6
  1164. package/lib/typescript/src/games/checkers/CheckersStore.d.ts +0 -48
  1165. package/lib/typescript/src/games/checkers/components/GameBoard.d.ts +0 -6
  1166. package/lib/typescript/src/games/checkers/components/ScoreBoard.d.ts +0 -6
  1167. package/lib/typescript/src/games/color-switch/ColorSwitchService.d.ts +0 -63
  1168. package/lib/typescript/src/games/color-switch/ColorSwitchStore.d.ts +0 -43
  1169. package/lib/typescript/src/games/color-switch/components/GameArea.d.ts +0 -8
  1170. package/lib/typescript/src/games/color-switch/components/ScoreBoard.d.ts +0 -6
  1171. package/lib/typescript/src/games/colors-sort/ColorsSortService.d.ts +0 -61
  1172. package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts +0 -56
  1173. package/lib/typescript/src/games/colors-sort/components/ColorContainer.d.ts +0 -7
  1174. package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts +0 -6
  1175. package/lib/typescript/src/games/connect-em-all/ConnectEmAllService.d.ts +0 -20
  1176. package/lib/typescript/src/games/connect-em-all/ConnectEmAllStore.d.ts +0 -48
  1177. package/lib/typescript/src/games/connect-em-all/components/GameBoard.d.ts +0 -7
  1178. package/lib/typescript/src/games/connect-em-all/components/ScoreBoard.d.ts +0 -6
  1179. package/lib/typescript/src/games/crossy-road/CrossyRoadService.d.ts +0 -89
  1180. package/lib/typescript/src/games/crossy-road/CrossyRoadStore.d.ts +0 -39
  1181. package/lib/typescript/src/games/crossy-road/components/GameArea.d.ts +0 -8
  1182. package/lib/typescript/src/games/crossy-road/components/ScoreBoard.d.ts +0 -6
  1183. package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts +0 -39
  1184. package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts +0 -97
  1185. package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts +0 -2
  1186. package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts +0 -7
  1187. package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts +0 -7
  1188. package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts +0 -8
  1189. package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts +0 -6
  1190. package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts +0 -2
  1191. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesService.d.ts +0 -45
  1192. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesStore.d.ts +0 -37
  1193. package/lib/typescript/src/games/dots-and-boxes/components/GameBoard.d.ts +0 -7
  1194. package/lib/typescript/src/games/dots-and-boxes/components/ScoreBoard.d.ts +0 -6
  1195. package/lib/typescript/src/games/falling-sticks/FallingSticksService.d.ts +0 -40
  1196. package/lib/typescript/src/games/falling-sticks/FallingSticksStore.d.ts +0 -31
  1197. package/lib/typescript/src/games/falling-sticks/components/GameArea.d.ts +0 -7
  1198. package/lib/typescript/src/games/falling-sticks/components/GameBackground.d.ts +0 -6
  1199. package/lib/typescript/src/games/falling-sticks/components/ScoreBoard.d.ts +0 -6
  1200. package/lib/typescript/src/games/find-different-number/FindDifferentNumberService.d.ts +0 -6
  1201. package/lib/typescript/src/games/find-different-number/FindDifferentNumberStore.d.ts +0 -36
  1202. package/lib/typescript/src/games/find-different-number/components/GameGrid.d.ts +0 -7
  1203. package/lib/typescript/src/games/find-different-number/components/ScoreBoard.d.ts +0 -6
  1204. package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts +0 -68
  1205. package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts +0 -2
  1206. package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts +0 -7
  1207. package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts +0 -7
  1208. package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts +0 -8
  1209. package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts +0 -6
  1210. package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts +0 -3
  1211. package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts +0 -66
  1212. package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts +0 -8
  1213. package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts +0 -8
  1214. package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts +0 -6
  1215. package/lib/typescript/src/games/fruit-ninja/FruitNinjaService.d.ts +0 -73
  1216. package/lib/typescript/src/games/fruit-ninja/FruitNinjaStore.d.ts +0 -38
  1217. package/lib/typescript/src/games/fruit-ninja/components/FruitComponent.d.ts +0 -8
  1218. package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts +0 -7
  1219. package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts +0 -7
  1220. package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +0 -6
  1221. package/lib/typescript/src/games/game-2048/Game2048Service.d.ts +0 -102
  1222. package/lib/typescript/src/games/game-2048/Game2048Store.d.ts +0 -44
  1223. package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts +0 -2
  1224. package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts +0 -6
  1225. package/lib/typescript/src/games/knife-hit/KnifeHitService.d.ts +0 -48
  1226. package/lib/typescript/src/games/knife-hit/KnifeHitStore.d.ts +0 -41
  1227. package/lib/typescript/src/games/knife-hit/components/GameArea.d.ts +0 -8
  1228. package/lib/typescript/src/games/knife-hit/components/ScoreBoard.d.ts +0 -6
  1229. package/lib/typescript/src/games/ludo-king/LudoKingService.d.ts +0 -33
  1230. package/lib/typescript/src/games/ludo-king/LudoKingStore.d.ts +0 -34
  1231. package/lib/typescript/src/games/ludo-king/components/Dice.d.ts +0 -7
  1232. package/lib/typescript/src/games/ludo-king/components/GameBoard.d.ts +0 -7
  1233. package/lib/typescript/src/games/ludo-king/components/ScoreBoard.d.ts +0 -6
  1234. package/lib/typescript/src/games/maze-runner/MazeRunnerStore.d.ts +0 -62
  1235. package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts +0 -10
  1236. package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts +0 -33
  1237. package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +0 -24
  1238. package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts +0 -24
  1239. package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts +0 -9
  1240. package/lib/typescript/src/games/memory-match/MemoryMatchService.d.ts +0 -6
  1241. package/lib/typescript/src/games/memory-match/MemoryMatchStore.d.ts +0 -42
  1242. package/lib/typescript/src/games/memory-match/components/Card.d.ts +0 -6
  1243. package/lib/typescript/src/games/memory-match/components/GameBoard.d.ts +0 -6
  1244. package/lib/typescript/src/games/memory-match/components/ScoreBoard.d.ts +0 -6
  1245. package/lib/typescript/src/games/mine-sweeper/MineSweeperService.d.ts +0 -22
  1246. package/lib/typescript/src/games/mine-sweeper/MineSweeperStore.d.ts +0 -73
  1247. package/lib/typescript/src/games/mine-sweeper/components/GameArea.d.ts +0 -8
  1248. package/lib/typescript/src/games/mine-sweeper/components/ScoreBoard.d.ts +0 -6
  1249. package/lib/typescript/src/games/mob-control/MobControlService.d.ts +0 -74
  1250. package/lib/typescript/src/games/mob-control/MobControlStore.d.ts +0 -66
  1251. package/lib/typescript/src/games/mob-control/components/GameArea.d.ts +0 -11
  1252. package/lib/typescript/src/games/mob-control/components/ScoreBoard.d.ts +0 -6
  1253. package/lib/typescript/src/games/number-search/NumberSearchConstants.d.ts +0 -63
  1254. package/lib/typescript/src/games/number-search/NumberSearchService.d.ts +0 -34
  1255. package/lib/typescript/src/games/number-search/NumberSearchStore.d.ts +0 -70
  1256. package/lib/typescript/src/games/number-search/components/GameBoard.d.ts +0 -7
  1257. package/lib/typescript/src/games/number-search/components/NumberList.d.ts +0 -2
  1258. package/lib/typescript/src/games/number-search/components/ScoreBoard.d.ts +0 -6
  1259. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsService.d.ts +0 -67
  1260. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsStore.d.ts +0 -45
  1261. package/lib/typescript/src/games/nuts-and-bolts/components/GameBoard.d.ts +0 -7
  1262. package/lib/typescript/src/games/nuts-and-bolts/components/ScoreBoard.d.ts +0 -6
  1263. package/lib/typescript/src/games/pac-man/PacManService.d.ts +0 -73
  1264. package/lib/typescript/src/games/pac-man/PacManStore.d.ts +0 -89
  1265. package/lib/typescript/src/games/pac-man/components/GameCanvas.d.ts +0 -2
  1266. package/lib/typescript/src/games/pac-man/components/ScoreBoard.d.ts +0 -6
  1267. package/lib/typescript/src/games/paper-io/PaperIoService.d.ts +0 -70
  1268. package/lib/typescript/src/games/paper-io/PaperIoStore.d.ts +0 -51
  1269. package/lib/typescript/src/games/paper-io/components/GameArea.d.ts +0 -8
  1270. package/lib/typescript/src/games/paper-io/components/ScoreBoard.d.ts +0 -6
  1271. package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +0 -15
  1272. package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +0 -55
  1273. package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +0 -8
  1274. package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +0 -6
  1275. package/lib/typescript/src/games/pipe-connect/PipeConnectService.d.ts +0 -17
  1276. package/lib/typescript/src/games/pipe-connect/PipeConnectStore.d.ts +0 -31
  1277. package/lib/typescript/src/games/pipe-connect/components/GameArea.d.ts +0 -7
  1278. package/lib/typescript/src/games/pipe-connect/components/ScoreBoard.d.ts +0 -6
  1279. package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts +0 -30
  1280. package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +0 -33
  1281. package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts +0 -10
  1282. package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts +0 -10
  1283. package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +0 -6
  1284. package/lib/typescript/src/games/reversi/ReversiStore.d.ts +0 -46
  1285. package/lib/typescript/src/games/reversi/components/GameBoard.d.ts +0 -6
  1286. package/lib/typescript/src/games/reversi/components/ScoreBoard.d.ts +0 -6
  1287. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts +0 -6
  1288. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts +0 -38
  1289. package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts +0 -7
  1290. package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts +0 -6
  1291. package/lib/typescript/src/games/snake-3d/Snake3DService.d.ts +0 -29
  1292. package/lib/typescript/src/games/snake-3d/Snake3DStore.d.ts +0 -49
  1293. package/lib/typescript/src/games/snake-3d/components/GameGrid.d.ts +0 -2
  1294. package/lib/typescript/src/games/snake-3d/components/ScoreBoard.d.ts +0 -6
  1295. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersService.d.ts +0 -22
  1296. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersStore.d.ts +0 -40
  1297. package/lib/typescript/src/games/snakes-and-ladders/components/Dice.d.ts +0 -7
  1298. package/lib/typescript/src/games/snakes-and-ladders/components/GameBoard.d.ts +0 -2
  1299. package/lib/typescript/src/games/snakes-and-ladders/components/ScoreBoard.d.ts +0 -6
  1300. package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts +0 -117
  1301. package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts +0 -54
  1302. package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts +0 -9
  1303. package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts +0 -9
  1304. package/lib/typescript/src/games/space-fighter/components/GameBackground.d.ts +0 -6
  1305. package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +0 -6
  1306. package/lib/typescript/src/games/space-fighter/components/Spacecraft3D.d.ts +0 -11
  1307. package/lib/typescript/src/games/space-fighter/components/SpacecraftPath.d.ts +0 -9
  1308. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireService.d.ts +0 -23
  1309. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireStore.d.ts +0 -71
  1310. package/lib/typescript/src/games/spider-solitaire/components/Card.d.ts +0 -10
  1311. package/lib/typescript/src/games/spider-solitaire/components/CardPile.d.ts +0 -12
  1312. package/lib/typescript/src/games/spider-solitaire/components/ScoreBoard.d.ts +0 -6
  1313. package/lib/typescript/src/games/stack-tower/StackTowerService.d.ts +0 -51
  1314. package/lib/typescript/src/games/stack-tower/StackTowerStore.d.ts +0 -52
  1315. package/lib/typescript/src/games/stack-tower/components/GameArea.d.ts +0 -8
  1316. package/lib/typescript/src/games/stack-tower/components/ScoreBoard.d.ts +0 -6
  1317. package/lib/typescript/src/games/sudoku/SudokuService.d.ts +0 -24
  1318. package/lib/typescript/src/games/sudoku/SudokuStore.d.ts +0 -65
  1319. package/lib/typescript/src/games/sudoku/components/GameArea.d.ts +0 -8
  1320. package/lib/typescript/src/games/sudoku/components/ScoreBoard.d.ts +0 -6
  1321. package/lib/typescript/src/games/tangram/TangramService.d.ts +0 -6
  1322. package/lib/typescript/src/games/tangram/TangramStore.d.ts +0 -34
  1323. package/lib/typescript/src/games/tangram/components/GameBoard.d.ts +0 -7
  1324. package/lib/typescript/src/games/tangram/components/ScoreBoard.d.ts +0 -6
  1325. package/lib/typescript/src/games/tank-1990/Tank1990Service.d.ts +0 -80
  1326. package/lib/typescript/src/games/tank-1990/Tank1990Store.d.ts +0 -48
  1327. package/lib/typescript/src/games/tank-1990/components/Controls.d.ts +0 -2
  1328. package/lib/typescript/src/games/tank-1990/components/GameBoard.d.ts +0 -2
  1329. package/lib/typescript/src/games/tank-1990/components/ScoreBoard.d.ts +0 -6
  1330. package/lib/typescript/src/games/tic-tac-toe/TicTacToeService.d.ts +0 -0
  1331. package/lib/typescript/src/games/tic-tac-toe/TicTacToeStore.d.ts +0 -51
  1332. package/lib/typescript/src/games/tic-tac-toe/components/GameBoard.d.ts +0 -6
  1333. package/lib/typescript/src/games/tic-tac-toe/components/ScoreBoard.d.ts +0 -6
  1334. package/lib/typescript/src/games/tile-home/TileHomeService.d.ts +0 -1
  1335. package/lib/typescript/src/games/tile-home/TileHomeStore.d.ts +0 -57
  1336. package/lib/typescript/src/games/tile-home/components/AnimatingTile.d.ts +0 -9
  1337. package/lib/typescript/src/games/tile-home/components/FlyingTile.d.ts +0 -16
  1338. package/lib/typescript/src/games/tile-home/components/GameBoard.d.ts +0 -7
  1339. package/lib/typescript/src/games/tile-home/components/ScoreBoard.d.ts +0 -6
  1340. package/lib/typescript/src/games/tile-home/components/TileItem.d.ts +0 -11
  1341. package/lib/typescript/src/games/tile-home/components/TileSlot.d.ts +0 -7
  1342. package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts +0 -32
  1343. package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts +0 -39
  1344. package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts +0 -7
  1345. package/lib/typescript/src/games/whack-a-mole/components/GameGrid.d.ts +0 -10
  1346. package/lib/typescript/src/games/whack-a-mole/components/GameHole.d.ts +0 -11
  1347. package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts +0 -6
  1348. package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts +0 -6
  1349. package/lib/typescript/src/games/word-search/WordSearchConstants.d.ts +0 -63
  1350. package/lib/typescript/src/games/word-search/WordSearchService.d.ts +0 -34
  1351. package/lib/typescript/src/games/word-search/WordSearchStore.d.ts +0 -70
  1352. package/lib/typescript/src/games/word-search/components/GameBoard.d.ts +0 -7
  1353. package/lib/typescript/src/games/word-search/components/ScoreBoard.d.ts +0 -6
  1354. package/lib/typescript/src/games/word-search/components/WordList.d.ts +0 -2
  1355. package/lib/typescript/src/helpers/AnimatedScore.d.ts +0 -36
  1356. package/lib/typescript/src/helpers/AnimationFrame.d.ts +0 -40
  1357. package/lib/typescript/src/helpers/AnimationTracker.d.ts +0 -44
  1358. package/lib/typescript/src/helpers/BlastAnimation.d.ts +0 -16
  1359. package/lib/typescript/src/helpers/ErrorHandler.d.ts +0 -123
  1360. package/lib/typescript/src/helpers/GameBackgroundPattern.d.ts +0 -7
  1361. package/lib/typescript/src/helpers/GameControlButton.d.ts +0 -11
  1362. package/lib/typescript/src/helpers/GameOverModal.d.ts +0 -15
  1363. package/lib/typescript/src/helpers/GameTimer.d.ts +0 -26
  1364. package/lib/typescript/src/helpers/Icons.d.ts +0 -12
  1365. package/lib/typescript/src/helpers/ParticleBlast.d.ts +0 -11
  1366. package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts +0 -85
  1367. package/lib/typescript/src/helpers/assets/apple-fruit.d.ts +0 -4
  1368. package/lib/typescript/src/helpers/assets/avocado-item.d.ts +0 -4
  1369. package/lib/typescript/src/helpers/assets/banana-fruit.d.ts +0 -4
  1370. package/lib/typescript/src/helpers/assets/bomb-item.d.ts +0 -4
  1371. package/lib/typescript/src/helpers/assets/broccoli-item.d.ts +0 -4
  1372. package/lib/typescript/src/helpers/assets/cherries-fruit.d.ts +0 -4
  1373. package/lib/typescript/src/helpers/assets/donut-item.d.ts +0 -4
  1374. package/lib/typescript/src/helpers/assets/dragonfruit-item.d.ts +0 -4
  1375. package/lib/typescript/src/helpers/assets/fries-item.d.ts +0 -4
  1376. package/lib/typescript/src/helpers/assets/fruit-helpers.d.ts +0 -154
  1377. package/lib/typescript/src/helpers/assets/grapes-fruit.d.ts +0 -4
  1378. package/lib/typescript/src/helpers/assets/icecream-item.d.ts +0 -4
  1379. package/lib/typescript/src/helpers/assets/index.d.ts +0 -31
  1380. package/lib/typescript/src/helpers/assets/kiwi-fruit.d.ts +0 -4
  1381. package/lib/typescript/src/helpers/assets/mango-fruit.d.ts +0 -4
  1382. package/lib/typescript/src/helpers/assets/orange-fruit.d.ts +0 -4
  1383. package/lib/typescript/src/helpers/assets/papaya-fruit.d.ts +0 -4
  1384. package/lib/typescript/src/helpers/assets/papaya-full-fruit.d.ts +0 -4
  1385. package/lib/typescript/src/helpers/assets/peach-fruit.d.ts +0 -4
  1386. package/lib/typescript/src/helpers/assets/pineapple-fruit.d.ts +0 -4
  1387. package/lib/typescript/src/helpers/assets/pomegranate-fruit.d.ts +0 -4
  1388. package/lib/typescript/src/helpers/assets/pumpkin-fruit.d.ts +0 -4
  1389. package/lib/typescript/src/helpers/assets/raspberry-item.d.ts +0 -4
  1390. package/lib/typescript/src/helpers/assets/star-item.d.ts +0 -4
  1391. package/lib/typescript/src/helpers/assets/strawberry-fruit.d.ts +0 -4
  1392. package/lib/typescript/src/helpers/assets/watermelon-fruit.d.ts +0 -4
@@ -0,0 +1 @@
1
+ "use strict";import{World}from"@nayan-ui/engine";import{AI_THINK,CANT_MOVE_DELAY,HOME_YARDS,HOP_TIME,MAX_SIXES,MOVE_DELAY,NEXT_TURN_DELAY,PENALTY_DELAY,ROLL_TIME}from"./LudoKingConstants.js";import{calculateScore,canMove,createPlayers,getWinner,isFinished,isGameOver,journey,movableTokens,moveToken,rollDice,selectAIMove,tokenCell}from"./LudoKingRules.js";import{aimCamera,bobToken,buildScene,captureBurst,confetti,finishBurst,hopToken,placeToken,removeScene,rollDie,setSceneTheme,showHints,showRollHint}from"./LudoKingScene.js";const WORLD_CAPACITY=700,MAX_STEP=.1;export function createGame(e){const n=new World(700),o=createPlayers("green",["red"]),r={world:n,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",players:o,turn:0,dice:0,stage:"rolling",sixes:0,get score(){return n.scoreboard.score},won:!1,onPhase:e=>{},onFinished:(e,n)=>{},onScore:e=>{},onTurn:e=>{},onEvent:(e,n)=>{}};return n.scoreboard.reset(),r}const after=(e,n,o)=>e.world.after(n,o),current=e=>e.players[e.turn],tokenIdsOf=e=>e.flatMap(e=>e.tokens.map(n=>({id:n.id,color:e.color})));export function setLayout(e,n){e.scene&&removeScene(e.world,e.scene),e.layout=n,aimCamera(e.camera,n),e.scene=buildScene(e.world,n,e.theme,tokenIdsOf(e.players)),arrange(e),idle(e)}export function setTheme(e,n){e.theme=n,e.scene&&setSceneTheme(e.world,e.scene,n)}function arrange(e){const{layout:n,scene:o}=e;if(!n||!o)return;const r=new Map;for(const n of e.players)for(const e of n.tokens){const n=tokenCell(e),o=n.row+","+n.col;(r.get(o)??r.set(o,[]).get(o)).push({id:e.id})}for(const[t,s]of r){const[r,i]=t.split(",").map(Number);s.forEach((t,a)=>placeToken(e.world,n,o,t.id,{row:r,col:i},s.length>1?.022*(a-(s.length-1)/2):0))}}function idle(e){const{layout:n,scene:o}=e;if(!n||!o)return;const r="playing"===e.phase;if(showRollHint(e.world,n,o,r&&"rolling"===e.stage&&0===e.turn),!r||"rolling"!==e.stage&&"thinking"!==e.stage&&"await"!==e.stage?bobToken(e.world,n,o,[]):bobToken(e.world,n,o,current(e).tokens.map(e=>e.id)),r&&"await"===e.stage&&0===e.turn){const r=movableTokens(current(e),e.dice).map(e=>tokenCell(e));showHints(e.world,n,o,r)}else showHints(e.world,n,o,[])}export function start(e){"ready"===e.phase&&(e.phase="playing",e.onPhase("playing"),beginTurn(e))}export function reset(e){e.world.cancelTimers(),e.players=createPlayers("green",["red"]),e.turn=0,e.dice=0,e.stage="rolling",e.sixes=0,e.world.scoreboard.reset(),e.won=!1,e.phase="ready",arrange(e),idle(e),e.onFinished(0,0),e.onScore(0),e.onTurn(0),e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function tick(e,n){e.world.isDisposed||e.world.update(Math.min(n,.1))}export function tap(e,n,o){if("playing"!==e.phase||!e.scene)return;const r=e.world.pick(n,o);if(!r)return;if(r.entity===e.scene.die)return void("rolling"===e.stage&&0===e.turn&&(e.onEvent("tap",0),roll(e)));const t=e.scene.tokenAt.get(r.entity);if(!t||"await"!==e.stage||0!==e.turn)return;const s=current(e).tokens.find(e=>e.id===t);s&&canMove(s,e.dice)&&applyMove(e,s)}function beginTurn(e){e.dice=0,current(e).isAI?(e.stage="thinking",idle(e),after(e,AI_THINK,()=>roll(e))):(e.stage="rolling",idle(e))}function roll(e){const{layout:n,scene:o}=e;if(!n||!o)return;e.stage="busy",idle(e);const r=rollDice();e.onEvent("roll",e.turn),rollDie(e.world,n,o,r,ROLL_TIME,()=>e.world.isDisposed),after(e,ROLL_TIME,()=>rolled(e,r))}function rolled(e,n){return e.dice=n,e.sixes=6===n?e.sixes+1:0,e.sixes>=MAX_SIXES?(e.onEvent("penalty",e.turn),e.sixes=0,void after(e,PENALTY_DELAY,()=>passTurn(e))):(6===n&&e.onEvent("six",e.turn),movableTokens(current(e),n).length?void(current(e).isAI?after(e,MOVE_DELAY,()=>{const o=selectAIMove(current(e),n,e.players);o?applyMove(e,o):passTurn(e)}):(e.stage="await",idle(e))):(0===e.turn&&e.onEvent("cantMove",0),void after(e,CANT_MOVE_DELAY,()=>passTurn(e))))}function applyMove(e,n){const{layout:o,scene:r}=e;if(!o||!r)return;e.stage="busy";const t=e.turn,s=e.dice,{moved:i,captured:a}=moveToken(n,s,e.players),l=isFinished(i)&&!isFinished(n),d=a?tokenCell(a):null,u=current(e);if(u.tokens=u.tokens.map(e=>e.id===n.id?i:e),u.finishedTokens=u.tokens.filter(isFinished).length,a){const n=e.players.find(e=>e.color===a.player);n.tokens=n.tokens.map(e=>e.id===a.id?{...e,progress:-1}:e)}e.world.scoreboard.set(calculateScore(e.players[0])),e.onScore(e.score),e.onFinished(e.players[0].finishedTokens,e.players[1].finishedTokens);const p=journey(n,s),f=Math.max(1,p.length-1)*HOP_TIME;showHints(e.world,o,r,[]),bobToken(e.world,o,r,[]),hopToken(e.world,o,r,n.id,p,f),e.onEvent(a?"capture":l?"finish":"move",t),after(e,f,()=>{const n=e.scene,o=e.layout;if(!n||!o)return;if(a&&d){captureBurst(e.world,o,d);const r=Number(a.id.split("-")[1]),t=HOME_YARDS[a.player][r];placeToken(e.world,o,n,a.id,t,0)}if(l&&finishBurst(e.world,o),arrange(e),isGameOver(e.players)){const n=getWinner(e.players);return e.won="green"===n?.color,end(e),void(n&&confetti(e.world,o,n.color))}const r=6===s||l||!!a;after(e,NEXT_TURN_DELAY,()=>r?beginTurn(e):passTurn(e))})}function passTurn(e){"playing"===e.phase&&(e.turn=0===e.turn?1:0,e.sixes=0,e.onTurn(e.turn),beginTurn(e))}function end(e){e.phase="over",e.stage="busy",idle(e),e.onPhase("over")}
@@ -0,0 +1 @@
1
+ "use strict";import{CENTER,ENTRY,HOME_STRETCH,HOME_YARDS,MAIN_PATH,SAFE_POSITIONS,TOKENS_PER_PLAYER,TRACK_LENGTH}from"./LudoKingConstants.js";export const isInYard=e=>e.progress<0;export const isFinished=e=>e.progress>=TRACK_LENGTH;export const rollDice=()=>Math.floor(6*Math.random())+1;export function createPlayers(e,r){const s=(e,r)=>({color:e,isAI:r,finishedTokens:0,tokens:Array.from({length:TOKENS_PER_PLAYER},(r,s)=>({id:e+"-"+s,player:e,progress:-1}))});return[s(e,!1),...r.map(e=>s(e,!0))]}export const mainIndexAt=(e,r)=>(ENTRY[e]+r)%52;export function canMove(e,r){return!isFinished(e)&&(isInYard(e)?6===r:e.progress+r<=TRACK_LENGTH)}export const movableTokens=(e,r)=>e.tokens.filter(e=>canMove(e,r));export function tokenCell(e){if(isFinished(e))return CENTER;if(isInYard(e)){const r=Number(e.id.split("-")[1]);return HOME_YARDS[e.player][r]??CENTER}return e.progress<=50?MAIN_PATH[mainIndexAt(e.player,e.progress)]:HOME_STRETCH[e.player][e.progress-51]}export function journey(e,r){const s=[tokenCell(e)];if(isInYard(e))return s.push(MAIN_PATH[ENTRY[e.player]]),s;for(let o=1;o<=r;o++){const r=e.progress+o;s.push(r>=TRACK_LENGTH?CENTER:r<=50?MAIN_PATH[mainIndexAt(e.player,r)]:HOME_STRETCH[e.player][r-51])}return s}export function moveToken(e,r,s){const o={...e};isInYard(e)?o.progress=0:o.progress=e.progress+r;let n=null;if(o.progress>=0&&o.progress<=50){const r=mainIndexAt(o.player,o.progress);if(!SAFE_POSITIONS.includes(r))for(const o of s)if(o.color!==e.player){for(const e of o.tokens)if(!isInYard(e)&&!isFinished(e)&&e.progress<=50&&mainIndexAt(e.player,e.progress)===r){n=e;break}if(n)break}}return{moved:o,captured:n}}export const isGameOver=e=>e.some(e=>e.finishedTokens===TOKENS_PER_PLAYER);export const getWinner=e=>e.find(e=>e.finishedTokens===TOKENS_PER_PLAYER)??null;export function selectAIMove(e,r,s){const o=movableTokens(e,r);if(!o.length)return null;const n=o.map(o=>{let n=0;const{moved:t,captured:i}=moveToken(o,r,s);if(i&&(n+=100),isInYard(o)&&6===r&&(n+=50),isFinished(t)&&(n+=200),isInYard(o)||isFinished(o)||(n+=t.progress),!isFinished(t)&&t.progress<=50&&SAFE_POSITIONS.includes(mainIndexAt(t.player,t.progress))&&(n+=30),!isFinished(t)&&t.progress<=50&&!SAFE_POSITIONS.includes(mainIndexAt(t.player,t.progress))){const r=mainIndexAt(t.player,t.progress);for(const o of s)if(o.color!==e.color)for(const e of o.tokens)isInYard(e)||isFinished(e)||e.progress>50||(r-mainIndexAt(e.player,e.progress)+52)%52<=6&&(n-=20)}return{token:o,score:n}});return n.sort((e,r)=>r.score-e.score),Math.random()<.3&&n.length>1?n[Math.floor(Math.random()*n.length)].token:n[0].token}export function calculateScore(e){let r=3e3*e.finishedTokens;for(const s of e.tokens)isInYard(s)||isFinished(s)||(r+=Math.round(30*s.progress));return r}
@@ -0,0 +1 @@
1
+ "use strict";import{effects,extrude,lathe,merge,Path,quat,shapeGeometry}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{dieMesh,dieRotation as _0x2d0286,rollDie as _0x382f19}from"../shared/EngineDice.js";import{cacheGameAsset,createGameMesh as _0x2d5cb8}from"../shared/EngineMeshes.js";import{aimTilted,placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{AI_COLOR,BOARD_FRAME,BOARD_WHITE,cellPoint,CENTER,DIE_SIZE,DIE_Y,ENTRY,GRID,HOME_STRETCH,HOME_YARDS,MAIN_PATH,PLAYER_COLOR,PLAYER_COLORS,RIM,SAFE_POSITIONS,STAR_COLOR,TILE_TOP,TILT,TOKEN_HEIGHT}from"./LudoKingConstants.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("ludo-king/LudoKingScene:"+e,o),meshes.set(e,t)),t},rgb=e=>{const[o,t,s]=toColor(e);return[o,t,s]},cube=()=>shapeGeometry("cube"),sphere=()=>shapeGeometry("sphere"),STAND_UP=quat.x(Math.PI/2),CELL=1/GRID,HOME_CORNER=[{color:"blue",row:0,col:0},{color:"red",row:0,col:9},{color:"green",row:9,col:0},{color:"yellow",row:9,col:9}],SKIN=4e-4,LAYER=.002,layerZ=e=>TILE_TOP-.008+.002*e;export const SHADOW_Z=layerZ(6);export const PAWN_Z=layerZ(7);const GRID_LINE=[.55,.53,.62];function tile(e,o,t,s,n=.92){const[i,r]=cellPoint(o,t);e.push({geometry:cube(),position:[i,r,layerZ(2)],scale:[CELL,CELL,SKIN],color:[...GRID_LINE,1]}),e.push({geometry:cube(),position:[i,r,layerZ(3)],scale:[CELL*n,CELL*n,SKIN],color:[...s,1]})}const disc=e=>extrude((new Path).addCircle(0,0,e),{depth:SKIN});function boardMesh(){return cached("ludo-board",()=>{const e=1+2*RIM,o=rgb(BOARD_FRAME),t=rgb(BOARD_WHITE),s=[{geometry:cube(),position:[0,0,layerZ(0)],scale:[e,e,SKIN],color:[...o,1]},{geometry:cube(),position:[0,0,layerZ(1)],scale:[1,1,SKIN],color:[...t,1]}];for(const{color:e,row:o,col:n}of HOME_CORNER){const i=rgb(PLAYER_COLORS[e]),[r,l]=cellPoint(o+2.5,n+2.5),a=6*CELL;s.push({geometry:cube(),position:[r,l,layerZ(2)],scale:[a,a,SKIN],color:[...i,1]}),s.push({geometry:cube(),position:[r,l,layerZ(3)],scale:[.68*a,.68*a,SKIN],color:[...t,1]});for(const o of HOME_YARDS[e]){const[e,n]=cellPoint(o.row,o.col);s.push({geometry:disc(.5),position:[e,n,layerZ(4)],scale:[1.5*CELL,1.5*CELL,1],color:[...i,1]}),s.push({geometry:disc(.5),position:[e,n,layerZ(5)],scale:[.9*CELL,.9*CELL,1],color:[...t,1]})}}MAIN_PATH.forEach((e,o)=>{const n=Object.keys(ENTRY).find(e=>ENTRY[e]===o),i=n?rgb(PLAYER_COLORS[n]):t;if(tile(s,e.row,e.col,i),SAFE_POSITIONS.includes(o)&&!n){const[o,t]=cellPoint(e.row,e.col);s.push({geometry:extrude((new Path).addStar(0,0,.5,.22),{depth:SKIN}),position:[o,t,layerZ(4)],scale:[.7*CELL,.7*CELL,1],color:[...rgb(STAR_COLOR),1]})}});for(const e of["blue","red","green","yellow"]){const o=rgb(PLAYER_COLORS[e]);for(const t of HOME_STRETCH[e])tile(s,t.row,t.col,o)}const n={tl:cellPoint(5.5,5.5),tr:cellPoint(5.5,8.5),bl:cellPoint(8.5,5.5),br:cellPoint(8.5,8.5)},i=(e,o,t)=>s.push({geometry:extrude((new Path).addPolygon([[0,0],[e[0],-e[1]],[o[0],-o[1]]]),{depth:SKIN}),position:[0,0,layerZ(3)],color:[...rgb(t),1]});return i(n.tl,n.tr,PLAYER_COLORS.red),i(n.tr,n.br,PLAYER_COLORS.yellow),i(n.br,n.bl,PLAYER_COLORS.green),i(n.bl,n.tl,PLAYER_COLORS.blue),_0x2d5cb8(merge(s),{center:!1,shine:0})})}const pawnMesh=()=>cached("ludo-pawn",()=>_0x2d5cb8(merge([{geometry:lathe([[.001,0],[.42,0],[.44,.04],[.42,.1],[.3,.14],[.24,.2],[.18,.44],[.15,.58],[.27,.61],[.27,.66],[.14,.69]],{segments:28})},{geometry:sphere(),position:[0,.84,0],scale:.42}]),{center:!1,shine:.6}));export const dieRotation=(e,o=0)=>_0x2d0286(TILT,e,o);const discMesh=()=>cached("ludo-disc",()=>_0x2d5cb8(extrude((new Path).addCircle(0,0,.5),{depth:0}))),ringMesh=()=>cached("ludo-ring",()=>_0x2d5cb8(extrude((new Path).addCircle(0,0,.5).addCircle(0,0,.4),{depth:0,fillRule:"evenodd"}))),SHADOW=[0,0,0,.22],BACKDROP_DEPTH=25;export const toWorld=(e,o,t,s)=>[o*e.size,t*e.size,s*e.size];const tiltView=e=>({width:e.width,height:e.height,centerY:e.centerY,tilt:TILT});export const aimCamera=(e,o)=>aimTilted(e,tiltView(o));export const dieRest=e=>toWorld(e,0,DIE_Y,DIE_SIZE/2);export function buildScene(e,o,t,s){const n=spawnBackdrop(e,o.width,o.height,-25,t);placeTiltedBackdrop(e,n,tiltView(o),25);const i=e.spawn({mesh:boardMesh(),scale:o.size,color:[1,1,1,1],pickable:!1}),r=new Map,l=new Map,a=new Map;for(const{id:t,color:n}of s){const s=e.spawn({mesh:pawnMesh(),rotation:STAND_UP,scale:TOKEN_HEIGHT*o.size,color:toColor(PLAYER_COLORS[n])});r.set(t,s),l.set(s,t),a.set(t,e.spawn({mesh:discMesh(),scale:.05*o.size,color:SHADOW,pickable:!1}))}const d=e.spawn({mesh:discMesh(),position:toWorld(o,.012,DIE_Y-.01,.001),scale:[1.25*DIE_SIZE*o.size,1.1*DIE_SIZE*o.size,1],color:SHADOW,pickable:!1}),p=e.spawn({mesh:ringMesh(),position:toWorld(o,0,DIE_Y,.002),scale:0,color:[1,.78,.15,.85],pickable:!1}),h=e.spawn({mesh:dieMesh(),position:dieRest(o),rotation:dieRotation(1),scale:DIE_SIZE*o.size}),E=Array.from({length:4},()=>e.spawn({mesh:ringMesh(),scale:0,color:[1,.85,.2,.9],pickable:!1}));return{backdrop:n,board:i,tokens:r,tokenAt:l,bobbing:new Set,shadows:a,die:h,dieShadow:d,ring:p,hints:E}}export function removeScene(e,o){e.despawn(o.backdrop),e.despawn(o.board);for(const t of o.tokens.values())e.despawn(t);for(const t of o.shadows.values())e.despawn(t);e.despawn(o.die),e.despawn(o.dieShadow),e.despawn(o.ring);for(const t of o.hints)e.despawn(t)}export function setSceneTheme(e,o,t){setBackdropTheme(e,o.backdrop,t)}export function placeToken(e,o,t,s,n,i=0){const[r,l]=cellPoint(n.row,n.col),a=t.tokens.get(s),d=t.shadows.get(s);e.stopAnimation(a),e.stopAnimation(d),e.set(a,{position:toWorld(o,r+i,l,PAWN_Z)}),e.set(d,{position:toWorld(o,r+i+.006,l-.006,SHADOW_Z)})}export function hopToken(e,o,t,s,n,i){const r=t.tokens.get(s),l=t.shadows.get(s),a=n.map(e=>cellPoint(e.row,e.col)),d=a.slice(1).map((e,t)=>({position:toWorld(o,e[0],e[1],PAWN_Z+.03),at:(t+1)/(a.length-1)})),p=a[a.length-1];e.stopAnimation(r),e.stopAnimation(l),e.animate(r,d,{duration:i,path:"smooth",easing:"easeInOut"}),e.animate(l,{position:toWorld(o,p[0]+.006,p[1]-.006,SHADOW_Z)},{duration:i})}export function bobToken(e,o,t,s){const n=new Set(s);for(const[s,i]of t.tokens)n.has(s)!==t.bobbing.has(s)&&e.set(i,{bob:n.has(s)?{amplitude:[0,0,.01*o.size],speed:6}:null});t.bobbing=n}export function showHints(e,o,t,s){const n=1.5*CELL*o.size;t.hints.forEach((t,i)=>{const r=s[i];if(!r)return e.stopAnimation(t),void e.set(t,{scale:0});const[l,a]=cellPoint(r.row,r.col);e.set(t,{position:toWorld(o,l,a,PAWN_Z),scale:n}),e.stopAnimation(t),e.animate(t,{scale:1.2*n},{duration:.6,easing:"easeInOut",repeat:"forever",yoyo:!0})})}export function rollDie(e,o,t,s,n,i){_0x382f19(e,{die:t.die,shadow:t.dieShadow,rest:dieRest(o),shadowAt:toWorld(o,.012,DIE_Y-.01,.001),shadowScale:[1.25*DIE_SIZE*o.size,1.1*DIE_SIZE*o.size,1],size:DIE_SIZE*o.size,tilt:TILT,value:s,duration:n,disposed:i})}export function showRollHint(e,o,t,s){if(e.stopAnimation(t.ring),!s)return void e.set(t.ring,{scale:0});const n=1.55*DIE_SIZE*o.size;e.set(t.ring,{scale:n}),e.animate(t.ring,{scale:1.15*n},{duration:.6,easing:"easeInOut",repeat:"forever",yoyo:!0})}export function captureBurst(e,o,t){const[s,n]=cellPoint(t.row,t.col);effects.sparkle(e,{position:toWorld(o,s,n,TILE_TOP+.03),count:18,size:.01*o.size,speed:.4*o.size,lifetime:.5,gravity:-.6*o.size,colors:[toColor("#FFF59D"),toColor("#FF7043"),[1,1,1,1]]})}export function finishBurst(e,o){const[t,s]=cellPoint(CENTER.row,CENTER.col);effects.sparkle(e,{position:toWorld(o,t,s,TILE_TOP+.04),count:20,size:.011*o.size,speed:.4*o.size,lifetime:.6,colors:[toColor("#FFD54F"),toColor("#FFF59D"),[1,1,1,1]]})}export function confetti(e,o,t){const[s,n]=cellPoint(CENTER.row,CENTER.col);effects.confetti(e,{position:toWorld(o,s,n,TILE_TOP+.08),count:48,size:.012*o.size,speed:.7*o.size,lifetime:1.3,gravity:-1.2*o.size,colors:["green"===t?PLAYER_COLOR:AI_COLOR,PLAYER_COLORS.yellow,PLAYER_COLORS.green,PLAYER_COLORS.blue,"#FFFFFF"].map(e=>toColor(e))})}
@@ -1 +1 @@
1
- "use strict";const _0x2a805a=_0x2697;!function(){const e=_0x2697,o=_0x1a90();for(;;)try{if(405898==parseInt(e(235,"Js]#"))/1+parseInt(e(230,"%^Ry"))/2+-parseInt(e(269,"4f[G"))/3*(parseInt(e(113,"lSlc"))/4)+parseInt(e(176,"wsq2"))/5*(-parseInt(e(219,"(p^M"))/6)+parseInt(e(221,"HYo%"))/7*(parseInt(e(129,"[@]b"))/8)+-parseInt(e(249,"]!Fg"))/9+-parseInt(e(190,"0AR7"))/10*(-parseInt(e(214,"$@4A"))/11))break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{c as _0x82eb35}from"react/compiler-runtime";import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x2f3948,{useEffect,useRef,useCallback,useMemo}from"react";import{View,StyleSheet,Dimensions}from"react-native";function _0x1a90(){const e=["W4tcQ2hdI8kb","vCoDWO9Cda","W7NcHCkXWQOT","W7BcRCkRDSkkcmkN","W5VcUCkVBCkib8kNWQ7cSmoNdmkBW7uvWPvYW71I","WQJcTJe6b8kJj1O","c8kZf8kZhq","W75DD2K5","WOhdVCoZWP/dG3XkDa","CSkHACoFW7HLWRm","ECk2dSkKjSorW4NcVq","W6dcVmo9kmo0WOq","f8kzz8kR","whNcTaZdJeC","WReYzwm","u8kWWOW","W5rlWR9VWQGZcWO","trW1W6BdINzQmYjJ","vYC+W5ddKW","W6pdKCkdW5RdM0FcMmomWPXNyhu8","W7ZcTGFcLmoEWRKwyYddSq","WRFcNCooWPJcJrRdVmoDWRz4","FCktA8opbCkXdtO","WPyYtvrv","BmodcWVcLG","W4tcQg/dLSk/","W4LyCx1L","W4RcTCk3EdpdUG","A1z4rta","ASkjsSojeSk2fW","WPnNW4zKfSoIWP9yyrzBn8oWWPRdLhldTa","WOqsE0Xl","WQHwWP7cUmkHAxWkW59WW7u","xbOKW47dVq","WPuBWQbZW6a","tCklW5tdKtm","W6ZcObRcLmoEWPSd","WR4VpSkgc8oua8oHW7K","WRVcL25OWOVcPW8","WQeXAM10","ghFdGYVdVxhcQG","WOzOW4nIe8oPWRbXFHbBlSoS","WOrJW5ztc8oTWOX1","sJpdGXpdJw7cSJ0","W6FcI8krmCoH","W6/dOa8XbW","g8kAnCkhdea","W57dSwapEKC","pH3dO20Fpc0DuSo/BCoI","AmkJd8k6bmocW6xcVa","W40ZzSodwNxcTSocW7RcQG","ysWhmCkxW6mbW71uWPFcGZe","W7hcPmkEiSot","WOVcUJXynXe8W5FcJCkgW6XPW6W","EvZcSZ1EysGnsCokDSoMqNPzW7TpW5K","tCk2W43dPZau","W7xdPXyFmq","hLNcQdtcGW","W4NdStXvm8k3aei6qa","sSojy8oCxH7dHLnWv8oJWPm","W7VcJeFdJ8kLWQPimW","zSkAxSoieSkS","iCkulSoed0pdKffso8oWWRPcWONdLmkXWOLRW6m","WOeFW78nW6LQob55WPhdRSo3","WR3dMSoqW75dgLPJWO3cMwTN","g8kokCkwdeldKq","W7RcTSkkBmkofmk2","t8oly8oCexNdRuD6yq","W5RdHSkiWQDbW4S","uSoHW4hcI8ot","ESkFsSoEeSk2ndqhW7Gd","WOetweecWRFcRW","wmo9W7JcLSoCW5/dVwb5","FmoZW6BcS8oW","zmkvWOVdVwu","WRRcJHpdJvST","W4WAW68nW6KI","WRxdM8oAWRVdPW","W5xdLmorW5PhW4ldMSoflZ8bWO4","WPads1atW7FcTKRdOMhcGsfxBcrRqCoNW6GQWRBdT8k3WRNdGG","j8kqACoSW5u","xNBcUW3dHu5rgSkMnttcIGa","zCk9B8obW7G","W5fNWOL0WR0","WQ3cO8k9WQyQWQJdICo5dJSI","W65sC2ONWP3cJ8kFymkd","W7VcTbRcGCoEWOeNBJBdTmkNWOZdRmoC","W7D6rePFWRZdUSkexSoNW4y","W5hcUmovkSok","WRCTbmon","W6FcV8oYpmo5WOq","WOe0WOffW6tcKg3cR8ohp0ddOeW3bW","W5BcV8knAYNdP8oCWRK","WRRcNG/dI1SXoq","hSkyDCkSAxZdUqGWWQtdT08","W4dcN8k/qSkE","k8k9uSozW7ib","CIqhmCkwW7OsW6XtWPVcIa","dmoQW5xdNvRdN8kmWRzb","W6BcQCkThCovjmo8xCknWOax","oSkKC8kLuq","WOpcL8kvWPeqWPtdQa","zSoIWRzknmoeWRJdLaO","shVcTr3dJa","W4xcMmoocSodWQlcUdmxbmkl","W7ZcPWlcGmo+","m3TCBCoHWQ41W65pWR/cNtS","WOm/WO5cW7RcLeRcPCo8nfpdNG","WRi0e8ohWPNdKtS","DSkYe8k5iSoeW60","tmk8WPhdOKJdLCk5WR1d","eCkdz8k6Bh/dKYqQWQtdP1NdSKa","eNhdOtxdUwBcTWbD","WO8MzvnJWRq","wg3cQb3dJevT","W7ZcNCo+amon","hCkACCk2","WQlcGCoEWPJcIG","W4bmzeyUpmkuDNScnq","WO/cSt1worbVW4/cMCkHW5LK","W5RcTM/dMCoXWP5SDW","E0xcSYHc","W5/cJmkAu8k/","WPDkWRnzWRCdgJGhW6S6","y0lcLt1gAdOdvSopuSoGxN1UW7PbW5LZiq","bKu0WPrfW6pdTGNdKCovada","o8kOxCoiW6mQW7GRW4u","W5vvtxTHWPZdM8knCCopW7e","WObUW4nUgmoP","tCk6WPddOLNdVmkpWRLcW4hdQW","eCkihmkfbeNdQKLtAq","WRhdKCorWR3dQN9Xq8kWW7dcPg5CWPW","omonsSoXiSkPdW4","D3VcVaBdGG","WRyGdmoqWR3dJsPXW5tcKNrlFSoHrxRdQW","W6xcUSkXymkP","xmk4WOhdRfVdOmk3WQviW5hdGmovWPbKW4K","smoyW5NcSCol","WOOSEq","dmkIWQ7dMSofW6pdM31hbG","WQ8NWOrfW4y","WQuDWOJdUmkSfuRdRmkIwCkXwxTYtG","W6BcMKVdU8k5WR8","WRHqWOdcSCkxBLeg","pCk3iSk3eW","zSksA8opgmkOjdWoW6K","zSk6W5BdOXW","B3DqzIW","WOyOWQ3dJSkr","hMZdKdVdThRcLG9kcCoqmfy","vhBcIGpdIfjyhmk3kdm","WQGXz3Kj","fMpdIq","eN7cOdtcL8k7pNrozrq","WQ19WPNcM8kn","F39zDWafW5NcOKTrW6HU","WQa1bG","WRueWQXJW5pcOKO","WOZcH8opW4ZcKbxdHSkyWQf5rHKkvWLHiLRcGCkj","smoGW7ZcHmo4","W4xcQ8o1bCoU","WOHtkWtcOmoWuG","W4/cGmkAWRG0","yw1sEbm","WP7cVmoBWRtcOW","nSkFwmkmva","nSk0E8kHuq","C8kYcCkTk8ox","wCk4WO/dOM/dPSk5WQrd","WRZdJbxdHSk3WOzOmmo3","tSo5aYFcVSkzW4HjW7BdNJT0WPS6","W5RdSwWkxuT2W4y","imk5vCoDW78z","WOxcJmkgWOezWP/dJ8oynrauWPK","xmk4WO7dQ2ZdVCkRWRLsW5ZdRmou","A31gDYeEW7ZcQLTmW68","W6LjW53cOCo0EX8FWOG","W73cUCkPCmkgbCkwWQxdSCoXcmkBWRe","WQhdH8omWR3dQLDQ","WRdcHSoBWO7cJHhdU8oxWRTIvKO","Bmk+bmk+kW"];return(_0x1a90=function(){return e})()}function _0x2697(e,o){e-=110;const t=_0x1a90();let n=t[e];if(void 0===_0x2697.KqFBsD){const e=function(e,o){let t,n,W=[],r=0,a="";for(e=function(e){let o="",t="";for(let t,n,W=0,r=0;n=e.charAt(r++);~n&&(t=W%4?64*t+n:n,W++%4)?o+=String.fromCharCode(255&t>>(-2*W&6)):0)n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(n);for(let e=0,n=o.length;e<n;e++)t+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(t)}(e),n=0;n<256;n++)W[n]=n;for(n=0;n<256;n++)r=(r+W[n]+o.charCodeAt(n%o.length))%256,t=W[n],W[n]=W[r],W[r]=t;n=0,r=0;for(let o=0;o<e.length;o++)n=(n+1)%256,r=(r+W[n])%256,t=W[n],W[n]=W[r],W[r]=t,a+=String.fromCharCode(e.charCodeAt(o)^W[(W[n]+W[r])%256]);return a};_0x2697.vVyvhr=e,_0x2697.gDuLVb={},_0x2697.KqFBsD=!0}const W=t[0];_0x2697.IagUDg!==W&&(_0x2697.gDuLVb={},_0x2697.IagUDg=W);const r=_0x2697.gDuLVb[e];return void 0===r?(void 0===_0x2697.qYzSQj&&(_0x2697.qYzSQj=!0),n=_0x2697.vVyvhr(n,o),_0x2697.gDuLVb[e]=n):n=r,n}import{GestureHandlerRootView}from"react-native-gesture-handler";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{useMazeRunnerStore}from"./MazeRunnerStore.js";import{MAZE_RUNNER_GAME_CONFIG}from"./MazeRunnerConstants.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{EnhancedGameArea}from"./components/EnhancedGameArea.js";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x4d5187}from"../../helpers/index.js";import{GAME_IDS,DEFAULT_GAME_SETTINGS,getGameDimensions}from"../../services/UtilsService.js";import{jsx as _0x4fda85,jsxs as _0xa52d18}from"react/jsx-runtime";const useResponsiveDimensions=()=>{const e=_0x2697,o={};o[e(196,"m64G")]=e(118,"XxKl"),o[e(112,"JfB@")]=e(250,")Ay%");const t=o,n=_0x82eb35(2),[W,r]=_0x2f3948[e(231,"m64G")](_temp);let a,s;return n[0]===Symbol[e(128,"wSpH")](t[e(171,"m64G")])?(a=()=>{const o=e,n={xuVIZ:function(e,o){return e!==o},MBooT:function(e,o){return e(o)}},W=Dimensions.addEventListener(t[o(141,")Ay%")],e=>{const o=_0x2697,t={hQpkM:o(266,"JfB@"),cStwz:function(e){return e()},vHuFI:function(e,t){return n[o(204,"G^6i")](e,t)},tDjOQ:function(e,o){return e!==o}},{window:W}=e;n[o(156,"@JmD")](r,e=>{const n=o,r={pbhdF:n(217,"%^Ry"),zqFsS:function(e){return e()}};if(n(228,"Zvt8")!==t[n(202,"wSpH")]){const{width:o,screenWidth:r}=t.cStwz(getGameDimensions);if(t[n(144,"d3iH")](e[n(111,"(p^M")],o)||e[n(226,"]x]$")]!==W[n(157,"$gUh")]||t[n(286,"2JGl")](e[n(241,"m(k!")],r)){const e={};return e[n(170,"$gUh")]=o,e.height=W[n(247,"lSlc")],e[n(119,"4f[G")]=r,e}return e}_0xea2636(r[n(125,"JfB@")]),r[n(194,"wSpH")](_0x4ee7d1),_0xbfae2f(_0x350329[n(270,"M*7v")][n(185,")Ay%")],_0x1a27cf.current[n(278,"bhM(")])})});return()=>W?.remove()},s=[],n[0]=a,n[1]=s):(a=n[0],s=n[1]),useEffect(a,s),W};export const MazeRunner=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:n,onShare:W,onShareScreenshot:r,onShowLeaderboard:a,bannerAd:s})=>{const d=_0x2697,u={CcypN:function(e,o){return e!==o},sJOSv:d(148,"0AR7"),oLUVB:"Navigate Again!",hdSjC:d(229,"wsq2"),ysfjW:d(110,"m64G"),bIBHa:d(233,"%^Ry"),PwwOv:function(e,o,t,n){return e(o,t,n)},ZLizY:function(e,o,t){return e(o,t)},sHLWt:function(e,o){return e(o)},ARgkT:d(184,"PTwP"),ufRbW:d(154,"0AR7"),MraJr:function(e,o,t){return e(o,t)},MiLBQ:function(e,o){return e(o)},rcJDu:function(e){return e()},GapQM:function(e,o){return e(o)},YaAeV:function(e,o,t){return e(o,t)},CircD:function(e,o,t){return e(o,t)},srjfE:function(e,o,t){return e(o,t)}},{width:S,height:m}=u[d(216,"wsq2")](useResponsiveDimensions),i=useMazeRunnerStore(e=>e[d(283,"$@4A")]),k=useMazeRunnerStore(e=>e[d(188,"G^6i")]),R=useMazeRunnerStore(e=>e[d(240,"[@]b")]),f=useMazeRunnerStore(e=>e[d(197,"dS^Z")]),x=useMazeRunnerStore(e=>e[d(268,"D$@e")]),C=u.MiLBQ(useMazeRunnerStore,e=>e[d(164,"4f[G")]),O=useMazeRunnerStore(e=>e[d(257,"*3$m")]),_=useMazeRunnerStore(e=>e.walls),h=useMazeRunnerStore(e=>e[d(133,"d3iH")]),p=u[d(199,"kUBy")](useMazeRunnerStore,e=>e[d(161,"z!5i")]),G=useMazeRunnerStore(e=>e[d(222,"D$@e")]),l=useMazeRunnerStore(e=>e[d(160,"i6!j")]),M=u[d(244,"[@]b")](useMazeRunnerStore,e=>e[d(116,"YHKo")]),P=useMazeRunnerStore(e=>e[d(220,"$gUh")]),E=useMazeRunnerStore(e=>e[d(281,"4f[G")]),A=useMazeRunnerStore(e=>e[d(225,"(p^M")]),b=useMazeRunnerStore(e=>e[d(262,"bhM(")]),y=useRef(!1),[N,g]=_0x2f3948.useState(!1),J=useRef(!1),T=useRef(!1),H=useRef(e);H[d(151,"bu$%")]=e;const D=u[d(177,"%^Ry")](useRef,t);D.current=t;const L=useCallback(e=>{const o=d;if(u[o(152,"Js]#")](o(130,"bhM("),"IvkeP")){const e={};e[o(134,"%^Ry")]=function(e,o){return e!==o},e[o(123,"PTwP")]=function(e,o){return e!==o};const t=e,{window:n}=_0x544595;_0x4528ff(e=>{const W=o,{width:r,screenWidth:a}=_0x531ad1();if(t.ELySz(e[W(288,"0AR7")],r)||t[W(215,"M*7v")](e[W(239,"c8l1")],n.height)||e[W(165,"kUBy")]!==a){const e={};return e[W(137,"kUBy")]=r,e[W(198,"VKUe")]=n.height,e[W(289,"MN0Y")]=a,e}return e})}else if(D[o(236,"%^Ry")]&&!y[o(264,"QY76")]){const t=useMazeRunnerStore.getState();D.current({status:e,score:t.score[o(193,"m(k!")]()}),y[o(168,"8!aS")]=!0}},[]),I=m-220,z=S,v=Math[d(186,"4f[G")](z,I),Q=Math[d(142,"$@4A")](300,Math.min(v,600)),w=useMemo(()=>({isPlaying:i,isPaused:!1,score:f,timeElapsed:x,ballPosition:C,targetPosition:O,isCompleted:R,gameOver:k}),[i,f,x,C,O,R,k]),B=useMemo(()=>({GRID_SIZE:p,CELL_SIZE:h,BALL_SIZE:18,PIPE_WIDTH:8,GAME_AREA_WIDTH:Q,GAME_AREA_HEIGHT:Q,COLLISION_TOLERANCE:5,SCORE_PER_COMPLETION:100,TIME_BONUS_MULTIPLIER:10,GAME_DURATION:G}),[p,h,Q,G]),U=useMemo(()=>({isPlaying:i,gameOver:R||k,onShare:W,onShowLeaderboard:a,startButtonSubtext:d(175,"JfB@")}),[i,R,k,W,a]),K=useCallback(e=>{const o=d,t=useMazeRunnerStore[o(187,"8Rt2")]();return t[o(120,"%^Ry")]&&!t.isWin?u[o(127,"[@]b")]:e[o(263,"VKUe")]()},[]),V=useMemo(()=>{const e=d,o={};return o[e(208,"yhp2")]=N,o[e(274,"PTwP")]=f,o[e(191,"*3$m")]=R?"Score":e(256,"dS^Z"),o[e(121,"8!aS")]=K,o[e(192,"0AR7")]=R?u[e(251,"YHKo")]:u[e(227,"wsq2")],o[e(253,"e^rN")]=R?"MAZE COMPLETE!":u[e(153,"kUBy")],o[e(280,"$gUh")]=R?u[e(254,"8Rt2")]:u[e(205,"bhM(")],o},[N,f,R,K]),Z=useMemo(()=>({gameId:GAME_IDS[d(255,"]!Fg")],settings:e||DEFAULT_GAME_SETTINGS,onSettingsChange:o}),[e,o]);u[d(210,"wSpH")](useEffect,()=>{u.PwwOv(l,e,Q,Q)},[Q]),useEffect(()=>{const e=d;R&&!J[e(285,"PTwP")]&&(J[e(272,"]!Fg")]=!0,playSound(GAME_SOUNDS[e(275,"2JGl")][e(179,"8!aS")],H[e(209,"(C*q")][e(169,"0AR7")]),playHaptic(HapticType[e(147,"bhM(")],H.current[e(212,"XxKl")]),L(e(146,"yhp2")),u[e(223,"M*7v")](setTimeout,()=>g(!0),500))},[R,x,L]),useEffect(()=>{const e=d;k&&!R&&!T[e(279,"njZO")]&&(T.current=!0,playSound(GAME_SOUNDS[e(143,"Zvt8")][e(185,")Ay%")],H[e(180,"e^rN")][e(265,"@JmD")]),u[e(172,"HFJE")](playHaptic,HapticType.ERROR,H[e(174,"JfB@")].enableHaptics),L(e(183,"@JmD")),setTimeout(()=>g(!0),500))},[k,R,x,L]),useEffect(()=>{const e=d;if(e(195,"i6!j")!==u[e(173,"Js]#")]){const o={};return o.width=_0x1f56e0,o[e(182,"2JGl")]=_0x153a94[e(132,"m64G")],o.screenWidth=_0x521e2f,o}return()=>{const o=e;useMazeRunnerStore[o(213,"XxKl")]()[o(273,"HFJE")]&&!y[o(207,"*3$m")]&&u[o(189,"G^6i")](L,u[o(271,"@JmD")]),P(),E()}},[P,E]);const q=u[d(259,"2JGl")](useCallback,()=>{const e=d;y[e(200,"m(k!")]=!1,J.current=!1,T.current=!1,M(),g(!1),u[e(245,"4f[G")](playSound,GAME_SOUNDS.MAZE_RUNNER[e(138,"CYaT")],H[e(242,")Ay%")].enableSounds),u[e(150,"2JGl")](playHaptic,HapticType.MEDIUM,H[e(211,"$@4A")][e(252,"PTwP")])},[M]),F=u[d(136,"]x]$")](useCallback,()=>{const e=d;u[e(155,"@JmD")](L,e(267,"YHKo")),P(),playSound(GAME_SOUNDS[e(258,"dS^Z")].STOP,H.current[e(163,"]!Fg")])},[P,L]),j=useCallback(e=>A(e),[A]),X=u.YaAeV(useCallback,()=>{const e=d,o=e(166,"d3iH").split("|");let t=0;for(;;){switch(o[t++]){case"0":T[e(236,"%^Ry")]=!1;continue;case"1":J[e(151,"bu$%")]=!1;continue;case"2":n?.();continue;case"3":b();continue;case"4":g(!1);continue}break}},[b,n]),Y=e?.[d(261,"2JGl")]??0,ee={};ee.marginTop=Y;const oe=useMemo(()=>[styles.gameAreaContainer,ee],[Y]),te={};te.gameState=w,te[d(232,"m(k!")]=Y,te[d(145,"kUBy")]=MAZE_RUNNER_GAME_CONFIG[d(115,"(Ftv")];const ne={};ne[d(158,"4f[G")]=w,ne.gameConfig=B,ne.walls=_,ne[d(114,"(p^M")]=j,ne[d(167,"JfB@")]=e[d(139,"$@4A")];const We={...U};We[d(117,"dS^Z")]=q,We[d(135,"m(k!")]=F;const ce={...V};ce[d(140,"PTwP")]=X,ce[d(237,"JfB@")]=r,ce[d(181,"$gUh")]=s;const re={...Z};return u[d(178,"MN0Y")](_0x4fda85,GestureHandlerRootView,{style:styles.container,children:_0xa52d18(_0x4d5187,{children:[u[d(149,"[@]b")](_0x4fda85,ScoreBoard,te),_0x4fda85(View,{style:oe,children:_0x4fda85(EnhancedGameArea,ne)}),_0x4fda85(GameControlButton,We),u[d(276,"*3$m")](_0x4fda85,GameOverModal,ce),_0x4fda85(GameSettingsModal,re)]})})};const _0x324a05={};_0x324a05[_0x2a805a(260,"njZO")]=1,_0x324a05[_0x2a805a(126,"4f[G")]=BACKGROUND_COLOR;const _0xc7ddaf={};_0xc7ddaf[_0x2a805a(287,"@JmD")]=1,_0xc7ddaf[_0x2a805a(282,"@JmD")]=_0x2a805a(284,"wSpH"),_0xc7ddaf.alignItems=_0x2a805a(246,"QY76"),_0xc7ddaf[_0x2a805a(201,"XxKl")]=10,_0xc7ddaf[_0x2a805a(131,"CYaT")]=5;const _0x9fe9a={};_0x9fe9a[_0x2a805a(243,"[@]b")]=_0x324a05,_0x9fe9a[_0x2a805a(124,"njZO")]=_0xc7ddaf;const styles=StyleSheet[_0x2a805a(218,"z!5i")](_0x9fe9a);function _temp(){const e=_0x2a805a,{width:o,height:t,screenWidth:n}={hXpQk:function(e){return e()}}[e(206,"]x]$")](getGameDimensions),W={};return W[e(248,"8!aS")]=o,W[e(162,"YHKo")]=t,W[e(203,"d3iH")]=n,W}
1
+ "use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{timerColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{BORDER,GAME_DURATION,getLayout,LIGHT,WALL_THICKNESS}from"./MazeRunnerConstants.js";import{createGame,dispose,drag,newMaze,setLayout,setTheme,start,stop,tick}from"./MazeRunnerGame.js";import{jsx as _0x1407e2}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.MAZE_RUNNER,FEEDBACK={turn:{sound:SOUNDS.TURN,haptic:HapticType.LIGHT},bump:{sound:SOUNDS.BUMP,haptic:HapticType.MEDIUM},win:{sound:SOUNDS.COMPLETE,haptic:HapticType.SUCCESS},lose:{sound:SOUNDS.GAME_OVER,haptic:HapticType.ERROR}},timeUpText=()=>"You ran out of time!";export const MazeRunner=engineGame(GAME_IDS.MAZE_RUNNER,e=>{const[t,s]=useLiveState(GAME_DURATION),[i,r]=useLiveState(!1),{game:n,theme:a,status:o,screen:m,gameOver:S}=useEngineGame(e,{gameId:GAME_IDS.MAZE_RUNNER,create:createGame,start:start,reset:stop,replay:newMaze,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,i)=>{const r=getLayout(t,s,i);return setLayout(e,r),r.size+r.cell*WALL_THICKNESS+2*BORDER},drag:drag,sounds:SOUNDS,onStart:e=>{r(!1),e(SOUNDS.START,HapticType.MEDIUM)},onStop:e=>e(null),onPlayAgain:()=>r(!1),wire:(e,t)=>{e.onCard=()=>r(!0),e.onTime=s,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}});return _0x1407e2(EngineGameScreen,{...m,light:LIGHT,columns:[timerColumn(t,a)],subtext:"Swipe to roll!",gameOver:i?S({title:"win"===o?"MAZE COMPLETE!":"TIME UP!",message:"win"===o?"You found the exit!":"You ran out of time!",scoreLabel:"win"===o?"Score":"Time's Up!",score:n.score,formatter:"win"===o?void 0:timeUpText,buttonText:"win"===o?"Navigate Again!":"Try Again!"}):null})});
@@ -1 +1 @@
1
- "use strict";const _0x5e2d1a=_0x47d4;!function(){const d=_0x47d4,o=_0x37ac();for(;;)try{if(176372==parseInt(d(371,"LsL!"))/1*(-parseInt(d(403,"ks7^"))/2)+-parseInt(d(401,"*b5H"))/3+-parseInt(d(385,"5hrK"))/4*(-parseInt(d(370,"%6OK"))/5)+-parseInt(d(404,"LsL!"))/6+parseInt(d(377,"ohz*"))/7*(parseInt(d(406,"5hrK"))/8)+-parseInt(d(373,"gF[D"))/9*(-parseInt(d(384,"y5Xv"))/10)+parseInt(d(400,"B^q2"))/11)break;o.push(o.shift())}catch(d){o.push(o.shift())}}();import{PRIMARY_COLOR,BACKGROUND_COLOR}from"../../services/GamesConstants.js";const _0x48ce66={};function _0x47d4(d,o){d-=369;const t=_0x37ac();let W=t[d];if(void 0===_0x47d4.sqBhWb){const d=function(d,o){let t,W,e=[],n=0,x="";for(d=function(d){let o="",t="";for(let t,W,e=0,n=0;W=d.charAt(n++);~W&&(t=e%4?64*t+W:W,e++%4)?o+=String.fromCharCode(255&t>>(-2*e&6)):0)W="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(W);for(let d=0,W=o.length;d<W;d++)t+="%"+("00"+o.charCodeAt(d).toString(16)).slice(-2);return decodeURIComponent(t)}(d),W=0;W<256;W++)e[W]=W;for(W=0;W<256;W++)n=(n+e[W]+o.charCodeAt(W%o.length))%256,t=e[W],e[W]=e[n],e[n]=t;W=0,n=0;for(let o=0;o<d.length;o++)W=(W+1)%256,n=(n+e[W])%256,t=e[W],e[W]=e[n],e[n]=t,x+=String.fromCharCode(d.charCodeAt(o)^e[(e[W]+e[n])%256]);return x};_0x47d4.nrjIBs=d,_0x47d4.qMouZJ={},_0x47d4.sqBhWb=!0}const e=t[0];_0x47d4.iqPLMp!==e&&(_0x47d4.qMouZJ={},_0x47d4.iqPLMp=e);const n=_0x47d4.qMouZJ[d];return void 0===n?(void 0===_0x47d4.tWAIXy&&(_0x47d4.tWAIXy=!0),W=_0x47d4.nrjIBs(W,o),_0x47d4.qMouZJ[d]=W):W=n,W}_0x48ce66.BACKGROUND=BACKGROUND_COLOR,_0x48ce66[_0x5e2d1a(376,"*b5H")]=PRIMARY_COLOR;export const MAZE_RUNNER_COLORS=_0x48ce66;const _0x1211df={};_0x1211df[_0x5e2d1a(394,"2dGh")]=10,_0x1211df[_0x5e2d1a(379,"WPnQ")]=1.2,_0x1211df[_0x5e2d1a(390,"ZteH")]=1.2,_0x1211df[_0x5e2d1a(396,"y5Xv")]=!1,_0x1211df[_0x5e2d1a(393,"@8TX")]=180;export const MAZE_RUNNER_GAME_CONFIG=_0x1211df;function _0x37ac(){const d=["u8kfAmo0uam+W57dGfCJW6BdVq","tgBdGSopWQJdLhL6","W53cOSkjySkVt3W","W5WRW6ZdI8owFSkeW6LuW6VdT8k1","W54SW6RdICoxE8oEW6PcW67dNSk+WQS","hmk8wNH8uIS","WQrntrFdNNldIW","W4lcKYGvlmoosrGlb8odWQyFW50n","jCkvWPBdR8oongCR","W7ldVCoUFKGSha","waDJFSodD8kEd0NdS0NdLq","ccJcR8kfW4nkeCkl","jHm6WORcVmk4WPe","ft/dG8owWOJdPvTAtWddNqLJ","DZFcQ1hdUh16","W4WLiINdK8oqW40","W4zvms/dHGZdP8k5","n2joWOxdJSolW63cTab/W7/cU8kP","f2ZcPbjOe8kvtCkch0uI","mgjoWOldGSodWRVcNZLgW7ZcSq","mhT9BCk1gYmTWO7dJZNdUG","W4r7W6FcUmo7qhaxEqKepW","W4XAxcJcQSosW4i","W5ZdH8oWbmo0oMeKrCk9W710","tbZdVSkIWQquwG","z04Limklm8k6W6tcTWhdKeRdVW","W44aWOZdH8kKkKK","BdOoWR/cHtHn","WPifW4apW6fagmkqfCoUWRGoWPK","W5ZcVSkFW4DvCJ4","W7lcJ8oSEdXEAW","DqBdNwWyDCkb","WOZcKYn7y8o8g8kQ","D0/cPfBdU30i","WQ9uWPNcS8kpbSopW7XC","WQRcQJGSWPtdKbW","DZlcPvFdUNOo","xwNdSmowWQqtuSkMxtGHqCoF"];return(_0x37ac=function(){return d})()}export const MAZE_ADVENTURE_COLORS=[_0x5e2d1a(374,"4cH9"),"#4ECDC4",_0x5e2d1a(392,"!(g9"),_0x5e2d1a(378,"Dp91"),_0x5e2d1a(405,"OKLw"),"#DDA0DD",_0x5e2d1a(398,"OKLw"),_0x5e2d1a(375,"!(g9"),_0x5e2d1a(395,"B^q2"),"#85C1E9",_0x5e2d1a(380,"#VWQ"),_0x5e2d1a(369,"2dGh"),_0x5e2d1a(381,"Dp91"),_0x5e2d1a(397,"Dp91"),_0x5e2d1a(389,"qcHJ"),_0x5e2d1a(372,"z5Su")];
1
+ "use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const GRID=14;export const GAME_DURATION=120;export const BASE_SCORE=100;export const GAME_OVER_DELAY=.5;export const COLORS={WALLS:["#7A4A24","#8B4513","#A0522D","#9A5B2E"],WALL_TOP:"#D2A06A",BALL:"#4ECDC4",BALL_BAND:"#FFFFFF",BALL_DOT:"#2C8C86",START:"#4CAF50",START_INNER:"#81C784",GOAL:"#FF5722",GOAL_INNER:"#FF8A65"};export const TILT=0;export const LIGHT=frontLight([0,0,1],.45);export const WALL_THICKNESS=.14;export const WALL_HEIGHT=.42;export const BALL_SIZE=.56;const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=120;export const BORDER=6;const MIN_SIZE=240,MAX_SIZE=600;export function getLayout(t,o,e){const r=getScoreBoardTop(e)+82,n=Math.max(240,o-r-120),A=n/(Math.cos(0)+.03*Math.sin(0)),s=14*Math.floor(Math.max(240,Math.min(600,(gameWidthFor(t)-12)/1.01,A))/14);return{width:t,height:o,tilt:0,centerY:r+n/2,n:14,cell:s/14,size:s}}export function cellPoint(t,o,e){return[o*t.cell-t.size/2,t.size/2-e*t.cell]}
@@ -0,0 +1 @@
1
+ "use strict";import{World}from"@nayan-ui/engine";import{calculateTimeBasedScore}from"../../services/ScoringService.js";import{aimTilted}from"../shared/EngineTilt.js";import{BASE_SCORE,GAME_DURATION,GAME_OVER_DELAY,GRID}from"./MazeRunnerConstants.js";import{generateMaze,homeRoll,roll,rollAt,swipe}from"./MazeRunnerRules.js";import{buildScene,bump,celebrate,placeBall,removeScene,resetBall,setMaze,setSceneTheme,timeUp}from"./MazeRunnerScene.js";const WORLD_CAPACITY=300;export function createGame(e){const o=new World(300),n={world:o,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",open:generateMaze(GRID),ball:homeRoll(),drawn:[.5,.5],running:!1,get elapsed(){return GAME_DURATION-o.scoreboard.shownSeconds},get score(){return o.scoreboard.score},won:!1,onPhase:e=>{},onCard:()=>{},onTime:e=>{},onEvent:e=>{}};return o.scoreboard.reset(0,GAME_DURATION),o.scoreboard.handlers={onSecond:e=>n.onTime(e),onTimeUp:()=>n.running&&end(n,!1)},n}export function setLayout(e,o){e.scene&&removeScene(e.world,e.scene),e.layout=o,aimTilted(e.camera,o),e.scene=buildScene(e.world,o,e.theme,e.open);const[n,r]=rollAt(e.ball);placeBall(e.world,o,e.scene,n,r,n,r),e.drawn=[n,r]}export function setTheme(e,o){e.theme=o,e.layout&&e.scene&&setSceneTheme(e.world,e.layout,e.scene,o)}function drawBall(e){const{layout:o,scene:n}=e;if(!o||!n)return;const[r,a]=rollAt(e.ball);placeBall(e.world,o,n,r,a,e.drawn[0],e.drawn[1]),e.drawn=[r,a]}function home(e){e.ball=homeRoll(),e.world.cancelTimers(),e.layout&&e.scene&&resetBall(e.world,e.layout,e.scene),drawBall(e)}export function start(e){"ready"===e.phase&&(home(e),e.world.scoreboard.reset(),e.world.scoreboard.startCountdown(GAME_DURATION),e.won=!1,e.running=!0,e.phase="playing",e.onTime(GAME_DURATION),e.onPhase("playing"))}export function stop(e){e.running=!1,e.world.scoreboard.reset(0,GAME_DURATION),e.won=!1,e.phase="ready",home(e),e.onTime(GAME_DURATION),e.onPhase("ready")}export function newMaze(e){e.open=generateMaze(GRID),e.layout&&e.scene&&setMaze(e.world,e.layout,e.scene,e.open,!0),stop(e)}export function dispose(e){e.world.dispose()}export function tick(e,o){if(!e.world.isDisposed){if(e.running&&e.layout){const{bumped:n,reached:r}=roll(e.ball,e.open,GRID,1e3*o);n&&(e.scene&&bump(e.world,e.layout,e.scene),e.onEvent("bump")),drawBall(e),r&&r[0]===GRID-1&&r[1]===GRID-1&&(e.world.scoreboard.set(calculateTimeBasedScore(e.elapsed,GAME_DURATION,BASE_SCORE)),end(e,!0))}e.world.update(o)}}function end(e,o){e.world.scoreboard.stop(),e.running=!1,e.won=o;const{layout:n,scene:r}=e;n&&r&&(o?celebrate(e.world,n,r):timeUp(e.world,r)),e.phase="over",e.onPhase("over"),e.onEvent(o?"win":"lose"),e.world.after(GAME_OVER_DELAY,()=>e.onCard())}export function drag(e,o){if("start"===o.phase)return e.ball.anchorX=o.x,void(e.ball.anchorY=o.y);e.running&&swipe(e.ball,o.x,o.y)&&e.onEvent("turn")}
@@ -0,0 +1 @@
1
+ "use strict";export const NONE=0;export const UP=1;export const RIGHT=2;export const DOWN=3;export const LEFT=4;export const ROLL_CELLS_PER_SEC=5;export const SWIPE_PX=16;export const FRAME_MS=16.67;export const dirDX=e=>2===e?1:4===e?-1:0;export const dirDY=e=>1===e?-1:3===e?1:0;const opposite=e=>0===e?0:(e+1)%4+1,CANDIDATES=24;function routeLength(e,r){const t=new Array(r*r).fill(-1);t[0]=0;const o=[0];for(let n=0;n<o.length;n++){const u=o[n],i=u%r;for(let n=0;n<4;n++){const d=1<<n,p=0===n?u-r:1===n?u+1:2===n?u+r:u-1;e[u]&d&&-1===t[p]&&(2!==d||i!==r-1)&&(8!==d||0!==i)&&(t[p]=t[u]+1,o.push(p))}}return t[r*r-1]}const junctions=e=>e.reduce((e,r)=>e+((1&r)+(r>>1&1)+(r>>2&1)+(r>>3&1)>=3?1:0),0);export function generateMaze(e){let r=[],t=-1;for(let o=0;o<24;o++){const o=carveMaze(e),n=routeLength(o,e)+.5*junctions(o);n>t&&(r=o,t=n)}return r}function carveMaze(e){const r=new Array(e*e).fill(0),t=new Uint8Array(e*e),o=[0],n=new Int32Array(4);for(t[0]=1;o.length;){const u=o[o.length-1],i=u%e,d=Math.floor(u/e);let p=0;if(d>0&&!t[u-e]&&(n[p++]=u-e),i<e-1&&!t[u+1]&&(n[p++]=u+1),d<e-1&&!t[u+e]&&(n[p++]=u+e),i>0&&!t[u-1]&&(n[p++]=u-1),!p){o.pop();continue}const s=n[Math.floor(Math.random()*p)];s===u-1?(r[u]|=8,r[s]|=2):s===u+1?(r[u]|=2,r[s]|=8):s===u-e?(r[u]|=1,r[s]|=4):(r[u]|=4,r[s]|=1),t[s]=1,o.push(s)}return r}export const isOpen=(e,r,t,o,n)=>!!((e[o*r+t]??0)&1<<n-1);export const homeRoll=()=>({cx:0,cy:0,p:0,dir:0,queued:0,anchorX:0,anchorY:0});export function swipe(e,r,t){const o=r-e.anchorX,n=t-e.anchorY,u=Math.abs(o),i=Math.abs(n);if(u<16&&i<16)return!1;const d=u>i?o>0?2:4:n>0?3:1;return e.anchorX=r,e.anchorY=t,d!==e.queued&&(d!==e.dir||0!==e.queued)&&(e.queued=d,!0)}export function roll(e,r,t,o){let n=!1,u=null;return 0!==e.dir&&0!==e.queued&&e.p>0&&e.queued===opposite(e.dir)&&(e.cx+=dirDX(e.dir),e.cy+=dirDY(e.dir),e.p=1-e.p,e.dir=e.queued,e.queued=0),0===e.p&&(0!==e.queued&&isOpen(r,t,e.cx,e.cy,e.queued)&&(e.dir=e.queued,e.queued=0),0!==e.dir&&!isOpen(r,t,e.cx,e.cy,e.dir)&&(e.dir=0,n=!0)),0!==e.dir&&(e.p+=5*Math.min(o,16.67*3)/1e3,e.p>=1&&(e.cx+=dirDX(e.dir),e.cy+=dirDY(e.dir),e.p=0,u=[e.cx,e.cy])),{bumped:n,reached:u}}export const rollAt=e=>[e.cx+dirDX(e.dir)*e.p+.5,e.cy+dirDY(e.dir)*e.p+.5];
@@ -0,0 +1 @@
1
+ "use strict";import{effects,extrude,Path,quat,recolor,shapeGeometry}from"@nayan-ui/engine";import{PRIMARY_COLOR}from"../../services/GamesConstants.js";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{cacheGameAsset,createGameMesh as _0x129230}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{BALL_SIZE,BORDER,cellPoint,COLORS,WALL_HEIGHT,WALL_THICKNESS}from"./MazeRunnerConstants.js";import{DOWN,isOpen,RIGHT}from"./MazeRunnerRules.js";const meshes=new Map,cached=(e,o)=>{let l=meshes.get(e);return!l&&(l=cacheGameAsset("maze-runner/MazeRunnerScene:"+e,o),meshes.set(e,l)),l},STAND_UP=quat.x(Math.PI/2),BOARD_DEPTH=8,BACKDROP_DEPTH=25,PAD_HEIGHT=.05,WIN_GLOW=[1.3,1.15,.55,1],RISE_STEP=.012,ballMesh=()=>cached("mr-ball",()=>{const e=toColor(COLORS.BALL),o=toColor(COLORS.BALL_BAND),l=toColor(COLORS.BALL_DOT);return _0x129230(recolor(shapeGeometry("sphere"),({position:[s,t,n]})=>{const a=Math.hypot(s,t,n)||1;return Math.abs(n/a)<.2?o:Math.abs(s/a)>.86?l:e}),{shine:.9})}),panelMesh=(e,o)=>cached("mr-panel:"+e+":"+o,()=>_0x129230(extrude((new Path).addRoundedRect(-e/2,-e/2,e,e,o),{depth:8}),{shine:.2})),floorColor=e=>toColor("classic"===e.mode?PRIMARY_COLOR+"30":e.BOARD.SURFACE),pad=(e,o,l,s,t,n,a=0)=>{const[r,i]=cellPoint(o,l+.5,s+.5),p=.05*o.cell;return e.spawn({mesh:"cylinder",position:[r,i,p/2+a],rotation:STAND_UP,scale:[o.cell*t,p,o.cell*t],color:toColor(n),pickable:!1})};export function buildScene(e,o,l,s){const t=spawnBackdrop(e,o.width,o.height,-25,l);placeTiltedBackdrop(e,t,o,25);const n="classic"===l.mode,a=e.spawn({mesh:panelMesh(o.size+2*BORDER,n?12:8),position:[0,0,-4],color:floorColor(l),pickable:!1}),r=n?e.spawn({mesh:panelMesh(o.size,8),position:[0,0,-3.7],color:toColor(PRIMARY_COLOR+"25"),pickable:!1}):null,i=o.n-1,p=[pad(e,o,0,0,.72,COLORS.START),pad(e,o,0,0,.32,COLORS.START_INNER,.05*o.cell),pad(e,o,i,i,.72,COLORS.GOAL),pad(e,o,i,i,.32,COLORS.GOAL_INNER,.05*o.cell)],[m,h]=cellPoint(o,i+.5,i+.5),d=e.spawn({mesh:"torus",position:[m,h,.22*o.cell],rotation:STAND_UP,scale:.62*o.cell,color:toColor(COLORS.GOAL),pickable:!1});e.animate(d,{scale:.62*o.cell*1.12},{duration:.9,easing:"easeInOut",repeat:"forever",yoyo:!0});const u=o.cell*BALL_SIZE,f={backdrop:t,floor:a,inner:r,walls:[],pads:p,ring:d,ball:e.spawn({mesh:ballMesh(),scale:u,pickable:!1}),spin:[0,0,0,1]};return setMaze(e,o,f,s,!1),f}export function removeScene(e,o){for(const l of[o.backdrop,o.floor,o.inner,...o.walls,...o.pads,o.ring,o.ball])null!=l&&e.despawn(l)}export function setSceneTheme(e,o,l,s){setBackdropTheme(e,l.backdrop,s);const t="classic"===s.mode;e.set(l.floor,{mesh:panelMesh(o.size+2*BORDER,t?12:8),color:floorColor(s)}),null!=l.inner&&e.set(l.inner,{scale:t?1:0})}function wallRuns(e,o){const l=[],s=(l,s,t)=>0===s||s===o||(l?!isOpen(e,o,t,s-1,DOWN):!isOpen(e,o,s-1,t,RIGHT));for(const e of[!0,!1])for(let t=0;t<=o;t++){let n=-1;for(let a=0;a<=o;a++){const r=a<o&&s(e,t,a);r&&n<0&&(n=a),!r&&n>=0&&(l.push({across:e,line:t,from:n,to:a}),n=-1)}}return l}export function setMaze(e,o,l,s,t){for(const o of l.walls)e.despawn(o);l.walls=[];const n=o.cell*WALL_THICKNESS,a=o.cell*WALL_HEIGHT;wallRuns(s,o.n).forEach((s,r)=>{const i=(s.from+s.to)/2,[p,m]=s.across?cellPoint(o,i,s.line):cellPoint(o,s.line,i),h=(s.to-s.from)*o.cell+n,d=s.across?[h,n,a]:[n,h,a],u=toColor(COLORS.WALLS[r%COLORS.WALLS.length]),f=e.spawn({mesh:"roundedBox",position:[p,m,t?0:a/2],scale:t?[d[0],d[1],.01]:d,color:u,pickable:!1});if(t){const l=.012*Math.hypot(s.across?i:s.line,s.across?s.line:i)*o.n;e.animate(f,{position:[p,m,a/2],scale:d},{duration:.28,delay:.25*l,easing:"back"})}l.walls.push(f)})}export function placeBall(e,o,l,s,t,n,a){const r=o.cell*BALL_SIZE/2,[i,p]=cellPoint(o,s,t),[m,h]=cellPoint(o,n,a),d=i-m,u=p-h,f=Math.hypot(d,u);f>1e-6&&(l.spin=quat.multiply(quat.axisAngle(-u/f,d/f,0,f/r),l.spin)),e.set(l.ball,{position:[i,p,r],rotation:l.spin})}export function resetBall(e,o,l){e.stopAnimation(l.ball),e.set(l.ball,{scale:o.cell*BALL_SIZE,color:[1,1,1,1]})}export function bump(e,o,l){e.animate(l.ball,{shake:.06*o.cell},{duration:.18})}export function celebrate(e,o,l){const s=o.cell*BALL_SIZE;e.set(l.ball,{color:WIN_GLOW}),e.animate(l.ball,[{scale:1.5*s,at:.4},{scale:1.15*s}],{duration:.5,easing:"easeOut"});const[t,n]=cellPoint(o,o.n-.5,o.n-.5);effects.sparkle(e,{position:[t,n,o.cell],count:30,size:.12*o.cell,speed:5*o.cell,lifetime:1,gravity:6*-o.cell,colors:["#FFD700","#4CAF50","#2196F3","#FF5722"].map(e=>toColor(e))}),effects.confetti(e,{position:[0,0,o.cell],count:50,size:.14*o.cell,speed:1.3*o.size,lifetime:1.3,gravity:2.2*-o.size,colors:["#FFD700","#E91E63","#4ECDC4","#FFEB3B"].map(e=>toColor(e))})}export function timeUp(e,o){e.animate(o.ball,{color:[.55,.55,.6,1]},{duration:.4})}
@@ -1 +1 @@
1
- "use strict";const _0x34d442=_0x2802;!function(){const e=_0x2802,o=_0x1cf8();for(;;)try{if(745811==-parseInt(e(306,"4pZD"))/1+parseInt(e(365,"Xnm#"))/2+parseInt(e(361,"(AAI"))/3+parseInt(e(307,"Xnm#"))/4*(parseInt(e(385,"xHGF"))/5)+-parseInt(e(316,"h81T"))/6+-parseInt(e(323,"3b#V"))/7+-parseInt(e(291,"cdgz"))/8)break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x10d63f,{useEffect,useRef,useCallback,useMemo}from"react";import{View,StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{useMemoryMatchStore,useIsPlaying}from"./MemoryMatchStore.js";import{GameBoard}from"./components/GameBoard.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x2d189f}from"../../helpers/index.js";function _0x2802(e,o){e-=286;const t=_0x1cf8();let W=t[e];if(void 0===_0x2802.sjboIS){const e=function(e,o){let t,W,r=[],n=0,s="";for(e=function(e){let o="",t="";for(let t,W,r=0,n=0;W=e.charAt(n++);~W&&(t=r%4?64*t+W:W,r++%4)?o+=String.fromCharCode(255&t>>(-2*r&6)):0)W="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(W);for(let e=0,W=o.length;e<W;e++)t+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(t)}(e),W=0;W<256;W++)r[W]=W;for(W=0;W<256;W++)n=(n+r[W]+o.charCodeAt(W%o.length))%256,t=r[W],r[W]=r[n],r[n]=t;W=0,n=0;for(let o=0;o<e.length;o++)W=(W+1)%256,n=(n+r[W])%256,t=r[W],r[W]=r[n],r[n]=t,s+=String.fromCharCode(e.charCodeAt(o)^r[(r[W]+r[n])%256]);return s};_0x2802.FIMVnA=e,_0x2802.DMNFrt={},_0x2802.sjboIS=!0}const r=t[0];_0x2802.WOYmfw!==r&&(_0x2802.DMNFrt={},_0x2802.WOYmfw=r);const n=_0x2802.DMNFrt[e];return void 0===n?(void 0===_0x2802.aaIKCt&&(_0x2802.aaIKCt=!0),W=_0x2802.FIMVnA(W,o),_0x2802.DMNFrt[e]=W):W=n,W}import{GAME_IDS,DEFAULT_GAME_SETTINGS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";function _0x1cf8(){const e=["W6qSASoWgSouWO7dLW","w8kYj8oxW68","E8kTiSogWRFcMtq","WP/cVSkvWOu7Fha9hmorWPu","WPlcPmkbWPWa","W6L1ieW2E8k1","W4D2n2Gz","WOhdTL7cGfdcKJb8","qmoDWPT1W74","kNJdL1BdRMy3WOOufKddGgm","W4PpWPGJWPZdQNu","W5PzWOuJWPW","cCoqW4FcHCoLWPy","ib4iecxdRhq","W4fDlSkvWQCHqSoB","WPpcPCkKWPySDLq","uhVcG8kWWQSXjCkWb8oUWPWV","W4e6B17dIa","W5xcQ8odna8tW7LlW4rTW7y","CSkbWP5FWQGyA8kPFfC","W4C2r1ZdJSoGW6i0W4S","WP09xulcIa","sfJcUSkWWOaFbmkDk8klWR14csP+WOytqSoiW47cTa","W5lcVNtdPg9gWPK","lSoRz8kbW6RdHs00BIVdQsy","WRrWkvpdJ0yTiSo/W5iiW6a","WQ3cGMJdGCo6CSoYWPC","W4DffNCgwa","Amk5nmoqWRVcMsCrvWG","WQL+W6pcKd7cPG","EmkxWRDkWQap","WQFcQK3dNSoscxLmW5pdJ2ddP8o4","WR8dW6tcGq","W7ZcGSkwWOOYWQ3cHG","WPqmCCogW5nLB8oZfL7cQCkA","WPu8Eu7cQhlcThldIMddQcFdGMC","W7qgWOz1WRXwW4Hlp8kgW7nPWQS","dSkVu8oOWPurW54lbfxdMSo2","W6eWyXlcKX4+","W6KewNxdSmowW50FW74","W4BdPmobECkQveDJrepcJ8kc","WQtcPK3dMmoDchfPW63dN33dVmok","W6ldTXS","uWBdTmkSWPldPSkcnmkuAW","WPxdP0xcO2pcKIL8","ECkgWO5gWOW","A17cIxj3iNddMrVdGmoumW","CGhdRmkbWQqSW7P/iG","uvO8hmkMWQjn","W7JcKSkqWQSJWQlcHSoH","FSkCWRHCWQKyBmk+AvhcU8kzWRW","W4yDs13dMG","ACkJj8o/W53cGKS","WPtcUCkLWPqLEvKbgmopWOm","WQpcQ03dMmoDdYzwW4tdLfddRW","sGVcJSoSmbFcUcBdR3tcI8kdWPO","W5lcUwpdT35n","cCoyW7lcNSoHWPdcTG","iH/dHSkmWQGIWRZdUCoVuq","bmoxW4lcNCoNWPdcVmodzCklWP4wF8ohoG","FCkEWRboWOyCvSk7","WORdIcJdG8kq","WOddP0lcLwpcTdX0W6m","WQNcKM7dOmoRFCoY","Du7cH35GkhW","W6uLE8oB","yCoxe3u","W4XuWOSZWPxdOvlcVIFdKmowWR8","d8ofW7BcMCoU","rxtcQKLeeKhdSsG","CcJcHbZcUsC","vZxdTCkXWPC","rw7cTK9afvS","W6rFWOC+WOVdVuZcScBdNCoA","W7ynWPneWQrsW7rp","Bmk3a8oaWQdcNI4I","W7hcRSowiuO","W5vFlmkcWOm","u8k5imkTW4RcJvhcKspdKSk1WPxcP1NdVSksjuJdQ8oy","CCoEjSksW7f4WRKic2VdJmoZW7S","EGZcUmoXW5tcIq0","cvRdHCk9D2xdQsddRq","mLhdSmk0WOCiW5HZ","WRnXkvtdHuv6hCobW6SvW7eI","W6nHWQxcMGST","q3OtAsS","tmk6pmo9WPJcMfFdLgZdHmkGW4FcReZdVSkhiKhcRSkuW6LXWR7dT1HFWQ7cGq3dQc/dMXRcMCoEoq","bCodW5pcHmoLWOZcPW","WPpdICoTW6iDW441","BeSjxJa5FSkQzay/WQ8","tmoHWPHEW5ZcUmkt","rmopWPhdQ8oPyJC","WP1kW6FcSrW","zmoobh8AtYK","W4vjmCkcWOm9uW","wCkcfmoFW6W","BfPAWRxcQWHpdLG0WQFdRq","W6yMDmozaq","WQNdHmotW41VW7hcN8o1WOm8qSo6","W7j1dSk1W4ygD8kB","W6DHWQBcNc8Zxt0","WRazW6xcLSoOmHC","gSkIW58vWOVdO8orWQZdGNWOWRpdQG","WRjczuNdHSomW7Cq","W4arW43dK3iDW6Ww","tmklnCo4WQy","WPxdKSo+W7iuW4ujWRjHWRxdSSknWPC","rXFcNbNdImk2FSo6WPaG"];return(_0x1cf8=function(){return e})()}import{jsx as _0x1ebfef,jsxs as _0x48c5ad}from"react/jsx-runtime";export const MemoryMatch=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:W,onShare:r,onShareScreenshot:n,onShowLeaderboard:s,bannerAd:a})=>{const d="qUWa",S="CRh(",m=_0x2802,x={btWxI:function(e,o,t){return e(o,t)},TSeLt:m(324,"3b#V"),oIqYG:"Score",QdrZW:m(300,"N!ce"),oXIZX:m(298,"EA9i"),FjADK:m(360,"#]IG"),eojzo:function(e,o){return e(o)},AMeGY:function(e,o){return e||o},MveVJ:function(e,o,t){return e(o,t)},sxucx:function(e,o,t){return e(o,t)},IBwPS:function(e,o,t){return e(o,t)}},i=x.eojzo(useMemoryMatchStore,e=>e[m(350,"iG^Y")]),u=useMemoryMatchStore(e=>e[m(301,"x094")]),f=useIsPlaying(),G=useRef(e);G[m(330,"tuNp")]=e;const l=useRef(!1),k=useRef(0),C=useRef(t);C.current=t;const p=x[m(379,"wgRv")](useRef,W);p[m(330,"tuNp")]=W;const _=useCallback(e=>{const o=m;if(C[o(315,"pUiK")]&&!l[o(345,"jE7G")]){const t=useMemoryMatchStore[o(356,"ReGy")]();C[o(292,"x0ci")]({status:e,score:t[o(359,"h81T")][o(357,"4pZD")]()}),l[o(320,"Xnm#")]=!0}},[]);useEffect(()=>()=>{const e=_0x2802;e(353,"g&sv")!==e(374,"yydk")?(_0x427ee3[e(305,"zRln")]=!1,_0x1a40f4[e(369,"iG^Y")]?.(),_0x4ad326[e(356,"ReGy")]()[e(329,"g&sv")]()):(useMemoryMatchStore.getState()[e(321,"xHGF")]&&!l[e(375,"vRQH")]&&_(e(366,"mTFy")),useMemoryMatchStore[e(390,"wgRv")]()[e(289,S)](),useMemoryMatchStore[e(308,"jE7G")]()[e(344,S)]())},[_]),useEffect(()=>{const e=m;i&&!l[e(392,"4pZD")]&&(x.btWxI(playSound,GAME_SOUNDS[e(319,"(AAI")].WIN,G[e(354,d)][e(322,"Xcml")]),x[e(286,"G3sF")](playHaptic,HapticType[e(346,"qUWa")],G[e(373,"(#VE")][e(318,"ReGy")]),_(x[e(387,"4pZD")])),u&&!l[e(287,"nkSF")]&&(x.btWxI(playSound,GAME_SOUNDS[e(328,d)][e(302,"xHGF")],G.current[e(349,"x0ci")]),x[e(367,"Giy%")](playHaptic,HapticType.ERROR,G[e(297,"G3sF")][e(388,"7$cl")]),_(e(314,"xaLo"))),!i&&!u&&(l[e(370,"7$cl")]=!1)},[i,u,_]);const h=x[m(327,"x094")](useCallback,()=>{const e=m;l[e(392,"4pZD")]=!1,useMemoryMatchStore[e(326,"CRh(")]().startGame(),playSound(GAME_SOUNDS[e(371,"Giy%")][e(377,"#]IG")],G[e(372,"GCAa")].enableSounds),playHaptic(HapticType[e(309,"nkSF")],G[e(295,"7R[N")][e(332,"x094")])},[]),M=useCallback(()=>{const e=m;_("cancel"),useMemoryMatchStore.getState()[e(363,"!SWv")]()},[_]),y=useCallback(()=>{const e=m;l[e(373,"(#VE")]=!1,p[e(362,"&ao!")]?.(),useMemoryMatchStore[e(331,"pUiK")]().resetGame()},[]),R=useCallback(e=>{const o=m;useMemoryMatchStore[o(386,"g6SD")]()[o(342,"x094")](e,G[o(383,"xaLo")])},[]),P=x[m(299,"xHGF")](i,u);P&&0===k.current&&(k[m(320,"Xnm#")]=useMemoryMatchStore[m(308,"jE7G")]()[m(293,"x0ci")]),!P&&(k[m(376,"h81T")]=0);const I=x.btWxI(useMemo,()=>({isPlaying:!P&&f,gameOver:P,onStartGame:h,onStopGame:M,onShare:r,onShowLeaderboard:s,startButtonSubtext:m(368,"#]IG")}),[P,f,h,M,r,s]),b=useMemo(()=>{const e=m,o=i,t={};return t.isVisible=P,t[e(343,"Tb&^")]=k[e(334,"#]IG")],t[e(340,"39$C")]=x[e(290,"GCAa")],t.onPlayAgain=y,t[e(325,"SwRe")]=x[e(391,"#]IG")],t[e(358,"N!ce")]=o?x.oXIZX:e(381,"h81T"),t.message=o?e(304,"EA9i"):x[e(333,"xHGF")],t},[i,P,y]),O=useMemo(()=>({gameId:GAME_IDS[m(378,"4!SI")],settings:e||DEFAULT_GAME_SETTINGS,onSettingsChange:o}),[e,o]),g=e?.[m(294,"iG^Y")]??0,F={};F[m(310,"4pZD")]=g;const Q=useMemo(()=>[styles[m(382,"mTFy")],F],[g]),H={};H[m(352,"cdgz")]=g;const A={};A[m(393,"G3sF")]=R;const v={...I},T={...b};T[m(339,"iG^Y")]=n,T.bannerAd=a;const D={...O};return _0x1ebfef(View,{style:styles[m(351,"qUWa")],children:_0x1ebfef(GestureHandlerRootView,{style:styles.gestureRoot,children:_0x48c5ad(_0x2d189f,{children:[_0x1ebfef(ScoreBoard,H),x[m(288,"nkSF")](_0x1ebfef,View,{style:Q,children:x.sxucx(_0x1ebfef,GameBoard,A)}),_0x1ebfef(GameControlButton,v),x.IBwPS(_0x1ebfef,GameOverModal,T),x[m(303,"JrdT")](_0x1ebfef,GameSettingsModal,D)]})})})};MemoryMatch[_0x34d442(335,"G3sF")]=_0x34d442(355,"x0ci");const _0x3ce55c={};_0x3ce55c[_0x34d442(347,"wgRv")]=1,_0x3ce55c[_0x34d442(341,"iG^Y")]=BACKGROUND_COLOR;const _0x452f5d={};_0x452f5d[_0x34d442(348,"vRQH")]=1;const _0x5a3e9b={flex:1};_0x5a3e9b[_0x34d442(317,"JrdT")]=_0x34d442(312,"x094"),_0x5a3e9b[_0x34d442(389,"J4(I")]=_0x34d442(311,"yydk");const _0x35fac5={};_0x35fac5.container=_0x3ce55c,_0x35fac5.gestureRoot=_0x452f5d,_0x35fac5[_0x34d442(296,"h81T")]=_0x5a3e9b;const styles=StyleSheet[_0x34d442(338,"zRln")](_0x35fac5);
1
+ "use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS,isTablet}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{scoreColumn,textColumn,timerColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{GAME_DURATION,getLayout,LIGHT}from"./MemoryMatchConstants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,start,tick}from"./MemoryMatchGame.js";import{jsx as _0x2b9053}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.MEMORY_MATCH,FEEDBACK={flip:{sound:SOUNDS.FLIP,haptic:HapticType.LIGHT},match:{sound:SOUNDS.MATCH,haptic:HapticType.SUCCESS},wrong:{sound:SOUNDS.WRONG,haptic:HapticType.WARNING},win:{sound:SOUNDS.WIN,haptic:HapticType.SUCCESS},lose:{sound:SOUNDS.GAME_OVER,haptic:HapticType.ERROR}};export const MemoryMatch=engineGame(GAME_IDS.MEMORY_MATCH,e=>{const[t,s]=useLiveState(0),[a,r]=useLiveState(null),[o,i]=useLiveState(GAME_DURATION),{game:n,theme:m,status:S,screen:u,gameOver:p}=useEngineGame(e,{gameId:GAME_IDS.MEMORY_MATCH,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,a)=>{const r=getLayout(t,s,a,isTablet);return setLayout(e,r),r.boardW},drag:drag,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.MEDIUM),wire:(e,t)=>{e.onScore=s,e.onPairs=(e,t)=>r({matched:e,total:t}),e.onTime=i,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}}),{matched:E,total:M}=a??{matched:0,total:n.totalPairs};return _0x2b9053(EngineGameScreen,{...u,light:LIGHT,columns:[scoreColumn(t),textColumn("PAIRS",E+"/"+M),timerColumn(o,m)],subtext:"Find every matching pair!",gameOver:p({title:"win"===S?"ALL MATCHED!":"TIME UP!",message:"win"===S?"You found every pair!":"You ran out of time!",scoreLabel:"Score",score:t,buttonText:"Play Again!"})})});
@@ -1 +1 @@
1
- "use strict";const _0x5065ff=_0x4d5a;!function(){const W=_0x4d5a,o=_0x1143();for(;;)try{if(646909==parseInt(W(488,"JY$]"))/1+-parseInt(W(423,"JY$]"))/2*(-parseInt(W(464,"cEWb"))/3)+-parseInt(W(485,"BXTm"))/4*(-parseInt(W(478,"T3yO"))/5)+-parseInt(W(453,"t]J#"))/6*(parseInt(W(445,"EJw^"))/7)+parseInt(W(448,"C2]E"))/8+-parseInt(W(480,"JY$]"))/9+-parseInt(W(433,"WOdw"))/10*(-parseInt(W(487,"M*L["))/11))break;o.push(o.shift())}catch(W){o.push(o.shift())}}();import{PRIMARY_COLOR,BACKGROUND_COLOR}from"../../services/GamesConstants.js";import{getGameDimensions,isTablet}from"../../services/UtilsService.js";const DIMS=getGameDimensions(),BOARD_W=DIMS[_0x5065ff(483,"w[nL")],SCREEN_H=DIMS.height,_0x11b4eb={};_0x11b4eb[_0x5065ff(455,"B$O1")]=5,_0x11b4eb[_0x5065ff(425,"QQuq")]=4;export const GRID=_0x11b4eb;const _0x288455={};_0x288455[_0x5065ff(463,"cEWb")]=300,_0x288455[_0x5065ff(457,"!P^s")]=800,_0x288455.POINTS_PER_MATCH=1e3,_0x288455[_0x5065ff(438,"!TlR")]=50,_0x288455[_0x5065ff(435,"EYIV")]=5e3;export const MEMORY_MATCH_CONFIG=_0x288455;const _0x186f4d={};function _0x4d5a(W,o){W-=423;const t=_0x1143();let f=t[W];if(void 0===_0x4d5a.zwyZnQ){const W=function(W,o){let t,f,n=[],d=0,x="";for(W=function(W){let o="",t="";for(let t,f,n=0,d=0;f=W.charAt(d++);~f&&(t=n%4?64*t+f:f,n++%4)?o+=String.fromCharCode(255&t>>(-2*n&6)):0)f="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(f);for(let W=0,f=o.length;W<f;W++)t+="%"+("00"+o.charCodeAt(W).toString(16)).slice(-2);return decodeURIComponent(t)}(W),f=0;f<256;f++)n[f]=f;for(f=0;f<256;f++)d=(d+n[f]+o.charCodeAt(f%o.length))%256,t=n[f],n[f]=n[d],n[d]=t;f=0,d=0;for(let o=0;o<W.length;o++)f=(f+1)%256,d=(d+n[f])%256,t=n[f],n[f]=n[d],n[d]=t,x+=String.fromCharCode(W.charCodeAt(o)^n[(n[f]+n[d])%256]);return x};_0x4d5a.VQzFuA=W,_0x4d5a.nsPsfS={},_0x4d5a.zwyZnQ=!0}const n=t[0];_0x4d5a.eeCpbG!==n&&(_0x4d5a.nsPsfS={},_0x4d5a.eeCpbG=n);const d=_0x4d5a.nsPsfS[W];return void 0===d?(void 0===_0x4d5a.PzLliM&&(_0x4d5a.PzLliM=!0),f=_0x4d5a.VQzFuA(f,o),_0x4d5a.nsPsfS[W]=f):f=d,f}_0x186f4d[_0x5065ff(484,"QrlH")]=BACKGROUND_COLOR,_0x186f4d[_0x5065ff(475,"QrlH")]=PRIMARY_COLOR,_0x186f4d.CARD_FRONT="#FDF6E3",_0x186f4d.CARD_MATCHED=_0x5065ff(447,"BiC#"),_0x186f4d[_0x5065ff(462,"EYIV")]=_0x5065ff(493,"JY$]"),_0x186f4d.CARD_SHADOW=_0x5065ff(477,"@%7&"),_0x186f4d[_0x5065ff(496,"r2!^")]=_0x5065ff(497,"$L4q"),_0x186f4d[_0x5065ff(461,"8tFC")]=_0x5065ff(451,"9(UU"),_0x186f4d[_0x5065ff(430,"EJw^")]=_0x5065ff(432,"T3yO");export const MEMORY_COLORS=_0x186f4d;export const FRUIT_SYMBOLS=[_0x5065ff(498,"OBZc"),_0x5065ff(489,"MHbL"),_0x5065ff(495,"M*L["),_0x5065ff(437,"TMp4"),_0x5065ff(440,"kF5t"),_0x5065ff(456,"T3yO"),_0x5065ff(491,"FkNg"),"peach",_0x5065ff(492,"8tFC"),_0x5065ff(481,"WcZi"),_0x5065ff(470,"9(UU"),_0x5065ff(428,"cEWb")];export const MAX_PAIRS=FRUIT_SYMBOLS[_0x5065ff(452,"mx3#")];const RESERVED_CHROME=260,GAP=isTablet?10:6;export const computeLayout=()=>{const W="EYIV",o="kF5t",t=_0x5065ff,f={};f[t(471,"UwHo")]=function(W,o){return W+o},f[t(426,W)]=function(W,o){return W-o},f[t(467,"8tFC")]=function(W,o){return W/o},f[t(473,"C2]E")]=function(W,o){return W+o},f[t(494,"eKqN")]=function(W,o){return W*o},f.NxLOh=function(W,o){return W+o},f[t(490,"t]J#")]=function(W,o){return W/o};const n=f,{rows:d,cols:x}=GRID,e=(BOARD_W-GAP*n[t(449,"XHFI")](x,1))/x,r=Math[t(454,"t]J#")](320,n.rTsGu(SCREEN_H,260)),_=n.lqeFv(r-GAP*n[t(449,"XHFI")](d,1),d),s=Math.max(40,Math.floor(Math[t(458,o)](e,_))),k=n[t(441,"b#Zt")](n.aTiDL(s,x),GAP*(x+1)),S=n[t(466,"BiC#")](s*d,GAP*n[t(450,"[(98")](d,1)),C=[];for(let W=0;W<d;W++)for(let f=0;f<x;f++){const d=GAP+f*(s+GAP),x=n[t(424,"r2!^")](GAP,n[t(479,"r2!^")](W,n[t(472,"t]J#")](s,GAP)));C[t(446,"[(98")]({x:d,y:x,w:s,h:s,cx:d+s/2,cy:x+n[t(444,o)](s,2)})}const m={};return m[t(476,"JY$]")]=d,m[t(460,W)]=x,m[t(429,"TMp4")]=s,m[t(459,"FkNg")]=GAP,m[t(434,"pWBE")]=k,m[t(482,"cEWb")]=S,m[t(443,"rBuX")]=C,m};function _0x1143(){const W=["D8oXCfHaW4WsWOiZ","m0NcJG8k","W4/cVhlcQSo8","W6qLW6ThWOtdVHKawW","cadcK8ovWRNdGX/dQSkGEaFcH2D3","WPy+kcBcQmo3W6RdPmo7WRG","WRjKWOBcTCkJ","WPz9WOn9W7S","W7/cUvWqfG","g0pcLhZcGY81WPZcMConotu","WQBdSmk7fmkHuHu","cmkwySoF","wCohWRi4mWq0yuddQrxcKSktWRBdH8kU","eSorv0GhEmk3W4ldJrZdNG","WQxdJZRcUCoy","s8oij8kzpmkdW5ddTCo6ugxcRmk2sW","WQ/cQmkSsaTSE8oGW7S","W4VdRmkWW5pdPSkG","WQb4WR97WQq","WRtdO8kXeSkNuGpcQmoWdG","W4y5FmkBW6BcHCk/jua","lIFcJmohW53cO0ZcVSk2WPOZ","rCk7bmk8WOhdKMTFWPn9WQFdOq","s8oalCkDoSkbWPBcSSojAvVcMa","wK/dQSkuBGe","WRfGWOHcW5S","kSk3l23dLa","W4dcPxlcNSo4W4tcMCoM","cmkED8onimkeW4VdTCk1kIBdVCoceSkLWRa","fcxcHZTJ","e8oRuSoUW5/cIW","WOBdMHdcTSolDCoHpa","WRivWPK3W6ZcQuC","W7ZcOSo6W57cLq","smobE8onrCoAWQJcPG","WORdOX/cSSo8","WQDmuva","bCkoWOrQW7K","ubKNAhhcUmkSW78+W7Xh","W5NdRmk8W4tdPCkAvmkLbwFcOa","W4fBv8kn","W7tdICkFv8oqxCkVWOJcINi","WQTnW7mFWPTQW4lcHW","vmkgbXWAemoKWO/cLe3cNWOeumoVW4uXqSooWOtdGxO","Asrsn8oiWQtcGSkYWOe","qXNdUMRdJd4","imktWRLYW47dOd/dVty","W6VdSmo6hLOKsmo1W63dLCkXWQi","W4virmkzW4tcSG","W61nW4H+W50ml2hcQCkkD8k6fSkMmmodFCkTo1ye","qmk9c8k3W6pcH19QWRn/","ySoiW5nB","WOKss8oJWR0","gSkzW6HOkqfPjJZcQMJdTW","j3iujxu","rSogW5vRia","WOFcV8oRjmoDFCkxWPdcKf4","W4RdTSkvpq","xNxdTqzxWPpdSW","WQxdSbrdrCoYx8oBrdmb","WOBcHCoVW5xdHa","W5ldUCkCmWu","W4jSpxFcVmo+WRK","W6/dSSk+WRJdVSou","W4W3W4SOWQBdQGddVCoJACkS","WPnMWOe","fmkoWROh","vCkvfXXfqmk0W4JdIGy","DhJdSSkTW4ZcOgVcKSkCDI3cQNXg","zmoiW4O","imk3mq","fmk1WPTE","W6hcJftcP8ovW6/cS8obWQmqW68","nmkBWQvPW5pdRt7dUIhdQKy","W67dGSkCW6tdNCkSymkzjuFcJmo0WRq","WPJcUSoKWPNcT8oqw8kPph7cRSo2"];return(_0x1143=function(){return W})()}
1
+ "use strict";import{isTablet}from"../../services/UtilsService.js";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";import{COLS,ROWS}from"./MemoryMatchRules.js";export const GAME_DURATION=300;export const MISMATCH_DELAY=.8;export const POINTS_PER_MATCH=1e3;export const WIN_BONUS=5e3;export const FLIP_TIME=.22;export const TAP_SLOP=12;export const COLORS={CARD_FRONT:"#FFFDF7",CARD_MATCHED:"#E5F7EC",FRONT_BORDER:"#DFE3F1",MATCHED_BORDER:"#8BD3AD",MATCHED_BADGE:"#32A875",BACK_TOP:"#6378E0",BACK_BOTTOM:"#3E4EAE",BACK_BORDER:"#97A7EF",BACK_HALO:"#6072CE",BACK_MOTIF:"#EAF0FF",BACK_PAIR:"#B9CCFF"};export const TILT=.2;export const LIGHT=frontLight([-.4,.5,1],.45);export const THICKNESS=.28;export const FACE_SIZE=.78;export const FRUIT_SIZE=.62;export const FRUIT_DETAIL=isTablet?.7:.5;const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=120,CARD_BOUNDS=1.01;export function getLayout(t,o,r,e){const s=e?12:10,n=getScoreBoardTop(r)+82,i=Math.max(1,o-n-120),p=gameWidthFor(t),O=Math.cos(.2),E=Math.sin(.2),A=(p-s*(COLS-1))/(COLS-1+1.01),C=(i-s*(ROWS-1)*O)/((ROWS-1+1.01)*O+.28*E),h=Math.max(1,Math.min(A,C));return{width:t,height:o,tilt:.2,centerY:n+i/2+.28*h*E/2,rows:ROWS,cols:COLS,card:h,gap:s,pitch:h+s,boardW:h*(COLS-1+1.01)+s*(COLS-1),boardH:h*(ROWS-1+1.01)+s*(ROWS-1)}}export function cardCentre(t,o){const r=Math.floor(o/t.cols);return[(o%t.cols-(t.cols-1)/2)*t.pitch,((t.rows-1)/2-r)*t.pitch]}export function cardAt(t,o,r){const e=o+t.cols*t.pitch/2,s=t.rows*t.pitch/2-r,n=Math.floor(e/t.pitch),i=Math.floor(s/t.pitch);if(i<0||i>=t.rows||n<0||n>=t.cols)return-1;const p=t.gap/2,O=e-n*t.pitch,E=s-i*t.pitch;return O>=p&&O<=t.pitch-p&&E>=p&&E<=t.pitch-p?i*t.cols+n:-1}
@@ -0,0 +1 @@
1
+ "use strict";import{World}from"@nayan-ui/engine";import{calculateTimeBasedScore}from"../../services/ScoringService.js";import{aimTilted,unproject}from"../shared/EngineTilt.js";import{cardAt,GAME_DURATION,MISMATCH_DELAY,POINTS_PER_MATCH,TAP_SLOP,THICKNESS,WIN_BONUS}from"./MemoryMatchConstants.js";import{buildDeck}from"./MemoryMatchRules.js";import{buildScene,celebrate,deal,flip,matched,mismatch,removeScene,setSceneTheme,timeUp}from"./MemoryMatchScene.js";const WORLD_CAPACITY=240;export function createGame(e){const r=new World(240),{cards:o,totalPairs:t}=buildDeck(),s={world:r,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",cards:o,totalPairs:t,firstIndex:-1,lock:!1,matchedPairs:0,moves:0,get score(){return r.scoreboard.score},get timeLeft(){return r.scoreboard.shownSeconds},won:!1,press:null,onPhase:e=>{},onScore:e=>{},onPairs:(e,r)=>{},onTime:e=>{},onEvent:e=>{}};return r.scoreboard.reset(0,GAME_DURATION),r.scoreboard.handlers={onScore:e=>s.onScore(e),onSecond:e=>s.onTime(e),onTimeUp:()=>"playing"===s.phase&&end(s,!1)},s}export function setLayout(e,r){e.scene&&removeScene(e.world,e.scene),e.layout=r,aimTilted(e.camera,r),e.scene=buildScene(e.world,r,e.theme,e.cards)}export function setTheme(e,r){e.theme=r,e.scene&&setSceneTheme(e.world,e.scene,r)}export function start(e){"ready"===e.phase&&(e.phase="playing",e.world.scoreboard.startCountdown(GAME_DURATION),e.onPhase("playing"))}export function reset(e){e.world.cancelTimers();const{cards:r,totalPairs:o}=buildDeck();e.cards=r,e.totalPairs=o,e.firstIndex=-1,e.lock=!1,e.matchedPairs=0,e.moves=0,e.world.scoreboard.reset(0,GAME_DURATION),e.won=!1,e.press=null,e.phase="ready",e.layout&&e.scene&&deal(e.world,e.layout,e.scene,e.cards),e.onScore(0),e.onPairs(0,o),e.onTime(GAME_DURATION),e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function tick(e,r){e.world.isDisposed||e.world.update(r)}function end(e,r){e.world.scoreboard.stop(),e.won=r,e.phase="over",e.press=null;const{layout:o,scene:t}=e;o&&t&&(r?celebrate(e.world,o,t):timeUp(e.world,t,e.cards)),e.onPhase("over"),e.onEvent(r?"win":"lose")}const setState=(e,r,o)=>{e.cards[r]={...e.cards[r],state:o}};export function flipCard(e,r){if("playing"!==e.phase||e.won||e.lock)return;const o=e.cards[r];if(!o||"down"!==o.state)return;const{layout:t,scene:s}=e;if(-1===e.firstIndex)return setState(e,r,"up"),e.firstIndex=r,t&&s&&flip(e.world,t,s,r,!0),void e.onEvent("flip");const n=e.firstIndex;if(n!==r){if(e.moves+=1,e.firstIndex=-1,e.cards[n].symbol===o.symbol){setState(e,n,"matched"),setState(e,r,"matched"),e.matchedPairs+=1,e.world.scoreboard.add(POINTS_PER_MATCH),t&&s&&(flip(e.world,t,s,r,!0),matched(e.world,t,s,n),matched(e.world,t,s,r));const o=e.matchedPairs>=e.totalPairs;return o&&e.world.scoreboard.set(calculateTimeBasedScore(GAME_DURATION-e.timeLeft,GAME_DURATION,e.score+WIN_BONUS)),e.onPairs(e.matchedPairs,e.totalPairs),e.onEvent("match"),void(o&&end(e,!0))}setState(e,r,"up"),e.lock=!0,t&&s&&(flip(e.world,t,s,r,!0),mismatch(e.world,t,s,n),mismatch(e.world,t,s,r)),e.onEvent("wrong"),e.world.after(MISMATCH_DELAY,()=>{if("playing"===e.phase){for(const o of[n,r])"up"===e.cards[o].state&&(setState(e,o,"down"),e.layout&&e.scene&&flip(e.world,e.layout,e.scene,o,!1));e.lock=!1}})}}export function cardUnder(e,r,o){const t=e.layout;if(!t)return-1;const[s,n]=unproject(t,r,o,t.card*THICKNESS);return cardAt(t,s,n)}export function drag(e,{phase:r,x:o,y:t}){if("start"===r)return void(e.press={x:o,y:t,index:cardUnder(e,o,t)});const s=e.press;if(!s)return;if(Math.hypot(o-s.x,t-s.y)>TAP_SLOP)return void(e.press=null);if("end"!==r)return;e.press=null;const n=cardUnder(e,o,t);n>=0&&flipCard(e,n)}
@@ -0,0 +1 @@
1
+ "use strict";export const ROWS=5;export const COLS=4;export const FRUIT_SYMBOLS=["apple","orange","banana","grapes","kiwi","strawberry","mango","peach","cherries","pineapple","watermelon","pomegranate"];export function buildDeck(){const t=Math.min(10,FRUIT_SYMBOLS.length),e=[];for(let a=0;a<t;a++)e.push(a,a);for(let t=e.length-1;t>0;t--){const a=Math.floor(Math.random()*(t+1));[e[t],e[a]]=[e[a],e[t]]}return{cards:e.map(t=>({symbol:t,state:"down"})),totalPairs:t}}
@@ -0,0 +1 @@
1
+ "use strict";import{effects,extrude,merge,Path,quat,recolor}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{spawnRaisedBlock}from"../shared/EngineBlocks.js";import{getFruit}from"../shared/EngineFruits.js";import{cacheGameAsset,createGameMesh as _0x2c1a6e}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{cardCentre,COLORS,FACE_SIZE,FLIP_TIME,FRUIT_DETAIL,FRUIT_SIZE,THICKNESS}from"./MemoryMatchConstants.js";import{FRUIT_SYMBOLS}from"./MemoryMatchRules.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("memory-match/MemoryMatchScene:"+e,o),meshes.set(e,t)),t},BACKDROP_DEPTH=30,RADIUS=.16,FACE_UP=[0,0,0,1],FACE_DOWN=quat.y(Math.PI),EDGE_ON=quat.y(Math.PI/2),square=(e,o=new Path)=>o.addRoundedRect(-.5+e,-.5+e,1-2*e,1-2*e,Math.max(.01,.16-e)),flat=(e,o,t)=>({geometry:extrude(e,{depth:0,fillRule:"evenodd"}),position:[0,0,o],color:t}),outline=(e,o)=>square(e+o,square(e)),backMesh=()=>cached("mm-back",()=>{const e=toColor(COLORS.BACK_TOP),o=toColor(COLORS.BACK_BOTTOM),t=recolor(extrude(square(.012),{depth:0}),({position:[t,a]})=>{const r=Math.max(0,Math.min(1,(t+.5+(.5-a))/2));return[e[0]+(o[0]-e[0])*r,e[1]+(o[1]-e[1])*r,e[2]+(o[2]-e[2])*r,1]}),a=extrude((new Path).addRoundedRect(-.12,-.165,.24,.33,.04),{depth:.008}),r=new Path;for(const e of[-.35,.35])for(const o of[-.35,.35])r.addCircle(e,o,.012);const s=merge([{geometry:t},flat(outline(.065,.009),.002,toColor(COLORS.BACK_BORDER)),flat((new Path).addCircle(0,0,.275),.003,toColor(COLORS.BACK_HALO)),flat(r,.003,toColor(COLORS.BACK_BORDER)),{geometry:a,position:[-.065,.025,.009],rotation:quat.z(.2),color:toColor(COLORS.BACK_PAIR)},{geometry:a,position:[.065,-.025,.022],rotation:quat.z(-.18),color:toColor(COLORS.BACK_MOTIF)},flat((new Path).addCircle(.065,.025,.035),.028,toColor(COLORS.BACK_TOP))]);return _0x2c1a6e(merge([{geometry:s,rotation:FACE_DOWN,position:[0,0,-THICKNESS/2-.002]}]),{center:!1,shine:0})}),frontMesh=()=>cached("mm-front",()=>_0x2c1a6e(extrude(outline(.065,.01),{depth:0,fillRule:"evenodd"}),{center:!1,shine:0})),sealMesh=()=>cached("mm-seal",()=>_0x2c1a6e(merge([flat((new Path).addCircle(0,0,.075),0,toColor(COLORS.MATCHED_BADGE)),flat((new Path).addPolygon([[-.037,0],[-.012,.025],[.04,-.027],[.029,-.038],[-.012,.003],[-.026,-.011]]),.002,[1,1,1,1])]),{center:!1,shine:0})),SURFACE=0,restZ=e=>0+e.card*THICKNESS/2,frontColor=e=>toColor("matched"===e?COLORS.CARD_MATCHED:COLORS.CARD_FRONT),borderColor=e=>toColor("matched"===e?COLORS.MATCHED_BORDER:COLORS.FRONT_BORDER);function fruitFit(e,o){const t=getFruit(FRUIT_SYMBOLS[e],FRUIT_DETAIL),a=Math.tan(o),r=FRUIT_SIZE/Math.max(t.whole.size[0],t.whole.size[1]+t.whole.size[2]*a),s=t.whole.size[2]*r/2+.01;return{model:t.whole,scale:r,position:[-t.center[0]*r,-t.center[1]*r-s*a,THICKNESS/2+s-t.center[2]*r]}}function spawnCard(e,o,t,a){const[r,s]=cardCentre(o,t),n="down"!==a.state,i=e.spawn({mesh:"none",position:[r,s,restZ(o)],rotation:n?FACE_UP:FACE_DOWN,scale:o.card,pickable:!1}),d=spawnRaisedBlock(e,{parent:i,position:[0,0,THICKNESS/4],size:[1,1,THICKNESS/2],color:frontColor(a.state),gloss:!1,shadow:!1}),l=spawnRaisedBlock(e,{parent:i,position:[0,0,-THICKNESS/4],size:[1,1,THICKNESS/2],color:toColor(COLORS.BACK_BOTTOM),gloss:!1,shadow:!1});e.set(l,{rotation:FACE_DOWN});const C=e.spawn({mesh:backMesh(),parent:i,scale:[FACE_SIZE,FACE_SIZE,1],pickable:!1}),m=e.spawn({mesh:frontMesh(),parent:i,position:[0,0,THICKNESS/2+.002],scale:[FACE_SIZE,FACE_SIZE,1],color:borderColor(a.state),pickable:!1}),p=e.spawn({mesh:sealMesh(),parent:i,position:[.34*FACE_SIZE,.34*FACE_SIZE,THICKNESS/2+.006],scale:"matched"===a.state?FACE_SIZE:0,pickable:!1}),h=fruitFit(a.symbol,o.tilt);return{root:i,body:d,backBody:l,back:C,front:m,seal:p,fruit:e.spawn({mesh:h.model,parent:i,position:h.position,scale:n?h.scale:0,pickable:!1}),fruitScale:h.scale}}export function buildScene(e,o,t,a){const r=spawnBackdrop(e,o.width,o.height,-30,t);return placeTiltedBackdrop(e,r,o,30),{backdrop:r,cards:a.map((t,a)=>spawnCard(e,o,a,t))}}export function removeScene(e,o){for(const t of[o.backdrop,...o.cards.map(e=>e.root)])e.despawn(t)}export function setSceneTheme(e,o,t){setBackdropTheme(e,o.backdrop,t)}export function deal(e,o,t,a){a.forEach((a,r)=>{const s=t.cards[r];s&&e.despawn(s.root);const n=spawnCard(e,o,r,a);t.cards[r]=n,e.set(n.root,{scale:.01}),e.animate(n.root,{scale:o.card},{duration:.26,delay:.022*r,easing:"back"})})}export function flip(e,o,t,a,r){const s=t.cards[a];if(!s)return;const[n,i]=cardCentre(o,a),d=restZ(o);e.stopAnimation(s.root),e.animate(s.root,[{rotation:EDGE_ON,position:[n,i,d+.28*o.card],at:.5},{rotation:r?FACE_UP:FACE_DOWN,position:[n,i,d]}],{duration:FLIP_TIME,easing:"easeInOut"}),e.stopAnimation(s.fruit),r?(e.set(s.fruit,{scale:0}),e.animate(s.fruit,{scale:s.fruitScale},{duration:FLIP_TIME/2,delay:FLIP_TIME/2,easing:"easeOut"})):e.animate(s.fruit,{scale:0},{duration:FLIP_TIME/2,easing:"easeIn"})}export function matched(e,o,t,a){const r=t.cards[a];r&&(e.set(r.body,{color:frontColor("matched")}),e.set(r.front,{color:borderColor("matched")}),e.animate(r.seal,{scale:FACE_SIZE},{duration:.18,delay:FLIP_TIME,easing:"back"}),e.animate(r.root,[{scale:1.04*o.card,at:.4},{scale:o.card}],{duration:.32,delay:FLIP_TIME,easing:"easeOut"}))}export function mismatch(e,o,t,a){const r=t.cards[a];r&&e.animate(r.root,{shake:.06*o.card},{duration:.26,delay:FLIP_TIME})}export function celebrate(e,o,t){e.animate(t.cards.map(e=>e.root),[{scale:1.05*o.card,at:.4},{scale:o.card}],{duration:.32,delay:.25,stagger:.035,easing:"easeOut"}),effects.confetti(e,{position:[0,0,o.card],count:70,size:.08*o.card,speed:1.4*o.boardW,lifetime:1.3,gravity:2.4*-o.boardW,colors:["#FFD700","#4CAF50","#5b7cfa","#FF6B6B"].map(e=>toColor(e))})}export function timeUp(e,o,t){const a=[];t.forEach((e,t)=>{const r=o.cards[t];r&&"matched"!==e.state&&a.push(r.body,r.backBody,r.back)}),e.animate(a,{color:[.55,.55,.6,1]},{duration:.4})}
@@ -1 +1 @@
1
- "use strict";const _0x1982d0=_0x27be;function _0x33d0(){const e=["WOZdKaZcV8kMWObs","CSkBFdRcKG","WQZcOLFdPSkJx2mTW6q","chddR8oNtdpdOga","uLrajZWcWRS7A13cS8kcWRBdIq","WQpcUCkjyCkOgK4","B8oMk8oJEg4","uCoNxMZdOmkcvwyX","W67dOaxcPmk4De0gW7ldHa","WQ/cTwOAW5vYWR/dV8o5WQ7dMSk9W7hdOd5WE8khyq","W4/dSK3cMs5Ge2HOWPJcPNWKrSof","WPJdS8kyh8kn","WOX0wetdTG","W54sW7RdV0bYvqTjWQ7cGa","tejeWO7cPCk5pa","umoNwx3dVCkRu3G","dsxcHCkDFHG/","W7ddOs45W5O","pZ3cI8k0WQdcTqVdLJ4","BM0Uz8ogzqy","WQ7dPr9EcNDz","WQZdKZvOzdu","WRddRrHZW4qDW6HI","WRTiCLVcSSoA","W4tdIcb+W7qDW6u","W7aoW6BdQhzRra","AH7cGSoDW5i","g1pcG1dcRCkPytFcLW","tZfZWPGOjxibW5xdQwm","dqFcO8k7s2STW4pdGZ/dJGS","W63dPWlcRCoGsKaXW7ldMmkC","W4jfW4Lxy04xECkz","FCkgomkJW70","W4zxW5TqrW","WQZdKZvPDtlcOmo+","WQTMj8oSDW","WPRdGsjLW680W5vt","cSkOtbJdOW","WO/dMCkcb8kY","WP/dQcJcVCkM","WRxcV8kExSkOgvu","dmkOw8kqWP8QW7a0WO0","WO7dLdPFW68","tevtWP3cTmkY","sv9AnIeKWRy/Da","amopW4NcH8kiy3fgWRNdRSo2ea","WQZdKZv5yd/cUmo5ACkTWOC","W7BdRmoyaWW","WRTiCKZcSCoAW6JdSrW","W7P5gmkumd/dUbFdKmkfFSoRWOpdGa","W7pcJYaEW4e","W6yiW7hdN3vJvq1n","WQldJ2CDWPSLW5iZW7zNW74","WO3dNCkNW6OBn8o9W43cLa","FqZdOSox","wKrtWRhcPCk6jW","h8kFrsxdPSoSeZTu","ghvXW6xdLuNdSSk2W6KPW4C","WRrHxG","W6dcU1e4mCk/WOS8rWBdTq","W4nwvSkFW5fqW4e","kHNcQ8k7As4bW4xdIZJdIutdLG","W6JcLgqomGlcVmokFCkmWPu","W7xcSe4jvtr9jLe1WRrR","W7bIa8kspdddOa","WP7dKsreW747W5u","W4nmsSkzW5vxW5VcMuO","W6tdUeVdNdjobIvS","gSoUw0hdU8knCa","W6zKfmkJodldUbZdI8kduG","WRlcLvK2W4G","WPtdQr5/xGdcG8oEtCkEWQLU","WQNdQCkyW50HfSoF","W4tdQmoqhszoW4m","WP0eW5bRl8o/W5FcLSkfW47dPCkLW75x","bWFcOmk0WPNcGdNdSa8gWQpcRW","W67dPWtcOmoLitf2W63dO8kkWQBcQmo1","WRxcQ8kct8kOgW","WPxcRSkBpqTOW5hdKw4","ivv/tNu","WPtdPrrZvb4","yCotC3JdLWeu","W4hcTbW","umoHqNVdSq","dSkprdldT8ofbG","c1NcMwpcRCkTAH3cK8oeWQK","wdxdKCoIxq/dPG","WQWeW77cVcTX","oX7cP8k8vY4/W4VdLZJdHfK","mgxcIfdcRW","qSk6tXRcO8oCCW","W7tdHIytW443WPq","h1NcMxFcUmkHEZC","beD/AKFdJmoY","mZDDhSoFASoHsuC7yW","gSoAW5jzts0","W49fqSkEW5fk","WRBcUf/dOmk+Ew4PW7VdLSkpWRpcKCoP","WR3cOhOOW5v2WP/dSW","zCodDvNdHG4ulW","DNnNfGOWWOaxvgJcSCkI","emo5dLJcQCoEsmkvWOZdTq","xhTVW54iWOdcN2BdKq","vtyJWPBdVNFdVmkfW5ec","ktVcNmkdWQpcVrO","WRhcR8kyF8k5fLxdUG","WObPW7PGsmkOW5S","WOi0W4JcHXTsgG","lmkwwMddV8ochdncvZ8NEmoWWRtdP8kiW7y","WR1cW79nAmkw","WQlcRaZcGxaWuWfXW47cPhK9","WPhdLt9LW7K","sSoXFwxdTCk8xwuZ","WQRdRa5SegnDeG","WQTcWQdcRciZzd9GWOFcPXy","W7aAW7RdUxzP","W5tcImoDuY4","WQRcIfGlW4q","WP3dNSkTW4GR","p39+W4pdGW","W6tcQ1a+iCkJWPO","g8oxW5Pe","W7ddLIaYW584WPqQ","ctNcIa","lYdcJ8ktWQRcTIBdLdOIWO/cNH8","rNZcOwuwmSoq","DhumzmkjvmopwLuZxa","W5TEWRyUAmkUWO/dHq","yf5IW58P","WQHgW6rnDSkvW6H1ia","pqxcTmkSxIuy","WOxdRt4MW6CGrmo+","W5Hammo8WQ/cRLNdVCoTW7K","W5jfmSo9W5ddHa3cMmogW7ZdKd7cKge","WOxdRmk/W6mn","WPFcJea+W75eWRZdK8orWPVdJCkk","W75mCCoOW4C","W7/cUK4jpu95fL4x","ph1uyN3dSSokEMzLduG","AedcNviSd8oZu8oKWOuAW7i","WOufWPvatwautCky","jmoXW6yQWOabW7SzAmkNWRS","W6rJW69rqhSH","eMBdSCkTWRdcPSo4tX8MxmoUoa"];return(_0x33d0=function(){return e})()}!function(){const e=_0x27be,t=_0x33d0();for(;;)try{if(708314==-parseInt(e(390,"&4bV"))/1*(parseInt(e(351,"ByUe"))/2)+parseInt(e(360,"F1!X"))/3+-parseInt(e(364,"K5hb"))/4*(parseInt(e(381,"phcq"))/5)+-parseInt(e(387,"FUY]"))/6*(-parseInt(e(424,"6N!D"))/7)+parseInt(e(470,"6N!D"))/8*(-parseInt(e(462,"D9*C"))/9)+-parseInt(e(353,"DNPo"))/10*(parseInt(e(391,"#XRq"))/11)+parseInt(e(468,"MY^O"))/12)break;t.push(t.shift())}catch(e){t.push(t.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x400eaf from"react";import{StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x175a57}from"../../helpers/index.js";import{DEFAULT_GAME_SETTINGS,GAME_IDS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{useMineSweeperStore,useIsPlaying,useGameOver,useGameWon}from"./MineSweeperStore.js";import{MineSweeperService}from"./MineSweeperService.js";import{MINE_SWEEPER_TIME_LIMIT}from"./MineSweeperConstants.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameArea}from"./components/GameArea.js";import{setGameInterval,clearGameInterval}from"../../helpers/GameTimer.js";function _0x27be(e,t){e-=337;const o=_0x33d0();let W=o[e];if(void 0===_0x27be.TyVXsp){const e=function(e,t){let o,W,n=[],r=0,a="";for(e=function(e){let t="",o="";for(let o,W,n=0,r=0;W=e.charAt(r++);~W&&(o=n%4?64*o+W:W,n++%4)?t+=String.fromCharCode(255&o>>(-2*n&6)):0)W="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(W);for(let e=0,W=t.length;e<W;e++)o+="%"+("00"+t.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(o)}(e),W=0;W<256;W++)n[W]=W;for(W=0;W<256;W++)r=(r+n[W]+t.charCodeAt(W%t.length))%256,o=n[W],n[W]=n[r],n[r]=o;W=0,r=0;for(let t=0;t<e.length;t++)W=(W+1)%256,r=(r+n[W])%256,o=n[W],n[W]=n[r],n[r]=o,a+=String.fromCharCode(e.charCodeAt(t)^n[(n[W]+n[r])%256]);return a};_0x27be.ExgMVE=e,_0x27be.qKDYbr={},_0x27be.TyVXsp=!0}const n=o[0];_0x27be.cLNeIP!==n&&(_0x27be.qKDYbr={},_0x27be.cLNeIP=n);const r=_0x27be.qKDYbr[e];return void 0===r?(void 0===_0x27be.KYAnit&&(_0x27be.KYAnit=!0),W=_0x27be.ExgMVE(W,t),_0x27be.qKDYbr[e]=W):W=r,W}import{jsx as _0x5d6d32,jsxs as _0x2555c4}from"react/jsx-runtime";const MineSweeperComponent=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:t,onEndGame:o,onReplayGame:W,onShare:n,onShareScreenshot:r,onShowLeaderboard:a,bannerAd:d})=>{const s="WbJV",i=_0x27be,S={RLiiU:i(367,"oc@R"),gRzXq:function(e,t){return e(t)},WBGgo:function(e,t,o){return e(t,o)},dZvqK:function(e,t,o){return e(t,o)},HYetc:function(e,t){return e||t},OQlsU:function(e,t){return e(t)},zACPi:i(365,"K5hb"),qawBB:function(e,t,o){return e(t,o)},Ryjew:function(e,t){return e(t)},QqzlO:function(e){return e()},vMcTX:function(e){return e()},SUvrE:function(e){return e()},xgoZE:function(e,t,o){return e(t,o)}},p=e?.[i(338,"kz2v")]??!0,u=e?.[i(374,"UieW")]??!0,x=e?.[i(346,"pfe3")]??0,m=_0x400eaf[i(400,"niav")](p);m[i(375,")jZN")]=p;const f=_0x400eaf[i(415,"YUkL")](u);f.current=u;const k=_0x400eaf.useRef(o);k[i(354,"UieW")]=o;const _=useIsPlaying(),l=S.vMcTX(useGameOver),C=S.SUvrE(useGameWon),[O,G]=_0x400eaf[i(428,"YUkL")](0);_0x400eaf[i(412,"UieW")](()=>{const e=i;e(433,"8Y8G")===S.RLiiU?l&&S[e(431,"^1)!")](G,useMineSweeperStore.getState().score):({hPWMi:function(e,t,o){return e(t,o)}}[e(464,"oc@R")](_0x1601f2,_0x406240[e(389,")jZN")][e(452,"jzN6")],_0xddefe2[e(478,"^1)!")]),_0x117595(_0x35b1b3.SUCCESS,_0x583216[e(419,"K5hb")]))},[l]);const b=_0x400eaf[i(417,"gdv*")](!1),R=_0x400eaf[i(422,"A2UO")](e=>{const t=i;if(k[t(434,s)]&&!b[t(408,"nnU9")]){const o=useMineSweeperStore[t(355,s)]();k[t(413,"AMkf")]({status:e,score:o[t(477,"D9*C")][t(377,"MY^O")]()}),b[t(408,"nnU9")]=!0}},[]),P=_0x400eaf[i(343,")9KD")](()=>new MineSweeperService,[]),M=_0x400eaf[i(463,"UKpL")](()=>{const e=i;playSound(GAME_SOUNDS[e(350,"n!Ao")][e(359,"CC)E")],m[e(341,"(]0%")]),S.WBGgo(playHaptic,HapticType[e(420,"@$e0")],f[e(454,"pfe3")])},[]),E=_0x400eaf.useCallback(()=>{const e=i;playSound(GAME_SOUNDS.MINE_SWEEPER[e(448,"FkwE")],m.current),playHaptic(HapticType[e(474,"YUkL")],f.current)},[]),v=_0x400eaf[i(440,"YUkL")](()=>{const e=i;playSound(GAME_SOUNDS[e(388,")9KD")][e(416,"&Ppb")],m[e(380,"kz2v")]),playHaptic(HapticType[e(426,"ybY8")],f[e(394,"8Y8G")])},[]),y=_0x400eaf[i(376,"IK[5")](()=>{const e=i;S[e(368,"i$C1")](playSound,GAME_SOUNDS.MINE_SWEEPER[e(447,"i$C1")],m[e(478,"^1)!")]),playHaptic(HapticType[e(444,"phcq")],f[e(480,"FkwE")])},[]),N=_0x400eaf[i(451,"DNPo")](()=>{const e=i;playSound(GAME_SOUNDS[e(469,"UieW")][e(373,"kz2v")],m[e(380,"kz2v")]),S[e(432,"ZPPq")](playHaptic,HapticType[e(410,"kz2v")],f[e(357,"bV%%")])},[]);_0x400eaf[i(442,"gdv*")](()=>{P.setCallbacks(M,E,v,y,N)},[P,M,E,v,y,N]),_0x400eaf[i(425,"&4bV")](()=>{const e=i;if(S[e(339,"MwH]")](l,C)&&!b[e(454,"pfe3")]){const t=C?e(476,"phcq"):"lose";S[e(378,"(NZ]")](R,t)}!l&&!C&&(b[e(466,"i$C1")]=!1)},[l,C,R]),_0x400eaf.useEffect(()=>{P[i(347,"6N!D")]()},[P]),_0x400eaf[i(445,"K5hb")](()=>()=>{const e=_0x27be;useMineSweeperStore[e(342,"MwH]")]()[e(362,"D9*C")]&&!b[e(413,"AMkf")]&&S[e(411,"(]0%")](R,S[e(366,"wUay")]),P[e(414,"FUY]")](),useMineSweeperStore[e(372,"(]0%")]()[e(450,"^1)!")]()},[P,R]),_0x400eaf.useEffect(()=>{const e=i,t={};t[e(429,"YPNN")]=function(e,t){return e!==t};const o=t;if(!_)return;const W=setGameInterval(()=>{const t=e;useMineSweeperStore[t(372,"(]0%")]()[t(455,"kz2v")]<=0?(useMineSweeperStore[t(430,"&Ppb")]()[t(479,"MwH]")](),playSound(GAME_SOUNDS.MINE_SWEEPER.GAME_OVER,m[t(458,"UKpL")]),playHaptic(HapticType.ERROR,f[t(340,"ByUe")]),clearGameInterval(W)):o[t(361,"&Ppb")](t(384,"i$C1"),t(473,")9KD"))?useMineSweeperStore[t(348,"oc@R")]()[t(403,"oc@R")](-1):_0x104266[t(370,"h9zG")]=!1},1e3);return()=>clearGameInterval(W)},[_]);const U=_0x400eaf.useCallback(()=>{const e=i;b[e(408,"nnU9")]=!1,useMineSweeperStore[e(349,"[LYs")]()[e(396,"6N!D")](MINE_SWEEPER_TIME_LIMIT),P[e(352,"(NZ]")](),playSound(GAME_SOUNDS[e(439,"A@Qo")][e(395,"ByUe")],m[e(380,"kz2v")]),S[e(427,"&4bV")](playHaptic,HapticType[e(392,"&4bV")],f[e(459,"&Ppb")])},[P]),h=_0x400eaf.useCallback(()=>{const e=i,t=e(446,"(]0%")[e(405,"ZPPq")]("|");let o=0;for(;;){switch(t[o++]){case"0":S.WBGgo(playHaptic,HapticType[e(337,"bV%%")],f[e(475,"[LYs")]);continue;case"1":P[e(398,"n!Ao")]();continue;case"2":P[e(401,"D9*C")]();continue;case"3":playSound(GAME_SOUNDS[e(465,"YUkL")][e(379,"CC)E")],m[e(467,"EQxb")]);continue;case"4":useMineSweeperStore[e(363,"FUY]")]().resetGame();continue;case"5":S[e(369,"DNPo")](R,e(471,"WbJV"));continue}break}},[P,R]),g=_0x400eaf[i(440,"YUkL")](()=>{const e=i,t=e(435,"ybY8")[e(436,"&Ppb")]("|");let o=0;for(;;){switch(t[o++]){case"0":P[e(461,"F1!X")]();continue;case"1":b.current=!1;continue;case"2":useMineSweeperStore.getState()[e(438,"n!Ao")]();continue;case"3":P[e(443,"UKpL")]();continue;case"4":W?.();continue}break}},[P,W]),I=_0x400eaf[i(422,"A2UO")](()=>{S[i(441,"EQxb")](g)},[g]),w={..._0x400eaf[i(449,"nnU9")](()=>({isPlaying:_,gameOver:l,onStartGame:U,onStopGame:h,onShare:n,onShowLeaderboard:a,startButtonSubtext:"Tap to reveal cells, long press to flag!"}),[_,l,U,h,n,a])},A={..._0x400eaf[i(399,"WbJV")](()=>({isVisible:l,score:O,onPlayAgain:I,buttonText:i(423,"kz2v"),title:C?"YOU WON!":i(406,"gdv*"),message:C?i(358,"^1)!"):i(404,"F1!X")}),[l,O,I,C])};A[i(356,"CC)E")]=r,A.bannerAd=d;const T={};return T[i(345,"jiCf")]=GAME_IDS[i(385,"oc@R")],T[i(409,"D9*C")]=e||DEFAULT_GAME_SETTINGS,T.onSettingsChange=t,S[i(386,"]K3L")](_0x5d6d32,GestureHandlerRootView,{style:styles[i(421,"MwH]")],children:_0x2555c4(_0x175a57,{offset:x,children:[_0x5d6d32(GameArea,{gameService:P,offset:x}),_0x5d6d32(ScoreBoard,{offset:x}),S.qawBB(_0x5d6d32,GameControlButton,w),_0x5d6d32(GameOverModal,A),_0x5d6d32(GameSettingsModal,T)]})})},_0x491328={};_0x491328[_0x1982d0(371,"jiCf")]=1,_0x491328.backgroundColor=BACKGROUND_COLOR;const _0x49e8c9={flex:1},_0x47c88b={};_0x47c88b[_0x1982d0(460,"pfe3")]=_0x491328,_0x47c88b[_0x1982d0(453,"h9zG")]=_0x49e8c9;const styles=StyleSheet[_0x1982d0(437,"nnU9")](_0x47c88b);export const MineSweeper=MineSweeperComponent;MineSweeper.displayName=_0x1982d0(407,"K5hb");
1
+ "use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS,isTablet}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{scoreColumn,textColumn,timerColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{boardFor,getLayout,LIGHT,TIME_LIMIT}from"./MineSweeperConstants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,start,tick}from"./MineSweeperGame.js";import{jsx as _0x3b76ba}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.MINE_SWEEPER,BOARD=boardFor(isTablet),FEEDBACK={reveal:{sound:SOUNDS.REVEAL,haptic:HapticType.LIGHT},flag:{sound:SOUNDS.FLAG,haptic:HapticType.MEDIUM},mine:{sound:SOUNDS.MINE_HIT,haptic:HapticType.ERROR}};export const MineSweeper=engineGame(GAME_IDS.MINE_SWEEPER,e=>{const[t,s]=useLiveState(0),[i,r]=useLiveState(TIME_LIMIT),[a,n]=useLiveState(BOARD.mines),{theme:o,status:m,screen:S,gameOver:E}=useEngineGame(e,{gameId:GAME_IDS.MINE_SWEEPER,create:e=>createGame(e,BOARD),start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,i)=>{const r=getLayout(t,s,i,BOARD);return setLayout(e,r),r.boardWidth},drag:drag,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.SUCCESS),onStop:e=>e(null,HapticType.MEDIUM),onOver:(e,t)=>e("win"===t?SOUNDS.WIN:SOUNDS.GAME_OVER,"win"===t?HapticType.SUCCESS:HapticType.ERROR),wire:(e,t)=>{e.onScore=s,e.onTime=r,e.onMines=n,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}});return _0x3b76ba(EngineGameScreen,{...S,light:LIGHT,columns:[scoreColumn(t),textColumn("MINES",a),timerColumn(i,o)],subtext:"Reveal cells, flag mines!",gameOver:E({title:"win"===m?"YOU WON!":"BOOM!",message:"win"===m?"All mines cleared!":"You hit a mine!",scoreLabel:"Final Score",score:t,buttonText:"Sweep Again!"})})});
@@ -1 +1 @@
1
- "use strict";function _0x3934(){const a=["W4ZdUZldUqHzW57dMCoj","imkhW7HCqSkhW6W","l8oRWOz+gmo/W7/dVCkQxSkv","hmkyg8kTimkIuSohfG","W6tcJ8kpW5BdNL/dHq","W5yxW7ldNSoSWQLUyCouWRdcQSocW7VcPKdcTSkDW5T/W4xdJ2hdT8oheG","pfFdIKGDnmkM","W6H0CKnFW4RcQW","W7riW67dRCo1WQFcP8oavmkHph3dHa","BxBdRHannSkJpCkemSoJWQNcKConW7GDAc/cN8k8WQbpWRzXDW","w8kEW7ilFSkbW6pdV8kPsCkYcq","WQpcK8kCqSobsa","W6xcGWCmgdPnWPpcTa","cSoJzCopDa","ovedWP7cO8knxGNdGSkxW71uWO4gBwbLW6BdI1ldHSk8W7KdeG","FCksBColj8oorq","WPRdH8ozW6XJBSk2","WPBdT8ksW4LtWQRcS8k4WRG","lCoeWOFdI8opcSoE","WPNcOJm2W6H1W5u","W6ZdNW/cJfxdLstdUrH6WR0yW6xdJMHVqSo9W4dcQeeDWRbMpa","sCk7j8kykCoCvdjxW6ZdN8kgW6m","peyNWQ7dHmkdBmkupSoQWPiZ","WOC1WQxdU8kfW5KE","Bue7WR1OACokpfP6","uuBdRCkKWPLPkq","W5JdIwTdCmomimkvW6q","W4VcPZm","W6ZdUsxdOmkWW7ZcHdPjcxO","xftdGd16tmoFtmoSv8kF","W5yxW7ldNSoSWQLUyCouWRdcQSocW7VcPKdcTSkDW5T/W4xdJ2hdSCoE","FmktW5xdQmkKFmozeSk3W4KJjSoBk8oQzNBcKCokumk5fa","nmo5E8oskrXNW6LwrCk1WQxcP0FcRSkBuq","WR7cHGRdTczZW4FdHW","nmo5E8oskqnRW7fw","kmoEwCoSuCk2pa","rSkEh8ksWPNcNZbSkfJcPq","w8k/vmkwuCoqia","WP0BW7e6mmkoEq","vmk+W5NcIGnIWPjWW5/cISk9ia","p8obWOBcUmk+D8kFBmoAWP9gAq","sCohWRZdTCoOoSkm","WQ/cJvZdNe/dNMtcG3uSW51u","WPtdV3HWC0vxWPBcLhGDW4q","W71NW75ewmkkbtaK","WQH+q1vZWOOP","j1RdItvUu8of","bmoopmoLWQ8tW6C","pcpdJuqrn8kU","y005WRrOEmoap1fVW7NdICk0WQaanCot","FmktW5xdQmkKFmoFfSk3W4KMjCocj8o8zg/cHmowxSk8eWRdI1q","AhbrWRRcVCo7wW","AdxdS3FcGhNcNSoaE00rwa","WP/cGCkgW57dIKddN8kPWRNdHSkBE8oCW7VcHW","WOpcTCk6ASk8k2/cLNuGW5WfW5RcS8kGae8cwq","vCk6W5BcJrTJWO1KW5lcHW","d8o9o8oL","rhRdPG8olI/dQSoaWOlcI1m","rhpdOWydtcVdP8ouWR7cOq","gHfHbCk+W7RcMCk1W5a","W5/dStFdUWnhW4JdH8ojE8kiWPilBei","W6ZcUsb5W5jOqa","WORcL8k5WR4uEmou","W7flW6xdRmoYWQRdGSoasCkPmwC","WRZdNwrdgmkWwq","WORcLmoPWRqrdmox","WRDwWQeuk8oqhmonjMhdHYddUq","WPviW6tdVSk1W7Wlba","CCosoSoWwG","rdG3WO3cKCkIW40","lCkYWOpcVCk/FCoC","W7JdLalcGG8","g1dcIqVdRG7cHmowuu4mxmoJ","t17dHt9Xv8ojwmoTqmkoW47dOCk3WP1Ueq","W6RdOmoeW4T9BmkIDdr/W4KCWOy"];return(_0x3934=function(){return a})()}const _0x4aa467=_0x25d3;!function(){const a=_0x25d3,_=_0x3934();for(;;)try{if(156938==parseInt(a(243,"Mhfy"))/1+parseInt(a(228,"Vd#l"))/2*(parseInt(a(276,"iTW#"))/3)+-parseInt(a(282,"GA9J"))/4+-parseInt(a(237,"^Xi5"))/5*(-parseInt(a(293,"J)Ku"))/6)+parseInt(a(251,"07(z"))/7*(parseInt(a(264,"1vh]"))/8)+-parseInt(a(268,"3jo3"))/9+parseInt(a(277,"Rfn0"))/10*(-parseInt(a(227,"ZUhl"))/11))break;_.push(_.shift())}catch(a){_.push(_.shift())}}();import{PRIMARY_COLOR,lighten,darken}from"../../services/GamesConstants.js";import{getGameDimensions,isTablet}from"../../services/UtilsService.js";const BACKGROUND_COLOR=_0x4aa467(250,"iTW#"),{width:GAME_WIDTH}=getGameDimensions(),COLS=isTablet?12:9,ROWS=isTablet?14:10,CELL_SPACING=3,GRID_PADDING=6,CELL_SIZE=Math[_0x4aa467(256,"ZUhl")]((GAME_WIDTH-12-3*(COLS+1))/COLS);export const GRID_PIXEL_WIDTH=COLS*(CELL_SIZE+3)+3;export const GRID_PIXEL_HEIGHT=ROWS*(CELL_SIZE+3)+3;export const GRID_TOTAL_WIDTH=GRID_PIXEL_WIDTH+12;export const GRID_TOTAL_HEIGHT=GRID_PIXEL_HEIGHT+12;export const GRID_HEIGHT=GRID_TOTAL_HEIGHT;const _0x21b66a={};_0x21b66a[_0x4aa467(253,"uZep")]=isTablet?10:8,_0x21b66a[_0x4aa467(267,"jUEX")]=0,_0x21b66a[_0x4aa467(271,"krfO")]=isTablet?16:12;export const BOARD_3D=_0x21b66a;const _0x1c362c={};_0x1c362c[_0x4aa467(263,"wSp2")]=_0x4aa467(269,"IKM("),_0x1c362c[_0x4aa467(288,"$)jI")]=_0x4aa467(265,"Lr7R"),_0x1c362c.BOARD_INNER="rgba(255, 255, 255, 0.15)",_0x1c362c.BOARD_HIGHLIGHT=_0x4aa467(280,"ZUhl");export const BOARD_FRAME_COLORS=_0x1c362c;const _0x5a2a92={};function _0x25d3(a,_){a-=226;const W=_0x3934();let o=W[a];if(void 0===_0x25d3.RWjJSV){const a=function(a,_){let W,o,x=[],d=0,t="";for(a=function(a){let _="",W="";for(let W,o,x=0,d=0;o=a.charAt(d++);~o&&(W=x%4?64*W+o:o,x++%4)?_+=String.fromCharCode(255&W>>(-2*x&6)):0)o="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(o);for(let a=0,o=_.length;a<o;a++)W+="%"+("00"+_.charCodeAt(a).toString(16)).slice(-2);return decodeURIComponent(W)}(a),o=0;o<256;o++)x[o]=o;for(o=0;o<256;o++)d=(d+x[o]+_.charCodeAt(o%_.length))%256,W=x[o],x[o]=x[d],x[d]=W;o=0,d=0;for(let _=0;_<a.length;_++)o=(o+1)%256,d=(d+x[o])%256,W=x[o],x[o]=x[d],x[d]=W,t+=String.fromCharCode(a.charCodeAt(_)^x[(x[o]+x[d])%256]);return t};_0x25d3.WUxoNs=a,_0x25d3.kzhkku={},_0x25d3.RWjJSV=!0}const x=W[0];_0x25d3.VFVEPh!==x&&(_0x25d3.kzhkku={},_0x25d3.VFVEPh=x);const d=_0x25d3.kzhkku[a];return void 0===d?(void 0===_0x25d3.dQTWSO&&(_0x25d3.dQTWSO=!0),o=_0x25d3.WUxoNs(o,_),_0x25d3.kzhkku[a]=o):o=d,o}_0x5a2a92[_0x4aa467(241,"8rwR")]=ROWS,_0x5a2a92.COLS=COLS,_0x5a2a92[_0x4aa467(244,"UyGr")]=CELL_SIZE,_0x5a2a92[_0x4aa467(299,"hzY&")]=3,_0x5a2a92[_0x4aa467(284,"TY^n")]=isTablet?12:10,_0x5a2a92[_0x4aa467(258,"IKM(")]=100,_0x5a2a92[_0x4aa467(245,"J)Ku")]=50,_0x5a2a92.WIN_BONUS=5e3;export const MINE_SWEEPER_GAME_CONFIG=_0x5a2a92;export const MINE_SWEEPER_TIME_LIMIT=180;const _0x3aa98b={};_0x3aa98b[1]=_0x4aa467(247,"iTW#"),_0x3aa98b[2]=_0x4aa467(226,"i^tc"),_0x3aa98b[3]=_0x4aa467(255,"p*SB"),_0x3aa98b[4]=_0x4aa467(298,"dxJU"),_0x3aa98b[5]=_0x4aa467(266,"IKM("),_0x3aa98b[6]=_0x4aa467(278,"p*SB"),_0x3aa98b[7]=_0x4aa467(246,"QrBP"),_0x3aa98b[8]=_0x4aa467(254,"&WB%");export const NUMBER_COLORS=_0x3aa98b;const _0x44dc7c={};_0x44dc7c[_0x4aa467(240,"hzY&")]=BACKGROUND_COLOR,_0x44dc7c[_0x4aa467(295,"nCom")]=PRIMARY_COLOR,_0x44dc7c[_0x4aa467(289,"IKM(")]=_0x4aa467(297,"nCom"),_0x44dc7c.CELL_HIDDEN_ALT="#5DA86E",_0x44dc7c[_0x4aa467(259,"iTW#")]=_0x4aa467(236,"(sVb"),_0x44dc7c[_0x4aa467(234,"TY^n")]=_0x4aa467(283,"Lr7R"),_0x44dc7c[_0x4aa467(286,"bPJm")]=_0x4aa467(233,"IKM("),_0x44dc7c[_0x4aa467(272,"Vd#l")]=_0x4aa467(232,"WTBH"),_0x44dc7c[_0x4aa467(229,"dxJU")]=_0x4aa467(249,"bPJm"),_0x44dc7c.CELL_BORDER=_0x4aa467(239,"krfO"),_0x44dc7c.UI=PRIMARY_COLOR,_0x44dc7c[_0x4aa467(257,"^Xi5")]="rgba(255, 255, 255, 0.10)",_0x44dc7c.GRID_BOX_BORDER=_0x4aa467(235,"p*SB");export const MINE_SWEEPER_COLORS=_0x44dc7c;export const CELL_BEVEL=Math[_0x4aa467(287,"Vd#l")](Math[_0x4aa467(273,"nCom")](.08*CELL_SIZE),2);const HIDDEN_BASE=MINE_SWEEPER_COLORS[_0x4aa467(262,"oq]C")],HIDDEN_ALT_BASE=MINE_SWEEPER_COLORS[_0x4aa467(238,"1vh]")];export const CELL_3D={hidden:{top:lighten(HIDDEN_BASE,.35),face:HIDDEN_BASE,faceBottom:darken(HIDDEN_BASE,.08),right:darken(HIDDEN_BASE,.25),bottom:darken(HIDDEN_BASE,.35),highlight:"rgba(255, 255, 255, 0.30)"},hiddenAlt:{top:lighten(HIDDEN_ALT_BASE,.35),face:HIDDEN_ALT_BASE,faceBottom:darken(HIDDEN_ALT_BASE,.08),right:darken(HIDDEN_ALT_BASE,.25),bottom:darken(HIDDEN_ALT_BASE,.35),highlight:_0x4aa467(274,"(sVb")},revealed:{face:MINE_SWEEPER_COLORS.CELL_REVEALED,faceBottom:darken(MINE_SWEEPER_COLORS.CELL_REVEALED,.06),insetShadow:"rgba(0, 0, 0, 0.12)",insetLight:_0x4aa467(290,"Lr7R")},revealedAlt:{face:MINE_SWEEPER_COLORS.CELL_REVEALED_ALT,faceBottom:darken(MINE_SWEEPER_COLORS[_0x4aa467(292,"r%z6")],.06),insetShadow:"rgba(0, 0, 0, 0.12)",insetLight:"rgba(255, 255, 255, 0.4)"},mine:{face:MINE_SWEEPER_COLORS[_0x4aa467(260,"J)Ku")],faceBottom:darken(MINE_SWEEPER_COLORS[_0x4aa467(294,"r%z6")],.15),glow:_0x4aa467(291,"p*SB")},flag:{pole:_0x4aa467(230,"NLsR"),cloth:_0x4aa467(285,"ntA*"),clothShadow:darken(_0x4aa467(275,"wSp2"),.2),base:_0x4aa467(261,"%5nY")}};
1
+ "use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const boardFor=t=>t?{rows:14,cols:12,mines:5}:{rows:10,cols:9,mines:5};export const TIME_LIMIT=180;export const POINTS_PER_REVEAL=100;export const POINTS_PER_FLAG=50;export const WIN_BONUS=5e3;export const FLAG_HOLD=.3;export const TAP_SLOP=10;export const TAP_MAX=.5;export const GAME_OVER_DELAY=.4;export const REVEAL_STEP=.025;export const NUMBER_COLORS=["","#2196F3","#4CAF50","#F44336","#9C27B0","#FF9800","#00BCD4","#795548","#607D8B"];export const COLORS={HIDDEN:"#3D7A4E",HIDDEN_ALT:"#5DA86E",REVEALED:"#F0E6D0",REVEALED_ALT:"#E5DABE",MINE:"#E74C3C",CLASSIC_BOARD:"rgba(255, 255, 255, 0.30)",CLASSIC_GRID:"rgba(255, 255, 255, 0.10)"};export const TILT=.34;export const LIGHT=frontLight([-.4,.5,1],.45);const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=110;export const SPACING=3;const PADDING=6;export function getLayout(t,o,r,e){const n=gameWidthFor(t),s=getScoreBoardTop(r)+82,i=Math.max(200,o-s-110),E=(n-12-3*(e.cols+1))/e.cols,h=(i/Math.cos(.34)-12-3*(e.rows+1))/e.rows,l=Math.max(10,Math.floor(Math.min(E,h))),p=e.cols*(l+3)+3,A=e.rows*(l+3)+3;return{...e,width:t,height:o,tilt:.34,centerY:s+i/2,cell:l,pitch:l+3,gridWidth:p,gridHeight:A,boardWidth:p+12,boardHeight:A+12}}export function cellCentre(t,o,r){return[-t.gridWidth/2+3+r*t.pitch+t.cell/2,t.gridHeight/2-3-o*t.pitch-t.cell/2]}export function cellAt(t,o,r){const e=o+t.gridWidth/2-3,n=t.gridHeight/2-3-r,s=Math.floor(e/t.pitch),i=Math.floor(n/t.pitch);return i<0||i>=t.rows||s<0||s>=t.cols?null:e-s*t.pitch<=t.cell&&n-i*t.pitch<=t.cell?[i,s]:null}
@@ -0,0 +1 @@
1
+ "use strict";import{World}from"@nayan-ui/engine";import{calculateTimeBasedScore}from"../../services/ScoringService.js";import{aimTilted,unproject}from"../shared/EngineTilt.js";import{cellAt,FLAG_HOLD,GAME_OVER_DELAY,POINTS_PER_FLAG,POINTS_PER_REVEAL,TAP_MAX,TAP_SLOP,TIME_LIMIT,WIN_BONUS}from"./MineSweeperConstants.js";import{CellState,emptyGrid,floodReveal,placeMines}from"./MineSweeperRules.js";import{buildScene,celebrate,explode,flag,removeScene,reveal,setSceneTheme}from"./MineSweeperScene.js";const WORLD_CAPACITY=600;export function createGame(e,o){const r=new World(600),t={world:r,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,board:o,layout:null,scene:null,phase:"ready",grid:emptyGrid(o),firstReveal:!0,mineHit:!1,get score(){return r.scoreboard.score},get timeRemaining(){return r.scoreboard.shownSeconds},minesRemaining:o.mines,revealed:0,won:!1,press:null,clock:0,onPhase:e=>{},onScore:e=>{},onTime:e=>{},onMines:e=>{},onEvent:e=>{}};return r.scoreboard.reset(0,TIME_LIMIT),r.scoreboard.handlers={onSecond:e=>t.onTime(e),onTimeUp:()=>"playing"===t.phase&&end(t,!1)},t}const safeCells=e=>e.rows*e.cols-e.mines;export function setLayout(e,o){e.scene&&removeScene(e.world,e.scene),e.layout=o,aimTilted(e.camera,o),e.scene=buildScene(e.world,o,e.theme,e.grid)}export function setTheme(e,o){e.theme=o,e.layout&&e.scene&&setSceneTheme(e.world,e.layout,e.scene,o)}export function start(e){"ready"===e.phase&&(e.phase="playing",e.world.scoreboard.reset(),e.world.scoreboard.startCountdown(TIME_LIMIT),e.revealed=0,e.firstReveal=!0,e.mineHit=!1,e.onScore(0),e.onTime(TIME_LIMIT),e.onPhase("playing"))}export function reset(e){e.world.cancelTimers(),e.grid=emptyGrid(e.board),e.firstReveal=!0,e.mineHit=!1,e.world.scoreboard.reset(0,TIME_LIMIT),e.minesRemaining=e.board.mines,e.revealed=0,e.won=!1,e.press=null,e.phase="ready",e.layout&&setLayout(e,e.layout),e.onScore(0),e.onTime(TIME_LIMIT),e.onMines(e.minesRemaining),e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function tick(e,o){if(e.world.isDisposed)return;e.clock+=Math.min(o,.25);const r=e.press;r&&!r.flagged&&r.cell&&e.clock-r.at>=FLAG_HOLD&&(r.flagged=!0,toggleFlag(e,r.cell[0],r.cell[1])),e.world.update(o)}function end(e,o){e.world.scoreboard.stop(),e.won=o,e.phase="over",e.press=null,e.onPhase("over")}export function cellUnder(e,o,r){const t=e.layout;if(!t)return null;const[n,l]=unproject(t,o,r,.32*t.cell);return cellAt(t,n,l)}export function drag(e,{phase:o,x:r,y:t}){if("start"===o)return void(e.press={x:r,y:t,at:e.clock,cell:cellUnder(e,r,t),flagged:!1});const n=e.press;n&&(Math.hypot(r-n.x,t-n.y)>TAP_SLOP?e.press=null:"end"===o&&(e.press=null,!n.flagged&&n.cell&&e.clock-n.at<TAP_MAX&&revealAt(e,n.cell[0],n.cell[1])))}export function revealAt(e,o,r){if("playing"!==e.phase||e.mineHit)return;const t=e.grid[o]?.[r];if(!t||t.state!==CellState.HIDDEN)return;e.firstReveal&&(e.firstReveal=!1,placeMines(e.grid,e.board,o,r));const{layout:n,scene:l}=e;if(t.isMine){e.mineHit=!0;const o=e.grid.flat().filter(e=>e.isMine&&e.state!==CellState.REVEALED);for(const e of o)e.state=CellState.REVEALED;return n&&l&&explode(e.world,n,l,e.camera,t,o),e.onEvent("mine"),e.world.scoreboard.stop(),void e.world.after(GAME_OVER_DELAY,()=>end(e,!1))}const s=floodReveal(e.grid,e.board,o,r);if(s.length){for(const e of s)e.state=CellState.REVEALED;if(e.revealed+=s.length,e.world.scoreboard.add(s.length*POINTS_PER_REVEAL),n&&l&&reveal(e.world,n,l,s,t),e.onEvent("reveal"),e.revealed>=safeCells(e.board))return e.world.scoreboard.set(calculateTimeBasedScore(TIME_LIMIT-e.timeRemaining,TIME_LIMIT,e.score+WIN_BONUS)),e.onScore(e.score),n&&celebrate(e.world,n),void end(e,!0);e.onScore(e.score)}}export function toggleFlag(e,o,r){if("playing"!==e.phase||e.mineHit)return;const t=e.grid[o]?.[r];if(!t||t.state===CellState.REVEALED)return;const n=t.state===CellState.HIDDEN;t.state=n?CellState.FLAGGED:CellState.HIDDEN,e.minesRemaining+=n?-1:1,n&&e.world.scoreboard.add(POINTS_PER_FLAG),e.layout&&e.scene&&flag(e.world,e.layout,e.scene,t),e.onMines(e.minesRemaining),n&&(e.onScore(e.score),e.onEvent("flag"))}
@@ -0,0 +1 @@
1
+ "use strict";export let CellState=function(e){return e.HIDDEN="hidden",e.REVEALED="revealed",e.FLAGGED="flagged",e}({});export function emptyGrid(e){return Array.from({length:e.rows},(t,o)=>Array.from({length:e.cols},(e,t)=>({row:o,col:t,isMine:!1,state:CellState.HIDDEN,adjacentMines:0})))}export function placeMines(e,t,o,n){let r=0;for(;r<t.mines;){const s=Math.floor(Math.random()*t.rows),l=Math.floor(Math.random()*t.cols);(Math.abs(s-o)>1||Math.abs(l-n)>1)&&!e[s][l].isMine&&(e[s][l].isMine=!0,r++)}for(let o=0;o<t.rows;o++)for(let n=0;n<t.cols;n++){if(e[o][n].isMine)continue;let t=0;for(let r=-1;r<=1;r++)for(let s=-1;s<=1;s++)(r||s)&&e[o+r]?.[n+s]?.isMine&&t++;e[o][n].adjacentMines=t}}export function floodReveal(e,t,o,n){const r=[[o,n]],s=new Uint8Array(t.rows*t.cols);s[o*t.cols+n]=1;const l=[];for(let o=0;o<r.length;o++){const[n,i]=r[o],a=e[n]?.[i];if(a&&a.state===CellState.HIDDEN&&!a.isMine&&(l.push(a),0===a.adjacentMines))for(let e=-1;e<=1;e++)for(let o=-1;o<=1;o++){if(!e&&!o)continue;const l=n+e,a=i+o;l<0||l>=t.rows||a<0||a>=t.cols||s[l*t.cols+a]||(s[l*t.cols+a]=1,r.push([l,a]))}}return l}
@@ -0,0 +1 @@
1
+ "use strict";import{effects,extrude,lathe,merge,Path,quat,shapeGeometry,tube}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{GLYPH_RADIUS,glyphMesh}from"../shared/EngineGlyphs.js";import{cacheGameAsset,createGameMesh as _0x38f695}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{cellCentre,COLORS,NUMBER_COLORS,REVEAL_STEP}from"./MineSweeperConstants.js";import{CellState}from"./MineSweeperRules.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("mine-sweeper/MineSweeperScene:"+e,o),meshes.set(e,t)),t},STAND_UP=quat.x(Math.PI/2),BOARD_DEPTH=10,BACKDROP_DEPTH=25,RAISED=.32,SUNK=.08,mineMesh=()=>cached("ms-mine",()=>{const e=lathe([[.07,0],[.04,.14],[.001,.2]],{segments:10}),o=[{geometry:shapeGeometry("sphere"),position:[0,0,.32],scale:.48,color:[.12,.12,.14,1]}];for(let t=0;t<8;t++){const l=t/8*Math.PI*2,s=t%2?.45:-.45,a=quat.multiply(quat.z(l),quat.multiply(quat.y(Math.PI/2+s),STAND_UP));o.push({geometry:e,position:[.2*Math.cos(l),.2*Math.sin(l),.32+.3*s],rotation:a,color:[.2,.2,.22,1]})}return o.push({geometry:shapeGeometry("sphere"),position:[-.08,.08,.5],scale:.09,color:[.9,.9,.95,1]}),_0x38f695(merge(o),{center:!1,shine:.8})}),flagMesh=()=>cached("ms-flag",()=>{const e=extrude((new Path).moveTo(0,0).lineTo(.36,.12).lineTo(0,.26).close(),{depth:.03});return _0x38f695(merge([{geometry:lathe([[.001,.05],[.18,.05],[.2,0],[.001,0]],{segments:18}),rotation:STAND_UP,color:[.33,.33,.33,1]},{geometry:tube([[-.06,0,.04],[-.06,0,.72]],{radius:.03,sides:8}),color:toColor("#8B4513")},{geometry:e,position:[-.06,0,.72],rotation:STAND_UP,color:toColor("#E74C3C")}]),{center:!1,shine:.4})}),panelMesh=(e,o,t)=>cached("ms-panel:"+e+"x"+o+":"+t,()=>_0x38f695(extrude((new Path).addRoundedRect(-e/2,-o/2,e,o,t),{depth:10}),{shine:.2})),alt=(e,o)=>(e+o)%2==1,hiddenColor=(e,o)=>toColor(alt(e,o)?COLORS.HIDDEN_ALT:COLORS.HIDDEN),revealedColor=e=>toColor(e.isMine?COLORS.MINE:alt(e.row,e.col)?COLORS.REVEALED_ALT:COLORS.REVEALED),panelColor=e=>toColor("classic"===e.mode?COLORS.CLASSIC_BOARD:e.BOARD.SURFACE);export function buildScene(e,o,t,l){const s=spawnBackdrop(e,o.width,o.height,-25,t);placeTiltedBackdrop(e,s,o,25);const a="classic"===t.mode,r=e.spawn({mesh:panelMesh(o.boardWidth,o.boardHeight,a?12:8),position:[0,0,-5],color:panelColor(t),pickable:!1}),n=a?e.spawn({mesh:panelMesh(o.gridWidth,o.gridHeight,8),position:[0,0,-4.7],color:toColor(COLORS.CLASSIC_GRID),pickable:!1}):null,i=[],p=[];for(const t of l)for(const l of t){const[t,s]=cellCentre(o,l.row,l.col),a=l.state===CellState.REVEALED,r=o.cell*(a?.08:.32);i.push(e.spawn({mesh:"roundedBox",position:[t,s,r/2],scale:[o.cell,o.cell,r],color:a?revealedColor(l):hiddenColor(l.row,l.col),pickable:!1})),p.push(null)}const h={backdrop:s,panel:r,grid:n,tiles:i,marks:p};for(const t of l)for(const l of t)mark(e,o,h,l,!1);return h}export function removeScene(e,o){for(const t of[o.backdrop,o.panel,o.grid,...o.tiles,...o.marks])null!=t&&e.despawn(t)}export function setSceneTheme(e,o,t,l){setBackdropTheme(e,t.backdrop,l),e.set(t.panel,{mesh:panelMesh(o.boardWidth,o.boardHeight,"classic"===l.mode?12:8),color:panelColor(l)}),null!=t.grid&&e.set(t.grid,{scale:"classic"===l.mode?1:0})}const at=(e,o,t)=>{const[l,s]=cellCentre(e,o.row,o.col);return[l,s,t]};function mark(e,o,t,l,s,a=0){const r=l.row*o.cols+l.col,n=t.marks[r];null!=n&&e.despawn(n),t.marks[r]=null;let i=null;if(l.state===CellState.FLAGGED)i=e.spawn({mesh:flagMesh(),position:at(o,l,.32*o.cell),scale:.8*o.cell,pickable:!1});else if(l.state===CellState.REVEALED&&l.isMine)i=e.spawn({mesh:mineMesh(),position:at(o,l,.08*o.cell),scale:.85*o.cell,pickable:!1});else if(l.state===CellState.REVEALED&&l.adjacentMines>0){const t=.56*o.cell;i=e.spawn({mesh:glyphMesh(String(l.adjacentMines)),position:at(o,l,.08*o.cell+GLYPH_RADIUS*t),scale:t,color:toColor(NUMBER_COLORS[l.adjacentMines]),pickable:!1})}if(t.marks[r]=i,null!=i&&s){const t=l.state===CellState.FLAGGED?.8*o.cell:l.state===CellState.REVEALED&&l.isMine?.85*o.cell:.56*o.cell;e.set(i,{scale:.01}),e.animate(i,{scale:t},{duration:.22,delay:a,easing:"back"})}}export function reveal(e,o,t,l,s){for(const a of l){const l=Math.hypot(a.row-s.row,a.col-s.col)*REVEAL_STEP,r=t.tiles[a.row*o.cols+a.col],n=.08*o.cell;e.animate(r,{position:at(o,a,n/2),scale:[o.cell,o.cell,n],color:revealedColor(a)},{duration:.16,delay:l,easing:"easeIn"}),mark(e,o,t,a,!0,l+.1)}}export function flag(e,o,t,l){mark(e,o,t,l,!0)}export function explode(e,o,t,l,s,a){reveal(e,o,t,a,s);const[r,n]=cellCentre(o,s.row,s.col);effects.explosion(e,{position:[r,n,.4*o.cell],count:28,size:.9*o.cell,speed:4*o.cell,lifetime:.6,direction:[0,0,1],spread:1.4,debris:[toColor("#3E4A58"),toColor("#8D6E63"),toColor("#5A5A5A")]}),l.shake=.25*o.cell}export function celebrate(e,o){effects.confetti(e,{position:[0,0,o.cell],count:60,size:.2*o.cell,speed:1.4*o.boardWidth,lifetime:1.3,gravity:2.4*-o.boardWidth,colors:["#FFD700","#4CAF50","#2196F3","#E74C3C"].map(e=>toColor(e))})}
@@ -1 +1 @@
1
- "use strict";const _0x54c527=_0x174b;!function(){const o=_0x174b,e=_0x3499();for(;;)try{if(720389==-parseInt(o(540,"wvp1"))/1*(-parseInt(o(553,"!5J0"))/2)+-parseInt(o(537,"#&kf"))/3+parseInt(o(548,"U0OW"))/4+-parseInt(o(565,"0dpm"))/5+parseInt(o(634,"WJ1o"))/6+parseInt(o(511,"U0OW"))/7+-parseInt(o(514,"U0OW"))/8)break;e.push(e.shift())}catch(o){e.push(e.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x5b7047 from"react";import{StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x2c2118}from"../../helpers/index.js";import{DEFAULT_GAME_SETTINGS,GAME_IDS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{useMobControlStore,useGameOver,useWon,useIsPlaying}from"./MobControlStore.js";import{MobControlService}from"./MobControlService.js";import{MOB_CONFIG}from"./MobControlConstants.js";function _0x174b(o,e){o-=496;const t=_0x3499();let W=t[o];if(void 0===_0x174b.SXQzyZ){const o=function(o,e){let t,W,n=[],r=0,d="";for(o=function(o){let e="",t="";for(let t,W,n=0,r=0;W=o.charAt(r++);~W&&(t=n%4?64*t+W:W,n++%4)?e+=String.fromCharCode(255&t>>(-2*n&6)):0)W="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(W);for(let o=0,W=e.length;o<W;o++)t+="%"+("00"+e.charCodeAt(o).toString(16)).slice(-2);return decodeURIComponent(t)}(o),W=0;W<256;W++)n[W]=W;for(W=0;W<256;W++)r=(r+n[W]+e.charCodeAt(W%e.length))%256,t=n[W],n[W]=n[r],n[r]=t;W=0,r=0;for(let e=0;e<o.length;e++)W=(W+1)%256,r=(r+n[W])%256,t=n[W],n[W]=n[r],n[r]=t,d+=String.fromCharCode(o.charCodeAt(e)^n[(n[W]+n[r])%256]);return d};_0x174b.qCEmwt=o,_0x174b.ntsvAZ={},_0x174b.SXQzyZ=!0}const n=t[0];_0x174b.CLjcnm!==n&&(_0x174b.ntsvAZ={},_0x174b.CLjcnm=n);const r=_0x174b.ntsvAZ[o];return void 0===r?(void 0===_0x174b.PykcLO&&(_0x174b.PykcLO=!0),W=_0x174b.qCEmwt(W,e),_0x174b.ntsvAZ[o]=W):W=r,W}function _0x3499(){const o=["W4fipCoamwq0Bh3dUxhdPmo/W4G","BSoEyvVdOr0we8ofvSoR","CmoABmosqwRcTG","WO7dTSk+W6pdMSk8WOi","m3ddLL7cTq","rmkNrMOOnLFdJmkeW5qFW7ZdICkRt8o9WReQqGX5W5ONWRD0WOC1WPBdLrxdRs8","W4SLyCo3gx7dHZ8mjKS","eJZdPMxdOW","ACkHW71vvq","W5u6smoOW55vo8kDrmoWwG","DJBcQCo0jSky","W7jYWPZcVCojW47dSG","WQzdWPZdP8kJ","vCo7eCoHpq","W6VcR25uo8kl","W7ddGmosgSoJWRrfpmoH","jMBdMMpcI8o5c8o1ghO","eSkVmSoBW5DKgG","bqrNzKCPvLVcQdTC","WPRdOGVdPHS","WR/cS05WW4S","WOjDWRZdLSkfW7q","imkLW4uDpvhdJsxcMg/cGq","gGJcJ8oLWPJdUY0ZxJRcSmo0fG","iaKIW73dSSksWQ/dIa","W4WZD8ordfxdIJai","oCkQBmkKnCosW7hcPmoleW","eWjWv0mRtG","W5q/W6LCW5G","WOzgdSo4kCkO","zSoCE8oTqwNcRq","W4ldUCoNn8ojWOHoeCojW6u","w1/dISkWW5ZcI38sAG","gsZdU1ldNYnRW4TjD8kj","W4ropmofoMqXdw3dT1tdM8o7","W7mZgmkhWO3dUhTG","aSkeW4qUh23dQW","n8ofWRT2qmo5W7K","WOJdHsNcUSk4WOBcGWmYW7TlWOW","qKC0D3muxxBcSa","j8otWQz2qa","a8k/m8omW4znd8kKW6e","WQOMWPNdRWDYWOjDFvHVt8k3WPBcIxVcNCkm","WPqSWPJcNaf2WPDB","BSoEDLBdRqeyaSobtq","W7hcSLHUp8kFma","WR0YsSkVsX5jdLBdU0K","eCoIWPTlDW","kmkKW4ipj0hdGtdcMwxcKSooiG","WP7dS8kGW7JdIW","rJlcR8oybSkuxGS","eZTSWRrOd8onpmkZWQRcUK7dLa","WQhdVt7dMc/cICor","rsZcQ8oon8oEWOtcUSo8W6zrW5K","W7CmzmoWW40","W7mzrSoRo13dPqK/cMW","WRSQe0DnW51j","AmodyvVdOr0+gSod","FZW5","tSogW7SyxhjsW67dGSk1W7u","W63cV2r0oW","iwZdVuFcLCoXhmo7","WPblWQ3dL8kuW7pdTgm","W5a5W49MW6OdbwJcJSoSW7K","W5xdV8o2eCodWOa","W4pcKwVdJCoGW5NdNqW+W4PeWQ1t","wmoaW6WPwhbk","ihddI3dcHSo0hSo+f37cJG","iCodWQXhrmo7W6hdVtdcM2G","WOXgkmo7mCkOWOq1WRNdGe7cVW","qSoODSkzWOi9xCkfW5uXocSb","W4hdSxBcJmoOW57dVCok","vatcNSoOcSkWWOi","cSkuuvunmae","FSkPxsK+lW","W4xdOxdcRCo5W5hdVq","pCkjbSowWQCiFq","W4GqW5Tkdmoyt2neWPVdIa","WPmiESkcBt9Z","W4yLW4rrW6Ogb2/cNq","BCovr1ldRa","WPa8WP7cVrb5WPC","kcpdIIlcGtRdMNGdWPnjWRFcMq","tGdcImoVfSkZ","uCkbDaip","W7pcQGj7m0z3W6S1","wmkGW6rHFG","WORdJrNdSc0","dCk0o8oRWPy","iCkyW4ddPXNcVG","WOeJaL4SASoNWPlcUW","WQvJvCoTW43cRJPeWR8zDW3dKG","WOzjW6PWWRJdGmoMwG","hSkEW6yWcLNdOHZcRW","m8ovWR1xuCo2W7NdUG","WQ5PbmoCaSkcWOeFWP4","B8oJaLldPa7cMvVdTmkWWRm","WPPljSoRoa","n8oazIFdOSkGW7C","W4SLyCoXhNtdJJ4z","lSkGD2i","vJ7cTq","W4pdUMpcVCoWW5RdMSoaWO91W5bz","D8kNW6fuuw/cJW","B0exW5iFD8k2kCkYWRpcKa","B0ebW64+","tJhcVCo4f8kb","WPNcUSkGCSodWQLIa8oZW78","j8oaDIBdPmk8W6RdV8ko","WRqiWQhcILvyWRv7rW","WPXBlmouomkGWRG","WP/dPSk/W7tdI8kvWPCTtq","lCocWOblFW","gmkzW6iqg3G","ubhcJCo0fW","zcdcUmo1n8kFWRhcUa","W7CJhSkMWPZdT3S","WO81jMe5CSo6WPK","BmkwgCoaW7RcJ2O","W7hcSLHUmCkciq","W40mWRm0W4BcKSk5uSkjW7eWreK","WPJdLs/cI8k8WOtcMW","hJddULddLIXM","exjHW7fTrmokaCoq","WRBcUfL3W4VdT1lcRGWpW5WDvG","maeIW7NcLCkc","W7eQW7Lboq","wmoAW7aVxhDqW6NdKq","sK/dI8kNW43cOMO","W4pdUCoHmCodWOHU","W4/dOSoxiSolWOD9eq","BNxcJxldH0JcJuip","cSkpW7mrcN/dTXq","rbazW6pcVYjjsapdMq","W73cQxL0o8kdiq","WQ0SbhzjW59rW6NcOd8e","W503ASoxhx4","WRH4W4fjWQRdRa","n8ozCttdQCk7W7m","W4rommofp2CXfvldPNldUSon","zSoWoSoT","ECoLfwpdOaZcGq"];return(_0x3499=function(){return o})()}import{ScoreBoard}from"./components/ScoreBoard.js";import{GameArea}from"./components/GameArea.js";import{jsx as _0x66786d,jsxs as _0x51031e}from"react/jsx-runtime";const MobControlComponent=({settings:o=DEFAULT_GAME_SETTINGS,onSettingsChange:e,onEndGame:t,onReplayGame:W,onShare:n,onShareScreenshot:r,onShowLeaderboard:d,bannerAd:s})=>{const a="puFD",S="xaNe",m="v4C8",i=_0x174b,C={MOTcb:function(o,e,t){return o(e,t)},HEUZg:function(o,e,t){return o(e,t)},GenZU:function(o,e,t){return o(e,t)},yrIOZ:function(o,e,t){return o(e,t)},XjGLQ:function(o,e,t){return o(e,t)},FYZlc:function(o,e,t){return o(e,t)},quCyS:function(o,e,t){return o(e,t)},UgNtm:i(600,"b]t3"),QmEcC:i(637,"0dpm"),bcOCY:function(o){return o()},fsxmR:function(o,e){return o||e}},p=_0x5b7047[i(524,"#I@m")](o?.[i(583,a)]??!0);p.current=o?.[i(616,"5W@L")]??!0;const u=_0x5b7047.useRef(o?.[i(496,"0yL@")]??!0);u[i(531,"8ub$")]=o?.[i(496,"0yL@")]??!0;const x=o?.[i(620,"Njje")]??0,l=_0x5b7047.useRef(t);l[i(595,"im0@")]=t;const b=_0x5b7047[i(627,"%VTB")](W);b[i(632,"CE%l")]=W;const O=C.bcOCY(useGameOver),f=useWon(),k=useIsPlaying(),_=O||f,G=_0x5b7047[i(603,"1($l")](!1),M=_0x5b7047[i(528,S)](0),R=_0x5b7047[i(578,"S($y")](1),y=_0x5b7047[i(535,"^OEZ")](!1),j=_0x5b7047[i(573,"gc(*")](o=>{const e=i;if(l[e(551,"p5j3")]&&!y[e(635,"x8*x")]){const t=useMobControlStore[e(504,"%VTB")]()[e(554,"p5j3")];l[e(525,"WxwE")]({status:o,score:t[e(575,"6qTx")]()}),y.current=!0}},[]),h=_0x5b7047[i(516,"I30N")](()=>new MobControlService,[]),N=_0x5b7047.useCallback(()=>{const o=i;playSound(GAME_SOUNDS[o(523,"hlm6")][o(602,"a82a")],p[o(580,"gc(*")])},[]),L=_0x5b7047[i(507,"akS#")](()=>{const o=i;C[o(619,"0dpm")](playSound,GAME_SOUNDS.MOB_CONTROL[o(614,"p3y2")],p.current),C[o(601,"r]!7")](playHaptic,HapticType[o(598,"Dmnn")],u[o(517,"zpjs")])},[]),P=_0x5b7047[i(532,"!5J0")](()=>{const o=i;playSound(GAME_SOUNDS[o(618,"0dpm")][o(572,"KCOz")],p[o(501,"S($y")]),C.GenZU(playHaptic,HapticType[o(597,"#I@m")],u[o(612,"^gb4")])},[]),v=_0x5b7047.useCallback(()=>{const o=i;C[o(626,"p5j3")](playHaptic,HapticType[o(498,"TlWR")],u[o(590,"a82a")])},[]),T=_0x5b7047[i(577,"X!Ru")](()=>{const o=i;playSound(GAME_SOUNDS[o(618,"0dpm")].LEVEL_UP,p[o(570,"akS#")]),C.XjGLQ(playHaptic,HapticType.SUCCESS,u[o(544,"I30N")])},[]),I=_0x5b7047[i(591,"TlWR")](()=>{const o=i;C.FYZlc(playSound,GAME_SOUNDS.MOB_CONTROL[o(497,"]sxk")],p[o(513,"s6^P")]),C[o(542,"X!Ru")](playHaptic,HapticType[o(586,"#I@m")],u[o(517,"zpjs")])},[]),q=_0x5b7047[i(582,"p5j3")](()=>{const o=i;playSound(GAME_SOUNDS[o(569,"v4C8")].GAME_OVER,p.current),playHaptic(HapticType[o(561,"p5j3")],u[o(587,"p3y2")])},[]);_0x5b7047.useEffect(()=>{const o=i,e={};e[o(633,"xaNe")]=N,e[o(543,"puFD")]=L,e.onHit=P,e[o(550,"%VTB")]=v,e.onLevelUp=T,e[o(502,"S($y")]=I,e[o(558,"845&")]=q,h[o(552,"x8*x")](e)},[h,N,L,P,v,T,I,q]),_0x5b7047[i(613,m)](()=>{const o=i;return useMobControlStore[o(622,"^gb4")](e=>e[o(571,"845&")],e=>{const t=o;G[t(531,"8ub$")]=e,h[t(530,"6qTx")](e)})},[h]),_0x5b7047.useEffect(()=>{const o=i;if(O&&!y[o(589,"5W@L")]&&j(f?o(615,"Njje"):"lose"),_){const e=useMobControlStore[o(585,"5W@L")]();M[o(589,"5W@L")]=e[o(574,"xaNe")],R[o(513,"s6^P")]=e.level}if(!O)if("RFgSK"===C[o(527,"wvp1")]){const e=_0x2726dc[o(629,"#I@m")]();_0x47c660[o(630,"A!Z4")]=e.score,_0x410f9a[o(517,"zpjs")]=e[o(594,"845&")]}else y[o(589,"5W@L")]=!1},[O,f,_,j]),_0x5b7047.useEffect(()=>{h.initialize()},[h]),_0x5b7047.useEffect(()=>{const o=i,e={};e[o(521,"KCpA")]=o(588,"Dmnn");const t=e;return()=>{const e=o;useMobControlStore.getState()[e(604,"Nd(F")]&&!y[e(592,"U0OW")]&&j(t[e(568,"hlm6")]),useMobControlStore[e(631,"Nd(F")]()[e(606,"WJ1o")](),h[e(510,"^gb4")](),useMobControlStore[e(564,"Njje")]()[e(539,"v4C8")]()}},[h,j]);const U=_0x5b7047[i(610,"s6^P")](()=>{const o=i;y[o(500,"#&kf")]=!1,h[o(503,"C5)#")](),useMobControlStore[o(576,"^OEZ")]()[o(607,"%VTB")](MOB_CONFIG[o(562,"%VTB")],MOB_CONFIG[o(529,"S($y")]),h[o(505,"KCOz")](!0),h[o(599,"Oq5b")](),playSound(GAME_SOUNDS.MOB_CONTROL[o(628,"#I@m")],p[o(566,"r]!7")]),C[o(533,"r]!7")](playHaptic,HapticType.SUCCESS,u.current)},[h]),g=_0x5b7047[i(581,"6qTx")](()=>{const o=i,e=C[o(526,"^OEZ")][o(563,"zpjs")]("|");let t=0;for(;;){switch(e[t++]){case"0":useMobControlStore[o(549,"A!Z4")]().resetGame();continue;case"1":C.XjGLQ(playHaptic,HapticType[o(509,"WJ1o")],u[o(531,"8ub$")]);continue;case"2":h[o(546,"#&kf")]();continue;case"3":j(o(508,"v4C8"));continue;case"4":C.FYZlc(playSound,GAME_SOUNDS[o(560,"U0OW")][o(609,"puFD")],p[o(636,"KCpA")]);continue}break}},[h,j]),D=_0x5b7047[i(520,m)](()=>{const o=i;b[o(506,"xaNe")]?.(),y[o(541,"!5J0")]=!1,h[o(555,"8ub$")](),useMobControlStore[o(557,"im0@")]()[o(625,"zpjs")]()},[h]),B={..._0x5b7047[i(624,a)](()=>({isPlaying:!_&&k,gameOver:O,onStartGame:U,onStopGame:g,onShare:n,onShowLeaderboard:d,startButtonSubtext:"Drag to aim your mob!"}),[_,k,O,U,g,n,d])},E={..._0x5b7047.useMemo(()=>{const o=i,e=useMobControlStore[o(608,"p5j3")](),t=O?e[o(611,"puFD")]:0,W=O?e[o(534,"0yL@")]:1,n={};return n.isVisible=O,n[o(522,"b]t3")]=t,n[o(515,"845&")]=D,n[o(545,"S($y")]=o(567,"#I@m"),n.title=f?o(538,"]sxk"):o(623,"im0@"),n[o(617,"b]t3")]=f?o(519,"Dmnn")+W+".":o(556,"im0@")+W+"!",n},[O,f,D])};return E[i(559,S)]=r,E.bannerAd=s,_0x66786d(GestureHandlerRootView,{style:styles[i(593,"X!Ru")],children:_0x51031e(_0x2c2118,{offset:x,children:[_0x66786d(GameArea,{gameService:h,offset:x}),_0x66786d(ScoreBoard,{offset:x}),_0x66786d(GameControlButton,B),_0x66786d(GameOverModal,E),_0x66786d(GameSettingsModal,{gameId:GAME_IDS[i(536,"%VTB")],settings:C[i(518,"6qTx")](o,DEFAULT_GAME_SETTINGS),onSettingsChange:e})]})})},_0x2c2f0f={};_0x2c2f0f[_0x54c527(512,"wvp1")]=1,_0x2c2f0f.backgroundColor=BACKGROUND_COLOR;const _0x25ef30={};_0x25ef30[_0x54c527(499,"gc(*")]=_0x2c2f0f;const styles=StyleSheet.create(_0x25ef30);export const MobControl=MobControlComponent;MobControl[_0x54c527(547,"KCpA")]="MobControl";
1
+ "use strict";import{useMemo}from"react";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{scoreColumn,textColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{DAY_LIGHT,MOB_COLORS,MOB_CONFIG as _0x35f15e,NIGHT_LIGHT,SKY_DAY,SKY_NIGHT}from"./MobControlConstants.js";import{aim,createGame,dispose,INITIAL_HUD,replay,reset,setActive,setLayout,setTheme,start,tick}from"./MobControlGame.js";import{jsx as _0x508bef}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.MOB_CONTROL,FEEDBACK={shoot:{sound:SOUNDS.SHOOT},gate:{sound:SOUNDS.GATE,haptic:HapticType.LIGHT},hit:{sound:SOUNDS.HIT},clash:{sound:SOUNDS.CLASH,haptic:HapticType.LIGHT},boss:{sound:SOUNDS.LEVEL_UP,haptic:HapticType.SUCCESS},damage:{sound:SOUNDS.DAMAGE,haptic:HapticType.WARNING},champion:{sound:SOUNDS.LEVEL_UP,haptic:HapticType.HEAVY},win:{sound:GAME_SOUNDS.WELL_DONE,haptic:HapticType.SUCCESS},lose:{sound:SOUNDS.GAME_OVER,haptic:HapticType.ERROR}};export const MobControl=engineGame(GAME_IDS.MOB_CONTROL,e=>{const[t,s]=useLiveState(INITIAL_HUD,0),{game:o,theme:r,status:a,screen:i,gameOver:n}=useEngineGame(e,{gameId:GAME_IDS.MOB_CONTROL,create:createGame,start:start,reset:reset,replay:replay,dispose:dispose,tick:tick,setTheme:setTheme,setActive:setActive,resize:setLayout,drag:(e,t)=>{t.cancelled||"end"===t.phase||aim(e,t.x)},sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.SUCCESS),resultsDelay:e=>"win"===e?1300:650,wire:(e,t)=>{e.onHud=s,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}}),m="dark"===r.mode,S=Math.ceil(t.hp/_0x35f15e.PLAYER_HP*100),p=useMemo(()=>m?NIGHT_LIGHT:DAY_LIGHT,[m]);return _0x508bef(EngineGameScreen,{...i,source:o.renderer,light:p,background:m?SKY_NIGHT:SKY_DAY,fog:.007,columns:[scoreColumn(t.score),textColumn("SHIELD",S+"%",MOB_COLORS.HP_PLAYER),textColumn("ARMY",t.army)],subtext:"Aim and grow mobs!",gameOver:n({title:"win"===a?"LEVEL CLEARED!":"DEFENSE BREACHED",message:"win"===a?"Level "+t.level+" conquered! "+S+"% shield remaining.":"Your cannon fell in level "+t.level+". Chain multiplier gates and use your champion to stop the red mob.",scoreLabel:"Battle Score",score:t.score,buttonText:"win"===a?"Next Level!":"Try Again!"})})});
@@ -1 +1 @@
1
- "use strict";const _0x5e15f3=_0x4473;!function(){const _=_0x4473,e=_0x8d64();for(;;)try{if(887611==parseInt(_(242,"xsiE"))/1*(parseInt(_(227,"WSDD"))/2)+-parseInt(_(254,"60l%"))/3+-parseInt(_(216,"zAiw"))/4*(-parseInt(_(266,"Eg0D"))/5)+-parseInt(_(231,"&3nW"))/6+parseInt(_(257,"TgOu"))/7+-parseInt(_(220,"AmFT"))/8*(-parseInt(_(273,"6MEi"))/9)+-parseInt(_(275,"$lI1"))/10)break;e.push(e.shift())}catch(_){e.push(e.shift())}}();import{PRIMARY_COLOR,BACKGROUND_COLOR}from"../../services/GamesConstants.js";import{getGameDimensions,isTablet}from"../../services/UtilsService.js";const{screenWidth:screenWidth}=getGameDimensions(),SCREEN_HEIGHT=getGameDimensions()[_0x5e15f3(238,"URb@")],FIELD_TOP=Math[_0x5e15f3(272,"[hht")](.14*SCREEN_HEIGHT),FIELD_BOTTOM=Math[_0x5e15f3(201,"WSDD")](.76*SCREEN_HEIGHT),ENEMY_LINE=-Math[_0x5e15f3(236,"AmFT")](.05*SCREEN_HEIGHT),PLAYER_LINE=FIELD_BOTTOM-30,CANNON_Y=FIELD_BOTTOM,CANNON_WIDTH=isTablet?90:68,BLOB_MIN_RADIUS=isTablet?16:13,BLOB_MAX_RADIUS=isTablet?34:28,PLAYER_BLOB_SPEED=isTablet?7:5.6,ENEMY_BLOB_SPEED=isTablet?1.1:.85,MAX_COUNT=80,MAX_BLOBS=28,ENEMY_COUNT_CAP=40,FIRE_INTERVAL_MS=480,FIRE_COUNT=2,GATE_HEIGHT=isTablet?46:38,GATE_SPEED=isTablet?1.4:1.1,GATE_SPAWN_INTERVAL_MS=3200,MAX_GATES=2,ENEMY_BASE_HP=40,ENEMY_HP_PER_LEVEL=20,PLAYER_HP=30,ENEMY_SPAWN_INTERVAL_MS=3600,ENEMY_SPAWN_MIN_MS=2200,ENEMY_LEVEL_CAP=10,SCORE_PER_KILL=100,SCORE_PER_LEVEL=1e3,GAME_DURATION_MS=12e4,ROAD_TOP_Y=-Math[_0x5e15f3(244,"fy[G")](.14*SCREEN_HEIGHT),ROAD_BOTTOM_Y=SCREEN_HEIGHT,ROAD_HALF_TOP=Math[_0x5e15f3(255,"6MEi")](.13*screenWidth),ROAD_HALF_BOTTOM=Math[_0x5e15f3(210,"$lI1")](.46*screenWidth),DEPTH_FAR_SCALE=.78,DEPTH_NEAR_SCALE=1.25;function _0x4473(_,e){_-=171;const W=_0x8d64();let x=W[_];if(void 0===_0x4473.ewBlTo){const _=function(_,e){let W,x,f=[],E=0,o="";for(_=function(_){let e="",W="";for(let W,x,f=0,E=0;x=_.charAt(E++);~x&&(W=f%4?64*W+x:x,f++%4)?e+=String.fromCharCode(255&W>>(-2*f&6)):0)x="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(x);for(let _=0,x=e.length;_<x;_++)W+="%"+("00"+e.charCodeAt(_).toString(16)).slice(-2);return decodeURIComponent(W)}(_),x=0;x<256;x++)f[x]=x;for(x=0;x<256;x++)E=(E+f[x]+e.charCodeAt(x%e.length))%256,W=f[x],f[x]=f[E],f[E]=W;x=0,E=0;for(let e=0;e<_.length;e++)x=(x+1)%256,E=(E+f[x])%256,W=f[x],f[x]=f[E],f[E]=W,o+=String.fromCharCode(_.charCodeAt(e)^f[(f[x]+f[E])%256]);return o};_0x4473.PcVqMo=_,_0x4473.WhVonU={},_0x4473.ewBlTo=!0}const f=W[0];_0x4473.gSSUcv!==f&&(_0x4473.WhVonU={},_0x4473.gSSUcv=f);const E=_0x4473.WhVonU[_];return void 0===E?(void 0===_0x4473.RzlmxU&&(_0x4473.RzlmxU=!0),x=_0x4473.PcVqMo(x,e),_0x4473.WhVonU[_]=x):x=E,x}export const LANE_INNER=.86;export const GATE_REF_Y=FIELD_BOTTOM-70;const _0x3ee838={};_0x3ee838[_0x5e15f3(195,"eVAG")]=screenWidth,_0x3ee838[_0x5e15f3(222,"6MEi")]=SCREEN_HEIGHT,_0x3ee838[_0x5e15f3(211,"fuv[")]=FIELD_TOP,_0x3ee838.FIELD_BOTTOM=FIELD_BOTTOM,_0x3ee838[_0x5e15f3(177,"r!jn")]=ENEMY_LINE,_0x3ee838[_0x5e15f3(250,"EbmT")]=PLAYER_LINE,_0x3ee838[_0x5e15f3(228,"oc6h")]=ROAD_TOP_Y,_0x3ee838[_0x5e15f3(258,"4M8&")]=ROAD_BOTTOM_Y,_0x3ee838[_0x5e15f3(247,"r!jn")]=ROAD_HALF_TOP,_0x3ee838[_0x5e15f3(187,"zAiw")]=ROAD_HALF_BOTTOM,_0x3ee838[_0x5e15f3(245,"&3nW")]=.78,_0x3ee838[_0x5e15f3(260,"FPL6")]=1.25,_0x3ee838[_0x5e15f3(267,"cCVm")]=1.28,_0x3ee838[_0x5e15f3(263,"9&Xn")]=CANNON_Y,_0x3ee838[_0x5e15f3(218,"TgOu")]=CANNON_WIDTH,_0x3ee838[_0x5e15f3(188,"0cJi")]=BLOB_MIN_RADIUS,_0x3ee838.BLOB_MAX_RADIUS=BLOB_MAX_RADIUS,_0x3ee838[_0x5e15f3(197,"UlWD")]=PLAYER_BLOB_SPEED,_0x3ee838.ENEMY_BLOB_SPEED=ENEMY_BLOB_SPEED,_0x3ee838[_0x5e15f3(274,"4M8&")]=80,_0x3ee838[_0x5e15f3(186,"&3nW")]=28,_0x3ee838[_0x5e15f3(226,"URb@")]=40,_0x3ee838.FIRE_INTERVAL_MS=480,_0x3ee838[_0x5e15f3(207,"[hht")]=2,_0x3ee838.GATE_HEIGHT=GATE_HEIGHT,_0x3ee838[_0x5e15f3(174,"NNq]")]=GATE_SPEED,_0x3ee838.GATE_SPAWN_INTERVAL_MS=3200,_0x3ee838.MAX_GATES=2,_0x3ee838.ENEMY_BASE_HP=40,_0x3ee838[_0x5e15f3(199,"SqVB")]=20,_0x3ee838[_0x5e15f3(224,"fy[G")]=30,_0x3ee838[_0x5e15f3(225,"WSDD")]=3600,_0x3ee838.ENEMY_SPAWN_MIN_MS=2200,_0x3ee838.ENEMY_LEVEL_CAP=10,_0x3ee838.SCORE_PER_KILL=100,_0x3ee838.SCORE_PER_LEVEL=1e3,_0x3ee838[_0x5e15f3(232,"0cJi")]=12e4;export const MOB_CONFIG=_0x3ee838;const _0x5dea07={};_0x5dea07[_0x5e15f3(185,"UlWD")]="mul",_0x5dea07[_0x5e15f3(243,"SqVB")]=2;const _0x53a74f={};_0x53a74f[_0x5e15f3(192,"#tRz")]=_0x5e15f3(256,"UlWD"),_0x53a74f.value=3;const _0x26427a={};function _0x8d64(){const _=["mSoGp8kaWOK7CmkskmkwWPfM","WPxcLSkkA8oSCmk4jeq+W4CuW5RcTSo/aa","WRD+W5vUW4bHgG","W6pdHXvUW6jAf8kvWRy","WOyAW7z5wSkPgCkyWQrzWP4","W5ekBcRdGW","WRD7W5eAW4nKfq","W70zW53dKmkHnW","AIms","WPddSY4","WRtdMq/dMGi4wxSYhCkgW5S/WOW","ze7dHZ42sCoUWPT2","WOlcTcqiW4q","y0RcO2qz","qmktxmoKW7Lqw8k+d8kpWRDnA1Pi","wmo7W59vnsvx","W5/cPmovWQRdIdldOhDGnICVW7q","W6micmkOgSkskW","W6aKvWRdQcauwvFcM8o/pW","WQmUWRNcLCobWOONW7JcPwmj","BmkJW4ldNSknW6WP","WRaJWRBcGSolWPyNW7NcQxKnWQu","FmojWOO","W6aKbbqkW4yqiSo0aSoxWORdIW","W58DC8kRsW","xSo8aG","WQamWQJcTmo3WQNcJSo/a8obemkNyq","DJBcOtBdQSkuF0hcHHVcQmkIWQa","ba0J","EWXtjXvLWRDgW6eLW5K/W55ErCot","WQD0uvDA","W4hcMbPXW5LZuCoxwMvjo1q","W7RcNqKClsPCeG","W5tcIt4tEmochL7cJCkaEb8m","WOBcSCoidgC","W5TtcZhdQvP6WQtcJ8kbWRtcLWC","W79RhwtdOq7dO1BcNeZcRq","W5BcHI8BFSoCfLpcLCkmBq","W6hdRIBdR8o8bCo1WQpdH8oAWPyNWQD9","WRy6W7lcGSkkDIO","wmklW5SJncCJ","DtKle1K","WPq1qCkPytuM","AtJcUc3dTSkzzvVcHG","W77dQCoJo8owi8ogc8kdamkwWRxcUmkY","W7xdICk+Cqy8W4tdIWHVkgy","r8kxqSo+W75bqSkYgmkeWQvcDvjmEWW","eKFdG8klW54BW6y","ACkqW7ySWPKMlW","W7j1b2VdUqpdR1FcMG","W4GmDYa","WPLfyMb+WQf5c8oYfCoDWQS","W4f4W5/dGCkqW5tdUCotea","eZlcUXyorSodWRrCW7ldOH/dTSo4wW","j1uBrY3dG1fdB1i","ACoGWOSTWPLrla","W7pcKfJcMCo5CSo/","W4JcPCorWQpdJIxdRxjOla","WPRcNNrGifzb","nfFcNCkQW6lcGmkBd8o/WQecWObRcCokW6yiWQ3dUG","WO5anCoXAKWJ","W4j1W5ddNmkkW4m","fZlcUWmuwCovW4K","W6OZuSkaCdWOgmoY","W6/dMN/dVvdcRmoX","vmoXchG","sCkxvmoVW7nduSk9dG","hCoFW4lcRSktWPeTW4aCjSkiACo/WRFdS8kz","WPdcM8kiBmoSECkKofO4W48FW53cVmoH","dNG6rwGpW49VW6GLW4euW5C","WRtdMq/dMGi4wxSYhCkgW4SXWO7dRa","W5lcTsK2","WR3dTfBdTq","W7VcISo4WPVdSG","v2NcMv04WRZdGq4","gCoNW6bqW6OUnK8HfZi5","WQtcTSkRw8ow","B8ouj0ucWPDFWPtdH0lcQmkyW6xdOdPiWO8","W5mSWP7cJmkU","WRhcMW0WW7JcSCoxgLLiW4pdUrxdVbtcKmoAWQq","jg44pG1yWPq","nf/cISkLWQ4","WRNcVSkPsG","WROZCuZcMZaw","WRddVsWxfmkWBa","WPpcL1dcLmkeFW","W6jNWOewzSkbl8kRWRvg","qr8SogjDW67cPSkhuq","ECoukuScWPDFW6q","WQf9WQaZW6yrrSoyWPm","WR3cVSkUymkf","A8oiW7zVF8koW47cV1m","W4/cVsSNbW","WRxdQCkoySkSEu4","eJpcTSo/W51UW6q","W47cIrf2W4DNxmogw2e","FCkGW4JcPSk0WRGCW7G","CJJcSHzLp8k5","W5f4W5/dI8kaW5/dOSodhmotcCkJ","WQRcJxyfWQ0wpa","WPzvlNdcKLL9uuZcHSoTeYe","W73dPmoIp8ozl8onumkDbmkkWRpcNW","W74XvmkaAJu4h8oZWQNcQ8k3zW","WRddQZ1jW57cKHG","qwNcL1m4WRZdGxFcHq","a37cUSkgWPpdQmo4C8klW4zGW60wA8kUWO1PW4VcKSk7qZ3cRG","W5aYW7hdUSkqhcOBu1yhDCkRW7HW","CGhdICo9WRpdJCocvmkAW5W","WPhcSmombwfCW6BdTIjW","WPb9W4xdJCo+e8kjCmoytCkIW6FdMG","WQtcMqKKW6tcVmoabK9FW47dVW"];return(_0x8d64=function(){return _})()}_0x26427a[_0x5e15f3(281,"AmFT")]=_0x5e15f3(259,"yfkk"),_0x26427a[_0x5e15f3(261,"60l%")]=5;const _0x22e524={};_0x22e524[_0x5e15f3(192,"#tRz")]="mul",_0x22e524[_0x5e15f3(198,"Drep")]=2;const _0x181aff={};_0x181aff[_0x5e15f3(191,"9&Xn")]=_0x5e15f3(240,"w%sX"),_0x181aff[_0x5e15f3(193,"r!jn")]=4;export const GATE_OPS=[_0x5dea07,_0x53a74f,_0x26427a,_0x22e524,_0x181aff];export const gateLabel=_=>_[_0x5e15f3(202,"0cJi")]===_0x5e15f3(239,"[hht")?"x"+_[_0x5e15f3(212,"9&Xn")]:"+"+_[_0x5e15f3(196,"0cJi")];export const radiusForCount=_=>{const e=_0x5e15f3,W=Math[e(253,"Z5TF")](_/60,1);return MOB_CONFIG.BLOB_MIN_RADIUS+(MOB_CONFIG.BLOB_MAX_RADIUS-MOB_CONFIG[e(173,"xsiE")])*W};const _0x4fe618={};_0x4fe618.BACKGROUND=BACKGROUND_COLOR,_0x4fe618[_0x5e15f3(203,"Eg0D")]=PRIMARY_COLOR,_0x4fe618[_0x5e15f3(181,"TgOu")]=_0x5e15f3(279,"eVAG"),_0x4fe618[_0x5e15f3(230,"SqVB")]="#B9D6FF",_0x4fe618[_0x5e15f3(235,"Tkua")]=_0x5e15f3(248,"MhLZ"),_0x4fe618[_0x5e15f3(265,"oc6h")]=_0x5e15f3(270,"URb@"),_0x4fe618[_0x5e15f3(268,"A8qO")]=_0x5e15f3(176,"GBv)"),_0x4fe618.ENEMY_DARK=_0x5e15f3(178,"9&Xn"),_0x4fe618.BLOB_SHADOW="rgba(0,0,0,0.22)",_0x4fe618[_0x5e15f3(234,"!$Fg")]="#82C24A",_0x4fe618.GRASS_BOTTOM=_0x5e15f3(204,"A8qO"),_0x4fe618.GRASS_DARK=_0x5e15f3(233,"aK#l"),_0x4fe618.SAND_FAR="#A8916A",_0x4fe618.SAND_NEAR=_0x5e15f3(213,"QhVn"),_0x4fe618[_0x5e15f3(172,"TgOu")]=_0x5e15f3(179,"WSDD"),_0x4fe618[_0x5e15f3(194,"fy[G")]=_0x5e15f3(214,"QkLI"),_0x4fe618[_0x5e15f3(208,"UlWD")]="#FFD34A",_0x4fe618[_0x5e15f3(182,"xsiE")]="#FF7BAC",_0x4fe618[_0x5e15f3(183,"6MEi")]=_0x5e15f3(271,"HsTV"),_0x4fe618.GATE_GOOD_DARK="#3C8F4C",_0x4fe618.GATE_ADD=_0x5e15f3(217,"xsiE"),_0x4fe618[_0x5e15f3(264,"A8qO")]=_0x5e15f3(175,"eVAG"),_0x4fe618[_0x5e15f3(215,"DUai")]="#2B3A2E",_0x4fe618.ENEMY_BASE=_0x5e15f3(223,"uq]^"),_0x4fe618[_0x5e15f3(190,"w%sX")]="#7A2732",_0x4fe618[_0x5e15f3(241,"w%sX")]=_0x5e15f3(219,"DUai"),_0x4fe618.ENEMY_BASE_SIDE="#94303C",_0x4fe618[_0x5e15f3(205,"GBv)")]="#4E8FD6",_0x4fe618[_0x5e15f3(249,"AmFT")]=_0x5e15f3(200,"[hht"),_0x4fe618.CANNON_DARK=_0x5e15f3(180,"6MEi"),_0x4fe618[_0x5e15f3(252,"EbmT")]=_0x5e15f3(251,"zAiw"),_0x4fe618[_0x5e15f3(277,"&3nW")]=_0x5e15f3(278,"QkLI"),_0x4fe618[_0x5e15f3(280,"cCVm")]="rgba(0,0,0,0.35)",_0x4fe618[_0x5e15f3(171,"60l%")]=_0x5e15f3(246,"HsTV"),_0x4fe618[_0x5e15f3(262,"DUai")]=_0x5e15f3(237,"aK#l"),_0x4fe618.TEXT="#ffffff";export const MOB_COLORS=_0x4fe618;
1
+ "use strict";export const MOB_CONFIG={HALF_WIDTH:5.2,TRACK_NEAR_Z:30,TRACK_FAR_Z:-150,CANNON_LIMIT:4.25,CANNON_Z:1.2,SPAWN_Z:-.9,BASE_Z:-32,TARGET_LINE:-29.5,BREACH_Z:.15,PLAYER_HP:1200,PLAYER_SLOTS:640,ENEMY_SLOTS:384,CAPACITY:1024,BASE_HP:1e3,CORE_HP:1400,ENEMY_WAVE_SIZE:14,ENEMY_WAVE_INTERVAL:1.35,ENEMY_SURGE_INTERVAL:15,ENEMY_MAX_SURGE:8,MAX_STRENGTH:4096,PLAYER_SPEED:4.8,ENEMY_SPEED:2.65,FIRE_INTERVAL:.105,CHAMPION_CHARGE:100,CHAMPION_PER_SHOT:1.6,CHAMPION_STRENGTH:42,CHAMPION_SPEED:6.2,BOSS_STRENGTH:170,BOSS_SPEED:1.55,BOOST_SPEED:1.65,BOOST_DURATION:1.4,FLIGHT_DURATION:.38,COLLISION_RADIUS:.34,GRID_SIZE:.8,GRID_COLUMNS:14,GRID_ROWS:46,MAX_COLLISION_VISITS:48,MAX_SEPARATION_VISITS:12,STEP:1/30,MAX_FRAME:.05,HUD_INTERVAL:.12,EFFECT_INTERVAL:.075,MAX_EFFECTS:6,WORLD_CAPACITY:640,KILL_POINTS:5,BASE_POINTS:350,LEVEL_POINTS:500};export const MOB_COLORS={PLAYER:"#3998FF",ENEMY:"#F25467",PLAYER_DARK:"#1D568F",ENEMY_DARK:"#8D2D42",GATE:"#29BFFF",GATE_HIGH:"#A14CF5",GATE_DANGER:"#F16B68",FRAME:"#1763A8",ROAD:"#CDD0D2",ROAD_EDGE:"#E6BA78",GROUND:"#D7AB72",CHAMPION:"#FFC83E",BOOST:"#7DECF1",HP_PLAYER:"#54CDA2",HP_ENEMY:"#F25467"};export const SKY_DAY=[.67,.81,.88];export const SKY_NIGHT=[.035,.07,.13];export const DAY_LIGHT={direction:[-.45,.85,.4],ambient:.55,color:[1.04,1.02,.98],shadows:!0,shadowExtent:27};export const NIGHT_LIGHT={direction:[-.3,.85,.4],ambient:.65,color:[.76,.86,1.1],shadows:!0,shadowExtent:27};
@@ -0,0 +1 @@
1
+ "use strict";import{World}from"@nayan-ui/engine";import{MOB_CONFIG as _0x3e8f88}from"./MobControlConstants.js";import{unitMeshes}from"./MobControlMeshes.js";import{MobControlRenderer}from"./MobControlRenderer.js";import{createSim,step}from"./MobControlRules.js";import{battleEffect,buildScene,captured,celebrate,makeView,recoil,removeScene,syncScene}from"./MobControlScene.js";export const INITIAL_HUD={score:0,hp:_0x3e8f88.PLAYER_HP,army:0,level:1};export function createGame(e){const n=new World(_0x3e8f88.WORLD_CAPACITY);return{world:n,renderer:new MobControlRenderer(n,unitMeshes()),sim:createSim(),camera:{eye:[0,19,15],target:[0,0,-13],fov:.9},night:"dark"===e.mode,view:null,scene:null,phase:"ready",won:!1,active:!0,pending:0,clock:0,lastHud:-1,lastEffect:-1,hudKey:"",feedback:{},get score(){return this.sim.score},onPhase:e=>{},onHud:e=>{},onEvent:e=>{}}}export function setLayout(e,n,o){e.world.isDisposed||n<=0||o<=0||(e.view=makeView(n,o,e.camera),e.scene||(e.scene=buildScene(e.world,e.night,e.sim)),syncScene(e.world,e.scene,e.sim,!0),e.world.update(0),e.renderer.sync(e.sim,1,e.clock))}export function setTheme(e,n){const o="dark"===n.mode;e.world.isDisposed||o===e.night||(e.night=o,e.scene&&(removeScene(e.world,e.scene),e.scene=buildScene(e.world,e.night,e.sim)))}function publish(e,n=!1){if(!n&&e.clock-e.lastHud<_0x3e8f88.HUD_INTERVAL)return!1;e.lastHud=e.clock;const o=e.sim,s=o.score+"/"+o.hp+"/"+o.playerStrength+"/"+o.level;return s!==e.hudKey&&(e.hudKey=s,e.onHud({score:o.score,hp:o.hp,army:o.playerStrength,level:o.level})),!0}export function reset(e){resetLevel(e,e.sim.level)}export function replay(e){resetLevel(e,e.sim.level+(e.won?1:0))}function resetLevel(e,n){e.world.isDisposed||(e.sim=createSim(void 0,n),e.won=!1,e.pending=0,e.camera.shake=0,e.hudKey="",e.feedback={},e.world.cancelTimers(),e.scene&&(e.world.stopAnimation(e.scene.barrel),e.world.set(e.scene.barrel,{position:[0,.92,-.1]}),syncScene(e.world,e.scene,e.sim,!0)),e.phase="ready",publish(e,!0),e.onPhase("ready"),e.world.update(0),e.renderer.sync(e.sim,1,e.clock))}export function start(e){!e.world.isDisposed&&e.scene&&"ready"===e.phase&&(e.pending=0,e.phase="playing",e.onPhase("playing"))}export function aim(e,n){!e.world.isDisposed&&e.active&&"playing"===e.phase&&e.view&&(e.sim.targetX=Math.max(-_0x3e8f88.CANNON_LIMIT,Math.min(_0x3e8f88.CANNON_LIMIT,(n-e.view.width/2)/e.view.k)))}export function setActive(e,n){e.active=n,e.pending=0}export function dispose(e){e.world.isDisposed||(e.renderer.dispose(),e.world.dispose())}function emit(e,n,o=0){e.clock-(e.feedback[n]??-100)<o||(e.feedback[n]=e.clock,e.onEvent(n))}export function tick(e,n){if(e.world.isDisposed||!e.active||!Number.isFinite(n)||n<0)return;if(n=Math.min(n,_0x3e8f88.MAX_FRAME),e.clock+=n,"playing"===e.phase)for(e.pending=Math.min(e.pending+n,_0x3e8f88.MAX_FRAME+_0x3e8f88.STEP);"playing"===e.phase&&e.pending+1e-9>=_0x3e8f88.STEP;)e.pending=Math.max(0,e.pending-_0x3e8f88.STEP),apply(e);const o=publish(e);e.scene&&syncScene(e.world,e.scene,e.sim,o),e.world.update(n),e.renderer.sync(e.sim,"playing"===e.phase?Math.min(1,e.pending/_0x3e8f88.STEP):1,e.clock)}function apply(e){const n=step(e.sim,_0x3e8f88.STEP),o=e.scene;if(n.shots&&(emit(e,"shoot"),o&&recoil(e.world,o)),n.gates&&emit(e,"gate",.14),n.champion&&emit(e,"champion"),n.bossDefeated&&!n.won&&(emit(e,"boss"),celebrate(e.world)),n.clashes&&emit(e,"clash",.15),n.hits&&emit(e,"hit",.13),n.breaches&&(e.camera.shake=.18,emit(e,"damage",.35)),o&&n.captured)for(let n=0;n<e.sim.bases.length;n++)0!==e.sim.bases[n].hp||o.bases[n].captured||captured(e.world,e.sim.bases[n].x,e.sim.bases[n].z);if(n.won&&celebrate(e.world),n.effectCount&&e.clock-e.lastEffect>=_0x3e8f88.EFFECT_INTERVAL){e.lastEffect=e.clock;for(let o=0;o<Math.min(2,n.effectCount);o++)battleEffect(e.world,n.effectX[o],n.effectZ[o],1===n.effectTeam[o])}(n.won||n.lost)&&(e.won=n.won,e.phase="over",publish(e,!0),emit(e,n.won?"win":"lose"),e.onPhase("over"))}
@@ -0,0 +1 @@
1
+ "use strict";import{merge,tube}from"@nayan-ui/engine";import{createGameMesh as _0x4b6864}from"../shared/EngineMeshes.js";const PHI=(1+Math.sqrt(5))/2,POINTS=[[-1,PHI,0],[1,PHI,0],[-1,-PHI,0],[1,-PHI,0],[0,-1,PHI],[0,1,PHI],[0,-1,-PHI],[0,1,-PHI],[PHI,0,-1],[PHI,0,1],[-PHI,0,-1],[-PHI,0,1]],FACES=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];function pebble(e){const s=new Float32Array(11*POINTS.length);return POINTS.forEach((o,t)=>{const r=Math.hypot(...o),n=o[0]/r,i=o[1]/r,p=o[2]/r,a=Math.hypot(n/e[0],i/e[1],p/e[2]);s.set([n*e[0],i*e[1],p*e[2],n/e[0]/a,i/e[1]/a,p/e[2]/a,1,1,1,0,0],11*t)}),{vertices:s,indices:Uint32Array.from(FACES)}}let poses=null;export function unitMeshes(){if(poses)return poses;const e=e=>{const s=[{geometry:pebble([.15,.23,.11]),position:[0,.4,0]},{geometry:pebble([.145,.15,.135]),position:[0,.73,0]},{geometry:pebble([.025,.035,.014]),position:[-.05,.75,.122],color:[.08,.13,.2,1]},{geometry:pebble([.025,.035,.014]),position:[.05,.75,.122],color:[.08,.13,.2,1]}];for(const o of[-1,1])s.push({geometry:tube([[.08*o,.25,0],[.11*o,.055,o*e*.13]],{radius:.055,sides:5,smoothness:1,caps:!0})}),s.push({geometry:tube([[.13*o,.53,0],[.22*o,.31,-o*e*.13]],{radius:.043,sides:5,smoothness:1,caps:!0})});return _0x4b6864(merge(s),{center:!1,shine:.22})};return poses=[e(-1),e(1)],poses}
@@ -0,0 +1 @@
1
+ "use strict";import{getMeshIdLimit}from"@nayan-ui/engine";import{MOB_CONFIG as _0x5d8971}from"./MobControlConstants.js";export class MobControlRenderer{count=0;disposed=!1;sizeStrength=new Float64Array(_0x5d8971.CAPACITY).fill(NaN);sizeKind=new Int8Array(_0x5d8971.CAPACITY).fill(-1);sizes=new Float64Array(_0x5d8971.CAPACITY);constructor(s,t){this.world=s,this.poses=t,this.capacity=s.capacity+_0x5d8971.CAPACITY,this.matrices=new Float32Array(16*this.capacity),this.colors=new Float32Array(4*this.capacity),this.regions=new Float32Array(4*this.capacity),this.ranges=new Uint32Array(s.ranges.length)}sync(s,t,i){if(this.disposed)return;this.ranges.fill(0);const e=this.ranges.length/4,r=Math.min(e,Math.max(getMeshIdLimit(),this.poses[0].id+1,this.poses[1].id+1));let h=0;const a=Math.floor(8*i);for(let o=0;o<2;o++)for(let n=0;n<r;n++){const r=o*e*2+2*n,l=h,d=this.world.ranges[r],g=this.world.ranges[r+1];g&&(this.matrices.set(this.world.matrices.subarray(16*d,16*(d+g)),16*h),this.colors.set(this.world.colors.subarray(4*d,4*(d+g)),4*h),this.regions.set(this.world.regions.subarray(4*d,4*(d+g)),4*h),h+=g);const m=n===this.poses[0].id?0:n===this.poses[1].id?1:-1;if(0===o&&m>=0)for(let e=0;e<_0x5d8971.CAPACITY;e++){if(!s.alive[e]||(a+s.ticket[e]&1)!==m)continue;const r=e<_0x5d8971.PLAYER_SLOTS,o=s.x[e]-s.previousX[e],n=s.z[e]-s.previousZ[e],l=Math.abs(o)+Math.abs(n)>1e-5?Math.atan2(o,n):r?Math.PI:0,d=s.kind[e],g=0!==d;(this.sizeStrength[e]!==s.strength[e]||this.sizeKind[e]!==d)&&(this.sizeStrength[e]=s.strength[e],this.sizeKind[e]=d,this.sizes[e]=g?.76*(1===d?2.65:3.5):1.2*(1+Math.min(.42,.055*Math.log2(s.strength[e]))));const p=this.sizes[e],M=Math.sin(l)*p,A=Math.cos(l)*p,y=16*h,w=4*h;this.matrices[y]=A,this.matrices[y+1]=0,this.matrices[y+2]=-M,this.matrices[y+3]=0,this.matrices[y+4]=0,this.matrices[y+5]=p,this.matrices[y+6]=0,this.matrices[y+7]=0,this.matrices[y+8]=M,this.matrices[y+9]=0,this.matrices[y+10]=A,this.matrices[y+11]=0,this.matrices[y+12]=s.previousX[e]+o*t;const f=s.flight[e]>0?Math.min(_0x5d8971.FLIGHT_DURATION,s.flight[e]+(1-t)*_0x5d8971.STEP)/_0x5d8971.FLIGHT_DURATION:0;this.matrices[y+13]=.05+.8*f+.55*Math.sin(f*Math.PI)+.045*Math.abs(Math.sin(12*i+1.7*s.ticket[e])),this.matrices[y+14]=s.previousZ[e]+n*t,this.matrices[y+15]=1,this.colors[w]=1===d?1:r?s.boost[e]>0?.35:.1:.98,this.colors[w+1]=1===d?.78:r?s.boost[e]>0?.95:.63:2===d?.15:.22,this.colors[w+2]=1===d?.22:r?1:.27,this.colors[w+3]=1,this.regions[w]=this.regions[w+1]=0,this.regions[w+2]=this.regions[w+3]=1,h++}h>l&&(this.ranges[r]=l,this.ranges[r+1]=h-l)}this.count=h}setView(s,t,i){this.disposed||this.world.setView(s,t,i)}dispose(){this.disposed=!0,this.count=0,this.ranges.fill(0)}}
@@ -0,0 +1 @@
1
+ "use strict";import{MOB_CONFIG as _0x413050}from"./MobControlConstants.js";const clamp=(e,t,n)=>Math.max(t,Math.min(n,e));function random(e){return e.seed=Math.imul(e.seed,1664525)+1013904223>>>0,e.seed/4294967296}export const isPlayer=e=>e<_0x413050.PLAYER_SLOTS;export function createSim(e=Math.floor(4294967295*Math.random()),t=1){const n={alive:new Uint8Array(_0x413050.CAPACITY),x:new Float32Array(_0x413050.CAPACITY),z:new Float32Array(_0x413050.CAPACITY),previousX:new Float32Array(_0x413050.CAPACITY),previousZ:new Float32Array(_0x413050.CAPACITY),strength:new Uint16Array(_0x413050.CAPACITY),gatesPassed:new Uint8Array(_0x413050.CAPACITY),ticket:new Uint32Array(_0x413050.CAPACITY),kind:new Uint8Array(_0x413050.CAPACITY),boost:new Float32Array(_0x413050.CAPACITY),flight:new Float32Array(_0x413050.CAPACITY),next:new Int16Array(_0x413050.CAPACITY),playerGrid:new Int16Array(_0x413050.GRID_COLUMNS*_0x413050.GRID_ROWS),enemyGrid:new Int16Array(_0x413050.GRID_COLUMNS*_0x413050.GRID_ROWS),freePlayer:new Uint16Array(_0x413050.PLAYER_SLOTS),freeEnemy:new Uint16Array(_0x413050.ENEMY_SLOTS),freePlayerCount:0,freeEnemyCount:0,playerCount:0,enemyCount:0,playerStrength:0,enemyStrength:0,championCount:0,bossCount:0,charge:0,serial:0,seed:e>>>0,level:Math.max(1,Math.floor(Number.isFinite(t)?t:1)),elapsed:0,battleClock:0,fireClock:0,cannonX:0,targetX:0,hp:_0x413050.PLAYER_HP,score:0,finished:!1,won:!1,gates:[],bases:[],barriers:[],boostPad:null,collisionVisits:0,events:{shots:0,gates:0,clashes:0,hits:0,breaches:0,captured:0,champion:!1,barrierBroken:0,bossDefeated:!1,won:!1,lost:!1,effectCount:0,effectX:new Float32Array(_0x413050.MAX_EFFECTS),effectZ:new Float32Array(_0x413050.MAX_EFFECTS),effectTeam:new Uint8Array(_0x413050.MAX_EFFECTS)}};return prepareLevel(n),n}function clearUnits(e){e.alive.fill(0),e.strength.fill(0),e.kind.fill(0),e.boost.fill(0),e.flight.fill(0),e.freePlayerCount=_0x413050.PLAYER_SLOTS,e.freeEnemyCount=_0x413050.ENEMY_SLOTS,e.playerCount=e.enemyCount=e.playerStrength=e.enemyStrength=0,e.championCount=e.bossCount=0;for(let t=0;t<_0x413050.PLAYER_SLOTS;t++)e.freePlayer[t]=_0x413050.PLAYER_SLOTS-1-t;for(let t=0;t<_0x413050.ENEMY_SLOTS;t++)e.freeEnemy[t]=_0x413050.CAPACITY-1-t}function prepareLevel(e){clearUnits(e),e.battleClock=0,e.fireClock=_0x413050.FIRE_INTERVAL,e.charge=0;const t=random(e)>.5,n=(e.level-1)%3+1,r=1===n?1:2===n?2.5:3,o=1===n?[1,2,3,4]:2===n?[3,4,-2,5]:[4,3,6,5];e.gates=o.map((e,r)=>{const o=2.35*(r%2==0!==t?-1:1);return{id:r,x:o,originX:o,z:r<2?-8.5:-16,halfWidth:1.95,factor:e,operation:1===n&&0===r?"add":e<0?"divide":"multiply",moving:n>1&&r>=2,hits:0,remainder:0}}),e.bases=[-3.1,0,3.1].map((e,t)=>{const n=(1===t?_0x413050.CORE_HP:_0x413050.BASE_HP)*r;return{x:e,z:_0x413050.BASE_Z-(1===t?1.2:0),hp:n,maxHp:n,spawnClock:-.4-.32*t}}),e.barriers=1===n?[]:[-2.35,2.35].map(e=>({x:e,z:-22.5,halfWidth:1.5,hp:18*n,maxHp:18*n})),e.boostPad=1===n?null:{x:t?2.35:-2.35,z:-19.1,halfWidth:1.55,halfLength:1.15},3===n&&spawn(e,!1,0,-26.5,_0x413050.BOSS_STRENGTH,0,2)}export function spawn(e,t,n,r,o=1,a=0,s=0,i=!1){const _=_0x413050.MAX_STRENGTH-(t?e.playerStrength:e.enemyStrength),l=Math.max(0,Math.min(o,_));if(0===l)return-1;const h=t?e.freePlayer:e.freeEnemy,f=t?e.freePlayerCount:e.freeEnemyCount;let x;if(0===f||t&&0===s&&1===f&&0===e.championCount){let o=-1,i=1/0;const _=t?0:_0x413050.PLAYER_SLOTS,h=t?_0x413050.PLAYER_SLOTS:_0x413050.CAPACITY;for(let t=_;t<h;t++){if(!e.alive[t]||e.gatesPassed[t]!==a||e.kind[t]!==s)continue;const _=(e.x[t]-n)**2+(e.z[t]-r)**2;_<i&&(i=_,o=t)}return o<0?-1:(e.strength[o]=e.strength[o]+l,t?e.playerStrength+=l:e.enemyStrength+=l,o)}return x=h[f-1],t?(e.freePlayerCount--,e.playerCount++,e.playerStrength+=l):(e.freeEnemyCount--,e.enemyCount++,e.enemyStrength+=l),e.alive[x]=1,e.strength[x]=l,e.gatesPassed[x]=a,e.kind[x]=s,e.boost[x]=0,e.flight[x]=i?_0x413050.FLIGHT_DURATION:0,1===s&&e.championCount++,2===s&&e.bossCount++,e.ticket[x]=++e.serial,e.x[x]=e.previousX[x]=clamp(n,.3-_0x413050.HALF_WIDTH,_0x413050.HALF_WIDTH-.3),e.z[x]=e.previousZ[x]=r,x}function remove(e,t){e.alive[t]&&(e.alive[t]=0,1===e.kind[t]&&e.championCount--,2===e.kind[t]&&(e.bossCount--,0===e.strength[t]&&(e.events.bossDefeated=!0)),isPlayer(t)?(e.playerStrength-=e.strength[t],e.freePlayer[e.freePlayerCount++]=t,e.playerCount--):(e.enemyStrength-=e.strength[t],e.freeEnemy[e.freeEnemyCount++]=t,e.enemyCount--),e.strength[t]=0)}function effect(e,t,n,r){const o=e.events;if(o.effectCount>=_0x413050.MAX_EFFECTS)return;const a=o.effectCount++;o.effectX[a]=t,o.effectZ[a]=n,o.effectTeam[a]=r?1:0}function gridX(e){return clamp(Math.floor((e+_0x413050.HALF_WIDTH)/_0x413050.GRID_SIZE),0,_0x413050.GRID_COLUMNS-1)}function gridZ(e){return clamp(Math.floor(-e/_0x413050.GRID_SIZE),0,_0x413050.GRID_ROWS-1)}function grid(e){e.playerGrid.fill(-1),e.enemyGrid.fill(-1);for(let t=0;t<_0x413050.CAPACITY;t++)if(e.alive[t]){const n=isPlayer(t)?e.playerGrid:e.enemyGrid,r=gridZ(e.z[t])*_0x413050.GRID_COLUMNS+gridX(e.x[t]);e.next[t]=n[r],n[r]=t}}function move(e,t){grid(e);let n=-1;if(e.bossCount>0)for(let t=_0x413050.PLAYER_SLOTS;t<_0x413050.CAPACITY;t++)if(e.alive[t]&&2===e.kind[t]){n=t;break}const r=e.bases.some(e=>e.hp>0);for(let o=0;o<_0x413050.CAPACITY;o++){if(!e.alive[o])continue;const a=isPlayer(o),s=e.x[o],i=e.z[o];e.previousX[o]=s,e.previousZ[o]=i,e.flight[o]=Math.max(0,e.flight[o]-t);let _=s,l=a?_0x413050.TARGET_LINE-3:_0x413050.BREACH_Z+1;const h=n<0?1/0:Math.hypot(e.x[n]-s,e.z[n]-i);if(a&&(i<-18||h<8||!r)){let t=1/0;for(const n of e.bases)if(n.hp>0){const e=Math.abs(n.x-s)+.15*Math.abs(n.z-i);e<t&&(t=e,_=n.x,l=n.z)}n>=0&&(h<8||!r||1===e.kind[o])&&(_=e.x[n],l=e.z[n])}else a||(_=.65*e.cannonX);const f=_-s,x=l-i,A=Math.hypot(f,x)||1,C=e.boostPad;a&&C&&Math.abs(s-C.x)<=C.halfWidth&&Math.abs(i-C.z)<=C.halfLength?e.boost[o]=_0x413050.BOOST_DURATION:e.boost[o]=Math.max(0,e.boost[o]-t);const S=(1===e.kind[o]?_0x413050.CHAMPION_SPEED:2===e.kind[o]?_0x413050.BOSS_SPEED:a?_0x413050.PLAYER_SPEED:_0x413050.ENEMY_SPEED)*(e.boost[o]>0?_0x413050.BOOST_SPEED:1);let g=0,p=0,u=0;const I=a?e.playerGrid:e.enemyGrid,m=gridX(s),E=gridZ(i);for(let t=-1;t<=1&&u<_0x413050.MAX_SEPARATION_VISITS;t++)for(let n=-1;n<=1&&u<_0x413050.MAX_SEPARATION_VISITS;n++){const r=m+n,a=E+t;if(!(r<0||r>=_0x413050.GRID_COLUMNS||a<0||a>=_0x413050.GRID_ROWS))for(let t=I[a*_0x413050.GRID_COLUMNS+r];t>=0&&u<_0x413050.MAX_SEPARATION_VISITS;t=e.next[t]){if(t===o||!e.alive[t])continue;u++;const n=s-e.x[t],r=i-e.z[t],a=n*n+r*r;if(a>1e-5&&a<.24){const e=2.2*(.49-Math.sqrt(a)),t=1/Math.sqrt(a);g+=n*t*e,p+=r*t*e}}}e.x[o]=clamp(s+(f/A*S+clamp(g,-1.1,1.1))*t,.3-_0x413050.HALF_WIDTH,_0x413050.HALF_WIDTH-.3),e.z[o]=i+(x/A*S+clamp(p,-.5,.5))*t}}function gates(e){for(let t=0;t<_0x413050.PLAYER_SLOTS;t++)if(e.alive[t]&&1!==e.kind[t])for(const n of e.gates){const r=1<<n.id;if(e.gatesPassed[t]&r||e.previousZ[t]<n.z||e.z[t]>n.z||Math.abs(e.x[t]-n.x)>n.halfWidth)continue;e.gatesPassed[t]=e.gatesPassed[t]|r;const o=e.strength[t];if(n.hits++,e.events.gates++,n.factor<0){n.remainder+=o/-n.factor;const r=Math.floor(n.remainder);n.remainder-=r,e.playerStrength+=r-o,e.strength[t]=r,r||remove(e,t)}else{const r=Math.min("add"===n.operation?n.factor:o*(n.factor-1),_0x413050.MAX_STRENGTH-e.playerStrength);for(let o=0;o<r;o++){if(e.freePlayerCount<=(0===e.championCount?1:0)){e.strength[t]=e.strength[t]+r-o,e.playerStrength+=r-o;break}const a=2.39996*(e.serial+o),s=.16+.11*Math.sqrt(o+1);spawn(e,!0,e.x[t]+Math.cos(a)*s,n.z-.12-Math.abs(Math.sin(a)*s),1,e.gatesPassed[t])}}}}function fight(e){grid(e),e.collisionVisits=0;const t=_0x413050.COLLISION_RADIUS*_0x413050.COLLISION_RADIUS;for(let n=0;n<_0x413050.PLAYER_SLOTS;n++){if(!e.alive[n])continue;const r=gridX(e.x[n]),o=gridZ(e.z[n]);let a=0;for(let s=-1;s<=1&&e.alive[n]&&a<_0x413050.MAX_COLLISION_VISITS;s++)for(let i=-1;i<=1&&e.alive[n]&&a<_0x413050.MAX_COLLISION_VISITS;i++){const _=r+i,l=o+s;if(!(_<0||_>=_0x413050.GRID_COLUMNS||l<0||l>=_0x413050.GRID_ROWS))for(let r=e.enemyGrid[l*_0x413050.GRID_COLUMNS+_];r>=0&&e.alive[n]&&a<_0x413050.MAX_COLLISION_VISITS;r=e.next[r]){if(a++,e.collisionVisits++,!e.alive[r])continue;const o=e.x[n]-e.x[r],s=e.z[n]-e.z[r];if(o*o+s*s>(1===e.kind[n]||2===e.kind[r]?.5625:t))continue;const i=Math.min(e.strength[n],e.strength[r]);e.strength[n]=e.strength[n]-i,e.strength[r]=e.strength[r]-i,e.playerStrength-=i,e.enemyStrength-=i,e.score+=i*_0x413050.KILL_POINTS,e.events.clashes+=i,e.charge=Math.min(_0x413050.CHAMPION_CHARGE,e.charge+.12*i),effect(e,(e.x[n]+e.x[r])/2,(e.z[n]+e.z[r])/2,!1),e.strength[r]||remove(e,r),e.strength[n]||remove(e,n)}}}}function outcomes(e){for(let t=0;t<_0x413050.CAPACITY;t++)if(e.alive[t]){if(isPlayer(t)){for(const n of e.barriers){if(n.hp<=0||e.previousZ[t]<n.z||e.z[t]>n.z||Math.abs(e.x[t]-n.x)>n.halfWidth)continue;const r=Math.min(n.hp,e.strength[t]);n.hp-=r,e.strength[t]=e.strength[t]-r,e.playerStrength-=r,e.events.hits+=r,e.score+=2*r,effect(e,n.x,n.z,!0),0===n.hp&&e.events.barrierBroken++,0===e.strength[t]&&remove(e,t)}if(!e.alive[t])continue}if(isPlayer(t)&&e.z[t]<=_0x413050.TARGET_LINE){let n=null,r=1/0;for(const o of e.bases)if(o.hp>0){const a=Math.abs(o.x-e.x[t]);a<r&&(n=o,r=a)}if(!n)continue;if(r>.9||e.z[t]>n.z+1.25)continue;const o=Math.min(n.hp,e.strength[t]);n.hp-=o,e.score+=2*o,e.events.hits+=o,effect(e,n.x,n.z,!0),e.strength[t]=e.strength[t]-o,e.playerStrength-=o,e.strength[t]||remove(e,t),0===n.hp&&(e.score+=_0x413050.BASE_POINTS,e.events.captured++)}else!isPlayer(t)&&e.z[t]>=_0x413050.BREACH_Z&&(e.hp=2===e.kind[t]?0:Math.max(0,e.hp-e.strength[t]),e.events.breaches+=e.strength[t],effect(e,e.x[t],0,!1),remove(e,t))}}export function step(e,t){const n=e.events;if(n.shots=n.gates=n.clashes=n.hits=n.breaches=n.captured=n.effectCount=n.barrierBroken=0,n.won=n.lost=n.champion=n.bossDefeated=!1,e.finished||t<=0||!Number.isFinite(t))return n;const r=(e.level-1)%3+1;t=Math.min(t,_0x413050.STEP),e.elapsed+=t,e.battleClock+=t,e.cannonX+=(e.targetX-e.cannonX)*(1-Math.exp(15*-t)),e.fireClock+=t,e.fireClock>=_0x413050.FIRE_INTERVAL&&(e.fireClock-=_0x413050.FIRE_INTERVAL,spawn(e,!0,e.cannonX+.22*(random(e)-.5),_0x413050.SPAWN_Z,1,0,0,!0),e.charge=Math.min(_0x413050.CHAMPION_CHARGE,e.charge+_0x413050.CHAMPION_PER_SHOT),n.shots++),e.charge>=_0x413050.CHAMPION_CHARGE&&0===e.championCount&&spawn(e,!0,e.cannonX,_0x413050.SPAWN_Z,_0x413050.CHAMPION_STRENGTH+12*r,0,1,!0)>=0&&(e.charge=0,n.champion=!0);for(const t of e.gates)t.x=t.originX+(t.moving?.28*Math.sin(.65*e.battleClock+t.id):0);for(const n of e.bases)if(n.hp>0){n.spawnClock+=t;const o=_0x413050.ENEMY_WAVE_INTERVAL-.12*(r-1);if(n.spawnClock>=o){n.spawnClock-=o;const t=_0x413050.ENEMY_WAVE_SIZE+3*r+Math.min(_0x413050.ENEMY_MAX_SURGE,2*Math.floor(e.battleClock/_0x413050.ENEMY_SURGE_INTERVAL));for(let r=0;r<t;r++){const t=2.39996*e.serial,o=.2*Math.sqrt(r+.5);spawn(e,!1,n.x+Math.cos(t)*o,n.z+1.1+Math.sin(t)*o)}}}return move(e,t),gates(e),fight(e),outcomes(e),0===e.hp?(e.finished=!0,n.lost=!0):0===e.bossCount&&e.bases.every(e=>0===e.hp)&&(e.score+=_0x413050.LEVEL_POINTS,clearUnits(e),e.finished=e.won=n.won=!0),n}
@@ -0,0 +1 @@
1
+ "use strict";import{effects,quat,tube}from"@nayan-ui/engine";import{glyphMesh}from"../shared/EngineGlyphs.js";import{createGameMesh as _0x4490f3}from"../shared/EngineMeshes.js";import{toColor}from"../shared/EngineUtils.js";import{MOB_COLORS,MOB_CONFIG as _0x221750}from"./MobControlConstants.js";const WHITE=[1,1,1,1];export function makeView(o,t,e){const r=Math.max(1,.5/(o/Math.max(t,1)));e.eye=[0,19*r,15*r],e.target=[0,0,t<550?-9:-13],e.fov=.9;const n=e.target[1]-e.eye[1],a=e.target[2]-e.eye[2],s=Math.hypot(n,a),i=(-e.eye[1]*n-e.eye[2]*a)/s;return{width:o,height:t,k:t/(2*Math.tan(e.fov/2)*i)}}const gateColor=o=>toColor(o.factor<0?MOB_COLORS.GATE_DANGER:o.factor>=3?MOB_COLORS.GATE_HIGH:MOB_COLORS.GATE);function part(o,t,e,r,n,a,s){return o.spawn({mesh:e,parent:t,position:r,scale:n,color:a,rotation:s,pickable:!1})}function number(o,t,e,r,n,a){return[...e].map((s,i)=>o.spawn({mesh:glyphMesh(s),parent:t,position:[(i-(e.length-1)/2)*a*.7,r,n],scale:a,color:WHITE,pickable:!1}))}function spawnBase(o,t,e,r,n){const a=o.spawn({mesh:"none",parent:t,position:[e.x,0,e.z],pickable:!1}),s=toColor(MOB_COLORS.ENEMY),i=toColor(MOB_COLORS.ENEMY_DARK),p=part(o,a,"roundedBox",[0,1.5,0],[2.45,3,2.5],s);part(o,a,"roundedBox",[0,.18,0],[2.8,.36,2.9],i),part(o,a,"roundedBox",[0,3.05,0],[2.65,.3,2.7],n?[.6,.31,.45,1]:[1,.62,.65,1]);for(const t of[-1,1])part(o,a,"cylinder",[1.1*t,2.1,.65],[.62,4.2,.62],s),part(o,a,"cone",[1.1*t,4.45,.65],[.9,.8,.9],i);part(o,a,"roundedBox",[0,.9,1.27],[.9,1.8,.08],i),part(o,a,"cube",[0,1,1.32],[.53,1.2,.04],[.1,.16,.23,1]),part(o,a,"cylinder",[0,3.9,-.65],[.08,1.7,.08],[.85,.87,.84,1]),part(o,a,"cube",[.4,4.45,-.65],[.8,.5,.055],s);const l=(r-1)%3+1;for(let t=0;t<l;t++)part(o,a,"roundedBox",[.32*(t-(l-1)/2),2,1.3],[.2,.35,.07],[1.25,1.08,.5,1]);return part(o,a,"roundedBox",[0,3.5,1.45],[2.3,.24,.14],[.17,.23,.29,1]),{root:a,body:p,bar:part(o,a,"roundedBox",[0,3.5,1.54],[2.15,.14,.08],toColor("#FFC66E")),digits:number(o,a,String(e.hp),2.75,1.5,.5),shown:String(e.hp),hp:e.hp,captured:!1}}let bow=null;function portalBow(){return bow||(bow=_0x4490f3(tube([[-1.86,1.65,0],[-1.65,.3,0],[0,.16,0],[1.65,.3,0],[1.86,1.65,0]],{radius:.045,sides:6,smoothness:5}),{center:!1,shine:.1})),bow}function spawnGate(o,t,e){const r=o.spawn({mesh:"none",parent:t,position:[e.x,0,e.z],pickable:!1}),n=toColor(MOB_COLORS.FRAME),a=gateColor(e),s=2*e.halfWidth;for(const t of[-1,1])part(o,r,"roundedBox",[t*e.halfWidth,.94,0],[.21,1.88,.32],n),part(o,r,"cube",[t*e.halfWidth,1.92,0],[.22,.11,.33],[1,.8,.24,1]);part(o,r,"roundedBox",[0,.03,0],[s,.06,.38],[1.3*a[0],1.3*a[1],1.3*a[2],1]);const i=part(o,r,"cube",[0,.92,0],[s-.12,1.7,.035],[a[0],a[1],a[2],.48]);if(o.spawn({mesh:portalBow(),parent:r,position:[0,0,.06],color:[.8,1.3,1.5,1],pickable:!1}),part(o,r,"roundedBox",[0,1.03,.06],[1.65,1.1,.04],[.38*a[0],.38*a[1],.38*a[2],1]),e.factor<0||"add"===e.operation){if(part(o,r,"roundedBox",[-.43,1.03,.15],[.51,.1,.05],WHITE),e.factor<0)for(const t of[-.23,.23])part(o,r,"sphere",[-.43,1.03+t,.15],.1,WHITE);else part(o,r,"roundedBox",[-.43,1.03,.15],[.1,.51,.05],WHITE);o.spawn({mesh:glyphMesh(String(Math.abs(e.factor))),parent:r,position:[.3,1.03,.18],scale:.85,color:WHITE,pickable:!1})}else number(o,r,"X"+e.factor,1.03,.18,.85);return{root:r,panel:i,hits:e.hits,factor:e.factor}}function spawnBarrier(o,t,e){const r=o.spawn({mesh:"none",parent:t,position:[e.x,0,e.z],pickable:!1});part(o,r,"roundedBox",[0,.75,0],[2*e.halfWidth,1.5,.7],[.92,.62,.23,1]);for(const t of[-1.2,0,1.2])part(o,r,"cube",[t,.75,.39],[.1,1.5,.1],[1,.8,.41,1]);for(const t of[.15,1.35])part(o,r,"cube",[0,t,.4],[2*e.halfWidth,.12,.12],[.52,.31,.12,1]);return part(o,r,"roundedBox",[0,.8,.47],[1.3,1.05,.08],[.2,.17,.13,1]),{root:r,digits:number(o,r,String(e.hp),.8,.54,.65),shown:e.hp,broken:!1}}function spawnBoost(o,t,e){const r=e.boostPad;if(!r)return;const n=o.spawn({mesh:"none",parent:t,position:[r.x,.06,r.z],pickable:!1});part(o,n,"roundedBox",[0,0,0],[2*r.halfWidth,.07,2*r.halfLength],[.13,.56,.65,1]);for(let t=0;t<3;t++)for(const e of[-1,1])part(o,n,"cube",[.3*e,.05,.6*t-.65],[.12,.03,.8],[.65,1.3,1.4,1],quat.y(e*Math.PI/4))}function spawnBossBar(o,t){const e=o.spawn({mesh:"none",parent:t,pickable:!1});return part(o,e,"roundedBox",[0,2.9,0],[2.15,.3,.1],[.18,.1,.14,1]),{root:e,bar:part(o,e,"roundedBox",[0,2.9,.07],[2,.18,.08],[1.1,.2,.25,1]),digits:number(o,e,String(_0x221750.BOSS_STRENGTH),3.4,.1,.65),shown:_0x221750.BOSS_STRENGTH,visible:!0}}export function buildScene(o,t,e){for(const o of"0123456789X")glyphMesh(o);const r=o.spawn({mesh:"none",pickable:!1}),n=t?[.12,.13,.18,1]:toColor(MOB_COLORS.GROUND),a=_0x221750.TRACK_NEAR_Z-_0x221750.TRACK_FAR_Z,s=(_0x221750.TRACK_NEAR_Z+_0x221750.TRACK_FAR_Z)/2;part(o,r,"cube",[0,-1.5,-18],[250,.3,240],n),part(o,r,"roundedBox",[0,-.55,s],[2*_0x221750.HALF_WIDTH+1.2,.9,a+.5],t?[.25,.31,.37,1]:toColor(MOB_COLORS.ROAD_EDGE)),part(o,r,"cube",[0,-.04,s],[2*_0x221750.HALF_WIDTH,.13,a],t?[.38,.43,.46,1]:toColor(MOB_COLORS.ROAD));for(const e of[-1,1])part(o,r,"roundedBox",[e*(_0x221750.HALF_WIDTH+.1),.04,s],[.18,.22,a],t?[.52,.65,.73,1]:[.95,.94,.86,1]);for(let e=0,n=_0x221750.TRACK_NEAR_Z-1.5;n>_0x221750.TRACK_FAR_Z;e++,n-=2.3)if(part(o,r,"cube",[0,.032,n],[.07,.012,.9],t?[.51,.57,.6,1]:[.96,.96,.92,1]),e%2==0)for(const e of[-1,1])part(o,r,"cylinder",[e*(_0x221750.HALF_WIDTH+.4),.23,n],[.13,.9,.13],t?[.35,.31,.28,1]:[.55,.35,.18,1]);for(const e of[-1,1])part(o,r,"cube",[e*(_0x221750.HALF_WIDTH+.4),.4,s],[.09,.13,a],t?[.35,.31,.28,1]:[.67,.43,.22,1]);part(o,r,"roundedBox",[0,.06,.35],[2*_0x221750.HALF_WIDTH,.1,.2],toColor(MOB_COLORS.PLAYER));const i=o.spawn({mesh:"none",parent:r,position:[0,0,_0x221750.CANNON_Z],pickable:!1}),p=toColor(MOB_COLORS.PLAYER),l=toColor(MOB_COLORS.PLAYER_DARK);part(o,i,"roundedBox",[0,.38,0],[1.6,.4,1.65],[.8,.18,.21,1]),part(o,i,"sphere",[0,.86,0],[1.18,.9,1.2],p);for(const t of[-1,1])for(const e of[-.48,.5])part(o,i,"cylinder",[.83*t,.31,e],[.6,.24,.6],[.1,.13,.18,1],quat.z(Math.PI/2)),part(o,i,"cylinder",[.96*t,.31,e],[.25,.03,.25],[.77,.83,.87,1],quat.z(Math.PI/2));const h=o.spawn({mesh:"none",parent:i,position:[0,.92,-.1],pickable:!1});part(o,h,"cylinder",[0,0,-.7],[.62,1.6,.62],l,quat.x(Math.PI/2)),part(o,h,"cylinder",[0,0,-1.52],[.76,.22,.76],p,quat.x(Math.PI/2)),part(o,h,"cylinder",[0,0,-1.65],[.49,.025,.49],[.06,.11,.17,1],quat.x(Math.PI/2)),part(o,i,"roundedBox",[0,.4,1.05],[1.65,.15,.26],[.16,.24,.31,1]);const f=part(o,i,"roundedBox",[-.76,.5,1.05],[.01,.1,.2],toColor(MOB_COLORS.CHAMPION)),u={root:r,battleRoot:o.spawn({mesh:"none",parent:r,pickable:!1}),cannon:i,barrel:h,chargeBar:f,chargeShown:-1,battle:null,bases:[],gates:[],barriers:[],boss:null,night:t};return syncBattle(o,u,e),u}function syncBattle(o,t,e){t.battle!==e&&(o.despawn(t.battleRoot),t.battleRoot=o.spawn({mesh:"none",parent:t.root,pickable:!1}),t.battle=e,t.bases=e.bases.map(r=>spawnBase(o,t.battleRoot,r,e.level,t.night)),t.gates=e.gates.map(e=>spawnGate(o,t.battleRoot,e)),t.barriers=e.barriers.map(e=>spawnBarrier(o,t.battleRoot,e)),spawnBoost(o,t.battleRoot,e),t.boss=e.bossCount>0?spawnBossBar(o,t.battleRoot):null)}export function syncScene(o,t,e,r){syncBattle(o,t,e),o.set(t.cannon,{position:[e.cannonX,0,_0x221750.CANNON_Z]});const n=5*Math.floor(e.charge/5);if(n!==t.chargeShown){t.chargeShown=n;const e=n/_0x221750.CHAMPION_CHARGE;o.set(t.chargeBar,{scale:[Math.max(.01,1.5*e),.1,.2],position:[.75*e-.75,.5,1.05]})}for(let r=0;r<e.gates.length;r++){const n=e.gates[r],a=t.gates[r];if(n.moving&&o.set(a.root,{position:[n.x,0,n.z]}),a.hits!==n.hits){a.hits=n.hits;const t=gateColor(n);o.set(a.panel,{color:[1.3*t[0],1.3*t[1],1.3*t[2],.65]}),o.animate(a.panel,{color:[t[0],t[1],t[2],.48]},{duration:.18})}}for(let n=0;n<e.bases.length;n++){const a=e.bases[n],s=t.bases[n];if(a.hp!==s.hp){s.hp=a.hp;const t=a.hp/a.maxHp;o.set(s.bar,{scale:[Math.max(.001,2.15*t),.14,.08],position:[1.075*-(1-t),3.5,1.54]})}0===a.hp&&!s.captured&&(s.captured=!0,o.set(s.body,{color:toColor(MOB_COLORS.PLAYER)}),o.animate(s.root,{scale:[1,.25,1]},{duration:.55,easing:"bounce"}));const i=String(a.hp);if(r&&i!==s.shown){for(const t of s.digits)o.despawn(t);s.digits=number(o,s.root,i,2.75,1.5,.5),s.shown=i}}for(let n=0;n<e.barriers.length;n++){const a=e.barriers[n],s=t.barriers[n];if(0===a.hp&&!s.broken&&(s.broken=!0,effects.shatter(o,{position:[a.x,.65,a.z],colors:[.92,.62,.23,1],count:9,size:.13,speed:2,lifetime:.4,gravity:-7}),o.animate(s.root,{scale:[1,.001,1]},{duration:.25})),r&&a.hp!==s.shown){for(const t of s.digits)o.despawn(t);s.digits=a.hp>0?number(o,s.root,String(a.hp),.8,.54,.65):[],s.shown=a.hp}}if(t.boss){const n=t.boss;let a=-1;for(let o=_0x221750.PLAYER_SLOTS;o<_0x221750.CAPACITY;o++)if(e.alive[o]&&2===e.kind[o]){a=o;break}if(a>=0){o.set(n.root,{position:[e.previousX[a],0,e.previousZ[a]]});const t=e.strength[a];if(t!==n.shown){const e=t/_0x221750.BOSS_STRENGTH;if(o.set(n.bar,{scale:[Math.max(.001,2*e),.18,.08],position:[-(1-e),2.9,.07]}),r){for(const t of n.digits)o.despawn(t);n.digits=number(o,n.root,String(t),3.4,.1,.65),n.shown=t}}}else n.visible&&(n.visible=!1,o.set(n.root,{scale:.001}))}}export function recoil(o,t){o.animate(t.barrel,[{position:[0,.92,.1],at:.2},{position:[0,.92,-.1]}],{duration:.09})}export function battleEffect(o,t,e,r){effects.sparkle(o,{position:[t,.4,e],colors:toColor(r?MOB_COLORS.PLAYER:MOB_COLORS.ENEMY),count:5,size:.07,speed:1.5,lifetime:.24,flash:!1})}export function captured(o,t,e){effects.shatter(o,{position:[t,1.2,e],colors:toColor(MOB_COLORS.ENEMY),count:12,size:.14,speed:3,lifetime:.5,gravity:-7})}export function celebrate(o){effects.confetti(o,{position:[0,2,-12],colors:[toColor(MOB_COLORS.PLAYER),[1,.82,.35,1],WHITE],count:35,size:.1,speed:5,lifetime:1.2,gravity:-4})}export function removeScene(o,t){o.despawn(t.root)}