@nayan-ui/games 1.19.0 → 1.20.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 (1808) 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 +94 -73
  832. package/src/assets/fonts/Inter-SemiBold.ttf +0 -0
  833. package/src/assets/models/explorer/explorer.glb +0 -0
  834. package/src/assets/models/explorer/params.json +51 -0
  835. package/src/assets/models/explorer/source.json +222 -0
  836. package/src/assets/models/play-with-tua/play-with-tua.glb +0 -0
  837. package/src/assets/models/play-with-tua/sources.json +141 -0
  838. package/src/assets/sfx/balloon_pop.wav +0 -0
  839. package/src/assets/sfx/blocked.wav +0 -0
  840. package/src/assets/sfx/boing.wav +0 -0
  841. package/src/assets/sfx/bonus.wav +0 -0
  842. package/src/assets/sfx/boom.wav +0 -0
  843. package/src/assets/sfx/bump.wav +0 -0
  844. package/src/assets/sfx/cannon.wav +0 -0
  845. package/src/assets/sfx/capture.wav +0 -0
  846. package/src/assets/sfx/card_flip.wav +0 -0
  847. package/src/assets/sfx/card_place.wav +0 -0
  848. package/src/assets/sfx/catch.wav +0 -0
  849. package/src/assets/sfx/chime.wav +0 -0
  850. package/src/assets/sfx/chomp.wav +0 -0
  851. package/src/assets/sfx/chomp_alt.wav +0 -0
  852. package/src/assets/sfx/clack.wav +0 -0
  853. package/src/assets/sfx/clang.wav +0 -0
  854. package/src/assets/sfx/clash.wav +0 -0
  855. package/src/assets/sfx/click.wav +0 -0
  856. package/src/assets/sfx/coin.wav +0 -0
  857. package/src/assets/sfx/combo.wav +0 -0
  858. package/src/assets/sfx/crash.wav +0 -0
  859. package/src/assets/sfx/crunch.wav +0 -0
  860. package/src/assets/sfx/dance.wav +0 -0
  861. package/src/assets/sfx/deselect.wav +0 -0
  862. package/src/assets/sfx/dice_roll.wav +0 -0
  863. package/src/assets/sfx/die.wav +0 -0
  864. package/src/assets/sfx/draw.wav +0 -0
  865. package/src/assets/sfx/drop.wav +0 -0
  866. package/src/assets/sfx/eat.wav +0 -0
  867. package/src/assets/sfx/engine.wav +0 -0
  868. package/src/assets/sfx/error.wav +0 -0
  869. package/src/assets/sfx/flag.wav +0 -0
  870. package/src/assets/sfx/flap.wav +0 -0
  871. package/src/assets/sfx/flip_disc.wav +0 -0
  872. package/src/assets/sfx/footstep_run.wav +0 -0
  873. package/src/assets/sfx/footstep_walk.wav +0 -0
  874. package/src/assets/sfx/game_over.wav +0 -0
  875. package/src/assets/sfx/gate.wav +0 -0
  876. package/src/assets/sfx/hit.wav +0 -0
  877. package/src/assets/sfx/hop.wav +0 -0
  878. package/src/assets/sfx/hurt.wav +0 -0
  879. package/src/assets/sfx/invalid.wav +0 -0
  880. package/src/assets/sfx/jump.wav +0 -0
  881. package/src/assets/sfx/ladder.wav +0 -0
  882. package/src/assets/sfx/land.wav +0 -0
  883. package/src/assets/sfx/laugh.wav +0 -0
  884. package/src/assets/sfx/lose.wav +0 -0
  885. package/src/assets/sfx/merge.wav +0 -0
  886. package/src/assets/sfx/miss.wav +0 -0
  887. package/src/assets/sfx/nitro.wav +0 -0
  888. package/src/assets/sfx/pew.wav +0 -0
  889. package/src/assets/sfx/place.wav +0 -0
  890. package/src/assets/sfx/pling.wav +0 -0
  891. package/src/assets/sfx/point.wav +0 -0
  892. package/src/assets/sfx/pop.wav +0 -0
  893. package/src/assets/sfx/pop_soft.wav +0 -0
  894. package/src/assets/sfx/power_up.wav +0 -0
  895. package/src/assets/sfx/reveal.wav +0 -0
  896. package/src/assets/sfx/robot.wav +0 -0
  897. package/src/assets/sfx/rotate.wav +0 -0
  898. package/src/assets/sfx/run_steps.wav +0 -0
  899. package/src/assets/sfx/select.wav +0 -0
  900. package/src/assets/sfx/shuffle.wav +0 -0
  901. package/src/assets/sfx/six.wav +0 -0
  902. package/src/assets/sfx/slice.wav +0 -0
  903. package/src/assets/sfx/slide.wav +0 -0
  904. package/src/assets/sfx/snake.wav +0 -0
  905. package/src/assets/sfx/snap.wav +0 -0
  906. package/src/assets/sfx/splash.wav +0 -0
  907. package/src/assets/sfx/star.wav +0 -0
  908. package/src/assets/sfx/start.wav +0 -0
  909. package/src/assets/sfx/swoosh.wav +0 -0
  910. package/src/assets/sfx/tap.wav +0 -0
  911. package/src/assets/sfx/thud.wav +0 -0
  912. package/src/assets/sfx/thunk.wav +0 -0
  913. package/src/assets/sfx/tick.wav +0 -0
  914. package/src/assets/sfx/time_up.wav +0 -0
  915. package/src/assets/sfx/tock.wav +0 -0
  916. package/src/assets/sfx/walk_steps.wav +0 -0
  917. package/src/assets/sfx/warning.wav +0 -0
  918. package/src/assets/sfx/whack.wav +0 -0
  919. package/src/assets/sfx/whoosh.wav +0 -0
  920. package/src/assets/sfx/win.wav +0 -0
  921. package/src/assets/sfx/zap.wav +0 -0
  922. package/src/assets/textures/ad_bolt.png +0 -0
  923. package/src/assets/textures/ad_bubbles.png +0 -0
  924. package/src/assets/textures/ad_chevrons.png +0 -0
  925. package/src/assets/textures/asphalt.png +0 -0
  926. package/src/assets/textures/bark.jpg +0 -0
  927. package/src/assets/textures/explorer-atlas.png +0 -0
  928. package/src/assets/textures/facade.png +0 -0
  929. package/src/assets/textures/grass.png +0 -0
  930. package/src/assets/textures/leaves.png +0 -0
  931. package/src/assets/textures/limestone.jpg +0 -0
  932. package/src/assets/textures/meadow.jpg +0 -0
  933. package/src/assets/textures/nature-sources.json +87 -0
  934. package/src/assets/textures/pine.png +0 -0
  935. package/src/assets/textures/river.jpg +0 -0
  936. package/src/assets/textures/soft_glow.png +0 -0
  937. package/src/games/arrows/Arrows.tsx +69 -0
  938. package/src/games/arrows/ArrowsConstants.ts +107 -0
  939. package/src/games/arrows/ArrowsGame.ts +735 -0
  940. package/src/games/arrows/ArrowsScene.ts +395 -0
  941. package/src/games/balloon-blaster/BalloonBlaster.tsx +75 -0
  942. package/src/games/balloon-blaster/BalloonBlasterConstants.ts +79 -0
  943. package/src/games/balloon-blaster/BalloonBlasterGame.ts +287 -0
  944. package/src/games/balloon-blaster/BalloonBlasterPhysics.ts +95 -0
  945. package/src/games/balloon-blaster/BalloonBlasterScene.ts +225 -0
  946. package/src/games/bike-racing/BikeMeshes.ts +273 -0
  947. package/src/games/bike-racing/BikeRacing.tsx +211 -0
  948. package/src/games/bike-racing/BikeRacingConstants.ts +103 -0
  949. package/src/games/bike-racing/BikeRacingGame.ts +557 -0
  950. package/src/games/bike-racing/BikeRacingScene.ts +119 -0
  951. package/src/games/block-blast/BlockBlast.tsx +73 -0
  952. package/src/games/block-blast/BlockBlastConstants.ts +179 -0
  953. package/src/games/block-blast/BlockBlastGame.ts +471 -0
  954. package/src/games/block-blast/BlockBlastScene.ts +156 -0
  955. package/src/games/block-breaker/BlockBreaker.tsx +79 -0
  956. package/src/games/block-breaker/BlockBreakerConstants.ts +139 -0
  957. package/src/games/block-breaker/BlockBreakerGame.ts +459 -0
  958. package/src/games/block-breaker/BlockBreakerScene.ts +257 -0
  959. package/src/games/bluk/Bluk.tsx +82 -0
  960. package/src/games/bluk/BlukConstants.ts +121 -0
  961. package/src/games/bluk/BlukGame.ts +323 -0
  962. package/src/games/bluk/BlukRules.ts +154 -0
  963. package/src/games/bluk/BlukScene.ts +514 -0
  964. package/src/games/bubble-shooter/BubbleShooter.tsx +76 -0
  965. package/src/games/bubble-shooter/BubbleShooterConstants.ts +103 -0
  966. package/src/games/bubble-shooter/BubbleShooterGame.ts +459 -0
  967. package/src/games/bubble-shooter/BubbleShooterScene.ts +158 -0
  968. package/src/games/candy-crush/CandyCrush.tsx +77 -0
  969. package/src/games/candy-crush/CandyCrushConstants.ts +94 -0
  970. package/src/games/candy-crush/CandyCrushGame.ts +477 -0
  971. package/src/games/candy-crush/CandyCrushScene.ts +209 -0
  972. package/src/games/car-racing/CarMeshes.ts +440 -0
  973. package/src/games/car-racing/CarRacing.tsx +211 -0
  974. package/src/games/car-racing/CarRacingConstants.ts +167 -0
  975. package/src/games/car-racing/CarRacingFacade.ts +40 -0
  976. package/src/games/car-racing/CarRacingGame.ts +539 -0
  977. package/src/games/car-racing/CarRacingScene.ts +1026 -0
  978. package/src/games/car-racing/CarRacingScenery.ts +265 -0
  979. package/src/games/chameleon-run/ChameleonRun.tsx +96 -0
  980. package/src/games/chameleon-run/ChameleonRunBackdrop.ts +186 -0
  981. package/src/games/chameleon-run/ChameleonRunConstants.ts +47 -0
  982. package/src/games/chameleon-run/ChameleonRunGame.ts +309 -0
  983. package/src/games/chameleon-run/ChameleonRunMeshes.ts +305 -0
  984. package/src/games/chameleon-run/ChameleonRunRules.ts +252 -0
  985. package/src/games/chameleon-run/ChameleonRunScene.ts +310 -0
  986. package/src/games/checkers/Checkers.tsx +83 -0
  987. package/src/games/checkers/CheckersAI.ts +255 -0
  988. package/src/games/checkers/CheckersConstants.ts +68 -0
  989. package/src/games/checkers/CheckersGame.ts +322 -0
  990. package/src/games/checkers/CheckersRules.ts +167 -0
  991. package/src/games/checkers/CheckersScene.ts +308 -0
  992. package/src/games/color-switch/ColorSwitch.tsx +75 -0
  993. package/src/games/color-switch/ColorSwitchConstants.ts +61 -0
  994. package/src/games/color-switch/ColorSwitchGame.ts +329 -0
  995. package/src/games/color-switch/ColorSwitchScene.ts +220 -0
  996. package/src/games/colors-sort/ColorsSort.tsx +82 -0
  997. package/src/games/colors-sort/ColorsSortConstants.ts +119 -0
  998. package/src/games/colors-sort/ColorsSortGame.ts +246 -0
  999. package/src/games/colors-sort/ColorsSortScene.ts +315 -0
  1000. package/src/games/connect-em-all/ConnectEmAll.tsx +70 -0
  1001. package/src/games/connect-em-all/ConnectEmAllConstants.ts +77 -0
  1002. package/src/games/connect-em-all/ConnectEmAllGame.ts +401 -0
  1003. package/src/games/connect-em-all/ConnectEmAllScene.ts +235 -0
  1004. package/src/games/crossy-road/CrossyRoad.tsx +74 -0
  1005. package/src/games/crossy-road/CrossyRoadCamera.ts +59 -0
  1006. package/src/games/crossy-road/CrossyRoadConstants.ts +132 -0
  1007. package/src/games/crossy-road/CrossyRoadGame.ts +293 -0
  1008. package/src/games/crossy-road/CrossyRoadMeshes.ts +195 -0
  1009. package/src/games/crossy-road/CrossyRoadPerson.ts +198 -0
  1010. package/src/games/crossy-road/CrossyRoadRules.ts +99 -0
  1011. package/src/games/crossy-road/CrossyRoadScene.ts +355 -0
  1012. package/src/games/dino-jump/DinoJump.tsx +77 -0
  1013. package/src/games/dino-jump/DinoJumpConstants.ts +80 -0
  1014. package/src/games/dino-jump/DinoJumpGame.ts +344 -0
  1015. package/src/games/dino-jump/DinoJumpScene.ts +686 -0
  1016. package/src/games/dots-and-boxes/DotsAndBoxes.tsx +83 -0
  1017. package/src/games/dots-and-boxes/DotsAndBoxesConstants.ts +77 -0
  1018. package/src/games/dots-and-boxes/DotsAndBoxesGame.ts +271 -0
  1019. package/src/games/dots-and-boxes/DotsAndBoxesScene.ts +249 -0
  1020. package/src/games/falling-sticks/FallingSticks.tsx +72 -0
  1021. package/src/games/falling-sticks/FallingSticksConstants.ts +62 -0
  1022. package/src/games/falling-sticks/FallingSticksGame.ts +220 -0
  1023. package/src/games/falling-sticks/FallingSticksRules.ts +145 -0
  1024. package/src/games/falling-sticks/FallingSticksScene.ts +245 -0
  1025. package/src/games/find-different-number/FindDifferentNumber.tsx +74 -0
  1026. package/src/games/find-different-number/FindDifferentNumberConstants.ts +74 -0
  1027. package/src/games/find-different-number/FindDifferentNumberGame.ts +174 -0
  1028. package/src/games/find-different-number/FindDifferentNumberRules.ts +43 -0
  1029. package/src/games/find-different-number/FindDifferentNumberScene.ts +193 -0
  1030. package/src/games/flappy-bird/FlappyBird.tsx +73 -0
  1031. package/src/games/flappy-bird/FlappyBirdConstants.ts +95 -0
  1032. package/src/games/flappy-bird/FlappyBirdGame.ts +375 -0
  1033. package/src/games/flappy-bird/FlappyBirdScene.ts +630 -0
  1034. package/src/games/fruit-merger/FruitMerger.tsx +73 -0
  1035. package/src/games/fruit-merger/FruitMergerConstants.ts +102 -0
  1036. package/src/games/fruit-merger/FruitMergerGame.ts +285 -0
  1037. package/src/games/fruit-merger/FruitMergerRules.ts +286 -0
  1038. package/src/games/fruit-merger/FruitMergerScene.ts +498 -0
  1039. package/src/games/fruit-ninja/FruitNinja.tsx +129 -0
  1040. package/src/games/fruit-ninja/FruitNinjaConstants.ts +107 -0
  1041. package/src/games/fruit-ninja/FruitNinjaGame.ts +391 -0
  1042. package/src/games/fruit-ninja/FruitNinjaScene.ts +319 -0
  1043. package/src/games/fruit-ninja/FruitNinjaWorld.ts +17 -0
  1044. package/src/games/game-2048/Game2048.tsx +84 -0
  1045. package/src/games/game-2048/Game2048Constants.ts +68 -0
  1046. package/src/games/game-2048/Game2048Game.ts +181 -0
  1047. package/src/games/game-2048/Game2048Rules.ts +101 -0
  1048. package/src/games/game-2048/Game2048Scene.ts +206 -0
  1049. package/src/games/knife-hit/KnifeHit.tsx +78 -0
  1050. package/src/games/knife-hit/KnifeHitConstants.ts +89 -0
  1051. package/src/games/knife-hit/KnifeHitGame.ts +264 -0
  1052. package/src/games/knife-hit/KnifeHitScene.ts +360 -0
  1053. package/src/games/ludo-king/LudoKing.tsx +86 -0
  1054. package/src/games/ludo-king/LudoKingConstants.ts +212 -0
  1055. package/src/games/ludo-king/LudoKingGame.ts +326 -0
  1056. package/src/games/ludo-king/LudoKingRules.ts +143 -0
  1057. package/src/games/ludo-king/LudoKingScene.ts +397 -0
  1058. package/src/games/maze-runner/MazeRunner.tsx +88 -0
  1059. package/src/games/maze-runner/MazeRunnerConstants.ts +65 -0
  1060. package/src/games/maze-runner/MazeRunnerGame.ts +176 -0
  1061. package/src/games/maze-runner/MazeRunnerRules.ts +161 -0
  1062. package/src/games/maze-runner/MazeRunnerScene.ts +245 -0
  1063. package/src/games/memory-match/MemoryMatch.tsx +77 -0
  1064. package/src/games/memory-match/MemoryMatchConstants.ts +105 -0
  1065. package/src/games/memory-match/MemoryMatchGame.ts +222 -0
  1066. package/src/games/memory-match/MemoryMatchRules.ts +38 -0
  1067. package/src/games/memory-match/MemoryMatchScene.ts +268 -0
  1068. package/src/games/mine-sweeper/MineSweeper.tsx +77 -0
  1069. package/src/games/mine-sweeper/MineSweeperConstants.ts +94 -0
  1070. package/src/games/mine-sweeper/MineSweeperGame.ts +234 -0
  1071. package/src/games/mine-sweeper/MineSweeperRules.ts +67 -0
  1072. package/src/games/mine-sweeper/MineSweeperScene.ts +262 -0
  1073. package/src/games/mob-control/MobControl.tsx +73 -0
  1074. package/src/games/mob-control/MobControlConstants.ts +106 -0
  1075. package/src/games/mob-control/MobControlGame.ts +176 -0
  1076. package/src/games/mob-control/MobControlMeshes.ts +85 -0
  1077. package/src/games/mob-control/MobControlRenderer.ts +108 -0
  1078. package/src/games/mob-control/MobControlRules.ts +522 -0
  1079. package/src/games/mob-control/MobControlScene.ts +399 -0
  1080. package/src/games/number-search/NumberSearch.tsx +18 -0
  1081. package/src/games/number-search/NumberSearchNumbers.ts +623 -0
  1082. package/src/games/nuts-and-bolts/NutsAndBolts.tsx +85 -0
  1083. package/src/games/nuts-and-bolts/NutsAndBoltsConstants.ts +75 -0
  1084. package/src/games/nuts-and-bolts/NutsAndBoltsGame.ts +298 -0
  1085. package/src/games/nuts-and-bolts/NutsAndBoltsRules.ts +474 -0
  1086. package/src/games/nuts-and-bolts/NutsAndBoltsScene.ts +498 -0
  1087. package/src/games/pac-man/PacMan.tsx +86 -0
  1088. package/src/games/pac-man/PacManConstants.ts +169 -0
  1089. package/src/games/pac-man/PacManGame.ts +406 -0
  1090. package/src/games/pac-man/PacManRules.ts +255 -0
  1091. package/src/games/pac-man/PacManScene.ts +387 -0
  1092. package/src/games/paper-io/PaperIo.tsx +91 -0
  1093. package/src/games/paper-io/PaperIoConstants.ts +86 -0
  1094. package/src/games/paper-io/PaperIoGame.ts +193 -0
  1095. package/src/games/paper-io/PaperIoMeshes.ts +233 -0
  1096. package/src/games/paper-io/PaperIoRules.ts +315 -0
  1097. package/src/games/paper-io/PaperIoScene.ts +310 -0
  1098. package/src/games/penguin-run/PenguinMeshes.ts +269 -0
  1099. package/src/games/penguin-run/PenguinModel.ts +712 -0
  1100. package/src/games/penguin-run/PenguinRun.tsx +77 -0
  1101. package/src/games/penguin-run/PenguinRunConstants.ts +69 -0
  1102. package/src/games/penguin-run/PenguinRunGame.ts +406 -0
  1103. package/src/games/penguin-run/PenguinRunScene.ts +949 -0
  1104. package/src/games/perfect-circle/PerfectCircle.tsx +74 -0
  1105. package/src/games/perfect-circle/PerfectCircleConstants.ts +52 -0
  1106. package/src/games/perfect-circle/PerfectCircleGame.ts +153 -0
  1107. package/src/games/perfect-circle/PerfectCircleRules.ts +111 -0
  1108. package/src/games/perfect-circle/PerfectCircleScene.ts +176 -0
  1109. package/src/games/pipe-connect/PipeConnect.tsx +69 -0
  1110. package/src/games/pipe-connect/PipeConnectConstants.ts +101 -0
  1111. package/src/games/pipe-connect/PipeConnectGame.ts +179 -0
  1112. package/src/games/pipe-connect/PipeConnectRules.ts +326 -0
  1113. package/src/games/pipe-connect/PipeConnectScene.ts +271 -0
  1114. package/src/games/play-with-tua/PlayWithTua.tsx +123 -0
  1115. package/src/games/play-with-tua/PlayWithTuaConstants.ts +70 -0
  1116. package/src/games/play-with-tua/PlayWithTuaGame.ts +167 -0
  1117. package/src/games/play-with-tua/PlayWithTuaModel.ts +42 -0
  1118. package/src/games/play-with-tua/PlayWithTuaScene.ts +36 -0
  1119. package/src/games/popit-fidget/PopitFidget.tsx +72 -0
  1120. package/src/games/popit-fidget/PopitFidgetConstants.ts +71 -0
  1121. package/src/games/popit-fidget/PopitFidgetGame.ts +148 -0
  1122. package/src/games/popit-fidget/PopitFidgetScene.ts +242 -0
  1123. package/src/games/reversi/Reversi.tsx +94 -0
  1124. package/src/games/reversi/ReversiConstants.ts +67 -0
  1125. package/src/games/reversi/ReversiGame.ts +266 -0
  1126. package/src/games/reversi/ReversiRules.ts +176 -0
  1127. package/src/games/reversi/ReversiScene.ts +240 -0
  1128. package/src/games/search-grid/SearchGrid.tsx +92 -0
  1129. package/src/games/search-grid/SearchGridConstants.ts +178 -0
  1130. package/src/games/search-grid/SearchGridGame.ts +209 -0
  1131. package/src/games/search-grid/SearchGridScene.ts +301 -0
  1132. package/src/games/shared/BackdropCard.tsx +54 -0
  1133. package/src/games/shared/EngineBackdrop.ts +300 -0
  1134. package/src/games/shared/EngineBlasts.ts +136 -0
  1135. package/src/games/shared/EngineBlocks.ts +91 -0
  1136. package/src/games/shared/EngineControlText.ts +17 -0
  1137. package/src/games/shared/EngineDice.ts +250 -0
  1138. package/src/games/shared/EngineFootprint.ts +35 -0
  1139. package/src/games/shared/EngineFruits.ts +1435 -0
  1140. package/src/games/shared/EngineGameLoader.tsx +88 -0
  1141. package/src/games/shared/EngineGameScreen.tsx +325 -0
  1142. package/src/games/shared/EngineGameWidth.ts +3 -0
  1143. package/src/games/shared/EngineGameWidth.web.ts +3 -0
  1144. package/src/games/shared/EngineGlyphs.ts +178 -0
  1145. package/src/games/shared/EngineHud.ts +815 -0
  1146. package/src/games/shared/EngineLoading.ts +477 -0
  1147. package/src/games/shared/EngineMeadow.ts +725 -0
  1148. package/src/games/shared/EngineMeshCache.ts +15 -0
  1149. package/src/games/shared/EngineMeshes.ts +10 -0
  1150. package/src/games/shared/EngineRacingChase.ts +21 -0
  1151. package/src/games/shared/EngineRacingHandling.ts +48 -0
  1152. package/src/games/shared/EngineReadyContext.ts +4 -0
  1153. package/src/games/shared/EngineTilt.ts +44 -0
  1154. package/src/games/shared/EngineTouchSurface.tsx +103 -0
  1155. package/src/games/shared/EngineUtils.ts +52 -0
  1156. package/src/games/shared/GameActivity.ts +13 -0
  1157. package/src/games/shared/GameLoading.tsx +202 -0
  1158. package/src/games/shared/GameLoadingTransition.tsx +61 -0
  1159. package/src/games/shared/ProceduralCacheVersion.ts +2 -0
  1160. package/src/games/shared/useEngineGame.ts +240 -0
  1161. package/src/games/shared/useGameResource.ts +21 -0
  1162. package/src/games/shared/useLiveState.ts +58 -0
  1163. package/src/games/sliding-numbers/SlidingNumbers.tsx +71 -0
  1164. package/src/games/sliding-numbers/SlidingNumbersConstants.ts +65 -0
  1165. package/src/games/sliding-numbers/SlidingNumbersGame.ts +192 -0
  1166. package/src/games/sliding-numbers/SlidingNumbersRules.ts +79 -0
  1167. package/src/games/sliding-numbers/SlidingNumbersScene.ts +193 -0
  1168. package/src/games/snake-3d/Snake3D.tsx +76 -0
  1169. package/src/games/snake-3d/Snake3DConstants.ts +61 -0
  1170. package/src/games/snake-3d/Snake3DGame.ts +192 -0
  1171. package/src/games/snake-3d/Snake3DMotion.ts +22 -0
  1172. package/src/games/snake-3d/Snake3DRules.ts +116 -0
  1173. package/src/games/snake-3d/Snake3DScene.ts +322 -0
  1174. package/src/games/snakes-and-ladders/SnakesAndLadders.tsx +87 -0
  1175. package/src/games/snakes-and-ladders/SnakesAndLaddersConstants.ts +136 -0
  1176. package/src/games/snakes-and-ladders/SnakesAndLaddersGame.ts +310 -0
  1177. package/src/games/snakes-and-ladders/SnakesAndLaddersScene.ts +515 -0
  1178. package/src/games/space-fighter/SpaceFighter.tsx +74 -0
  1179. package/src/games/space-fighter/SpaceFighterConstants.ts +86 -0
  1180. package/src/games/space-fighter/SpaceFighterGame.ts +292 -0
  1181. package/src/games/space-fighter/SpaceFighterScene.ts +550 -0
  1182. package/src/games/spider-solitaire/SpiderSolitaire.tsx +80 -0
  1183. package/src/games/spider-solitaire/SpiderSolitaireConstants.ts +107 -0
  1184. package/src/games/spider-solitaire/SpiderSolitaireGame.ts +387 -0
  1185. package/src/games/spider-solitaire/SpiderSolitaireRules.ts +123 -0
  1186. package/src/games/spider-solitaire/SpiderSolitaireScene.ts +352 -0
  1187. package/src/games/stack-tower/StackTower.tsx +76 -0
  1188. package/src/games/stack-tower/StackTowerConstants.ts +74 -0
  1189. package/src/games/stack-tower/StackTowerGame.ts +236 -0
  1190. package/src/games/stack-tower/StackTowerScene.ts +186 -0
  1191. package/src/games/sudoku/Sudoku.tsx +73 -0
  1192. package/src/games/sudoku/SudokuConstants.ts +127 -0
  1193. package/src/games/sudoku/SudokuGame.ts +250 -0
  1194. package/src/games/sudoku/SudokuRules.ts +125 -0
  1195. package/src/games/sudoku/SudokuScene.ts +304 -0
  1196. package/src/games/tangram/Tangram.tsx +79 -0
  1197. package/src/games/tangram/TangramConstants.ts +64 -0
  1198. package/src/games/tangram/TangramGame.ts +356 -0
  1199. package/src/games/tangram/TangramRules.ts +409 -0
  1200. package/src/games/tangram/TangramScene.ts +203 -0
  1201. package/src/games/tank-1990/Tank1990.tsx +78 -0
  1202. package/src/games/tank-1990/Tank1990Constants.ts +81 -0
  1203. package/src/games/tank-1990/Tank1990Game.ts +331 -0
  1204. package/src/games/tank-1990/Tank1990Rules.ts +390 -0
  1205. package/src/games/tank-1990/Tank1990Scene.ts +434 -0
  1206. package/src/games/tic-tac-toe/TicTacToe.tsx +98 -0
  1207. package/src/games/tic-tac-toe/TicTacToeConstants.ts +69 -0
  1208. package/src/games/tic-tac-toe/TicTacToeGame.ts +200 -0
  1209. package/src/games/tic-tac-toe/TicTacToeRules.ts +103 -0
  1210. package/src/games/tic-tac-toe/TicTacToeScene.ts +245 -0
  1211. package/src/games/tile-home/TileHome.tsx +92 -0
  1212. package/src/games/tile-home/TileHomeConstants.ts +139 -0
  1213. package/src/games/tile-home/TileHomeGame.ts +435 -0
  1214. package/src/games/tile-home/TileHomeScene.ts +154 -0
  1215. package/src/games/treasure-hunt/TreasureHunt.tsx +206 -0
  1216. package/src/games/treasure-hunt/TreasureHuntConstants.ts +266 -0
  1217. package/src/games/treasure-hunt/TreasureHuntControls.ts +280 -0
  1218. package/src/games/treasure-hunt/TreasureHuntGame.ts +402 -0
  1219. package/src/games/treasure-hunt/TreasureHuntMeshes.ts +422 -0
  1220. package/src/games/treasure-hunt/TreasureHuntModel.ts +506 -0
  1221. package/src/games/treasure-hunt/TreasureHuntRules.ts +1210 -0
  1222. package/src/games/treasure-hunt/TreasureHuntScene.ts +586 -0
  1223. package/src/games/whack-a-mole/WhackAMole.tsx +79 -0
  1224. package/src/games/whack-a-mole/WhackAMoleConstants.ts +94 -0
  1225. package/src/games/whack-a-mole/WhackAMoleGame.ts +233 -0
  1226. package/src/games/whack-a-mole/WhackAMoleScene.ts +349 -0
  1227. package/src/games/word-search/WordSearch.tsx +18 -0
  1228. package/src/games/word-search/WordSearchWords.ts +1642 -0
  1229. package/src/helpers/GamePatternData.ts +120 -0
  1230. package/src/helpers/GameSettingsModal.tsx +384 -0
  1231. package/src/helpers/GameTheme.tsx +37 -0
  1232. package/src/helpers/IconPaths.ts +6 -0
  1233. package/src/helpers/index.ts +2 -0
  1234. package/src/index.tsx +60 -0
  1235. package/src/services/GameAssetLoader.ts +111 -0
  1236. package/src/services/GameAssets.ts +149 -0
  1237. package/src/services/GameLoaders.ts +93 -0
  1238. package/src/services/GamesConstants.ts +193 -0
  1239. package/src/services/GamesMetadata.ts +711 -0
  1240. package/src/services/GamesService.ts +116 -0
  1241. package/src/services/HapticsService.ts +48 -0
  1242. package/src/services/ScoringService.ts +19 -0
  1243. package/src/services/SfxSources.ts +81 -0
  1244. package/src/services/SoundsService.ts +582 -0
  1245. package/src/services/ThemeService.ts +281 -0
  1246. package/src/services/UtilsService.ts +134 -0
  1247. package/src/services/index.ts +6 -0
  1248. package/lib/module/games/arrows/ArrowsService.js +0 -1
  1249. package/lib/module/games/arrows/ArrowsStore.js +0 -1
  1250. package/lib/module/games/arrows/components/ArrowsGrid.js +0 -1
  1251. package/lib/module/games/arrows/components/ScoreBoard.js +0 -1
  1252. package/lib/module/games/balloon-blaster/BalloonBlasterService.js +0 -1
  1253. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +0 -1
  1254. package/lib/module/games/balloon-blaster/components/BalloonComponent.js +0 -1
  1255. package/lib/module/games/balloon-blaster/components/GameArea.js +0 -1
  1256. package/lib/module/games/balloon-blaster/components/GameBackground.js +0 -1
  1257. package/lib/module/games/balloon-blaster/components/ScoreBoard.js +0 -1
  1258. package/lib/module/games/bike-racing/BikeRacingService.js +0 -1
  1259. package/lib/module/games/bike-racing/BikeRacingStore.js +0 -1
  1260. package/lib/module/games/bike-racing/components/BikeComponent.js +0 -1
  1261. package/lib/module/games/bike-racing/components/GameBackground.js +0 -1
  1262. package/lib/module/games/bike-racing/components/ScoreBoard.js +0 -1
  1263. package/lib/module/games/block-blast/BlockBlastService.js +0 -1
  1264. package/lib/module/games/block-blast/BlockBlastStore.js +0 -1
  1265. package/lib/module/games/block-blast/components/BlockPieceComponent.js +0 -1
  1266. package/lib/module/games/block-blast/components/GameArea.js +0 -1
  1267. package/lib/module/games/block-blast/components/GridComponent.js +0 -1
  1268. package/lib/module/games/block-blast/components/ScoreBoard.js +0 -1
  1269. package/lib/module/games/block-breaker/BlockBreakerService.js +0 -1
  1270. package/lib/module/games/block-breaker/BlockBreakerStore.js +0 -1
  1271. package/lib/module/games/block-breaker/components/BlastAnimation.js +0 -1
  1272. package/lib/module/games/block-breaker/components/GameArea.js +0 -1
  1273. package/lib/module/games/block-breaker/components/ScoreBoard.js +0 -1
  1274. package/lib/module/games/bluk/BlukService.js +0 -1
  1275. package/lib/module/games/bluk/BlukStore.js +0 -1
  1276. package/lib/module/games/bluk/components/GameArea.js +0 -1
  1277. package/lib/module/games/bluk/components/GameBackground.js +0 -1
  1278. package/lib/module/games/bluk/components/ScoreBoard.js +0 -1
  1279. package/lib/module/games/bubble-shooter/BubbleShooterService.js +0 -1
  1280. package/lib/module/games/bubble-shooter/BubbleShooterStore.js +0 -1
  1281. package/lib/module/games/bubble-shooter/components/GameArea.js +0 -1
  1282. package/lib/module/games/bubble-shooter/components/ScoreBoard.js +0 -1
  1283. package/lib/module/games/candy-crush/CandyCrushService.js +0 -1
  1284. package/lib/module/games/candy-crush/CandyCrushStore.js +0 -1
  1285. package/lib/module/games/candy-crush/components/CandyItem.js +0 -1
  1286. package/lib/module/games/candy-crush/components/GameGrid.js +0 -1
  1287. package/lib/module/games/candy-crush/components/ScoreBoard.js +0 -1
  1288. package/lib/module/games/car-racing/CarRacingService.js +0 -1
  1289. package/lib/module/games/car-racing/CarRacingStore.js +0 -1
  1290. package/lib/module/games/car-racing/components/CarComponent.js +0 -1
  1291. package/lib/module/games/car-racing/components/GameBackground.js +0 -1
  1292. package/lib/module/games/car-racing/components/ScoreBoard.js +0 -1
  1293. package/lib/module/games/chameleon-run/ChameleonRunService.js +0 -1
  1294. package/lib/module/games/chameleon-run/ChameleonRunStore.js +0 -1
  1295. package/lib/module/games/chameleon-run/components/GameArea.js +0 -1
  1296. package/lib/module/games/chameleon-run/components/GameBackground.js +0 -1
  1297. package/lib/module/games/chameleon-run/components/ScoreBoard.js +0 -1
  1298. package/lib/module/games/checkers/CheckersService.js +0 -1
  1299. package/lib/module/games/checkers/CheckersStore.js +0 -1
  1300. package/lib/module/games/checkers/components/GameBoard.js +0 -1
  1301. package/lib/module/games/checkers/components/ScoreBoard.js +0 -1
  1302. package/lib/module/games/color-switch/ColorSwitchService.js +0 -1
  1303. package/lib/module/games/color-switch/ColorSwitchStore.js +0 -1
  1304. package/lib/module/games/color-switch/components/GameArea.js +0 -1
  1305. package/lib/module/games/color-switch/components/ScoreBoard.js +0 -1
  1306. package/lib/module/games/colors-sort/ColorsSortService.js +0 -1
  1307. package/lib/module/games/colors-sort/ColorsSortStore.js +0 -1
  1308. package/lib/module/games/colors-sort/components/ColorContainer.js +0 -1
  1309. package/lib/module/games/colors-sort/components/ScoreBoard.js +0 -1
  1310. package/lib/module/games/connect-em-all/ConnectEmAllService.js +0 -1
  1311. package/lib/module/games/connect-em-all/ConnectEmAllStore.js +0 -1
  1312. package/lib/module/games/connect-em-all/components/GameBoard.js +0 -1
  1313. package/lib/module/games/connect-em-all/components/ScoreBoard.js +0 -1
  1314. package/lib/module/games/crossy-road/CrossyRoadService.js +0 -1
  1315. package/lib/module/games/crossy-road/CrossyRoadStore.js +0 -1
  1316. package/lib/module/games/crossy-road/components/GameArea.js +0 -1
  1317. package/lib/module/games/crossy-road/components/ScoreBoard.js +0 -1
  1318. package/lib/module/games/dino-jump/DinoJumpService.js +0 -1
  1319. package/lib/module/games/dino-jump/DinoJumpStore.js +0 -1
  1320. package/lib/module/games/dino-jump/components/DinoSprite.js +0 -1
  1321. package/lib/module/games/dino-jump/components/GameArea.js +0 -1
  1322. package/lib/module/games/dino-jump/components/GameBackground.js +0 -1
  1323. package/lib/module/games/dino-jump/components/ObstacleSprite.js +0 -1
  1324. package/lib/module/games/dino-jump/components/ScoreBoard.js +0 -1
  1325. package/lib/module/games/dino-jump/components/StarSprite.js +0 -1
  1326. package/lib/module/games/dots-and-boxes/DotsAndBoxesService.js +0 -1
  1327. package/lib/module/games/dots-and-boxes/DotsAndBoxesStore.js +0 -1
  1328. package/lib/module/games/dots-and-boxes/components/GameBoard.js +0 -1
  1329. package/lib/module/games/dots-and-boxes/components/ScoreBoard.js +0 -1
  1330. package/lib/module/games/falling-sticks/FallingSticksService.js +0 -1
  1331. package/lib/module/games/falling-sticks/FallingSticksStore.js +0 -1
  1332. package/lib/module/games/falling-sticks/components/GameArea.js +0 -1
  1333. package/lib/module/games/falling-sticks/components/GameBackground.js +0 -1
  1334. package/lib/module/games/falling-sticks/components/ScoreBoard.js +0 -1
  1335. package/lib/module/games/find-different-number/FindDifferentNumberService.js +0 -1
  1336. package/lib/module/games/find-different-number/FindDifferentNumberStore.js +0 -1
  1337. package/lib/module/games/find-different-number/components/GameGrid.js +0 -1
  1338. package/lib/module/games/find-different-number/components/ScoreBoard.js +0 -1
  1339. package/lib/module/games/flappy-bird/FlappyBirdStore.js +0 -1
  1340. package/lib/module/games/flappy-bird/components/Bird.js +0 -1
  1341. package/lib/module/games/flappy-bird/components/GameArea.js +0 -1
  1342. package/lib/module/games/flappy-bird/components/GameBackground.js +0 -1
  1343. package/lib/module/games/flappy-bird/components/Pipes.js +0 -1
  1344. package/lib/module/games/flappy-bird/components/ScoreBoard.js +0 -1
  1345. package/lib/module/games/fruit-merger/FruitMergerService.js +0 -1
  1346. package/lib/module/games/fruit-merger/FruitMergerStore.js +0 -1
  1347. package/lib/module/games/fruit-merger/components/FruitItem.js +0 -1
  1348. package/lib/module/games/fruit-merger/components/GameArea.js +0 -1
  1349. package/lib/module/games/fruit-merger/components/ScoreBoard.js +0 -1
  1350. package/lib/module/games/fruit-ninja/FruitNinjaService.js +0 -1
  1351. package/lib/module/games/fruit-ninja/FruitNinjaStore.js +0 -1
  1352. package/lib/module/games/fruit-ninja/components/FruitComponent.js +0 -1
  1353. package/lib/module/games/fruit-ninja/components/GameArea.js +0 -1
  1354. package/lib/module/games/fruit-ninja/components/GameBackground.js +0 -1
  1355. package/lib/module/games/fruit-ninja/components/ScoreBoard.js +0 -1
  1356. package/lib/module/games/game-2048/Game2048Service.js +0 -1
  1357. package/lib/module/games/game-2048/Game2048Store.js +0 -1
  1358. package/lib/module/games/game-2048/components/GameGrid.js +0 -1
  1359. package/lib/module/games/game-2048/components/ScoreBoard.js +0 -1
  1360. package/lib/module/games/knife-hit/KnifeHitService.js +0 -1
  1361. package/lib/module/games/knife-hit/KnifeHitStore.js +0 -1
  1362. package/lib/module/games/knife-hit/components/GameArea.js +0 -1
  1363. package/lib/module/games/knife-hit/components/ScoreBoard.js +0 -1
  1364. package/lib/module/games/ludo-king/LudoKingService.js +0 -1
  1365. package/lib/module/games/ludo-king/LudoKingStore.js +0 -1
  1366. package/lib/module/games/ludo-king/components/Dice.js +0 -1
  1367. package/lib/module/games/ludo-king/components/GameBoard.js +0 -1
  1368. package/lib/module/games/ludo-king/components/ScoreBoard.js +0 -1
  1369. package/lib/module/games/maze-runner/MazeRunnerStore.js +0 -1
  1370. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +0 -1
  1371. package/lib/module/games/maze-runner/components/EnhancedGameArea.js +0 -1
  1372. package/lib/module/games/maze-runner/components/ScoreBoard.js +0 -1
  1373. package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +0 -1
  1374. package/lib/module/games/maze-runner/components/WallComponent.js +0 -1
  1375. package/lib/module/games/memory-match/MemoryMatchService.js +0 -1
  1376. package/lib/module/games/memory-match/MemoryMatchStore.js +0 -1
  1377. package/lib/module/games/memory-match/components/Card.js +0 -1
  1378. package/lib/module/games/memory-match/components/GameBoard.js +0 -1
  1379. package/lib/module/games/memory-match/components/ScoreBoard.js +0 -1
  1380. package/lib/module/games/mine-sweeper/MineSweeperService.js +0 -1
  1381. package/lib/module/games/mine-sweeper/MineSweeperStore.js +0 -1
  1382. package/lib/module/games/mine-sweeper/components/GameArea.js +0 -1
  1383. package/lib/module/games/mine-sweeper/components/ScoreBoard.js +0 -1
  1384. package/lib/module/games/mob-control/MobControlService.js +0 -1
  1385. package/lib/module/games/mob-control/MobControlStore.js +0 -1
  1386. package/lib/module/games/mob-control/components/GameArea.js +0 -1
  1387. package/lib/module/games/mob-control/components/ScoreBoard.js +0 -1
  1388. package/lib/module/games/number-search/NumberSearchConstants.js +0 -1
  1389. package/lib/module/games/number-search/NumberSearchService.js +0 -1
  1390. package/lib/module/games/number-search/NumberSearchStore.js +0 -1
  1391. package/lib/module/games/number-search/components/GameBoard.js +0 -1
  1392. package/lib/module/games/number-search/components/NumberList.js +0 -1
  1393. package/lib/module/games/number-search/components/ScoreBoard.js +0 -1
  1394. package/lib/module/games/nuts-and-bolts/NutsAndBoltsService.js +0 -1
  1395. package/lib/module/games/nuts-and-bolts/NutsAndBoltsStore.js +0 -1
  1396. package/lib/module/games/nuts-and-bolts/components/GameBoard.js +0 -1
  1397. package/lib/module/games/nuts-and-bolts/components/ScoreBoard.js +0 -1
  1398. package/lib/module/games/pac-man/PacManService.js +0 -1
  1399. package/lib/module/games/pac-man/PacManStore.js +0 -1
  1400. package/lib/module/games/pac-man/components/GameCanvas.js +0 -1
  1401. package/lib/module/games/pac-man/components/ScoreBoard.js +0 -1
  1402. package/lib/module/games/paper-io/PaperIoService.js +0 -1
  1403. package/lib/module/games/paper-io/PaperIoStore.js +0 -1
  1404. package/lib/module/games/paper-io/components/GameArea.js +0 -1
  1405. package/lib/module/games/paper-io/components/ScoreBoard.js +0 -1
  1406. package/lib/module/games/perfect-circle/PerfectCircleService.js +0 -1
  1407. package/lib/module/games/perfect-circle/PerfectCircleStore.js +0 -1
  1408. package/lib/module/games/perfect-circle/components/DrawingCanvas.js +0 -1
  1409. package/lib/module/games/perfect-circle/components/ScoreBoard.js +0 -1
  1410. package/lib/module/games/pipe-connect/PipeConnectService.js +0 -1
  1411. package/lib/module/games/pipe-connect/PipeConnectStore.js +0 -1
  1412. package/lib/module/games/pipe-connect/components/GameArea.js +0 -1
  1413. package/lib/module/games/pipe-connect/components/ScoreBoard.js +0 -1
  1414. package/lib/module/games/popit-fidget/PopitFidgetService.js +0 -1
  1415. package/lib/module/games/popit-fidget/PopitFidgetStore.js +0 -1
  1416. package/lib/module/games/popit-fidget/components/BubbleComponent.js +0 -1
  1417. package/lib/module/games/popit-fidget/components/FidgetGrid.js +0 -1
  1418. package/lib/module/games/popit-fidget/components/ScoreBoard.js +0 -1
  1419. package/lib/module/games/reversi/ReversiStore.js +0 -1
  1420. package/lib/module/games/reversi/components/GameBoard.js +0 -1
  1421. package/lib/module/games/reversi/components/ScoreBoard.js +0 -1
  1422. package/lib/module/games/sliding-numbers/SlidingNumbersService.js +0 -1
  1423. package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +0 -1
  1424. package/lib/module/games/sliding-numbers/components/NumbersGrid.js +0 -1
  1425. package/lib/module/games/sliding-numbers/components/ScoreBoard.js +0 -1
  1426. package/lib/module/games/snake-3d/Snake3DService.js +0 -1
  1427. package/lib/module/games/snake-3d/Snake3DStore.js +0 -1
  1428. package/lib/module/games/snake-3d/components/GameGrid.js +0 -1
  1429. package/lib/module/games/snake-3d/components/ScoreBoard.js +0 -1
  1430. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersService.js +0 -1
  1431. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersStore.js +0 -1
  1432. package/lib/module/games/snakes-and-ladders/components/Dice.js +0 -1
  1433. package/lib/module/games/snakes-and-ladders/components/GameBoard.js +0 -1
  1434. package/lib/module/games/snakes-and-ladders/components/ScoreBoard.js +0 -1
  1435. package/lib/module/games/space-fighter/SpaceFighterService.js +0 -1
  1436. package/lib/module/games/space-fighter/SpaceFighterStore.js +0 -1
  1437. package/lib/module/games/space-fighter/components/AsteroidComponent.js +0 -1
  1438. package/lib/module/games/space-fighter/components/GameArea.js +0 -1
  1439. package/lib/module/games/space-fighter/components/GameBackground.js +0 -1
  1440. package/lib/module/games/space-fighter/components/ScoreBoard.js +0 -1
  1441. package/lib/module/games/space-fighter/components/Spacecraft3D.js +0 -1
  1442. package/lib/module/games/space-fighter/components/SpacecraftPath.js +0 -1
  1443. package/lib/module/games/spider-solitaire/SpiderSolitaireService.js +0 -1
  1444. package/lib/module/games/spider-solitaire/SpiderSolitaireStore.js +0 -1
  1445. package/lib/module/games/spider-solitaire/components/Card.js +0 -1
  1446. package/lib/module/games/spider-solitaire/components/CardPile.js +0 -1
  1447. package/lib/module/games/spider-solitaire/components/ScoreBoard.js +0 -1
  1448. package/lib/module/games/stack-tower/StackTowerService.js +0 -1
  1449. package/lib/module/games/stack-tower/StackTowerStore.js +0 -1
  1450. package/lib/module/games/stack-tower/components/GameArea.js +0 -1
  1451. package/lib/module/games/stack-tower/components/ScoreBoard.js +0 -1
  1452. package/lib/module/games/sudoku/SudokuService.js +0 -1
  1453. package/lib/module/games/sudoku/SudokuStore.js +0 -1
  1454. package/lib/module/games/sudoku/components/GameArea.js +0 -1
  1455. package/lib/module/games/sudoku/components/ScoreBoard.js +0 -1
  1456. package/lib/module/games/tangram/TangramService.js +0 -1
  1457. package/lib/module/games/tangram/TangramStore.js +0 -1
  1458. package/lib/module/games/tangram/components/GameBoard.js +0 -1
  1459. package/lib/module/games/tangram/components/ScoreBoard.js +0 -1
  1460. package/lib/module/games/tank-1990/Tank1990Service.js +0 -1
  1461. package/lib/module/games/tank-1990/Tank1990Store.js +0 -1
  1462. package/lib/module/games/tank-1990/components/Controls.js +0 -1
  1463. package/lib/module/games/tank-1990/components/GameBoard.js +0 -1
  1464. package/lib/module/games/tank-1990/components/ScoreBoard.js +0 -1
  1465. package/lib/module/games/tic-tac-toe/TicTacToeService.js +0 -1
  1466. package/lib/module/games/tic-tac-toe/TicTacToeStore.js +0 -1
  1467. package/lib/module/games/tic-tac-toe/components/GameBoard.js +0 -1
  1468. package/lib/module/games/tic-tac-toe/components/ScoreBoard.js +0 -1
  1469. package/lib/module/games/tile-home/TileHomeService.js +0 -1
  1470. package/lib/module/games/tile-home/TileHomeStore.js +0 -1
  1471. package/lib/module/games/tile-home/components/AnimatingTile.js +0 -1
  1472. package/lib/module/games/tile-home/components/FlyingTile.js +0 -1
  1473. package/lib/module/games/tile-home/components/GameBoard.js +0 -1
  1474. package/lib/module/games/tile-home/components/ScoreBoard.js +0 -1
  1475. package/lib/module/games/tile-home/components/TileItem.js +0 -1
  1476. package/lib/module/games/tile-home/components/TileSlot.js +0 -1
  1477. package/lib/module/games/whack-a-mole/WhackAMoleService.js +0 -1
  1478. package/lib/module/games/whack-a-mole/WhackAMoleStore.js +0 -1
  1479. package/lib/module/games/whack-a-mole/components/GameBackground.js +0 -1
  1480. package/lib/module/games/whack-a-mole/components/GameGrid.js +0 -1
  1481. package/lib/module/games/whack-a-mole/components/GameHole.js +0 -1
  1482. package/lib/module/games/whack-a-mole/components/MoleCharacter.js +0 -1
  1483. package/lib/module/games/whack-a-mole/components/ScoreBoard.js +0 -1
  1484. package/lib/module/games/word-search/WordSearchConstants.js +0 -1
  1485. package/lib/module/games/word-search/WordSearchService.js +0 -1
  1486. package/lib/module/games/word-search/WordSearchStore.js +0 -1
  1487. package/lib/module/games/word-search/components/GameBoard.js +0 -1
  1488. package/lib/module/games/word-search/components/ScoreBoard.js +0 -1
  1489. package/lib/module/games/word-search/components/WordList.js +0 -1
  1490. package/lib/module/helpers/AnimatedScore.js +0 -1
  1491. package/lib/module/helpers/AnimationFrame.js +0 -1
  1492. package/lib/module/helpers/AnimationTracker.js +0 -1
  1493. package/lib/module/helpers/BlastAnimation.js +0 -1
  1494. package/lib/module/helpers/ErrorHandler.js +0 -1
  1495. package/lib/module/helpers/GameBackgroundPattern.js +0 -1
  1496. package/lib/module/helpers/GameControlButton.js +0 -1
  1497. package/lib/module/helpers/GameOverModal.js +0 -1
  1498. package/lib/module/helpers/GameTimer.js +0 -1
  1499. package/lib/module/helpers/Icons.js +0 -1
  1500. package/lib/module/helpers/ParticleBlast.js +0 -1
  1501. package/lib/module/helpers/ScoreBoardContainer.js +0 -1
  1502. package/lib/module/helpers/assets/apple-fruit.js +0 -1
  1503. package/lib/module/helpers/assets/avocado-item.js +0 -1
  1504. package/lib/module/helpers/assets/banana-fruit.js +0 -1
  1505. package/lib/module/helpers/assets/bomb-item.js +0 -1
  1506. package/lib/module/helpers/assets/broccoli-item.js +0 -1
  1507. package/lib/module/helpers/assets/cherries-fruit.js +0 -1
  1508. package/lib/module/helpers/assets/donut-item.js +0 -1
  1509. package/lib/module/helpers/assets/dragonfruit-item.js +0 -1
  1510. package/lib/module/helpers/assets/fries-item.js +0 -1
  1511. package/lib/module/helpers/assets/fruit-helpers.js +0 -1
  1512. package/lib/module/helpers/assets/grapes-fruit.js +0 -1
  1513. package/lib/module/helpers/assets/icecream-item.js +0 -1
  1514. package/lib/module/helpers/assets/index.js +0 -1
  1515. package/lib/module/helpers/assets/kiwi-fruit.js +0 -1
  1516. package/lib/module/helpers/assets/mango-fruit.js +0 -1
  1517. package/lib/module/helpers/assets/orange-fruit.js +0 -1
  1518. package/lib/module/helpers/assets/papaya-fruit.js +0 -1
  1519. package/lib/module/helpers/assets/papaya-full-fruit.js +0 -1
  1520. package/lib/module/helpers/assets/peach-fruit.js +0 -1
  1521. package/lib/module/helpers/assets/pineapple-fruit.js +0 -1
  1522. package/lib/module/helpers/assets/pomegranate-fruit.js +0 -1
  1523. package/lib/module/helpers/assets/pumpkin-fruit.js +0 -1
  1524. package/lib/module/helpers/assets/raspberry-item.js +0 -1
  1525. package/lib/module/helpers/assets/star-item.js +0 -1
  1526. package/lib/module/helpers/assets/strawberry-fruit.js +0 -1
  1527. package/lib/module/helpers/assets/watermelon-fruit.js +0 -1
  1528. package/lib/module/types.d.js +0 -1
  1529. package/lib/typescript/src/games/arrows/ArrowsService.d.ts +0 -6
  1530. package/lib/typescript/src/games/arrows/ArrowsStore.d.ts +0 -51
  1531. package/lib/typescript/src/games/arrows/components/ArrowsGrid.d.ts +0 -13
  1532. package/lib/typescript/src/games/arrows/components/ScoreBoard.d.ts +0 -6
  1533. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +0 -80
  1534. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +0 -30
  1535. package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts +0 -9
  1536. package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +0 -9
  1537. package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +0 -7
  1538. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +0 -6
  1539. package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +0 -44
  1540. package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +0 -68
  1541. package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +0 -12
  1542. package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +0 -7
  1543. package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +0 -6
  1544. package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +0 -16
  1545. package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +0 -70
  1546. package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +0 -11
  1547. package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +0 -11
  1548. package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +0 -8
  1549. package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +0 -6
  1550. package/lib/typescript/src/games/block-breaker/BlockBreakerService.d.ts +0 -88
  1551. package/lib/typescript/src/games/block-breaker/BlockBreakerStore.d.ts +0 -47
  1552. package/lib/typescript/src/games/block-breaker/components/BlastAnimation.d.ts +0 -15
  1553. package/lib/typescript/src/games/block-breaker/components/GameArea.d.ts +0 -8
  1554. package/lib/typescript/src/games/block-breaker/components/ScoreBoard.d.ts +0 -6
  1555. package/lib/typescript/src/games/bluk/BlukService.d.ts +0 -71
  1556. package/lib/typescript/src/games/bluk/BlukStore.d.ts +0 -52
  1557. package/lib/typescript/src/games/bluk/components/GameArea.d.ts +0 -17
  1558. package/lib/typescript/src/games/bluk/components/GameBackground.d.ts +0 -9
  1559. package/lib/typescript/src/games/bluk/components/ScoreBoard.d.ts +0 -6
  1560. package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +0 -35
  1561. package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +0 -63
  1562. package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +0 -8
  1563. package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +0 -6
  1564. package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts +0 -37
  1565. package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts +0 -53
  1566. package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts +0 -11
  1567. package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts +0 -2
  1568. package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts +0 -5
  1569. package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +0 -44
  1570. package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +0 -68
  1571. package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +0 -12
  1572. package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +0 -7
  1573. package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +0 -6
  1574. package/lib/typescript/src/games/chameleon-run/ChameleonRunService.d.ts +0 -76
  1575. package/lib/typescript/src/games/chameleon-run/ChameleonRunStore.d.ts +0 -48
  1576. package/lib/typescript/src/games/chameleon-run/components/GameArea.d.ts +0 -8
  1577. package/lib/typescript/src/games/chameleon-run/components/GameBackground.d.ts +0 -7
  1578. package/lib/typescript/src/games/chameleon-run/components/ScoreBoard.d.ts +0 -6
  1579. package/lib/typescript/src/games/checkers/CheckersService.d.ts +0 -6
  1580. package/lib/typescript/src/games/checkers/CheckersStore.d.ts +0 -48
  1581. package/lib/typescript/src/games/checkers/components/GameBoard.d.ts +0 -6
  1582. package/lib/typescript/src/games/checkers/components/ScoreBoard.d.ts +0 -6
  1583. package/lib/typescript/src/games/color-switch/ColorSwitchService.d.ts +0 -63
  1584. package/lib/typescript/src/games/color-switch/ColorSwitchStore.d.ts +0 -43
  1585. package/lib/typescript/src/games/color-switch/components/GameArea.d.ts +0 -8
  1586. package/lib/typescript/src/games/color-switch/components/ScoreBoard.d.ts +0 -6
  1587. package/lib/typescript/src/games/colors-sort/ColorsSortService.d.ts +0 -61
  1588. package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts +0 -56
  1589. package/lib/typescript/src/games/colors-sort/components/ColorContainer.d.ts +0 -7
  1590. package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts +0 -6
  1591. package/lib/typescript/src/games/connect-em-all/ConnectEmAllService.d.ts +0 -20
  1592. package/lib/typescript/src/games/connect-em-all/ConnectEmAllStore.d.ts +0 -48
  1593. package/lib/typescript/src/games/connect-em-all/components/GameBoard.d.ts +0 -7
  1594. package/lib/typescript/src/games/connect-em-all/components/ScoreBoard.d.ts +0 -6
  1595. package/lib/typescript/src/games/crossy-road/CrossyRoadService.d.ts +0 -89
  1596. package/lib/typescript/src/games/crossy-road/CrossyRoadStore.d.ts +0 -39
  1597. package/lib/typescript/src/games/crossy-road/components/GameArea.d.ts +0 -8
  1598. package/lib/typescript/src/games/crossy-road/components/ScoreBoard.d.ts +0 -6
  1599. package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts +0 -39
  1600. package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts +0 -97
  1601. package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts +0 -2
  1602. package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts +0 -7
  1603. package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts +0 -7
  1604. package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts +0 -8
  1605. package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts +0 -6
  1606. package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts +0 -2
  1607. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesService.d.ts +0 -45
  1608. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesStore.d.ts +0 -37
  1609. package/lib/typescript/src/games/dots-and-boxes/components/GameBoard.d.ts +0 -7
  1610. package/lib/typescript/src/games/dots-and-boxes/components/ScoreBoard.d.ts +0 -6
  1611. package/lib/typescript/src/games/falling-sticks/FallingSticksService.d.ts +0 -40
  1612. package/lib/typescript/src/games/falling-sticks/FallingSticksStore.d.ts +0 -31
  1613. package/lib/typescript/src/games/falling-sticks/components/GameArea.d.ts +0 -7
  1614. package/lib/typescript/src/games/falling-sticks/components/GameBackground.d.ts +0 -6
  1615. package/lib/typescript/src/games/falling-sticks/components/ScoreBoard.d.ts +0 -6
  1616. package/lib/typescript/src/games/find-different-number/FindDifferentNumberService.d.ts +0 -6
  1617. package/lib/typescript/src/games/find-different-number/FindDifferentNumberStore.d.ts +0 -36
  1618. package/lib/typescript/src/games/find-different-number/components/GameGrid.d.ts +0 -7
  1619. package/lib/typescript/src/games/find-different-number/components/ScoreBoard.d.ts +0 -6
  1620. package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts +0 -68
  1621. package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts +0 -2
  1622. package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts +0 -7
  1623. package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts +0 -7
  1624. package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts +0 -8
  1625. package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts +0 -6
  1626. package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts +0 -3
  1627. package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts +0 -66
  1628. package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts +0 -8
  1629. package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts +0 -8
  1630. package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts +0 -6
  1631. package/lib/typescript/src/games/fruit-ninja/FruitNinjaService.d.ts +0 -73
  1632. package/lib/typescript/src/games/fruit-ninja/FruitNinjaStore.d.ts +0 -38
  1633. package/lib/typescript/src/games/fruit-ninja/components/FruitComponent.d.ts +0 -8
  1634. package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts +0 -7
  1635. package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts +0 -7
  1636. package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +0 -6
  1637. package/lib/typescript/src/games/game-2048/Game2048Service.d.ts +0 -102
  1638. package/lib/typescript/src/games/game-2048/Game2048Store.d.ts +0 -44
  1639. package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts +0 -2
  1640. package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts +0 -6
  1641. package/lib/typescript/src/games/knife-hit/KnifeHitService.d.ts +0 -48
  1642. package/lib/typescript/src/games/knife-hit/KnifeHitStore.d.ts +0 -41
  1643. package/lib/typescript/src/games/knife-hit/components/GameArea.d.ts +0 -8
  1644. package/lib/typescript/src/games/knife-hit/components/ScoreBoard.d.ts +0 -6
  1645. package/lib/typescript/src/games/ludo-king/LudoKingService.d.ts +0 -33
  1646. package/lib/typescript/src/games/ludo-king/LudoKingStore.d.ts +0 -34
  1647. package/lib/typescript/src/games/ludo-king/components/Dice.d.ts +0 -7
  1648. package/lib/typescript/src/games/ludo-king/components/GameBoard.d.ts +0 -7
  1649. package/lib/typescript/src/games/ludo-king/components/ScoreBoard.d.ts +0 -6
  1650. package/lib/typescript/src/games/maze-runner/MazeRunnerStore.d.ts +0 -62
  1651. package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts +0 -10
  1652. package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts +0 -33
  1653. package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +0 -24
  1654. package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts +0 -24
  1655. package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts +0 -9
  1656. package/lib/typescript/src/games/memory-match/MemoryMatchService.d.ts +0 -6
  1657. package/lib/typescript/src/games/memory-match/MemoryMatchStore.d.ts +0 -42
  1658. package/lib/typescript/src/games/memory-match/components/Card.d.ts +0 -6
  1659. package/lib/typescript/src/games/memory-match/components/GameBoard.d.ts +0 -6
  1660. package/lib/typescript/src/games/memory-match/components/ScoreBoard.d.ts +0 -6
  1661. package/lib/typescript/src/games/mine-sweeper/MineSweeperService.d.ts +0 -22
  1662. package/lib/typescript/src/games/mine-sweeper/MineSweeperStore.d.ts +0 -73
  1663. package/lib/typescript/src/games/mine-sweeper/components/GameArea.d.ts +0 -8
  1664. package/lib/typescript/src/games/mine-sweeper/components/ScoreBoard.d.ts +0 -6
  1665. package/lib/typescript/src/games/mob-control/MobControlService.d.ts +0 -74
  1666. package/lib/typescript/src/games/mob-control/MobControlStore.d.ts +0 -66
  1667. package/lib/typescript/src/games/mob-control/components/GameArea.d.ts +0 -11
  1668. package/lib/typescript/src/games/mob-control/components/ScoreBoard.d.ts +0 -6
  1669. package/lib/typescript/src/games/number-search/NumberSearchConstants.d.ts +0 -63
  1670. package/lib/typescript/src/games/number-search/NumberSearchService.d.ts +0 -34
  1671. package/lib/typescript/src/games/number-search/NumberSearchStore.d.ts +0 -70
  1672. package/lib/typescript/src/games/number-search/components/GameBoard.d.ts +0 -7
  1673. package/lib/typescript/src/games/number-search/components/NumberList.d.ts +0 -2
  1674. package/lib/typescript/src/games/number-search/components/ScoreBoard.d.ts +0 -6
  1675. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsService.d.ts +0 -67
  1676. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsStore.d.ts +0 -45
  1677. package/lib/typescript/src/games/nuts-and-bolts/components/GameBoard.d.ts +0 -7
  1678. package/lib/typescript/src/games/nuts-and-bolts/components/ScoreBoard.d.ts +0 -6
  1679. package/lib/typescript/src/games/pac-man/PacManService.d.ts +0 -73
  1680. package/lib/typescript/src/games/pac-man/PacManStore.d.ts +0 -89
  1681. package/lib/typescript/src/games/pac-man/components/GameCanvas.d.ts +0 -2
  1682. package/lib/typescript/src/games/pac-man/components/ScoreBoard.d.ts +0 -6
  1683. package/lib/typescript/src/games/paper-io/PaperIoService.d.ts +0 -70
  1684. package/lib/typescript/src/games/paper-io/PaperIoStore.d.ts +0 -51
  1685. package/lib/typescript/src/games/paper-io/components/GameArea.d.ts +0 -8
  1686. package/lib/typescript/src/games/paper-io/components/ScoreBoard.d.ts +0 -6
  1687. package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +0 -15
  1688. package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +0 -55
  1689. package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +0 -8
  1690. package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +0 -6
  1691. package/lib/typescript/src/games/pipe-connect/PipeConnectService.d.ts +0 -17
  1692. package/lib/typescript/src/games/pipe-connect/PipeConnectStore.d.ts +0 -31
  1693. package/lib/typescript/src/games/pipe-connect/components/GameArea.d.ts +0 -7
  1694. package/lib/typescript/src/games/pipe-connect/components/ScoreBoard.d.ts +0 -6
  1695. package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts +0 -30
  1696. package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +0 -33
  1697. package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts +0 -10
  1698. package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts +0 -10
  1699. package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +0 -6
  1700. package/lib/typescript/src/games/reversi/ReversiStore.d.ts +0 -46
  1701. package/lib/typescript/src/games/reversi/components/GameBoard.d.ts +0 -6
  1702. package/lib/typescript/src/games/reversi/components/ScoreBoard.d.ts +0 -6
  1703. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts +0 -6
  1704. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts +0 -38
  1705. package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts +0 -7
  1706. package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts +0 -6
  1707. package/lib/typescript/src/games/snake-3d/Snake3DService.d.ts +0 -29
  1708. package/lib/typescript/src/games/snake-3d/Snake3DStore.d.ts +0 -49
  1709. package/lib/typescript/src/games/snake-3d/components/GameGrid.d.ts +0 -2
  1710. package/lib/typescript/src/games/snake-3d/components/ScoreBoard.d.ts +0 -6
  1711. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersService.d.ts +0 -22
  1712. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersStore.d.ts +0 -40
  1713. package/lib/typescript/src/games/snakes-and-ladders/components/Dice.d.ts +0 -7
  1714. package/lib/typescript/src/games/snakes-and-ladders/components/GameBoard.d.ts +0 -2
  1715. package/lib/typescript/src/games/snakes-and-ladders/components/ScoreBoard.d.ts +0 -6
  1716. package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts +0 -117
  1717. package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts +0 -54
  1718. package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts +0 -9
  1719. package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts +0 -9
  1720. package/lib/typescript/src/games/space-fighter/components/GameBackground.d.ts +0 -6
  1721. package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +0 -6
  1722. package/lib/typescript/src/games/space-fighter/components/Spacecraft3D.d.ts +0 -11
  1723. package/lib/typescript/src/games/space-fighter/components/SpacecraftPath.d.ts +0 -9
  1724. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireService.d.ts +0 -23
  1725. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireStore.d.ts +0 -71
  1726. package/lib/typescript/src/games/spider-solitaire/components/Card.d.ts +0 -10
  1727. package/lib/typescript/src/games/spider-solitaire/components/CardPile.d.ts +0 -12
  1728. package/lib/typescript/src/games/spider-solitaire/components/ScoreBoard.d.ts +0 -6
  1729. package/lib/typescript/src/games/stack-tower/StackTowerService.d.ts +0 -51
  1730. package/lib/typescript/src/games/stack-tower/StackTowerStore.d.ts +0 -52
  1731. package/lib/typescript/src/games/stack-tower/components/GameArea.d.ts +0 -8
  1732. package/lib/typescript/src/games/stack-tower/components/ScoreBoard.d.ts +0 -6
  1733. package/lib/typescript/src/games/sudoku/SudokuService.d.ts +0 -24
  1734. package/lib/typescript/src/games/sudoku/SudokuStore.d.ts +0 -65
  1735. package/lib/typescript/src/games/sudoku/components/GameArea.d.ts +0 -8
  1736. package/lib/typescript/src/games/sudoku/components/ScoreBoard.d.ts +0 -6
  1737. package/lib/typescript/src/games/tangram/TangramService.d.ts +0 -6
  1738. package/lib/typescript/src/games/tangram/TangramStore.d.ts +0 -34
  1739. package/lib/typescript/src/games/tangram/components/GameBoard.d.ts +0 -7
  1740. package/lib/typescript/src/games/tangram/components/ScoreBoard.d.ts +0 -6
  1741. package/lib/typescript/src/games/tank-1990/Tank1990Service.d.ts +0 -80
  1742. package/lib/typescript/src/games/tank-1990/Tank1990Store.d.ts +0 -48
  1743. package/lib/typescript/src/games/tank-1990/components/Controls.d.ts +0 -2
  1744. package/lib/typescript/src/games/tank-1990/components/GameBoard.d.ts +0 -2
  1745. package/lib/typescript/src/games/tank-1990/components/ScoreBoard.d.ts +0 -6
  1746. package/lib/typescript/src/games/tic-tac-toe/TicTacToeService.d.ts +0 -0
  1747. package/lib/typescript/src/games/tic-tac-toe/TicTacToeStore.d.ts +0 -51
  1748. package/lib/typescript/src/games/tic-tac-toe/components/GameBoard.d.ts +0 -6
  1749. package/lib/typescript/src/games/tic-tac-toe/components/ScoreBoard.d.ts +0 -6
  1750. package/lib/typescript/src/games/tile-home/TileHomeService.d.ts +0 -1
  1751. package/lib/typescript/src/games/tile-home/TileHomeStore.d.ts +0 -57
  1752. package/lib/typescript/src/games/tile-home/components/AnimatingTile.d.ts +0 -9
  1753. package/lib/typescript/src/games/tile-home/components/FlyingTile.d.ts +0 -16
  1754. package/lib/typescript/src/games/tile-home/components/GameBoard.d.ts +0 -7
  1755. package/lib/typescript/src/games/tile-home/components/ScoreBoard.d.ts +0 -6
  1756. package/lib/typescript/src/games/tile-home/components/TileItem.d.ts +0 -11
  1757. package/lib/typescript/src/games/tile-home/components/TileSlot.d.ts +0 -7
  1758. package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts +0 -32
  1759. package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts +0 -39
  1760. package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts +0 -7
  1761. package/lib/typescript/src/games/whack-a-mole/components/GameGrid.d.ts +0 -10
  1762. package/lib/typescript/src/games/whack-a-mole/components/GameHole.d.ts +0 -11
  1763. package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts +0 -6
  1764. package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts +0 -6
  1765. package/lib/typescript/src/games/word-search/WordSearchConstants.d.ts +0 -63
  1766. package/lib/typescript/src/games/word-search/WordSearchService.d.ts +0 -34
  1767. package/lib/typescript/src/games/word-search/WordSearchStore.d.ts +0 -70
  1768. package/lib/typescript/src/games/word-search/components/GameBoard.d.ts +0 -7
  1769. package/lib/typescript/src/games/word-search/components/ScoreBoard.d.ts +0 -6
  1770. package/lib/typescript/src/games/word-search/components/WordList.d.ts +0 -2
  1771. package/lib/typescript/src/helpers/AnimatedScore.d.ts +0 -36
  1772. package/lib/typescript/src/helpers/AnimationFrame.d.ts +0 -40
  1773. package/lib/typescript/src/helpers/AnimationTracker.d.ts +0 -44
  1774. package/lib/typescript/src/helpers/BlastAnimation.d.ts +0 -16
  1775. package/lib/typescript/src/helpers/ErrorHandler.d.ts +0 -123
  1776. package/lib/typescript/src/helpers/GameBackgroundPattern.d.ts +0 -7
  1777. package/lib/typescript/src/helpers/GameControlButton.d.ts +0 -11
  1778. package/lib/typescript/src/helpers/GameOverModal.d.ts +0 -15
  1779. package/lib/typescript/src/helpers/GameTimer.d.ts +0 -26
  1780. package/lib/typescript/src/helpers/Icons.d.ts +0 -12
  1781. package/lib/typescript/src/helpers/ParticleBlast.d.ts +0 -11
  1782. package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts +0 -85
  1783. package/lib/typescript/src/helpers/assets/apple-fruit.d.ts +0 -4
  1784. package/lib/typescript/src/helpers/assets/avocado-item.d.ts +0 -4
  1785. package/lib/typescript/src/helpers/assets/banana-fruit.d.ts +0 -4
  1786. package/lib/typescript/src/helpers/assets/bomb-item.d.ts +0 -4
  1787. package/lib/typescript/src/helpers/assets/broccoli-item.d.ts +0 -4
  1788. package/lib/typescript/src/helpers/assets/cherries-fruit.d.ts +0 -4
  1789. package/lib/typescript/src/helpers/assets/donut-item.d.ts +0 -4
  1790. package/lib/typescript/src/helpers/assets/dragonfruit-item.d.ts +0 -4
  1791. package/lib/typescript/src/helpers/assets/fries-item.d.ts +0 -4
  1792. package/lib/typescript/src/helpers/assets/fruit-helpers.d.ts +0 -154
  1793. package/lib/typescript/src/helpers/assets/grapes-fruit.d.ts +0 -4
  1794. package/lib/typescript/src/helpers/assets/icecream-item.d.ts +0 -4
  1795. package/lib/typescript/src/helpers/assets/index.d.ts +0 -31
  1796. package/lib/typescript/src/helpers/assets/kiwi-fruit.d.ts +0 -4
  1797. package/lib/typescript/src/helpers/assets/mango-fruit.d.ts +0 -4
  1798. package/lib/typescript/src/helpers/assets/orange-fruit.d.ts +0 -4
  1799. package/lib/typescript/src/helpers/assets/papaya-fruit.d.ts +0 -4
  1800. package/lib/typescript/src/helpers/assets/papaya-full-fruit.d.ts +0 -4
  1801. package/lib/typescript/src/helpers/assets/peach-fruit.d.ts +0 -4
  1802. package/lib/typescript/src/helpers/assets/pineapple-fruit.d.ts +0 -4
  1803. package/lib/typescript/src/helpers/assets/pomegranate-fruit.d.ts +0 -4
  1804. package/lib/typescript/src/helpers/assets/pumpkin-fruit.d.ts +0 -4
  1805. package/lib/typescript/src/helpers/assets/raspberry-item.d.ts +0 -4
  1806. package/lib/typescript/src/helpers/assets/star-item.d.ts +0 -4
  1807. package/lib/typescript/src/helpers/assets/strawberry-fruit.d.ts +0 -4
  1808. package/lib/typescript/src/helpers/assets/watermelon-fruit.d.ts +0 -4
@@ -0,0 +1 @@
1
+ "use strict";export const POINTS_PER_CORRECT=200;export const POINTS_PER_UNIT=500;export const WIN_BONUS=5e3;export const CLUES=36;const DIGITS=[1,2,3,4,5,6,7,8,9],ALL_DIGITS=1022,BOX_OF=Array.from({length:81},(o,r)=>3*Math.floor(r/27)+Math.floor(r%9/3));function shuffle(o){const r=[...o];for(let o=r.length-1;o>0;o--){const t=Math.floor(Math.random()*(o+1));[r[o],r[t]]=[r[t],r[o]]}return r}function deadCell(o,r,t,e,n){for(let l=n;l<81;l++)if(0===o[l]&&1022===(r[l/9|0]|t[l%9]|e[BOX_OF[l]]))return!0;return!1}function solve(o,r,t,e,n){let l=n;for(;l<81&&0!==o[l];)l++;if(81===l)return!0;const f=l/9|0,s=l%9,a=BOX_OF[l];for(const n of shuffle(DIGITS)){const i=1<<n;if(!((r[f]|t[s]|e[a])&i)){if(o[l]=n,r[f]|=i,t[s]|=i,e[a]|=i,!deadCell(o,r,t,e,l+1)&&solve(o,r,t,e,l+1))return!0;o[l]=0,r[f]&=~i,t[s]&=~i,e[a]&=~i}}return!1}function solvedBoard(){const o=new Uint8Array(81),r=new Uint16Array(9),t=new Uint16Array(9),e=new Uint16Array(9);for(let n=0;n<9;n+=3){const l=shuffle(DIGITS);let f=0;for(let s=n;s<n+3;s++)for(let a=n;a<n+3;a++){const n=l[f++],i=1<<n;o[9*s+a]=n,r[s]|=i,t[a]|=i,e[BOX_OF[9*s+a]]|=i}}return solve(o,r,t,e,0),Array.from({length:9},(r,t)=>Array.from(o.subarray(9*t,9*t+9)))}export function newPuzzle(){const o=solvedBoard(),r=o.map(o=>o.map(o=>({value:o,given:!0,error:!1}))),t=shuffle(Array.from({length:81},(o,r)=>({row:Math.floor(r/9),col:r%9})));for(const o of t.slice(0,45))r[o.row][o.col].value=0,r[o.row][o.col].given=!1;return{grid:r,solution:o,toFill:45}}export function completedUnits(o,r,t){const e=(r,t)=>o.grid[r][t].value===o.solution[r][t],n=new Set;let l=0,f=!0,s=!0;for(let o=0;o<9;o++)e(r,o)||(f=!1),e(o,t)||(s=!1);if(f){l+=500;for(let o=0;o<9;o++)n.add(9*r+o)}if(s){l+=500;for(let o=0;o<9;o++)n.add(9*o+t)}const a=3*Math.floor(r/3),i=3*Math.floor(t/3);let u=!0;for(let o=a;o<a+3;o++)for(let r=i;r<i+3;r++)e(o,r)||(u=!1);if(u){l+=500;for(let o=a;o<a+3;o++)for(let r=i;r<i+3;r++)n.add(9*o+r)}return{cells:[...n],points:l}}export function remaining(o){const r=[0,9,9,9,9,9,9,9,9,9];for(const t of o.grid)for(const o of t)o.value>0&&!o.error&&(r[o.value]=Math.max(0,r[o.value]-1));return r}
@@ -0,0 +1 @@
1
+ "use strict";import{effects,extrude,Path}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{spawnRaisedBlock}from"../shared/EngineBlocks.js";import{flatGlyphMesh}from"../shared/EngineGlyphs.js";import{cacheGameAsset,createGameMesh as _0x1f597b}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{CELL_HEIGHT,cellCentre,COLORS,FLASH_STEP,KEY_HEIGHT,keyCentre}from"./SudokuConstants.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("sudoku/SudokuScene:"+e,o),meshes.set(e,t)),t},BOARD_DEPTH=10,BACKDROP_DEPTH=30,SURFACE=1,panelMesh=(e,o,t,s)=>cached("sd-panel:"+e+":"+o+":"+t+":"+s,()=>_0x1f597b(extrude((new Path).addRoundedRect(-e/2,-o/2,e,o,t),{depth:s}),{shine:0})),cellColor=(e,o)=>toColor("selected"===o?COLORS.SELECTED:e.error?COLORS.ERROR:"same"===o?COLORS.SAME_NUMBER:"peer"===o?COLORS.PEER:e.given?COLORS.GIVEN:COLORS.CELL),digitColor=e=>toColor(e.error?COLORS.TEXT_ERROR:e.given?COLORS.TEXT_GIVEN:COLORS.TEXT_PLACED),keyDigit=e=>Math.min(.5*e.key,.4*e.keyH),DIGIT=.5,cellHeight=(e,o)=>e.cell*CELL_HEIGHT*(o?1.8:1),cellTop=e=>1+e.cell*CELL_HEIGHT,keyTop=e=>1+e.key*KEY_HEIGHT;function spawnBoard(e,o,t){const s="classic"===t.mode,l=[e.spawn({mesh:panelMesh(o.board,o.board,s?14:8,10),position:[0,o.boardY,-5],color:toColor(s?COLORS.FRAME:t.BOARD.SURFACE),pickable:!1}),e.spawn({mesh:panelMesh(o.grid,o.grid,4,1),position:[0,o.boardY,.5],color:toColor(s?COLORS.LINES:t.BOARD.GRID_LINE),pickable:!1})];return s&&l.push(e.spawn({mesh:panelMesh(o.grid+6,o.grid+6,8,1),position:[0,o.boardY,.2],color:toColor(COLORS.WELL),pickable:!1})),l}export function buildScene(e,o,t){const s=spawnBackdrop(e,o.width,o.height,-30,t);placeTiltedBackdrop(e,s,o,30);const l=o.cell*CELL_HEIGHT,n=[];for(let t=0;t<9;t++)for(let s=0;s<9;s++){const[i,a]=cellCentre(o,t,s);n.push(spawnRaisedBlock(e,{position:[i,a,1+l/2],size:[o.cell,o.cell,l],color:toColor(COLORS.CELL),gloss:!1,shadow:!1}))}const i=[],a=o.key*KEY_HEIGHT;for(let t=1;t<=9;t++){const[s,l]=keyCentre(o,t),n=e.spawn({mesh:"none",position:[s,l,1],pickable:!1}),r=spawnRaisedBlock(e,{parent:n,position:[0,0,a/2],size:[o.key,o.keyH,a],color:toColor(COLORS.KEY),gloss:!1,shadow:!1}),p=keyDigit(o),d=e.spawn({mesh:flatGlyphMesh(String(t)),parent:n,position:[0,.1*o.keyH,a+.6],scale:p,color:toColor(COLORS.KEY_TEXT),pickable:!1}),h=.42*p,C=e.spawn({mesh:flatGlyphMesh("9"),parent:n,position:[0,.32*-o.keyH,a+.6],scale:h,color:toColor(COLORS.KEY_REMAINING),pickable:!1});i.push({root:n,block:r,digit:d,count:C})}return{backdrop:s,board:spawnBoard(e,o,t),cells:n,digits:Array(81).fill(null),shown:Array(81).fill(""),selected:-1,keys:i,keyCounts:Array(9).fill(-1)}}export function removeScene(e,o){for(const t of[o.backdrop,...o.board,...o.cells,...o.digits,...o.keys.map(e=>e.root)])null!=t&&e.despawn(t)}export function setSceneTheme(e,o,t,s){setBackdropTheme(e,t.backdrop,s);for(const o of t.board)e.despawn(o);t.board=spawnBoard(e,o,s)}export function drawGrid(e,o,t,s,l,n=-1){const i=.5*o.cell;t.selected=-1;for(let a=0;a<9;a++)for(let r=0;r<9;r++){const p=9*a+r,d=s[a][r],h=l(a,r),[C,E]=cellCentre(o,a,r),k=cellHeight(o,"selected"===h),u=1+k+.6;"selected"===h&&(t.selected=p),e.stopAnimation(t.cells[p]),e.set(t.cells[p],{color:cellColor(d,h),position:[C,E,1+k/2],scale:[o.cell,o.cell,k]});const f=d.value?d.value+":"+d.given+":"+d.error:"";if(f!==t.shown[p]){const s=t.digits[p];if(null!=s&&e.despawn(s),t.digits[p]=null,d.value){const s=e.spawn({mesh:flatGlyphMesh(String(d.value)),position:[C,E,u],scale:i,color:digitColor(d),pickable:!1});p===n&&(e.set(s,{scale:.2*i,position:[C,E,u+.5*o.cell]}),e.animate(s,{scale:i,position:[C,E,u]},{duration:.22,easing:"back"})),t.digits[p]=s}t.shown[p]=f}else null!=t.digits[p]&&(e.stopAnimation(t.digits[p]),e.set(t.digits[p],{position:[C,E,u],scale:i}))}}export function drawKeys(e,o,t,s){const l=.42*keyDigit(o);t.keys.forEach((o,n)=>{const i=s[n+1];t.keyCounts[n]!==i&&(t.keyCounts[n]=i,e.set(o.block,{color:toColor(i>0?COLORS.KEY:COLORS.KEY_DISABLED)}),e.set(o.digit,{color:toColor(i>0?COLORS.KEY_TEXT:COLORS.KEY_DISABLED_TEXT)}),e.set(o.count,{mesh:flatGlyphMesh(String(i)),scale:i>0?l:.001}))})}export function pressKey(e,o,t,s,l){const n=t.keys[s-1];if(!n)return;const[i,a]=keyCentre(o,s);e.animate(n.root,{position:[i,a,1-(l?o.key*KEY_HEIGHT*.55:0)]},{duration:l?.06:.12,easing:l?"easeOut":"back"})}export function shakeCell(e,o,t,s){e.animate(t.cells[s],{shake:.12*o.cell},{duration:.28});const l=t.digits[s];null!=l&&e.animate(l,{shake:.12*o.cell},{duration:.28})}export function flash(e,o,t,s,l){const n=Math.floor(l/9),i=l%9;for(const l of s){const s=cellHeight(o,l===t.selected),a=Math.floor(l/9),r=l%9,[p,d]=cellCentre(o,a,r),h=Math.max(Math.abs(a-n),Math.abs(r-i))*FLASH_STEP;e.animate(t.cells[l],[{position:[p,d,1+s/2+.3*o.cell],at:.35},{position:[p,d,1+s/2]}],{duration:.4,delay:h,easing:"easeOut"});const C=t.digits[l];if(null!=C){const t=.5*o.cell,l=1+s+.6;e.animate(C,[{position:[p,d,l+.3*o.cell],scale:1.2*t,at:.35},{position:[p,d,l],scale:t}],{duration:.4,delay:h,easing:"easeOut"})}}}export function celebrate(e,o){effects.confetti(e,{position:[0,o.boardY,2*o.cell],count:70,size:.2*o.cell,speed:1.3*o.board,lifetime:1.4,gravity:2.2*-o.board,colors:["#FFD700","#4CAF50","#2196F3","#E74C3C"].map(e=>toColor(e))})}export{keyTop,cellTop};
@@ -1 +1 @@
1
- "use strict";function _0x35c5(){const e=["WQ9EWPdcImknfW","CmkxW5iueG","sbxdTCkwoSo5rG","WOiQW6NdMe1WWQy","zG5HWODTWPnnctZdPd/dVmk0","EqFcGxVcP8oFWRi","FKbJWRNdRmo/kxGfjmodWONcKG","jSkDWQr8WPBdThldPMq9WOKlBCkLWRldTmo4WOTjaXZcLSo+lmoBAq","h8kDWOuoWQ7cTLJdIrJcLsqMra","WOKErSkahdCdbW","WO1mESkXpmkpWPxcSq","W4tcNCkgrYTuW4FdRq","yCoPW4foW7i","W7vCaSklW5e","kSo4FfD+WP93WOy","WRjbj8oWWRzSW7SCWO/cNamC","DSkqW6echmk3ACoO","WPHEECkEea","W5CHDK1fW7ZdQcK","W5qTCw5DW7ZdPqiKW63cMq","lXa4DCoNf8ol","Df1/mmkWqCkidCoFW4NcV8kMsa","WOWPDCkAW4W","WQ9zWOFcM8kChdW","WPBdMmktDd5oW7W","WP07zSofWODA","W4zLwSoUWRnDWP/dVa","oXLwaSo8WQ54","BarMWOnRWPnobH7dGGBdV8kz","t8ozWRfyWQjGW7RdJ37dLW","WPRcRSkzrCk1W5tcKSkG","b2GsW6yn","WO05z8ouWOC","W7TIWQBdUI9CW6ZcIW","W7v0WPxdIdzyW5FcMe/cHG","qmoop3/cTGVdQ8oQWRD6","dJBdGmos","DmkBW7qZbmkZtSoIWQ3cTCo3bG","aSkEi2JcQZBdOCoo","hWyLDCoN","WQNcPSouW5W","W5fIoCkJW63cImoOsSkwhG","BKX0WQFdRa","tMroWOZdM8otaq","nHJdVCoWW6FdQwq","sCoKA8ksWOHzyG","asZdGCofW5ddHL0","WRtcR2aDWO3dHH3dUhy","o8oSCeP4WP9FWObF","wSoEbMtcOc7dQmoKWRC","WOtcI8oSACo7exfdEWhcNq","EvbYWRNdRmo8oa","aGaYC8kIkCokimoRW6FcI8oq","ESkRiaOVW5ucWRPwb8kDfvm","gmkxWQupWPddSgFdSa","AmodW4RcTKbNvrS","fSkbWOeWWOxdQhRdU3a","WQvPB8khmW","o1iaW5W4W5KC","q8oIsCkmWOXoF8khmG","s8oCW45iW7VdQbW","WPFcImkHimoNW6dcRmkHWQfKfmk0dqjqvSoCkY3dOa","WQzSkvVcJCojW60","W74uW4ldMmopqIxcJH8KWP7cHG","qhNcMbdcO8owW5G","WQj8l3RcNmogW607","CKrWWR/dOmoXcxGqeSogWOhcKWKgqq","W7lcM8o4i8kEegVcMG","W6Geymk0W603W5WGWPhcGW","WP/cKthdLCo1lwBcNW","gmkVW4FcHCkeDW","eSk8WQaBWOZdJmoMWRddU8k/vWu","WRK2zq","pxDKW6fkWPvr","n2HrW6XfWPLiWRFdJq","wH8tW5FdOcxcUWtcKa","pWyLDCoN","nL5RW77cRe0xW7zEWRDJwq","umocpNNcSI7dPmoTWQa","iaa8ySoU","W7BcI8o+aSkph2S","DeNdI8knixzm","W5vfxNOdihz3D8k1W73cJq","D03cPcxcLmo5W6e","xxjlWQFdOW","dmk7ncu4k2a1CKGRWQpcGW","pKFdKLzb","W7/dK8kqDCoaW4FcHmo2","js/cHxhcImoZ","W6FcM8o/fCkEnN7cKSk1","eSk+W6jkW4tcHCo7WRe","WQ3cKSkMCSoWW6/cTG","W64yWRtdTCk1xSknzSkj","W59fmmoNWQ0ZFXuXW7OAW48","WOdcM8oTB8oRdwa","W6tdGgVdQCk0WR5NcW","W7ddHNddImkL","WQXQdeBcHG","BaXGWOrTWP4kcdBdQZRdSa","dK5BW5POWQubWORdPCoSbrJdQgG","WPqGt8oDWQzhWQq","gcqeqmoqomoY","b2KqW7CCW7GQ","WQK+zSkGaGOWi8kA","W5vGmCkMW6/cPmopqmkoaWpcHa","ktZcKxdcImoPWOG","AYjgcCotWPHc","W58QuNjqW6tdNsSKW6NcKG","WOtcI8oRtSo6aMb0","WPhcNXlcL8kv","ae4QWPqyW4Wyod7cOq","aSkzyttdQ3hdRSo/WQTSW4RdUa","s8orWQPfWP0","oG1hg8o+WRjJWRldIHedBaurW6q","gmk7W5VcLmkeDCoj","WOSrsSkhmsaUb8k4W58pqYC","WP0GtSoBWQPpWQNdMSovdgONW53dGG","ksZcJxBcImo1"];return(_0x35c5=function(){return e})()}const _0x5955d9=_0x5325;!function(){const e=_0x5325,o=_0x35c5();for(;;)try{if(680022==-parseInt(e(241,"EBX)"))/1*(-parseInt(e(244,"IqOk"))/2)+parseInt(e(274,"(D2N"))/3*(-parseInt(e(322,"LgFX"))/4)+-parseInt(e(249,"vhP!"))/5+-parseInt(e(277,"gDc5"))/6+parseInt(e(324,"x#Js"))/7*(-parseInt(e(228,"FnJ9"))/8)+-parseInt(e(297,"vhP!"))/9*(-parseInt(e(280,"ep]]"))/10)+parseInt(e(233,"]SUj"))/11*(parseInt(e(226,"Kvp3"))/12))break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x4ad081,{useEffect,useRef,useMemo,useCallback}from"react";import{View,StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{useTangramStore}from"./TangramStore.js";function _0x5325(e,o){e-=226;const t=_0x35c5();let W=t[e];if(void 0===_0x5325.GOjltF){const e=function(e,o){let t,W,r=[],a=0,n="";for(e=function(e){let o="",t="";for(let t,W,r=0,a=0;W=e.charAt(a++);~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++)a=(a+r[W]+o.charCodeAt(W%o.length))%256,t=r[W],r[W]=r[a],r[a]=t;W=0,a=0;for(let o=0;o<e.length;o++)W=(W+1)%256,a=(a+r[W])%256,t=r[W],r[W]=r[a],r[a]=t,n+=String.fromCharCode(e.charCodeAt(o)^r[(r[W]+r[a])%256]);return n};_0x5325.TpkqOw=e,_0x5325.iAPZRz={},_0x5325.GOjltF=!0}const r=t[0];_0x5325.TJdHBH!==r&&(_0x5325.iAPZRz={},_0x5325.TJdHBH=r);const a=_0x5325.iAPZRz[e];return void 0===a?(void 0===_0x5325.UJzCtY&&(_0x5325.UJzCtY=!0),W=_0x5325.TpkqOw(W,o),_0x5325.iAPZRz[e]=W):W=a,W}import{TangramService}from"./TangramService.js";import{GameBoard}from"./components/GameBoard.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x4c7f50}from"../../helpers/index.js";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";import{jsx as _0x4001f2,jsxs as _0x54ab6c}from"react/jsx-runtime";export const Tangram=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:W,onShare:r,onShareScreenshot:a,onShowLeaderboard:n,bannerAd:s})=>{const d="Tqgm",m="Qk*]",S=_0x5325,u={rsnJm:function(e,o){return e(o)},GWKlj:S(339,d),wmohO:function(e,o,t){return e(o,t)},NLceM:S(321,"jZs2"),cbtqi:S(299,"te@X"),abGEz:function(e,o){return e(o)},ODxSN:function(e,o){return e(o)},bXtDY:function(e,o){return e(o)},BdPaN:function(e,o,t){return e(o,t)}},i=u[S(270,"GSoc")](useTangramStore,e=>e[S(248,"2g6V")]),f=useTangramStore(e=>e[S(303,"*VTS")]),k=useTangramStore(e=>e[S(343,"[6sV")]),x=useRef(!1),p=u[S(326,"On5Z")](useRef,e?.[S(255,"v!&L")]??!0);p[S(231,"BIdO")]=e?.[S(306,"GSoc")]??!0;const G=useRef(e?.[S(266,"qr!p")]??!0);G[S(265,d)]=e?.[S(236,"DPR&")]??!0;const O=useRef(new TangramService);useEffect(()=>{const e=S;return useTangramStore[e(317,"LgFX")](o=>o[e(325,"Q4ZP")],o=>{const t=e;x[t(289,"jZs2")]=o,o?O.current.startTimer(()=>{const e=t;useTangramStore[e(287,"]PpL")]()[e(275,"^%VM")]()}):O[t(292,"O%Q5")].stopTimer()})},[]);const C=u.abGEz(useRef,!1),l=useRef(0),g=useRef(!1),R=u[S(291,"IqOk")](useRef,t);R[S(314,"24V*")]=t;const _=useRef(W);_[S(242,"te@X")]=W;const P=useCallback(e=>{const o=S;if(R[o(292,"O%Q5")]&&!C[o(333,"N5ep")]){const t=useTangramStore[o(323,"Q4ZP")]();R[o(296,"[PZn")]({status:e,score:t[o(301,"F*2S")][o(338,"T#rV")]()}),C[o(331,"2g6V")]=!0}},[]);useEffect(()=>{const e=S;return useTangramStore[e(334,"2g6V")]().setupLevel(0),()=>{const o=e;useTangramStore[o(302,"*VTS")]()[o(328,"24V*")]&&!C[o(251,"!W!w")]&&u[o(237,"gdUB")](P,u[o(235,"^%VM")]),O[o(256,"(D2N")][o(342,"[6sV")](),useTangramStore[o(246,"N5xO")]()[o(243,")F&p")]()}},[P]),useEffect(()=>{const e=S;i&&!C.current&&(g[e(232,"wo^M")]=!0,playSound(GAME_SOUNDS[e(313,"OuaZ")][e(341,"qr!p")],p[e(271,")1nI")]),playHaptic(HapticType[e(253,"vhP!")],G[e(272,"(H8g")]),P("win")),f&&!C[e(272,"(H8g")]&&(g[e(320,"^%VM")]=!1,u[e(263,"mLCZ")](playSound,GAME_SOUNDS[e(234,"N5ep")][e(254,"qr!p")],p.current),playHaptic(HapticType[e(282,"v!&L")],G[e(315,"OuaZ")]),u[e(286,"On5Z")](P,e(305,"OuaZ"))),!i&&!f&&(C.current=!1)},[i,f,P]);const h=u[S(263,"mLCZ")](useCallback,()=>{const e=S;C[e(331,"2g6V")]=!1,useTangramStore[e(259,"[Ra^")]()[e(316,"S0AW")](),playSound(GAME_SOUNDS[e(312,"^%VM")][e(300,"vhP!")],p[e(333,"N5ep")])},[]),T=useCallback(()=>{const e=S;P(e(294,"F*2S")),useTangramStore[e(336,"BIdO")]()[e(240,"BIdO")](),useTangramStore[e(285,"GSoc")]()[e(298,"mLCZ")](0)},[P]),Q=useCallback(()=>{const e=S;C[e(245,"[Ra^")]=!1,_.current?.();const o=useTangramStore[e(287,"]PpL")](),t=g.current?o.level+1:o[e(230,"jZs2")];o.setupLevel(t)},[]),N=i||f;N&&0===l[S(293,"ep]]")]&&(l.current=useTangramStore.getState()[S(227,"jZs2")]),!N&&(l.current=0);const q=useMemo(()=>({isPlaying:!N&&k,gameOver:N,onStartGame:h,onStopGame:T,onShare:r,onShowLeaderboard:n,startButtonSubtext:"Drag & tap-to-rotate the tans to fill the shape!"}),[N,k,h,T,r,n]),D=useMemo(()=>{const e=S,o=i,t={};return t[e(318,m)]=N,t[e(247,"N5xO")]=l[e(329,"gDc5")],t[e(304,m)]=e(308,"jZs2"),t[e(258,"]PpL")]=Q,t[e(337,"ZfUv")]=o?u.NLceM:e(261,"vhP!"),t[e(311,"^%VM")]=o?e(250,"[6sV"):u.cbtqi,t.message=o?e(276,"Q4ZP"):e(330,"te@X"),t},[i,N,Q]),M=u[S(281,"EBX)")](useMemo,()=>({gameId:GAME_IDS[S(252,"jZs2")],settings:e||DEFAULT_GAME_SETTINGS,onSettingsChange:o}),[e,o]),I=e?.[S(239,"(D2N")]??0,v=useMemo(()=>({...styles[S(278,"qr!p")],marginTop:I}),[I]),B={};B.soundEnabledRef=p,B[S(335,"^%VM")]=G;const b={};b[S(239,"(D2N")]=I;const L={...q},Z={...D};Z[S(327,"vhP!")]=a,Z[S(283,"LgFX")]=s;const E={...M};return _0x4001f2(View,{style:styles[S(229,"Qk*]")],children:_0x4001f2(GestureHandlerRootView,{style:styles[S(319,"[Ra^")],children:_0x54ab6c(_0x4c7f50,{children:[_0x4001f2(View,{style:v,children:_0x4001f2(GameBoard,B)}),u[S(260,"UFJu")](_0x4001f2,ScoreBoard,b),_0x4001f2(GameControlButton,L),_0x4001f2(GameOverModal,Z),_0x4001f2(GameSettingsModal,E)]})})})};const _0x41f0b3={flex:1};_0x41f0b3[_0x5955d9(264,"[PZn")]=BACKGROUND_COLOR;const _0x1c1533={flex:1},_0x4a33ac={};_0x4a33ac[_0x5955d9(309,"9$%D")]=1,_0x4a33ac[_0x5955d9(267,"!W!w")]=_0x5955d9(268,"(D2N"),_0x4a33ac[_0x5955d9(310,"v!&L")]="center";const _0x30cf57={};_0x30cf57.container=_0x41f0b3,_0x30cf57.gestureRoot=_0x1c1533,_0x30cf57[_0x5955d9(279,"On5Z")]=_0x4a33ac;const styles=StyleSheet[_0x5955d9(269,"O%Q5")](_0x30cf57);Tangram[_0x5955d9(288,"]PpL")]="Tangram";
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{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"./TangramConstants.js";import{createGame,dispose,drag,playAgain,setLayout,setTheme,start,stop,tick}from"./TangramGame.js";import{TOTAL_PIECES}from"./TangramRules.js";import{jsx as _0x32e1f8}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.TANGRAM,FEEDBACK={rotate:{sound:SOUNDS.ROTATE,haptic:HapticType.LIGHT},place:{sound:SOUNDS.PLACE,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 Tangram=engineGame(GAME_IDS.TANGRAM,e=>{const[t,s]=useLiveState(0),[a,r]=useLiveState(0),[o,i]=useLiveState(GAME_DURATION),{game:n,theme:m,status:S,screen:p,gameOver:u}=useEngineGame(e,{gameId:GAME_IDS.TANGRAM,create:createGame,start:start,reset:stop,replay:playAgain,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,a)=>{const r=getLayout(t,s,a);return setLayout(e,r),r.boardW},drag:drag,sounds:SOUNDS,onStart:e=>e(SOUNDS.START),wire:(e,t)=>{e.onScore=s,e.onPlaced=r,e.onTime=i,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}});return _0x32e1f8(EngineGameScreen,{...p,light:LIGHT,columns:[scoreColumn(t),textColumn("PIECES",a+"/"+TOTAL_PIECES),timerColumn(o,m)],subtext:"Fit all seven pieces!",gameOver:u({title:"win"===S?"PUZZLE SOLVED!":"TIME UP!",message:"win"===S?"You reassembled the shape!":"You ran out of time!",scoreLabel:"Score",score:n.score,buttonText:"win"===S?"Next Puzzle!":"Try Again!"})})});
@@ -1 +1 @@
1
- "use strict";const _0x4f00d7=_0x3b4f;!function(){const t=_0x3b4f,o=_0x3816();for(;;)try{if(281776==-parseInt(t(323,"9E)e"))/1*(-parseInt(t(337,"esZu"))/2)+-parseInt(t(418,"OTL$"))/3+parseInt(t(320,"Lg8F"))/4*(-parseInt(t(325,"&p$#"))/5)+-parseInt(t(392,"Sw$8"))/6*(parseInt(t(448,"86hx"))/7)+parseInt(t(385,"c7RI"))/8+-parseInt(t(422,"iNQM"))/9*(parseInt(t(459,"Q8ZW"))/10)+parseInt(t(395,"zu2p"))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}();import{getGameDimensions}from"../../services/UtilsService.js";import{BACKGROUND_COLOR,PRIMARY_COLOR,darken}from"../../services/GamesConstants.js";const DIMS=getGameDimensions(),GAME_WIDTH=DIMS[_0x4f00d7(362,"PJTi")],SCREEN_H=DIMS.height,TOTAL_BOARD_UNITS=6.2,RESERVED_CHROME=280,AVAILABLE_H=Math[_0x4f00d7(416,"Q8ZW")](360,SCREEN_H-280),UNIT_BY_WIDTH=.998*GAME_WIDTH/4,UNIT_BY_HEIGHT=AVAILABLE_H/6.2;export const UNIT=Math.max(32,Math[_0x4f00d7(439,"G%B]")](Math[_0x4f00d7(344,"G%B]")](UNIT_BY_WIDTH,UNIT_BY_HEIGHT)));export const BOARD_W=GAME_WIDTH;export const BOARD_H=Math.round(6.2*UNIT);const SIL_TOP=.3*UNIT;export const SNAP_DIST=1.8*UNIT;export const ROT_TOL=30;export const TRAY_SCALE=.55;const _0x2d5b7f={};function _0x3816(){const t=["WRNdLZKKlSkiat8vhCkhWOG9","ffKdW60GWQ8bwG","W5enW51uxa","W5BcKmkqDay","WQyRomojwmozW5ldPZSdiSkr","WRjCWR9snq","WRiMWPq","W5G+e8oZW5a","W7eDW4O","wvlcI24","o8koW47dSq","W7xcLSoKW4RcSG","W4hcU8o+W5/cQG","WOyzWQJdTXNdLSoPi8ogWPhdRW","WRRcLGPecmk+","hmknEH1Y","f8oUdmo1","eLTkWPXaWOqwBqzFWPe","g8k5W67dHci/W49XrW","W6JcIhNdVfq","ib3cNG","W4NdI1NdQG","bLBdJ8oKxY8kW4q8W6uAW60","WOHbWR9Oiq","iCkdv8oPFq","WOrLWRnFW7m","W4/cG8kcv8o3sZK","WO3dO2RcQmo4W44","prxcGSkg","DXddIdNcGW","vSkjf1FcTq","cCkFE8ouzZ0","fNNcQ8oKmtG","eSkdzG","W4vsW6hcPW","W7DAW6xdSG","WQ7cMSkfW47dNGRdLa","d8oYeSo3vJC","WQRdKNVdUSo2","xq7cMq","qZVcV1FcOa","W4rnW5VcIwO","W4zBqCk4jCk+W77dQYGjkmkQWQFdJSoLBSoL","W5qSn8o9W40","gSkFW7fJbuvlWQrAWOlcMbhdQmkFr8oBW6bwoSo+lmoRWRBcTsW","WO/dOYmYaW","W7m6gCoiW5e","W7H3ACkzh8kg","WQfLr8kwWPORimk5WPldRSkSmSod","EbDPux4","W4hcU8kABIXbiq","W7RdPmoRWOZcQq","WRJcPKirW4D8","B8k+cvRcP8kiuSoqW7X7WOVcOeZcSbFcSG","WRKSWO8wWQy","W5asW6D6","lHVcNmkiW6W","WOLaWPjUeq","z8o5dCo2W73cHW","W5hdJG0tWOK","n8kYF8oJwW","baJdItb1b8ogW6WmW4P/lG","WQZcReCzW7a","WRpcIarfhq","W4m1dXK","WQtdNNpdOSoXWRG","WOxcTIjNlSkjW70","fN3cT8oKia","WQtcJSojWRVcTMbFpW","W7nOlIFcTW","awtcJu3cG8kyWQVdPG","W5JcSJxdV8k/WPtdVHpdTCoxW7hdHa8","W71Pose","umkFkNJcNq","W75lWOqRWPS","W69gW7VdSgldGW","W4GoW7L4y8kR","jLaLgbq","W5z4W4a","WRtdT33cICoe","W4FdPYBdHMpcTG","df/dJW","W57cOmkLDCod","rb7cH8k0","e2L4nSoW","WOldIaZdTedcGIa","BSo9ymk5CW","WR5DWRLrkq","x8oNgCosW6i","WPpdVXO","dCkfDbmOeSkEb8oQd8klW6ldQatcK2iOoCkdF8kCW4bAB8oI","dSkxqsfY","W5tdI1m","xmkEmW","WR7dPCkfWRBdMGRcJSo6vwOFoa","u8oiySk/ra","W5pcR8kvtmo2","W7LwWPSS","nCoYACoYWRmHW5a","rJxdHqS","W7ddLWK2WOSvfq","W7PWoqZcLW","fSkxDmoFFW","W4hdISoaWPVcQW","zu7cH0qn","W4icW7TRCSkX","cfSOnsRcIG","c8kkW7rYyW","x8kUnG","W7NcS8o2W6BcKf3cGW","f3xcQW","feS0iJlcHW","W7BdNsKFvSkzWPi","ee7dKJddGCkf","W5KPdXrMWPK","kXJcN8kiW6W","WPXQWQzFja","WQnaswezWQG","W53dG3ZdVIC","WQXMzmk9kmkUW4O","W5tdI1S","xfZcNwqH","wCoiW6ngDsqSW4u","BmoFW67cPe0YWRq","cSkfjmoJcmo3WPSiq2XlWQjR","m8o0W5VdL2e","s8ofyq","d1RdItBdH8ki","W5hdUJK","g8krW79QqGiBW6ucW4FdUehcVSoh","vSoyFa","W67cUCozW6m","W4zBDCkNha","m35EdSof","WRldJ0JcH8odW7pcJWRdJ8oEW73dTaNcVmkR","WOJcMHNcUK3dHL7dGgXewCo3WPK","W7nzWOecWPO","BXf/","W5bFW6lcQxi","k8kRwZDFySoKFmktFmoMWOFcMhRdRanyt8oGeCoO","zCoPgW","WRxdGM/dOCoQ","gxP4","WQS+WPqy","W58sp8o3W6i","WQzDCeuR","WRixWQpcPc7cMSknC8kolmkAW6VcKq","k8oSW5NdLq","ggpcNMn1","W7BdK8o2WQlcIW","W5ZcNSkHw8oH","WRzas2OcWRC","n8kjCczZ","e8oYW6FdOey","jfJdVqtdOW","W5O6pGbo","bCkDW7DRwbO","amkSCSoKza","EWZcP8k+gW","WQmJnCofwCozW5tdSqKnpSk7","W7LPiYVcPG","W7XQicVcPG","uCkmW7PpBZip"];return(_0x3816=function(){return t})()}_0x2d5b7f[_0x4f00d7(324,"3T$p")]=120,_0x2d5b7f[_0x4f00d7(377,"p9pV")]=1e3,_0x2d5b7f[_0x4f00d7(463,"v4Pt")]=10,_0x2d5b7f.TOTAL_PIECES=7;export const TANGRAM_GAME_CONFIG=_0x2d5b7f;const _0x231a71={};function _0x3b4f(t,o){t-=301;const n=_0x3816();let e=n[t];if(void 0===_0x3b4f.VzTukQ){const t=function(t,o){let n,e,r=[],W=0,x="";for(t=function(t){let o="",n="";for(let n,e,r=0,W=0;e=t.charAt(W++);~e&&(n=r%4?64*n+e:e,r++%4)?o+=String.fromCharCode(255&n>>(-2*r&6)):0)e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(e);for(let t=0,e=o.length;t<e;t++)n+="%"+("00"+o.charCodeAt(t).toString(16)).slice(-2);return decodeURIComponent(n)}(t),e=0;e<256;e++)r[e]=e;for(e=0;e<256;e++)W=(W+r[e]+o.charCodeAt(e%o.length))%256,n=r[e],r[e]=r[W],r[W]=n;e=0,W=0;for(let o=0;o<t.length;o++)e=(e+1)%256,W=(W+r[e])%256,n=r[e],r[e]=r[W],r[W]=n,x+=String.fromCharCode(t.charCodeAt(o)^r[(r[e]+r[W])%256]);return x};_0x3b4f.enqIez=t,_0x3b4f.pSBxrU={},_0x3b4f.VzTukQ=!0}const r=n[0];_0x3b4f.KWitlR!==r&&(_0x3b4f.pSBxrU={},_0x3b4f.KWitlR=r);const W=_0x3b4f.pSBxrU[t];return void 0===W?(void 0===_0x3b4f.CNzcJi&&(_0x3b4f.CNzcJi=!0),e=_0x3b4f.enqIez(e,o),_0x3b4f.pSBxrU[t]=e):e=W,e}_0x231a71[_0x4f00d7(423,"Xqxv")]=_0x4f00d7(447,"Ni$O"),_0x231a71[_0x4f00d7(301,"MW8M")]="#E24A4A",_0x231a71[_0x4f00d7(373,"&lKq")]="#5BB749",_0x231a71.orange=_0x4f00d7(360,"OTL$"),_0x231a71[_0x4f00d7(435,"PIB1")]=_0x4f00d7(436,"L8Kb"),_0x231a71[_0x4f00d7(389,"PJTi")]="#F4C724",_0x231a71[_0x4f00d7(334,"Ni$O")]="#26C6DA";const TAN_COLORS=_0x231a71,_0x23ac8e={};_0x23ac8e.BACKGROUND=BACKGROUND_COLOR,_0x23ac8e[_0x4f00d7(390,"L8Kb")]=PRIMARY_COLOR,_0x23ac8e[_0x4f00d7(458,"zu2p")]="rgba(255, 255, 255, 0.12)",_0x23ac8e[_0x4f00d7(366,"Lg8F")]=_0x4f00d7(368,"9E)e"),_0x23ac8e[_0x4f00d7(342,"Ni$O")]=_0x4f00d7(414,"v4Pt"),_0x23ac8e.TEXT_PRIMARY=_0x4f00d7(409,"9Ka^");export const TANGRAM_COLORS=_0x23ac8e;const _0x15720f={};_0x15720f[_0x4f00d7(358,"esZu")]=_0x4f00d7(449,"@1pj"),_0x15720f[_0x4f00d7(339,"v4Pt")]=TAN_COLORS[_0x4f00d7(396,"uMzr")],_0x15720f.pts=[[0,0],[0,4],[2,2]];const _0x40628c={type:"large"};_0x40628c[_0x4f00d7(322,"uMzr")]=TAN_COLORS.red,_0x40628c.pts=[[0,0],[4,0],[2,2]];const _0x491cb3={};_0x491cb3[_0x4f00d7(304,"y1f^")]=_0x4f00d7(317,"9E)e"),_0x491cb3.color=TAN_COLORS[_0x4f00d7(311,"Kg3f")],_0x491cb3.pts=[[4,4],[2,4],[4,2]];const _0x154dae={type:"small"};_0x154dae[_0x4f00d7(329,"KUk3")]=TAN_COLORS[_0x4f00d7(338,"L8Kb")],_0x154dae.pts=[[0,4],[2,4],[1,3]];const _0x29e9b2={};_0x29e9b2.type=_0x4f00d7(426,"2nqs"),_0x29e9b2.color=TAN_COLORS[_0x4f00d7(382,"MW8M")],_0x29e9b2[_0x4f00d7(461,"&lKq")]=[[2,2],[3,3],[3,1]];const _0x5668a1={};_0x5668a1[_0x4f00d7(407,"pOA0")]=_0x4f00d7(438,"U&1m"),_0x5668a1[_0x4f00d7(380,"G%B]")]=TAN_COLORS[_0x4f00d7(312,"u@dR")],_0x5668a1[_0x4f00d7(405,"boVD")]=[[1,3],[2,4],[3,3],[2,2]];const _0x421fd0={};_0x421fd0[_0x4f00d7(340,"VhrM")]=_0x4f00d7(352,"G%B]"),_0x421fd0[_0x4f00d7(310,"Sw$8")]=TAN_COLORS.teal,_0x421fd0[_0x4f00d7(452,"9Ka^")]=[[3,3],[4,2],[4,0],[3,1]];const BASE_TANS=[_0x15720f,_0x40628c,_0x491cb3,_0x154dae,_0x29e9b2,_0x5668a1,_0x421fd0],_0x41e940={};_0x41e940[_0x4f00d7(391,"qKQe")]=360,_0x41e940[_0x4f00d7(371,"Lg8F")]=360,_0x41e940[_0x4f00d7(364,"0V*x")]=360,_0x41e940[_0x4f00d7(451,"boVD")]=90,_0x41e940[_0x4f00d7(345,"Q8ZW")]=180;const SYMMETRY=_0x41e940,LEVEL_ROTATIONS=[0,90,180,270],_0x440beb={x:2,y:2},PIVOT=_0x440beb,rotatePt=(t,o,n,e,r)=>{const W=_0x4f00d7,x={ZPUNe:function(t,o){return t-o}};x[W(331,"%741")]=function(t,o){return t+o},x.yznQE=function(t,o){return t*o};const f=x,_=n*Math.PI/180,d=Math[W(417,"p9pV")](_),u=Math[W(303,"9wHS")](_),a=t-e,s=f[W(309,"AxV0")](o,r);return{x:e+a*d-s*u,y:f[W(313,"v4Pt")](f[W(412,"MW8M")](r,f.yznQE(a,u)),f[W(408,"9wHS")](s,d))}},centroidOf=t=>{const o=_0x4f00d7,n={};n[o(431,"9E)e")]=function(t,o){return t%o},n[o(442,"Q8ZW")]=o(384,"2nqs"),n.ufJKK=function(t,o){return t/o};const e=n;let r=0,W=0;for(const n of t){if(o(427,"Sw$8")===e.diWuS){const t={_0xcab401:"uMzr",_0xa42df7:413,_0x1146eb:"3T$p"},n={lmbcc:function(t,o){return e.crgpN(t,o)}},r=[45,90,135,180,225,270,315,0][o(404,"9Ka^")](e=>{const r=o;let W=(n[r(393,t._0xcab401)](e-_0x4e4ea5,_0x2fff6f)+_0x20f594)%_0x224fdf;return W=_0x4c3bbf[r(t._0xa42df7,t._0x1146eb)](W,_0x342f0e-W),W>_0x1b26e7});return r[_0x51a65b.floor(_0xa1be9d()*r[o(430,"PIB1")])]??45}r+=n.x,W+=n.y}return{x:e[o(365,"esZu")](r,t[o(356,"qKQe")]),y:e[o(326,"tx8b")](W,t[o(351,"zu2p")])}},pathFromPoints=t=>{const o=_0x4f00d7,n={};n[o(398,"25lP")]=function(t,o){return t<o};const e=n;let r="M "+t[0].x[o(350,"Kg3f")](2)+" "+t[0].y[o(374,"SirU")](2);for(let n=1;e[o(462,"esZu")](n,t[o(400,"tx8b")]);n++)r+=o(432,"v4Pt")+t[n].x[o(424,"E3@0")](2)+" "+t[n].y[o(433,"OTL$")](2);return r+" Z"},mulberry32=t=>{const o=_0x4f00d7,n={};n[o(428,"c7RI")]=function(t,o){return t|o},n[o(353,"Xqxv")]=function(t,o){return t+o},n.pMCHh=function(t,o){return t^o},n.fkkkD=function(t,o){return t>>>o},n[o(415,"v4Pt")]=function(t,o){return t/o},n[o(314,"@1pj")]=function(t,o){return t>>>o};const e=n;let r=t>>>0;return()=>{const t=o;r|=0,r=e[t(403,"zu2p")](e[t(456,"Lg8F")](r,1831565813),0);let n=Math[t(333,"c7RI")](r^r>>>15,1|r);return n=e.pMCHh(n+Math[t(388,"U&1m")](n^e[t(378,"y1f^")](n,7),61|n),n),e[t(369,"3T$p")]((n^e[t(336,"OTL$")](n,14))>>>0,4294967296)}},shuffle=(t,o)=>{const n=function(t,o){return t*o},e=function(t){return t()},r=[...t];for(let t=r.length-1;t>0;t--){const W=Math.floor(n(e(o),t+1));[r[t],r[W]]=[r[W],r[t]]}return r},polysMatch=(t,o,n)=>{const e=_0x4f00d7,r={};r[e(406,"Kg3f")]=function(t,o){return t<o},r[e(315,"boVD")]=function(t,o){return t-o};const W=r;if(t.length!==o[e(437,"boVD")])return!1;const x=new Array(o[e(361,"VhrM")])[e(421,"25lP")](!1);for(const r of t){let t=!1;for(let f=0;W.eLaKL(f,o[e(399,"lLR0")]);f++)if(!x[f]&&Math[e(302,"PJTi")](r.x-o[f].x,W[e(381,"KUk3")](r.y,o[f].y))<=n){x[f]=!0,t=!0;break}if(!t)return!1}return!0},FIT_STEPS=[0,45,90,135,180,225,270,315],pickInitialRot=(t,o,n)=>{const e=_0x4f00d7,r={eAjWv:function(t,o){return t%o},xJTEZ:function(t,o){return t%o},UvBLz:function(t,o){return t-o},cDLsR:function(t){return t()}},W=[45,90,135,180,225,270,315,0][e(429,"tx8b")](n=>{const W=e;let x=r.eAjWv(r[W(335,"OTL$")](n-t,o)+o,o);return x=Math[W(454,"86hx")](x,r[W(383,"E3@0")](o,x)),x>30});return W[Math[e(321,"uMzr")](r[e(327,"SirU")](n)*W[e(355,"2nqs")])]??45};export const generateLevel=t=>{const o=_0x4f00d7,n={MYubc:function(t,o){return t+o},lccfd:function(t,o){return t-o},BncJJ:function(t,o){return t<=o},KkPow:"oXqAP",ixWCF:function(t,o){return t*o},lfvBR:function(t,o){return t+o},hCQry:function(t){return t()},xokoC:function(t){return t()},pbDuZ:function(t,o){return t<o},OGJPA:function(t,o){return t>o},ULriC:function(t,o){return t-o},YmHip:function(t,o){return t-o},euuHC:function(t,o){return t-o},XIZPH:function(t,o){return t*o},YrlUf:function(t,o){return t-o},clRVU:function(t){return t()}},e=mulberry32(2654435761*t+40503),r=LEVEL_ROTATIONS[Math[o(387,"L8Kb")](n[o(420,"Kg3f")](e)*LEVEL_ROTATIONS[o(441,"u@dR")])],W=n[o(386,"9RvO")](e)<.5,x=t=>W?4-t:t,f=BASE_TANS.map(t=>t[o(450,"86hx")][o(402,"N4JX")](([t,o])=>{const n=rotatePt(x(t),o,r,PIVOT.x,PIVOT.y),e={};return e.x=n.x*UNIT,e.y=n.y*UNIT,e}));let _=1/0,d=1/0,u=-1/0,a=-1/0;for(const t of f)for(const e of t)e.x<_&&(_=e.x),n[o(316,"U&1m")](e.y,d)&&(d=e.y),n[o(305,"%741")](e.x,u)&&(u=e.x),e.y>a&&(a=e.y);const s=n[o(410,"86hx")](u,_),i=n.ULriC(n[o(457,"9wHS")](BOARD_W,s)/2,_),S=n[o(425,"uMzr")](SIL_TOP,d),R={};for(const t of BASE_TANS){if(R[t[o(358,"esZu")]])continue;const n=t.pts.map(([t,o])=>({x:x(t)*UNIT,y:o*UNIT})),e=centroidOf(n);R[t[o(359,"lLR0")]]=n.map(t=>({x:t.x-e.x,y:t.y-e.y}))}const O=SIL_TOP+(a-d)+n.XIZPH(UNIT,.35)+n[o(306,"u@dR")](UNIT,.55),k=n[o(347,"KUk3")](BOARD_H,n[o(343,"y7))")](UNIT,.55)),p=t=>Math[o(332,"IOC8")](Math.max(t,O),k),T=[p(O),p(k)],I=[4,3],l=[],C=.28*UNIT;for(let t=0;n.pbDuZ(t,I[o(376,"9RvO")]);t++){const r=I[t];for(let W=0;W<r;W++)l.push({x:n.ixWCF(n[o(349,"31M]")](W,.5),BOARD_W)/r+n[o(354,"p9pV")](e()-.5,C),y:T[t]+(n.clRVU(e)-.5)*C})}const b=shuffle(l,e),P=BASE_TANS[o(444,"Q8ZW")]((t,W)=>{const x=o,_=R[t[x(379,"tx8b")]];let d=0;for(const t of _){const o=Math[x(419,"86hx")](t.x,t.y);o>d&&(d=o)}const u=Math[x(455,"OTL$")](n.ixWCF(2,d)+.5*UNIT),a=centroidOf(f[W]),s=n[x(460,"25lP")](a.x,i),O=a.y+S,k=f[W].map(t=>({x:t.x-a.x,y:t.y-a.y})),p=((t,e)=>{const W=o;if(W(375,"Sw$8")!==n[W(319,"pOA0")]){let t=n[W(440,"KUk3")](n[W(445,"c7RI")](_0xff96c6,_0x29cc4e)%_0x609523,_0x2736c7)%_0x2e871f;return t=_0x36fb87[W(363,"pOA0")](t,_0x2ada49-t),n[W(401,"PIB1")](t,_0x1d2527)}{const o=R[t],n=.08*UNIT;for(const t of FIT_STEPS){const r=o[W(357,"v4Pt")](o=>rotatePt(o.x,o.y,t,0,0));if(polysMatch(r,e,n))return t}return r}})(t.type,k),T=f[W].map(t=>({x:t.x+i,y:t.y+S})),I=pathFromPoints(T),l=SYMMETRY[t[x(308,"@1pj")]],C=b[W];return{id:W,type:t.type,color:t.color,stroke:darken(t[x(370,"%741")],.28),localPoints:_,canvasSize:u,targetCx:s,targetCy:O,targetRot:p,symmetry:l,silPath:I,initialRot:pickInitialRot(p,l,e),scatterCx:C.x,scatterCy:C.y}}),N={};N.x=_+i,N.y=d+S,N.w=u-_,N.h=a-d;const h=N,L={};return L.pieces=P,L[o(453,"9E)e")]=h,L};export const isRotationMatched=(t,o,n)=>{const e=_0x4f00d7,r={};r[e(367,"%741")]=function(t,o){return t-o};const W=r;let x=((t-o)%n+n)%n;return x=Math[e(434,"qKQe")](x,W[e(348,"2nqs")](n,x)),x<=30};export const snappedRotation=(t,o,n)=>{const e=_0x4f00d7,r={eVgWw:function(t,o){return t-o}};r[e(397,"p9pV")]=function(t,o){return t+o};const W=r,x=Math.round(W[e(318,"2nqs")](t,o)/n);return W[e(411,"KUk3")](o,x*n)};export const localPath=(t,o,n)=>{const e=t[_0x4f00d7(330,"y1f^")](t=>({x:t.x+o,y:t.y+n}));return pathFromPoints(e)};
1
+ "use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";import{RIM_RADIUS,TOTAL_BOARD_UNITS}from"./TangramRules.js";export const GAME_DURATION=120;export const POINTS_PER_PIECE=1e3;export{TRAY_SCALE,RIM_RADIUS}from"./TangramRules.js";export const TAP_MAX=.25;export const TAP_SLOP=10;export const ROTATE_STEP=45;export const ROTATE_TIME=.18;export const SNAP_TIME=.16;export const ENTRY_STAGGER=.045;export const WIN_DELAY=.22;export const WIN_STAGGER=.09;export const COLORS={CLASSIC_SLOT:"rgba(255, 255, 255, 0.12)",CLASSIC_SLOT_EDGE:"rgba(255, 255, 255, 0.30)"};export const TILT=0;export const LIGHT=frontLight([0,0,1],.45);export const PIECE_DEPTH=.2;export const STACK_STEP=.14;export const HELD_HEIGHT=1.2;const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=88;export function getLayout(o,t,r){const T=getScoreBoardTop(r)+82,e=Math.max(240,t-T-88),n=gameWidthFor(o),s=n/(4+2*RIM_RADIUS),_=e/Math.cos(0)/TOTAL_BOARD_UNITS,E=Math.min(s,_);return{width:o,height:t,tilt:0,centerY:T+e/2,unit:E,boardW:n,boardH:E*TOTAL_BOARD_UNITS}}export const toWorld=(o,t,r)=>[t-o.boardW/2,o.boardH/2-r];export const toBoard=(o,t,r)=>[t+o.boardW/2,o.boardH/2-r];
@@ -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{ENTRY_STAGGER,GAME_DURATION,HELD_HEIGHT,PIECE_DEPTH,POINTS_PER_PIECE,RIM_RADIUS,ROTATE_STEP,ROTATE_TIME,SNAP_TIME,STACK_STEP,TAP_MAX,TAP_SLOP,toBoard,TRAY_SCALE,WIN_DELAY,WIN_STAGGER}from"./TangramConstants.js";import{claimSlot,generateLevel,insidePiece,rotatePt,TOTAL_PIECES}from"./TangramRules.js";import{buildScene,celebrate,dim,enter,moveTo,pop,removeScene,setPose,setSceneTheme,wiggle}from"./TangramScene.js";const WORLD_CAPACITY=200;export function createGame(e){const t=new World(200),o={world:t,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",level:0,data:null,tans:[],occupied:[],active:-1,held:null,placed:0,get score(){return t.scoreboard.score},get timeLeft(){return t.scoreboard.shownSeconds},won:!1,clock:0,onPhase:e=>{},onScore:e=>{},onPlaced:e=>{},onTime:e=>{},onEvent:e=>{}};return t.scoreboard.reset(0,GAME_DURATION),t.scoreboard.handlers={onSecond:e=>o.onTime(e),onTimeUp:()=>"playing"===o.phase&&end(o,!1)},o}function poseOf(e,t){const o=e.tans[t],n=e.held?.id===t&&e.held.moved;return o.placed?{x:o.x,y:o.y,rot:o.rot,scale:1,lift:0}:n?{x:o.x,y:o.y,rot:o.rot,scale:1.05,lift:HELD_HEIGHT}:e.active===t?{x:o.x,y:o.y,rot:o.rot,scale:1,lift:STACK_STEP*(TOTAL_PIECES+2)}:{x:o.x,y:o.y,rot:o.rot,scale:TRAY_SCALE,lift:STACK_STEP*(t+1)}}const allPoses=e=>e.tans.map((t,o)=>poseOf(e,o));export function setLayout(e,t){const o=!e.layout;e.held&&(e.held=null,e.active=-1),e.layout=t,aimTilted(e.camera,t),o?setupLevel(e,e.level):rebuild(e,!1)}export function setTheme(e,t){e.theme=t,e.scene&&setSceneTheme(e.world,e.scene,t)}function rebuild(e,t){const o=e.layout;if(!o)return;const n=e.data;e.data=generateLevel(e.level,o.unit,o.boardW,o.boardH),n&&n.pieces.length===e.data.pieces.length&&!t&&(e.tans=e.tans.map((t,o)=>{const a=e.data.pieces[o];if(!t.placed)return{...t,x:a.scatterCx,y:a.scatterCy};const r=e.occupied.findIndex((e,o)=>e&&Math.hypot(n.pieces[o].targetCx-t.x,n.pieces[o].targetCy-t.y)<1),s=e.data.pieces[r]??a;return{...t,x:s.targetCx,y:s.targetCy}})),e.scene&&removeScene(e.world,e.scene),e.scene=buildScene(e.world,o,e.theme,e.data,allPoses(e)),t&&enter(e.world,o,e.scene,allPoses(e),ENTRY_STAGGER)}function setupLevel(e,t){const o=e.layout;e.world.cancelTimers(),e.level=t,e.held=null,e.active=-1,e.placed=0,e.world.scoreboard.reset(0,GAME_DURATION),e.won=!1,o&&(e.data=generateLevel(t,o.unit,o.boardW,o.boardH),e.tans=e.data.pieces.map(e=>({x:e.scatterCx,y:e.scatterCy,rot:e.initialRot,placed:!1})),e.occupied=e.data.pieces.map(()=>!1),rebuild(e,!0)),e.onScore(0),e.onPlaced(0),e.onTime(GAME_DURATION)}export function start(e){"ready"===e.phase&&(e.phase="playing",e.world.scoreboard.startCountdown(GAME_DURATION),e.onPhase("playing"))}export function stop(e){e.phase="ready",setupLevel(e,0),e.onPhase("ready")}export function playAgain(e){const t=e.won?e.level+1:e.level;e.phase="ready",setupLevel(e,t),e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function tick(e,t){e.world.isDisposed||(e.clock+=Math.min(t,.25),e.world.update(t))}function end(e,t){e.world.scoreboard.stop(),e.won=t,e.phase="over";const{layout:o,scene:n,data:a}=e,r=e.held?.id;e.held=null,void 0!==r&&settle(e,r),o&&n&&a&&(t?celebrate(e.world,o,n,a,SNAP_TIME+WIN_DELAY,WIN_STAGGER):dim(e.world,n,e.tans.flatMap((e,t)=>e.placed?[]:[t]),a.pieces.map(e=>e.color))),e.onPhase("over"),e.onEvent(t?"win":"lose")}function boardPoint(e,t,o){const n=e.layout,[a,r]=unproject(n,t,o,.3+n.unit*PIECE_DEPTH*2);return toBoard(n,a,r)}export function tanAt(e,t,o){const{data:n,layout:a}=e;if(!n||!a)return-1;const r=[e.active,...[6,5,4,3,2,1,0].filter(t=>t!==e.active)].filter(e=>e>=0);for(const s of[0,.15*a.unit])for(const a of r){const r=e.tans[a];if(r.placed)continue;const l=e.held?.id===a&&e.held.moved?1.05:e.active===a?1:TRAY_SCALE;if(insidePiece(n.pieces[a].localPoints,r.x,r.y,r.rot,l,t,o,s))return a}return-1}export function drag(e,t){const{layout:o,scene:n}=e;if(!o||!n)return;if("start"===t.phase){if("playing"!==e.phase)return;const[a,r]=boardPoint(e,t.x,t.y),s=tanAt(e,a,r);if(s<0)return;const l=e.tans[s],i=e.active;return e.held={id:s,sx:t.x,sy:t.y,bx:a,by:r,ox:l.x,oy:l.y,at:e.clock,moved:!1},e.active=s,i>=0&&i!==s&&!e.tans[i].placed&&moveTo(e.world,o,n,i,poseOf(e,i),.14),void moveTo(e.world,o,n,s,poseOf(e,s),.14)}const a=e.held;if(!a)return;const r=e.tans[a.id];if("end"===t.phase&&t.cancelled)return r.x=a.ox,r.y=a.oy,e.held=null,settle(e,a.id);if(!a.moved&&Math.hypot(t.x-a.sx,t.y-a.sy)>TAP_SLOP&&(a.moved=!0,moveTo(e.world,o,n,a.id,poseOf(e,a.id),.1)),a.moved){const[s,l]=boardPoint(e,t.x,t.y);return r.x=a.ox+(s-a.bx),r.y=a.oy+(l-a.by),"end"!==t.phase?void setPose(e.world,o,n,a.id,poseOf(e,a.id)):(e.held=null,drop(e,a.id))}"end"===t.phase&&(e.held=null,e.clock-a.at<TAP_MAX&&rotate(e,a.id))}function rotate(e,t){const{layout:o,scene:n}=e;e.tans[t].rot+=ROTATE_STEP,keepInView(e,t),o&&n&&moveTo(e.world,o,n,t,poseOf(e,t),ROTATE_TIME,"back"),e.onEvent("rotate")}function settle(e,t){keepInView(e,t),e.layout&&e.scene&&moveTo(e.world,e.layout,e.scene,t,poseOf(e,t),.12)}function keepInView(e,t){const o=e.layout,n=e.data;if(!o||!n)return;const a=e.tans[t],r=poseOf(e,t).scale,s=n.pieces[t].localPoints.map(e=>rotatePt(e.x*r,e.y*r,a.rot,0,0)),l=s.map(e=>e.x),i=s.map(e=>e.y),d=o.unit*r*RIM_RADIUS;a.x=Math.max(d-Math.min(...l),Math.min(o.boardW-d-Math.max(...l),a.x)),a.y=Math.max(d-Math.min(...i),Math.min(o.boardH-d-Math.max(...i),a.y))}function drop(e,t){const{layout:o,scene:n,data:a}=e;if(!o||!n||!a||"playing"!==e.phase)return settle(e,t);const r=e.tans[t],s=claimSlot(a,e.occupied,o.unit,a.pieces[t].type,r.x,r.y,r.rot);if(s&&"nudge"!==s)return r.placed=!0,r.x=s.cx,r.y=s.cy,r.rot=s.rot,e.active===t&&(e.active=-1),moveTo(e.world,o,n,t,poseOf(e,t),SNAP_TIME),pop(e.world,o,n,t,.14),e.onEvent("place"),void placePiece(e);settle(e,t),"nudge"===s&&(wiggle(e.world,n,t,r.rot),e.onEvent("wrong"))}function placePiece(e){e.placed+=1,e.world.scoreboard.add(POINTS_PER_PIECE);const t=e.placed>=TOTAL_PIECES;t&&e.world.scoreboard.set(calculateTimeBasedScore(GAME_DURATION-e.timeLeft,GAME_DURATION,e.score)),e.onPlaced(e.placed),e.onScore(e.score),t&&end(e,!0)}
@@ -0,0 +1 @@
1
+ "use strict";export const TOTAL_BOARD_UNITS=6;export const TRAY_SCALE=.4;export const RIM_RADIUS=.024;export const ROT_TOL=30;export const SNAP_UNITS=1.8;export const TOTAL_PIECES=7;const TAN_COLORS={blue:"#4A90E2",red:"#E24A4A",green:"#5BB749",orange:"#F5A623",purple:"#9B59B6",yellow:"#F4C724",teal:"#26C6DA"},BASE_TANS=[{type:"large",color:TAN_COLORS.blue,pts:[[0,0],[0,4],[2,2]]},{type:"large",color:TAN_COLORS.red,pts:[[0,0],[4,0],[2,2]]},{type:"medium",color:TAN_COLORS.green,pts:[[4,4],[2,4],[4,2]]},{type:"small",color:TAN_COLORS.orange,pts:[[0,4],[2,4],[1,3]]},{type:"small",color:TAN_COLORS.purple,pts:[[2,2],[3,3],[3,1]]},{type:"square",color:TAN_COLORS.yellow,pts:[[1,3],[2,4],[3,3],[2,2]]},{type:"para",color:TAN_COLORS.teal,pts:[[3,3],[4,2],[4,0],[3,1]]}],SYMMETRY={large:360,medium:360,small:360,square:90,para:180},LEVEL_ROTATIONS=[0,90,180,270],PIVOT={x:2,y:2},FIT_STEPS=[0,45,90,135,180,225,270,315];export const rotatePt=(t,e,r,o,n)=>{const a=r*Math.PI/180,y=Math.cos(a),l=Math.sin(a),s=t-o,p=e-n;return{x:o+s*y-p*l,y:n+s*l+p*y}};const centroidOf=t=>{let e=0,r=0;for(const o of t)e+=o.x,r+=o.y;return{x:e/t.length,y:r/t.length}},mulberry32=t=>{let e=t>>>0;return()=>{e|=0,e=e+1831565813|0;let t=Math.imul(e^e>>>15,1|e);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296}},polysMatch=(t,e,r)=>{if(t.length!==e.length)return!1;const o=new Array(e.length).fill(!1);for(const n of t){let t=!1;for(let a=0;a<e.length;a++)if(!o[a]&&Math.hypot(n.x-e[a].x,n.y-e[a].y)<=r){o[a]=!0,t=!0;break}if(!t)return!1}return!0},TRAY_TANS=[[[2,0],[0,2],[2,2]],[[2,0],[0,2],[0,0]],[[3,1],[2,0],[4,0]],[[4,0],[3,1],[4,1]],[[2,2],[3,2],[2,1]],[[3,1],[3,2],[4,2],[4,1]],[[2,0],[2,1],[3,2],[3,1]]],canonicalCache=new Map;export function canonicalShapes(t){const e=canonicalCache.get(t);if(e)return e;const r={};for(const e of BASE_TANS){if(r[e.type])continue;const o=e.pts.map(([e,r])=>{return{x:(o=e,t?4-o:o),y:r};var o}),n=centroidOf(o);r[e.type]=o.map(t=>({x:t.x-n.x,y:t.y-n.y}))}const o=r;return canonicalCache.set(t,o),o}export function generateLevel(t,e,r,o){const n=e,a=.1*n,y=mulberry32(2654435761*t+40503),l=LEVEL_ROTATIONS[Math.floor(y()*LEVEL_ROTATIONS.length)],s=y()<.5,p=BASE_TANS.map(t=>t.pts.map(([t,e])=>{const r=rotatePt((o=t,s?4-o:o),e,l,PIVOT.x,PIVOT.y);var o;return{x:r.x*n,y:r.y*n}}));let x=1/0,i=1/0,h=-1/0,T=-1/0;for(const t of p)for(const e of t)e.x<x&&(x=e.x),e.y<i&&(i=e.y),e.x>h&&(h=e.x),e.y>T&&(T=e.y);const u=(r-(h-x))/2-x,m=a-i,S=canonicalShapes(s),f=Object.fromEntries(Object.entries(S).map(([t,e])=>[t,e.map(t=>({x:t.x*n,y:t.y*n}))])),A=(t,e)=>{const r=f[t],o=.08*n;for(const t of FIT_STEPS)if(polysMatch(r.map(e=>rotatePt(e.x,e.y,t,0,0)),e,o))return t;return l},O=2*Math.SQRT2*n,R=Math.SQRT2*n,M=1.1,g=TRAY_TANS.flatMap(t=>{const e=t.reduce((t,[e])=>t+e,0)/t.length,r=t.reduce((t,[,e])=>t+e,0)/t.length;return t.map(([t,o])=>({x:((e-2)*M+t-e)*Math.SQRT2*n*.4,y:((r-1)*M+o-r)*Math.SQRT2*n*.4}))}),_=Math.min(...g.map(t=>t.y)),C=Math.max(...g.map(t=>t.y)),E=(Math.min(...g.map(t=>t.x))+Math.max(...g.map(t=>t.x)))/2,N=a+(T-i)+Math.max(12,.12*n)-_,L=(o-(a-.024*n)-(N+C+.4*n*.024))/2;return{pieces:BASE_TANS.map((t,e)=>{const o=centroidOf(p[e]),a=p[e].map(t=>({x:t.x-o.x,y:t.y-o.y})),y=A(t.type,a),l=SYMMETRY[t.type],x=TRAY_TANS[e].map(([t,e])=>({x:(s?4-t:t)*Math.SQRT2*n,y:e*Math.SQRT2*n})),i=centroidOf(x),h=A(t.type,x.map(t=>({x:t.x-i.x,y:t.y-i.y}))),T={x:r/2+.4*(i.x-O)*M-(s?-E:E),y:N+.4*(i.y-R)*M+L};return{id:e,type:t.type,color:t.color,localPoints:f[t.type],targetCx:o.x+u,targetCy:o.y+m+L,targetRot:y,symmetry:l,silPoints:p[e].map(t=>({x:t.x+u,y:t.y+m+L})),initialRot:h,scatterCx:T.x,scatterCy:T.y}}),mirror:s,silhouetteRect:{x:x+u,y:i+m+L,w:h-x,h:T-i}}}export const isRotationMatched=(t,e,r)=>{let o=((t-e)%r+r)%r;return o=Math.min(o,r-o),o<=30};export const snappedRotation=(t,e,r)=>e+Math.round((t-e)/r)*r;export function claimSlot(t,e,r,o,n,a,y){let l=-1,s=1/0,p=!1;if(t.pieces.forEach((t,x)=>{if(e[x]||t.type!==o)return;const i=Math.hypot(n-t.targetCx,a-t.targetCy);i>1.8*r||(isRotationMatched(y,t.targetRot,t.symmetry)?i<s&&(s=i,l=x):p=!0)}),l<0)return p?"nudge":null;e[l]=!0;const x=t.pieces[l];return{slot:l,cx:x.targetCx,cy:x.targetCy,rot:snappedRotation(y,x.targetRot,x.symmetry)}}export function insidePiece(t,e,r,o,n,a,y,l=0){const s=rotatePt(a-e,y-r,-o,0,0),p=s.x/n,x=s.y/n;let i=!1;for(let e=0,r=t.length-1;e<t.length;r=e++){const o=t[e],n=t[r];o.y>x!=n.y>x&&p<(n.x-o.x)*(x-o.y)/(n.y-o.y)+o.x&&(i=!i)}if(i||l<=0)return i;const h=l/n;for(let e=0,r=t.length-1;e<t.length;r=e++){const o=t[e],n=t[r],a=n.x-o.x,y=n.y-o.y,l=Math.max(0,Math.min(1,((p-o.x)*a+(x-o.y)*y)/(a*a+y*y||1)));if(Math.hypot(p-(o.x+a*l),x-(o.y+y*l))<=h)return!0}return!1}
@@ -0,0 +1 @@
1
+ "use strict";import{effects,extrude,Path,quat,tube}from"@nayan-ui/engine";import{darken}from"../../services/GamesConstants.js";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{cacheGameAsset,createGameMesh as _0x2d9942}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{COLORS,PIECE_DEPTH,RIM_RADIUS,toWorld}from"./TangramConstants.js";import{canonicalShapes}from"./TangramRules.js";const meshes=new Map,cached=(o,t)=>{let e=meshes.get(o);return!e&&(e=cacheGameAsset("tangram/TangramScene:"+o,t),meshes.set(o,e)),e},BACKDROP_DEPTH=30,SLOT_Z=.3,polygon=o=>(new Path).addPolygon(o.map(o=>[o.x,o.y])),loop=(o,t)=>[...o,o[0]].map(o=>[o.x,-o.y,t]),slabMesh=(o,t)=>cached("tg-slab:"+o+":"+t,()=>_0x2d9942(extrude(polygon(canonicalShapes(t)[o]),{depth:PIECE_DEPTH}),{center:!1,shine:.45})),rimMesh=(o,t)=>cached("tg-rim:"+o+":"+t,()=>_0x2d9942(tube(loop(canonicalShapes(t)[o],0),{radius:RIM_RADIUS,sides:8,smoothness:1,caps:!1}),{center:!1,shine:.3})),slotMesh=(o,t)=>cached("tg-slot:"+o+":"+t,()=>_0x2d9942(extrude(polygon(canonicalShapes(t)[o]),{depth:0}),{center:!1}));export const turn=o=>quat.z(-o*Math.PI/180);const slotFill=o=>toColor("classic"===o.mode?COLORS.CLASSIC_SLOT:o.BOARD.CELL_EMPTY),slotEdge=o=>toColor("classic"===o.mode?COLORS.CLASSIC_SLOT_EDGE:o.BOARD.BORDER),rootPosition=(o,t)=>{const[e,n]=toWorld(o,t.x,t.y);return[e,n,.3+t.lift*o.unit]};function spawnSlots(o,t,e,n){const s=[];for(const a of e.pieces){const[r,i]=toWorld(t,a.targetCx,a.targetCy),l=turn(a.targetRot);s.push(o.spawn({mesh:slotMesh(a.type,e.mirror),position:[r,i,.3],rotation:l,scale:t.unit,color:slotFill(n),pickable:!1})),s.push(o.spawn({mesh:rimMesh(a.type,e.mirror),position:[r,i,.3],rotation:l,scale:[t.unit,t.unit,.2*t.unit],color:slotEdge(n),pickable:!1}))}return s}export function buildScene(o,t,e,n,s){const a=spawnBackdrop(o,t.width,t.height,-30,e);placeTiltedBackdrop(o,a,t,30);const r={backdrop:a,slots:spawnSlots(o,t,n,e),tans:[]};return n.pieces.forEach((e,a)=>{const i=s[a],l=o.spawn({mesh:"none",position:rootPosition(t,i),rotation:turn(i.rot),scale:t.unit*i.scale,pickable:!1}),p=o.spawn({mesh:slabMesh(e.type,n.mirror),parent:l,position:[0,0,PIECE_DEPTH/2],color:toColor(e.color),pickable:!1}),u=o.spawn({mesh:rimMesh(e.type,n.mirror),parent:l,position:[0,0,PIECE_DEPTH],color:toColor(darken(e.color,.28)),pickable:!1});r.tans.push({root:l,slab:p,rim:u})}),r}export function removeScene(o,t){for(const e of[t.backdrop,...t.slots,...t.tans.map(o=>o.root)])o.despawn(e)}export function setSceneTheme(o,t,e){setBackdropTheme(o,t.backdrop,e),t.slots.forEach((t,n)=>o.set(t,{color:n%2?slotEdge(e):slotFill(e)}))}export function setPose(o,t,e,n,s){const a=e.tans[n];a&&(o.stopAnimation(a.root),o.set(a.root,{position:rootPosition(t,s),rotation:turn(s.rot),scale:t.unit*s.scale}))}export function moveTo(o,t,e,n,s,a,r="easeOut"){const i=e.tans[n];i&&o.animate(i.root,{position:rootPosition(t,s),rotation:turn(s.rot),scale:t.unit*s.scale},{duration:a,easing:r})}export function enter(o,t,e,n,s){n.forEach((n,a)=>{const r=e.tans[a];r&&(o.stopAnimation(r.root),o.set(r.root,{position:rootPosition(t,n),rotation:turn(n.rot),scale:t.unit*n.scale*.4}),o.animate(r.root,{scale:t.unit*n.scale},{duration:.26,delay:a*s,easing:"back"}))})}export function pop(o,t,e,n,s){const a=e.tans[n];a&&o.animate(a.root,[{scale:1.08*t.unit,at:.3},{scale:t.unit}],{duration:.29,delay:s,easing:"easeOut"})}export function wiggle(o,t,e,n){const s=t.tans[e];s&&o.animate(s.root,[{rotation:turn(n+7)},{rotation:turn(n-7)},{rotation:turn(n+4)},{rotation:turn(n)}],{duration:.26})}export function celebrate(o,t,e,n,s,a){e.tans.forEach((e,n)=>{o.animate(e.root,[{scale:1.1*t.unit,at:.5},{scale:t.unit}],{duration:.27,delay:s+n*a,easing:"easeInOut"})});const r=n.silhouetteRect,[i,l]=toWorld(t,r.x+r.w/2,r.y+r.h/2);effects.confetti(o,{position:[i,l,t.unit],count:60,size:.1*t.unit,speed:1.4*r.w,lifetime:1.3,gravity:2.4*-r.w,colors:n.pieces.slice(0,4).map(o=>toColor(o.color))})}export function dim(o,t,e,n){for(const s of e){const e=t.tans[s];if(!e)continue;const a=toColor(n[s]);o.animate(e.slab,{color:[.45*a[0],.45*a[1],.5*a[2],1]},{duration:.4})}}
@@ -1 +1 @@
1
- "use strict";function _0x41bc(){const e=["wSoiFK57AwG","W7HNW5hcSCo0","A8ojsSkEW5NdJW","B8kKW5jQksOdWQldJSoWuKi","AZldNCo1WQ0","WP/cHmocmrWeqtu","FSorW7nVW58","wCoSWPpcG8oBcq","pYJcSwWJpSkyr1BdUs8s","drFdLqtcVfdcHW","WQ7dSSkzW4FcNa","hGpdGXlcSfdcLmk3W7ZdKq","tCosx0HSBNlcMW","fCodWRmWAW","W5i1hhS5FalcJWnFW5FcSG","lKNcGSoymCo5","l8o1WPu7ALSYWOddSG","vhLJnSoBW6FdJa","W75dW6dcTmok","WRXBnxNcNSkN","jmkWWRH2Fmo9WPjMB3TUwCoPgvmQW4y","AW5lWPxcLCkzWRZcPSk2WO8","BL4+xLbzCW","W4XwW6tcSmouW47dHWO","W5ddVdjCW4C/WOtdOW","ru3dIZehvG","lLddOCk6W7u0W4WdW6SgjXfPW4FdMq","W43cLgxdMmoYqCoElCoJW4CohG","W7ddKZqBzbC7WOH/tCop","WQhdG2xcSGjUtSk3CGbjB1u","CSonW5nGW4/cMa","nL/cMCkMW4S","wCo8WO/cHCoBftS","WPD4hmkM","WOBdRCoaWP5w","dmkioWSPmcNcPmodyeNdHSkr","FHZdLCknySkIWQldNCoJW5NdRvjEW4G","otpcONWQnCk/","WQhdJCkflW","cwxdH8oAWPHlW70","EWTyWPdcNSkYWQy","kK3cMmoOimo0W6hcIa","BSoTW6nkcWfNCSoN","W65bW457gmk1WOhcUgRcICokW5a","dmkpnqOMmIRcMmobzupdJmkR","i8kjWO4ZWOJdISkzWRJdLMlcNCkGuq","ACoetCkAW5ldQSoQBtpdKq","WRNcTSoZeq8","WR1fB1ezWPhcIZq","W7PxW7tcRmok","W4VcT8o5jqerDW","i2FcV8kYW4VcGHu","WQldVSk/W5/cKcGu","WPnIBg0U","tSoMWRhcMmoDgIpdJSokWQW9imkEWPq","lSoGWOCPCfK9WOJdUSom","tSo7WPZcMConfY7dN8oWWRCHeq","WRZdJmk/k3qFpCoT","W5/cK2i","sSosBM3cPHdcO8kFwK10x2m","W4xdUcXCW7ikWOddRYy","f3SZW6tcKGbpWQ/cQs7dPq","mLBcGCo4WRCeW54","oMS5W6ldLYjE","WP1lkWm0W64y","k8oPvZO6xmkO","WR1EEafu","W7H8zXtdOIFdKe1/W78Yo8kAWPm","W7engmoizwRdNG","E8oTW6r8cYDYEG","WPPuW7/cNfRcOCkVWP7cRW","W7RcUmkuv8oojsW","WRXlkx/cNSk7W70","W5pcKgpdU8oYxCoViCoN","W4OQs8keWQTkl8o8W4u","W5/cU0BcL8oL","W6zdW50AzW","aGVdJqtcNW","WP4aWQpdLSkxWPNdTIpcQmo6W64m","w1FcKehdRGNdHSk7W5VdSWHpWRG","pSoLWPqSE3iN","W5POA05QWRhdHfe","mZrxWRmOqmoxzCkzjSkNgqOo","suRdGYehtG","W7FdJZuzBrG2","wZJdOSoOWRCktbC","W5ieWQxcU2e","W4OpWQFcRxNcRCk8WOZcTmoO","W6RcQmksyCocot07yZZdQCor","WP7dSHJcPG","BK4IwfbfufqMq8ovW443","WRLvAxaiWP7cIW","l3ZcNSkOW4/cNGq","CaDgWOhcLa","pNS/W4pdHI1EWRW","W7NcUgmFW7a","uYxcH8oA","F8oTW75BgJrrBCoJWPNdMHbF","cIFcVG","n8oLWPuQD3OQWQ7dUmoBAw05gq","os9mWRuKt8op","W71wW5Tgh8k4WPtcQq","E2LNiCosWQNdUXHiiN8Mpb4n","F8orW4zoW7O","gvdcN8onaq","hMWYW73dVW","WPtcImoCec4","WOxcQwSnWRf7WRhdJrRcGuua","vvJdHcawFt86WPq","tCoKWO/cTCoN","WO/dQaxcOmklW7hcUW","W6vyW4aKxG","W6awWPNcMhe","n3VcOW","AbZdMmoWWPXAauVdIG","bCk7WR9XFSo8W7P+ChP1gSo4","WPDYcCk3","WQG9lfdcSx7cKW","W7DYetz9W7G7g8okyNFcGmkDW6BcG8kXeqHXW5iUt8kmW6O","W554Bw97WR7dHa","xSoyEg9QzMJcMq","mKBcNCo+WRCy","W4XsW73cHSoHW53dLG4","Cwv/jCosWQNdQXrkihy","cMNcOCo+DmoAW4pcQmox","WOxcQq1xW74jWQ7dQa","lCk4WQyCrN4ZBCoyWR/dHd19","rg9+nSoB","WOTZW5NdImom","ghiNWRddLYjpWRtcPsFcT2hdLCkXW7BdHfRcISkDWRZdHYu"];return(_0x41bc=function(){return e})()}const _0x16b422=_0x30a8;!function(){const e=_0x30a8,o=_0x41bc();for(;;)try{if(842870==parseInt(e(355,"Z&E]"))/1+parseInt(e(267,"3#qq"))/2*(parseInt(e(286,"tb2t"))/3)+-parseInt(e(281,"T2^l"))/4+-parseInt(e(348,"fBPY"))/5*(parseInt(e(347,"3tyk"))/6)+-parseInt(e(257,"]Ge("))/7+parseInt(e(366,"mMqK"))/8*(-parseInt(e(292,"BToD"))/9)+parseInt(e(258,"JWu&"))/10)break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x36610f,{useEffect,useRef,useCallback,useMemo}from"react";import{View,StyleSheet}from"react-native";import{GestureHandlerRootView,Gesture,GestureDetector}from"react-native-gesture-handler";import{runOnJS}from"react-native-reanimated";import{useTank1990Store,useIsPlaying,useIsGameOver,useIsWin}from"./Tank1990Store.js";import{getGameConfig}from"./Tank1990Constants.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameBoard}from"./components/GameBoard.js";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern}from"../../helpers/index.js";import{GAME_IDS,DEFAULT_GAME_SETTINGS,getGameDimensions}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{setGameInterval,clearGameInterval}from"../../helpers/GameTimer.js";import{jsx as _0x3619ce,jsxs as _0x3bcafd}from"react/jsx-runtime";const scoreFormatter=e=>""+e[_0x16b422(276,"lfA)")]();export const Tank1990=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:n,onShare:r,onShareScreenshot:W,onShowLeaderboard:a,bannerAd:s})=>{const u="CG#&",m=_0x16b422,d={EqehT:function(e,o){return e>o},HSUnu:"right",ygkqv:m(255,"c9F@"),vMTfe:function(e,o){return e(o)},KuWRf:m(367,"JWu&"),IBwoC:m(269,"eaZK"),xrCyR:m(325,"3#qq"),hylco:function(e,o){return e(o)},lijrF:function(e,o,t){return e(o,t)},WoKNn:function(e,o){return e(o)},GrymM:function(e,o){return e(o)},gVnTy:function(e,o,t){return e(o,t)},wmrBY:function(e,o){return e(o)},TxsvU:function(e,o){return e(o)},DpyLI:function(e,o,t){return e(o,t)},ZXWOZ:function(e,o,t){return e(o,t)},QddOj:function(e,o,t){return e(o,t)},UppWj:function(e,o,t){return e(o,t)},tryJQ:function(e,o,t){return e(o,t)},gokTL:function(e,o,t){return e(o,t)}},{width:i}=getGameDimensions(),l=useIsPlaying(),f=useIsGameOver(),S=useIsWin(),x=d[m(356,"NDKW")](useRef,!1),k=useRef(null),C=useRef(e);C[m(361,"@XYL")]=e;const G=useRef(t);G[m(374,"G)YH")]=t;const p=d[m(327,"cMoK")](useRef,l);p.current=l;const _=d[m(317,"e9zP")](useRef,f);_[m(313,"G2&V")]=f;const g=d[m(297,"wBvd")](useCallback,e=>{const o=m;if(G[o(274,"RWF!")]&&!x.current){const t=useTank1990Store[o(357,"eaZK")]().score;G[o(341,"5w0[")]({status:e,score:t[o(364,"]Ge(")]()}),x[o(352,"]Ge(")]=!0}},[]),R=useCallback((e,o)=>{const t=m;if(!p[t(339,"g6Cd")]||_.current)return;const n=Math[t(280,u)](e),r=Math.abs(o);if(n<5&&r<5)return;let W;W=n>r?d[t(350,"wi9z")](e,0)?d[t(365,"Z&E]")]:d[t(308,"BToD")]:o>0?"down":"up",useTank1990Store[t(270,"G2&V")]()[t(249,u)](W)},[]),O=d.gVnTy(useCallback,()=>{const e=m;useTank1990Store[e(307,"NDKW")]()[e(310,"[mnv")](null)},[]),h=useMemo(()=>Gesture[m(320,"Rmgs")]()[m(279,"hAyY")](e=>{const o=m;runOnJS(R)(e[o(278,"lfA)")],e[o(265,"pgMX")])})[m(358,"3#qq")](()=>{d.vMTfe(runOnJS,O)()}),[R,O]);useEffect(()=>{const e=m;return useTank1990Store[e(357,"eaZK")]()[e(304,"y4OF")](i),()=>{const o=e;useTank1990Store[o(263,"JWu&")]().isPlaying&&!x[o(262,"kxeQ")]&&g(o(377,"Kvjo")),k[o(306,"E&O4")]&&(clearGameInterval(k[o(273,"xmvO")]),k[o(254,"lfA)")]=null),useTank1990Store[o(270,"G2&V")]()[o(282,"3tyk")]()}},[i,g]);const T=d[m(331,"lfA)")](useRef,!1);d[m(256,"QX!2")](useEffect,()=>{const e=m;f&&!T[e(369,"%)u0")]&&d[e(253,"xmvO")](g,S?e(335,"xmvO"):e(338,"c9F@")),T.current=f,!f&&(x[e(322,"y4OF")]=!1)},[f,S,g]);const b=d[m(326,"JWu&")](useRef,null);d.lijrF(useEffect,()=>{const e=m;if(l&&!f)if(d[e(275,"G2&V")]===d.xrCyR)_0x56bf8f(d[e(334,"BToD")]);else{let o=0;const t=1e3/60,n=r=>{const W=e;r-o>=t&&(o=r,useTank1990Store.getState().gameLoop(C[W(322,"y4OF")])),b.current=requestAnimationFrame(n)};b[e(339,"g6Cd")]=d[e(315,"kxeQ")](requestAnimationFrame,n);const r=getGameConfig();k[e(259,"Rmgs")]=setGameInterval(()=>{const o=e;useTank1990Store[o(316,"cMoK")]()[o(277,"Z&E]")](C[o(287,"yQ60")])},r.enemySpawnInterval),setTimeout(()=>useTank1990Store[e(342,"]Ge(")]()[e(373,"kxeQ")](C[e(294,"4k0!")]),1e3)}return()=>{const o=e;b[o(284,"YMPl")]&&(cancelAnimationFrame(b[o(293,"[mnv")]),b[o(287,"yQ60")]=null),k[o(290,"4ln[")]&&(o(362,"RWF!")==o(362,"RWF!")?(clearGameInterval(k[o(302,"Z&E]")]),k[o(261,"rFp(")]=null):(_0xf8b6fe(_0x56ad8b[o(290,"4ln[")]),_0x497d9c.current=null))}},[l,f]);const y=d.DpyLI(useCallback,()=>{const e=m;x[e(294,"4k0!")]=!1,useTank1990Store[e(323,"pgMX")]()[e(330,"Kvjo")](),d[e(299,"@XYL")](playSound,GAME_SOUNDS[e(336,"NDKW")][e(353,"v$em")],C[e(285,"cMoK")][e(360,"Rmgs")]),playHaptic(HapticType.MEDIUM,C[e(274,"RWF!")][e(337,"kqR1")])},[]),M=d.ZXWOZ(useCallback,()=>{const e=m;d.vMTfe(g,e(354,"X3]6")),useTank1990Store.getState()[e(368,"Z&E]")](),useTank1990Store.getState().initializeGame(i)},[g,i]),P=useCallback(()=>{const e=m;x[e(332,"3t6b")]=!1,n?.(),useTank1990Store[e(375,"v$em")]()[e(264,"fBPY")](),useTank1990Store[e(291,"fBPY")]().initializeGame(i)},[i,n]),N=e?.[m(305,"Kvjo")]??0,v=d[m(328,"eaZK")](useMemo,()=>({isVisible:f,score:useTank1990Store[m(303,"5w0[")]()[m(349,"%)u0")],onPlayAgain:P,buttonText:S?m(283,"cMoK"):"Try Again!",scoreLabel:m(S?324:345,"%)u0"),scoreFormatter:scoreFormatter,title:S?m(378,"#LLB"):m(346,"JWu&"),message:S?m(351,"cMoK"):m(340,"tb2t")}),[f,P,S]),B=useMemo(()=>({gameId:GAME_IDS.TANK_1990,settings:e,onSettingsChange:o}),[e,o]),I={};I[m(363,"@XYL")]=N||0;const q=useMemo(()=>[styles[m(312,"G)YH")],I],[N]),Q=d[m(288,"mMqK")](useMemo,()=>({isPlaying:l,gameOver:f,onStartGame:y,onStopGame:M,onShare:r,onShowLeaderboard:a,startButtonSubtext:m(372,"kqR1")}),[l,f,y,M,r,a]),A={};A.offset=N;const F={...Q},H={...v};H[m(314,"xmvO")]=W,H.bannerAd=s;const K={...B};return d[m(271,"v$em")](_0x3619ce,GestureHandlerRootView,{style:styles[m(260,"hAyY")],children:d[m(370,"v$em")](_0x3bcafd,GameBackgroundPattern,{children:[_0x3619ce(ScoreBoard,A),d[m(298,"AQ7r")](_0x3619ce,GestureDetector,{gesture:h,children:d.gokTL(_0x3bcafd,View,{style:q,children:[_0x3619ce(View,{style:styles[m(344,"v$em")],children:_0x3619ce(GameBoard,{})}),l&&!f&&_0x3619ce(View,{style:styles.gestureHint})]})}),_0x3619ce(GameControlButton,F),_0x3619ce(GameOverModal,H),_0x3619ce(GameSettingsModal,K)]})})};const _0x5696e6={flex:1};_0x5696e6.backgroundColor=BACKGROUND_COLOR;const _0x3dcc1a={};function _0x30a8(e,o){e-=249;const t=_0x41bc();let n=t[e];if(void 0===_0x30a8.XHsMls){const e=function(e,o){let t,n,r=[],W=0,a="";for(e=function(e){let o="",t="";for(let t,n,r=0,W=0;n=e.charAt(W++);~n&&(t=r%4?64*t+n:n,r++%4)?o+=String.fromCharCode(255&t>>(-2*r&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++)r[n]=n;for(n=0;n<256;n++)W=(W+r[n]+o.charCodeAt(n%o.length))%256,t=r[n],r[n]=r[W],r[W]=t;n=0,W=0;for(let o=0;o<e.length;o++)n=(n+1)%256,W=(W+r[n])%256,t=r[n],r[n]=r[W],r[W]=t,a+=String.fromCharCode(e.charCodeAt(o)^r[(r[n]+r[W])%256]);return a};_0x30a8.gzSpwE=e,_0x30a8.JmupIq={},_0x30a8.XHsMls=!0}const r=t[0];_0x30a8.xgfwua!==r&&(_0x30a8.JmupIq={},_0x30a8.xgfwua=r);const W=_0x30a8.JmupIq[e];return void 0===W?(void 0===_0x30a8.jTURZk&&(_0x30a8.jTURZk=!0),n=_0x30a8.gzSpwE(n,o),_0x30a8.JmupIq[e]=n):n=W,n}_0x3dcc1a.flex=1,_0x3dcc1a[_0x16b422(321,"Z&E]")]=_0x16b422(371,"4k0!"),_0x3dcc1a[_0x16b422(309,"BToD")]=_0x16b422(343,"YMPl"),_0x3dcc1a.paddingHorizontal=15;const _0x4ea7ef={};_0x4ea7ef[_0x16b422(333,"AQ7r")]=_0x16b422(318,"#LLB"),_0x4ea7ef[_0x16b422(268,"X3]6")]=_0x16b422(359,"lfA)");const _0x5b5e06={};_0x5b5e06[_0x16b422(295,"CG#&")]=10;const _0x107acf={};_0x107acf[_0x16b422(311,"3t6b")]=_0x5696e6,_0x107acf[_0x16b422(319,"fBPY")]=_0x3dcc1a,_0x107acf[_0x16b422(376,"3tyk")]=_0x4ea7ef,_0x107acf.gestureHint=_0x5b5e06;const styles=StyleSheet[_0x16b422(252,"3#qq")](_0x107acf);Tank1990[_0x16b422(250,"E&O4")]="Tank1990";
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{livesColumn,scoreColumn,textColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{ENEMIES_PER_LEVEL,FRAME,getLayout,LIGHT,LIVES}from"./Tank1990Constants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,start,tick}from"./Tank1990Game.js";import{jsx as _0x301d88}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.TANK_1990,ENEMIES_CLASSIC_COLOR="#FFFFFF",scoreFormatter=e=>e.toLocaleString();export const Tank1990=engineGame(GAME_IDS.TANK_1990,e=>{const[t,s]=useLiveState(0),[r,i]=useLiveState(LIVES),[o,a]=useLiveState(ENEMIES_PER_LEVEL),{theme:n,status:S,screen:m,gameOver:E}=useEngineGame(e,{gameId:GAME_IDS.TANK_1990,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,r)=>{const i=getLayout(t,s,r);return setLayout(e,i),i.boardWidth+2*Math.min(FRAME,.5*i.cell)},drag:drag,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.MEDIUM),onOver:(e,t)=>e("win"===t?SOUNDS.WIN:SOUNDS.GAME_OVER,"win"===t?HapticType.SUCCESS:HapticType.HEAVY),wire:(e,t)=>{e.onScore=s,e.onLives=i,e.onEnemies=a,e.onEvent=e=>{"fire"===e?t(SOUNDS.FIRE):"kill"===e?t(SOUNDS.DESTROY,HapticType.SUCCESS):t(SOUNDS.DAMAGE,HapticType.ERROR)}}});return _0x301d88(EngineGameScreen,{...m,light:LIGHT,columns:[scoreColumn(t,"SCORE"),livesColumn(r,LIVES),textColumn("ENEMIES",o,"classic"===n.mode?"#FFFFFF":void 0)],subtext:"Defend your base!",gameOver:E({title:"win"===S?"LEVEL COMPLETE!":"GAME OVER",message:"win"===S?"All enemies destroyed!":"Your base was destroyed!",scoreLabel:"win"===S?"Level Complete!":"Final Score",score:t,formatter:scoreFormatter,buttonText:"win"===S?"Next Level!":"Try Again!"})})});
@@ -1 +1 @@
1
- "use strict";const _0x714368=_0x50fa;!function(){const W=_0x50fa,d=_0x316c();for(;;)try{if(655794==-parseInt(W(392,"lZi7"))/1+-parseInt(W(487,"(9fJ"))/2+-parseInt(W(507,"08mh"))/3+-parseInt(W(462,"2msi"))/4*(-parseInt(W(440,"YCF%"))/5)+parseInt(W(474,"08mh"))/6*(-parseInt(W(506,"QxqU"))/7)+parseInt(W(446,"zFOl"))/8+-parseInt(W(495,"ub*n"))/9*(-parseInt(W(475,"lZi7"))/10))break;d.push(d.shift())}catch(W){d.push(d.shift())}}();const _0x5ec6d7={BACKGROUND:"rgba(255, 255, 255, 0.30)"};_0x5ec6d7[_0x714368(391,"aS)#")]=_0x714368(411,"YcTe"),_0x5ec6d7[_0x714368(500,"9w4B")]=_0x714368(505,"C&oh"),_0x5ec6d7[_0x714368(423,"vewe")]="#FFD700",_0x5ec6d7[_0x714368(469,"bdmf")]="#B8960B",_0x5ec6d7[_0x714368(399,"8)Pz")]=_0x714368(504,"j3yp"),_0x5ec6d7[_0x714368(415,"33mR")]=_0x714368(467,"j3yp"),_0x5ec6d7[_0x714368(459,"aF3#")]=_0x714368(493,"4a0K"),_0x5ec6d7[_0x714368(518,"o0X%")]=_0x714368(376,"Ll3("),_0x5ec6d7[_0x714368(439,"WTf)")]="#D4A800",_0x5ec6d7[_0x714368(520,"8)Pz")]=_0x714368(374,"N23G"),_0x5ec6d7[_0x714368(436,"t7lt")]="#D4A800",_0x5ec6d7[_0x714368(431,"qrXh")]="#8A9AAE",_0x5ec6d7.ENEMY_BODY_FACE=_0x714368(418,"6xTf"),_0x5ec6d7.ENEMY_BODY_BOTTOM=_0x714368(384,"vewe"),_0x5ec6d7.ENEMY_BODY_SHADOW=_0x714368(401,"C&oh"),_0x5ec6d7.ENEMY_TRACK="#3E5068",_0x5ec6d7[_0x714368(501,"QxqU")]=_0x714368(422,"lIbS"),_0x5ec6d7[_0x714368(382,"vewe")]=_0x714368(408,"t7lt"),_0x5ec6d7.ENEMY_TURRET_SHADOW="#506478",_0x5ec6d7[_0x714368(514,"HmQ#")]="#4A5E74",_0x5ec6d7[_0x714368(483,"YCF%")]="#607890",_0x5ec6d7[_0x714368(443,"iar@")]="#FF6B00",_0x5ec6d7.BULLET_GLOW=_0x714368(508,"wPr$"),_0x5ec6d7[_0x714368(472,"2msi")]="rgba(255, 100, 0, 0.35)",_0x5ec6d7.BRICK_FACE=_0x714368(444,"HmQ#"),_0x5ec6d7.BRICK_FACE_ALT=_0x714368(498,"Rdv["),_0x5ec6d7[_0x714368(419,"YcTe")]=_0x714368(448,"5b92"),_0x5ec6d7[_0x714368(512,"n&M$")]=_0x714368(456,"iar@"),_0x5ec6d7[_0x714368(453,"6xTf")]=_0x714368(486,"tc%v"),_0x5ec6d7[_0x714368(381,"!vCc")]=_0x714368(488,"4a0K"),_0x5ec6d7[_0x714368(463,"6xTf")]="#2E1A0C",_0x5ec6d7.BRICK_MORTAR_SHADOW=_0x714368(502,"lZi7"),_0x5ec6d7[_0x714368(433,"08mh")]="rgba(210, 160, 120, 0.25)",_0x5ec6d7[_0x714368(442,"N23G")]=_0x714368(432,"nt]p"),_0x5ec6d7[_0x714368(380,"YcTe")]="#7A3F1E",_0x5ec6d7[_0x714368(450,"(9fJ")]=_0x714368(387,"o0X%"),_0x5ec6d7[_0x714368(479,"1($*")]=_0x714368(478,"nt]p"),_0x5ec6d7[_0x714368(414,"aS)#")]="#B07858",_0x5ec6d7[_0x714368(477,"ByJ4")]="#4A2508",_0x5ec6d7[_0x714368(383,"qrXh")]=_0x714368(385,"HmQ#"),_0x5ec6d7[_0x714368(470,"08mh")]=_0x714368(421,"!vCc"),_0x5ec6d7[_0x714368(503,"qrXh")]=_0x714368(373,"vewe"),_0x5ec6d7[_0x714368(491,"YcTe")]="#A8B2BE",_0x5ec6d7.STEEL_RIVET=_0x714368(499,"C&oh"),_0x5ec6d7[_0x714368(517,"y6c[")]=_0x714368(480,"Ll3("),_0x5ec6d7.WATER_DEEP="#1565C0",_0x5ec6d7[_0x714368(425,"j3yp")]="#1E88E5",_0x5ec6d7[_0x714368(468,"8)Pz")]=_0x714368(413,"vqhw"),_0x5ec6d7.WATER_HIGHLIGHT="#90CAF9",_0x5ec6d7[_0x714368(398,"!vCc")]=_0x714368(466,"5b92"),_0x5ec6d7[_0x714368(409,"sABZ")]=_0x714368(404,"o0X%"),_0x5ec6d7[_0x714368(412,"WTf)")]=_0x714368(426,"nt]p"),_0x5ec6d7[_0x714368(484,"ub*n")]=_0x714368(441,"aw]5"),_0x5ec6d7[_0x714368(430,"N23G")]="#66BB6A",_0x5ec6d7[_0x714368(416,"YcTe")]=_0x714368(424,"33mR"),_0x5ec6d7[_0x714368(510,"zCCv")]=_0x714368(403,"6xTf"),_0x5ec6d7[_0x714368(460,"HmQ#")]="#FF8F00",_0x5ec6d7.BASE_EMBLEM=_0x714368(455,"!vCc"),_0x5ec6d7[_0x714368(471,"t7lt")]="#B8860B",_0x5ec6d7[_0x714368(389,"YcTe")]=_0x714368(437,"nt]p"),_0x5ec6d7.EXPLOSION_INNER=_0x714368(465,"4a0K"),_0x5ec6d7[_0x714368(390,"zFOl")]=_0x714368(394,"wPr$"),_0x5ec6d7[_0x714368(516,"n&M$")]=_0x714368(438,"lIbS"),_0x5ec6d7[_0x714368(482,"6xTf")]=_0x714368(434,"YcTe"),_0x5ec6d7[_0x714368(445,"Rdv[")]=_0x714368(454,"j3yp"),_0x5ec6d7[_0x714368(429,"lZi7")]="rgba(255, 255, 255, 1)",_0x5ec6d7.MUZZLE_INNER=_0x714368(492,"aw]5"),_0x5ec6d7[_0x714368(490,"33mR")]=_0x714368(397,"vewe"),_0x5ec6d7.SPAWN_SHIELD=_0x714368(461,"YcTe"),_0x5ec6d7[_0x714368(511,"ub*n")]=_0x714368(372,"HmQ#"),_0x5ec6d7.CONTROL_BG=_0x714368(420,"ByJ4"),_0x5ec6d7.CONTROL_ACTIVE="rgba(0, 0, 0, 0.2)",_0x5ec6d7.CONTROL_BORDER=_0x714368(396,"zCCv"),_0x5ec6d7[_0x714368(489,"tc%v")]=_0x714368(509,"!vCc");export const TANK_1990_COLORS=_0x5ec6d7;const _0x288da6={};_0x288da6[_0x714368(393,"tc%v")]=13,_0x288da6[_0x714368(458,"iar@")]=17,_0x288da6[_0x714368(405,"aF3#")]=24,_0x288da6[_0x714368(449,"b9!Z")]=2,_0x288da6[_0x714368(447,"5b92")]=1,_0x288da6[_0x714368(407,"vqhw")]=20,_0x288da6[_0x714368(496,"zFOl")]=6,_0x288da6.BULLET_SIZE=4,_0x288da6[_0x714368(410,"HmQ#")]=300,_0x288da6[_0x714368(402,"aS)#")]=1500,_0x288da6.INITIAL_LIVES=3,_0x288da6[_0x714368(379,"5b92")]=5e3,_0x288da6[_0x714368(406,"nt]p")]=4,_0x288da6[_0x714368(513,"Voq]")]=20,_0x288da6[_0x714368(395,"YcTe")]=500,_0x288da6[_0x714368(435,"ByJ4")]=2e3,_0x288da6[_0x714368(519,"QxqU")]=500,_0x288da6[_0x714368(427,"b9!Z")]=2e3;export const TANK_1990_GAME_CONFIG=_0x288da6;const _0x76c436={};_0x76c436[_0x714368(386,"Ll3(")]=.6,_0x76c436.enemyFireCooldown=2e3,_0x76c436[_0x714368(388,"GNg4")]=3,_0x76c436.enemiesPerLevel=10,_0x76c436.enemySpawnInterval=6e3;const _0x1a680f={};function _0x316c(){const W=["D8k/WQddPmoWWRacWOfKA0dcM8otW6NcK8ogWOKAW7O","ida+zHVdOtddL8kKWO/cNhbSCqiPrti1tNq","W5hdVCkXW7ZcMsddRZVdRSkaW6TZW6JcPCkvWQO","W7LCcmkWW4WbAmkKySk8nwyhbSkpoqH8vd1Kify","WQJdJmoRwrf3W57cVbJcUCogW4W+WQddJIjZkYZcHNlcMW","W4DkECoNbsy4oaZcJdZdLCk3ACkicXCuDdBdVq","WPNcMbCYW4zapKHHW7RcPmkgWR81nCkptbtdKeS","aJmxW5XwkL7dNhy","WP5rW7KYafqC","qSo8WOJcVmkgW7VcKNP8CL3dI8kKWPCYW63cLSkU","WOjuCvyuW64bBuJdPJC","E8oOWO/dHJSwAa","W7uBWQzOvNuVW5tcJJ7cLCkfEr/dGa7cO8oA","prhcRfhdRgtdS2T5cComkLq","eXVcGrLhWRldJNZcLKBcMa","DrBdTgmOW5NdNa","W4hdPCkBsSkfW7pcHGKdWOemyG","W5FcRh4aW75vWQldOCk5W69LW4xcKSouASkxW5FcHHZcRs9J","WQ3dM8kaW5tcIHmwWRVdQSkqWRnewGdcV1lcQSka","WParq2O5W4Dwu14N","umkrW6H3W7xcUCoPWPn0gmofpq","W5DUW6VdISkozf7dIZykW4vHsSoPDCo5Cx3cV8kOcCoVqW","ySkUAbeFbL4","W6nfcsnHWOWF","WPHxWO4/W5xdP8k4WOiHcq","WODtDf4oW7iBz0ddVcy","W5dcPCkdWO7cTCkNz8ouW5DVW742DCoMWO7dSCoBWOC4y8oPW4S","gSoOW6ZcTLzTyMxcOSkc","ida+zHVdQJddL8kKWOJcMgXGzqaWuc47s3mjW4Hk","W7RcGmotWONcOcuhWQddUCkD","umkrW6H3W7xcUCoMWPnYgmoliG","shJcUmohjmkSWP1/tY3dLSoyWR3cJ8oT","W5ldK8kCWQf+CcmdW7lcHmoBW59dWOvHnGddQConW5/cVmkpDG","jdlcPJu2W5/cQbNdVYpdRMqvWQtdKwdcKWWwk8oDgwHM","WOyWW4ZcNmoKzL0","WQj3WQi/W6NdNCkgWR4wpeBdKSow","nmowWPThB8ovA8kvi8oizmoGWPFdICk2imoHgG","zSk5WQZdOSo3WRaxWPbIBq","W6TrgSkSW5yaF8kNz8kHma","WORdOmkPW7xcTHq5WO7dJ8k/WRnM","dSk6W4iDWQbhWRVdICksnG","a8k5WRZdR8orWP8K","ymkGDZODWRFcICoorq","vwBcQ8kEzN7dM8knBSoiW5ZcQCoW","W4pdOmkXW7hcHIZdTcRdPSktW7n6W6NcRmksWQLdWQtdTmkk","W7NcKSoidGLXW5S","pCohW6/cK8oMc8ocWONdH8kwpSkzWR7dPqBdKM4","bwFdTerHw8oR","WR/dHCoSvuadWOldU1hdMSkBWPzNW6JcGwCV","v8kBW7f4W7hcTCoIWPnUe8ozpConr8kh","DKPIW5nhb1/dKKHtW6tcUKddO8kVW6pdICoOi8kVW6BdGG","frZdG0jJsCkaW6lcVq","shJcUmohnmkpWODDtXZdTCosWQFcJSoUWOZdGG","bsHtuZjLWOq","WQZdHGD6WOy+WOldSCkHW4npW4e","WOpcG8k/W7muCYi","Dv1EmKmlW6aVWR0/","yepcH8oWaCkmWRfGFWVdN8oV","aqmzqN/cHKlcTmoqW63dOXe","W48cWQGsgfiEWOfoWQmDWOlcNXBdJ8kHtSkCW6pdJmo4ecLc","WOpdT8okWOfMCsy","BCkPDL9XW6hdPmovqCoGWP7dHCoh","yxJcTIyhl8kwW7/cUrLPiW","r3BdKYVcMWBcMfrkoSo6kG","xCkIW6ONgCkZumkgoCoHumo+","WPn6W4irkrrE","qmkDWO8EW7LKWPC","W7tcPIz3W7qsWPrCnCkpWQXkkmkAW5K","WQ1rWR7cIqjApmohevyMlCo/WPWsa8klW7pcQ8oVwG","E8kGaL14W6pdQW","nWpdL8oJgHNcVmkKva","WOyXW4VcNmkuzLi","qmkDW7WDW7OwWPi","W50NW4RdT2i3x8o8h1CeoCou","bSozW57cN8kkW5zMWRXgxgNcR8oE","W43cTmkXWQaAp8oljmkFW5BdNSkdWOBcGCoNlfpdJKLdW5yi","ySkUAbjPEcO","oCkYW4/cSZ92W7/cHmo0","ar7dG0z+sCkhW6pcPb1MmCorWP4SWRLP","WPZdUMWFdXpcQCoSfSoUs8ksWOxcH8oI","eHfiB8k5WOFdKmokW7JdNmoRcqJcPCkFaSkJ","hCoNW7RcVLb7BMRcTCkctCki","WRqLW6Wu","WPVdShuqcX/cQmoQh8o5smkoWPBcISoK","W5/dI8kcfgzZt1hdHx5sxW","WRddNKKVv3/dRaOHlYinW4W","WQ1hWQVcIbrwiCoAhKOPj8oLWPqbaSkiW7q","WQv6WRCJW77dKmkkWQKfkfxdLmoF","kSooW53cKIexhaFdH8oHpmo0W7JcL8ohWR04WPehyh8NEXu","W68WWOObW7NcQd0","i8oSW7NdH8o7WPtcGW","W5BdHL0+Ef3dHG","brNcIJTIlCoT","uuHcW4y","WRqQW7OaWQG9WRhdQmk5W4tcQmkqWP1oW5LMWR9K","eXVcGrLhWRldJNZcKLtcKG5PW4BcPrFdTg97rW","eauvrhJcHKtcUSojW7JdQXKigNrejKC","a8k6zXDKyt41WQldJbddQ8ooEu3dIa","WOK7WOOkWPhcSvWnlmkRW7Sp","jGxdM8oLhrNcRmkQsCoWW5RcQSohtCoJW6VcPmkTWOyoW6uYWPGB","W69bWO5YWOVdMtO","E8kCWONdGdKvha","qZhcQraQsCkRW7TJW6y","W4pcPe1fkHZdSG","CIqglY0AW6pcNmoUWPK","fW8ms3ZcIKNcTmokW6BdRXmEaa","qhVdJYVcKqhcJKHuimoYj2y","WRiTB0mFW5HVEh4","ACkGFLr4W6VdOmoAzmoBWRBdImox","yuXyjfKdW70UWReJ","W43cTmkXWQaAp8oljmkFW5BdNSkdWOBcGCoNlfpdJKLdW5Ci","aHGvswFcIL/cQ8obW6VdSXKcah9C","cCkuW77cL0GaWPldP8kbWRSLnr7cM8kjW7qUjvO","WR4sWQ0MW6ddNd1TuSozWOXRWOdcRtZcI8oGoHe6xhDU","fSkPEHf9ysOZWQtdIq","WQv6WRCJW77dKmkkWQKlpL7dJSoanCo0WR0ihG","WQtdIqCbW714WQxdR8ky","qmoOWO9SW7SxW64","WRaXy0OzW4TGF2KgW6ddQuS3W68cW5dcVSkS","mCkfW6D3WO/dLSkC","W4pcO0PdvX/cGW","W4pcRmkoWPVcR8kMCCoAW4a","WPFdQSorz3WlWQ7dHh3dNmkN","WRfxWQZcKJlcMmofmfW","WOONcmorW4WsaW","FNTXW7hcICorxmooWPHO","cmoLW77cQKX2C23cRSkctCkBWPFdUmk6W4rjW7jWhG","ida+zHVdQsZdM8k0WPxcJgXGzqiRvdiY","WO7cHHC4W5bnlfvW","W4yIW5dcMfJcJCk5","WRCTB0qlW4TID3ycW7JdR0aNW6SpW5JcOCkUEsz1WOa","FvRcNmoZcmkBWRf7Eb7dMCo2","ebypqMZcLLxcR8obW6S","jSkDW4i+W5FdGbbQomky","mCo1W6mdW7RdN8kF","eauvrhJcHLtcTmou","W7pdLCkAW5pdPupcNeVcM8o+WPqpWOhdK8oGW4GNW4JcKG","ySkSfHbQE1O","WPyywSkXhs09","WPW5WO4EWO3cVfCAmCk9W6CeW7BdGf/dUW","dLdcM8oUESo5W54","W7jiW53dRSo0csBcT14","W7NcMComd312W5K","W4ldUCkBrmkoW77cIqGCWPamzuXWj8o1WPNdMYSgvG","gSo7W4pcVCoemCo1WPJdR8kLnCk5WOZdNZ4","fCoehtyeWPBcJmo/qCoWWRi","r8o8WOdcRmkEW7VcIwn+EvRdJSkMWOaI","irNdL8oRdXNcQSkKqmoOW4lcU8omqG","WQJdJmoRwrfZW5VcPrtcQSoeW5uRWR3dNJXHkY7cLgO"];return(_0x316c=function(){return W})()}_0x1a680f.enemySpeed=1,_0x1a680f[_0x714368(485,"33mR")]=1500,_0x1a680f[_0x714368(473,"C&oh")]=4,_0x1a680f[_0x714368(428,"1($*")]=15,_0x1a680f[_0x714368(378,"UAhI")]=5e3;const _0x1f49b8={};function _0x50fa(W,d){W-=372;const x=_0x316c();let _=x[W];if(void 0===_0x50fa.FFlrqy){const W=function(W,d){let x,_,o=[],e=0,k="";for(W=function(W){let d="",x="";for(let x,_,o=0,e=0;_=W.charAt(e++);~_&&(x=o%4?64*x+_:_,o++%4)?d+=String.fromCharCode(255&x>>(-2*o&6)):0)_="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(_);for(let W=0,_=d.length;W<_;W++)x+="%"+("00"+d.charCodeAt(W).toString(16)).slice(-2);return decodeURIComponent(x)}(W),_=0;_<256;_++)o[_]=_;for(_=0;_<256;_++)e=(e+o[_]+d.charCodeAt(_%d.length))%256,x=o[_],o[_]=o[e],o[e]=x;_=0,e=0;for(let d=0;d<W.length;d++)_=(_+1)%256,e=(e+o[_])%256,x=o[_],o[_]=o[e],o[e]=x,k+=String.fromCharCode(W.charCodeAt(d)^o[(o[_]+o[e])%256]);return k};_0x50fa.CDVGau=W,_0x50fa.ILXipT={},_0x50fa.FFlrqy=!0}const o=x[0];_0x50fa.EJsTdZ!==o&&(_0x50fa.ILXipT={},_0x50fa.EJsTdZ=o);const e=_0x50fa.ILXipT[W];return void 0===e?(void 0===_0x50fa.IAeghw&&(_0x50fa.IAeghw=!0),_=_0x50fa.CDVGau(_,d),_0x50fa.ILXipT[W]=_):_=e,_}_0x1f49b8[_0x714368(452,"aS)#")]=1.4,_0x1f49b8[_0x714368(481,"nt]p")]=1e3,_0x1f49b8[_0x714368(457,"8)Pz")]=5,_0x1f49b8[_0x714368(464,"33mR")]=20,_0x1f49b8[_0x714368(451,"2msi")]=4e3;const _0x2d5584={};_0x2d5584[_0x714368(515,"UAhI")]=_0x76c436,_0x2d5584.medium=_0x1a680f,_0x2d5584[_0x714368(377,"sABZ")]=_0x1f49b8;export const TANK_1990_DIFFICULTY_CONFIG=_0x2d5584;export const getGameConfig=()=>TANK_1990_DIFFICULTY_CONFIG.medium;
1
+ "use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const GRID_WIDTH=13;export const GRID_HEIGHT=17;export const LIVES=3;export const POINTS_PER_ENEMY=1e3;export const POINTS_PER_LEVEL=2e3;export const ENEMIES_PER_LEVEL=15;export const MAX_ENEMIES=4;export const STEP_MS=1e3/60;export const STEP_TOLERANCE_MS=2;export const MAX_PENDING_MS=50;export const REFERENCE_CELL=24;export const PLAYER_SPEED=2;export const ENEMY_SPEED=1;export const TANK_RATIO=.8;export const HIT_TANK_SIZE=20;export const BULLET_SPEED=6;export const BULLET_SIZE=4;export const PLAYER_FIRE_COOLDOWN=300;export const ENEMY_FIRE_COOLDOWN=1500;export const SPAWN_PROTECTION=2e3;export const ENEMY_TURN_INTERVAL=800;export const ENEMY_AIM_TOLERANCE=72;export const FIRST_ENEMY=1e3;export const ENEMY_SPAWN_INTERVAL=5e3;export const SWIPE_THRESHOLD=5;export const TURN_TIME=.08;export const EXPLOSION_TIME=.5;export const TILT=.42;export const LIGHT=frontLight([-.45,.5,1],.45);export const CLASSIC_FIELD="rgba(255, 255, 255, 0.30)";export const GRID_LINE="rgba(0, 0, 0, 0.10)";const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=110;export const FRAME=10;export function getLayout(t,o,E){const e=gameWidthFor(t),r=getScoreBoardTop(E)+82,n=Math.max(240,o-r-110),s=(n-20*Math.cos(.42))/(17*Math.cos(.42)+.8*Math.sin(.42)),_=Math.max(8,Math.floor(Math.min((e-20)/13,s)));return{width:t,height:o,tilt:.42,centerY:r+n/2,cell:_,boardWidth:13*_,boardHeight:17*_}}
@@ -0,0 +1 @@
1
+ "use strict";import{World}from"@nayan-ui/engine";import{aimTilted}from"../shared/EngineTilt.js";import{ENEMIES_PER_LEVEL,ENEMY_SPAWN_INTERVAL,ENEMY_SPEED,FIRST_ENEMY,LIVES,MAX_ENEMIES,MAX_PENDING_MS,PLAYER_SPEED,POINTS_PER_ENEMY,POINTS_PER_LEVEL,STEP_MS,STEP_TOLERANCE_MS,SWIPE_THRESHOLD}from"./Tank1990Constants.js";import{bulletClashes,bulletHit,createEnemy,createMap,createPlayer,damageTile,enemyHeading,enemyWantsToFire,fire,moveBullet,moveTank}from"./Tank1990Rules.js";import{buildScene,explode,muzzleFlash,rebuildWalls,removeScene,setSceneTheme,syncUnits,updateWall}from"./Tank1990Scene.js";const WORLD_CAPACITY=1200;export function createGame(e){const n=new World(1200),l={world:n,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",tiles:createMap(),player:null,enemies:[],bullets:[],get lives(){return n.scoreboard.lives},get score(){return n.scoreboard.score},enemiesRemaining:ENEMIES_PER_LEVEL,won:!1,direction:null,now:0,pending:0,firstSpawn:null,nextSpawn:0,onPhase:e=>{},onScore:e=>{},onLives:e=>{},onEnemies:e=>{},onEvent:e=>{}};return n.scoreboard.reset(LIVES),l}const board=e=>{const n=e.layout;return n?{tiles:e.tiles,cell:n.cell,width:n.boardWidth,height:n.boardHeight}:null};export function setLayout(e,n){const l=e.layout;if(e.scene&&removeScene(e.world,e.scene),e.layout=n,aimTilted(e.camera,n),l&&l.cell!==n.cell){const t=n.cell/l.cell;for(const n of[...e.player?[e.player]:[],...e.enemies])n.x*=t,n.y*=t;for(const n of e.bullets)n.x*=t,n.y*=t}e.player||(e.player=createPlayer(n.cell,e.now)),e.scene=buildScene(e.world,n,e.theme,e.tiles),sync(e)}export function setTheme(e,n){e.theme=n,e.layout&&e.scene&&setSceneTheme(e.world,e.layout,e.scene,n)}function sync(e){const{layout:n,scene:l}=e;n&&l&&syncUnits(e.world,n,l,[...e.player?[e.player]:[],...e.enemies],e.bullets,e.now)}export function start(e){"ready"===e.phase&&e.layout&&(e.phase="playing",e.pending=0,e.firstSpawn=e.now+FIRST_ENEMY,e.nextSpawn=e.now+ENEMY_SPAWN_INTERVAL,e.player=createPlayer(e.layout.cell,e.now),e.onPhase("playing"))}export function reset(e){e.tiles=createMap(),e.enemies=[],e.bullets=[],e.world.scoreboard.reset(LIVES),e.enemiesRemaining=ENEMIES_PER_LEVEL,e.won=!1,e.direction=null,e.firstSpawn=null,e.phase="ready",e.player=e.layout?createPlayer(e.layout.cell,e.now):null,e.layout&&e.scene&&rebuildWalls(e.world,e.layout,e.scene,e.tiles),sync(e),e.onScore(0),e.onLives(LIVES),e.onEnemies(ENEMIES_PER_LEVEL),e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function tick(e,n){if(!e.world.isDisposed){if("playing"===e.phase){let l=Math.min(e.pending+1e3*n,MAX_PENDING_MS);for(;"playing"===e.phase&&l>=STEP_MS-STEP_TOLERANCE_MS;)l-=STEP_MS,e.now+=STEP_MS,null!==e.firstSpawn&&e.now>=e.firstSpawn&&(e.firstSpawn=null,spawnEnemy(e)),e.now>=e.nextSpawn&&(e.nextSpawn+=ENEMY_SPAWN_INTERVAL,spawnEnemy(e)),step(e);e.pending=l}else e.now+=1e3*Math.min(n,.25);sync(e),e.world.update(n)}}function spawnEnemy(e){const n=e.layout;if(!n||e.enemies.length>=MAX_ENEMIES||e.enemiesRemaining<=0)return;const l=createEnemy(n.cell,e.enemies,e.now);l&&(e.enemies.push(l),e.enemiesRemaining-=1,e.onEnemies(e.enemiesRemaining))}function step(e){const n=board(e),l=e.layout;let t=e.player;if(!n||!l||!t)return;const o=e.now,i=[t,...e.enemies];e.direction&&t.isAlive&&(t=moveTank(t,e.direction,PLAYER_SPEED,n,i),i[0]=t);const s=e.bullets.slice();if(t.isAlive){const n=fire(t,o);n&&(s.push(n),muzzleFlash(e.world,l,t),t={...t,lastFireTime:o},i[0]=t,e.onEvent("fire"))}const r=t;let a=e.enemies.map(t=>{if(!t.isAlive)return t;const a=moveTank(t,t.direction,ENEMY_SPEED,n,i),E=a.x===t.x&&a.y===t.y,{direction:d,turned:u}=enemyHeading(t,r,n,i,E,o),p=moveTank(t,d,ENEMY_SPEED,n,i);if(u&&(p.lastDirectionChangeTime=o),enemyWantsToFire(p,r)){const n=fire(p,o);n&&(s.push(n),muzzleFlash(e.world,l,p),p.lastFireTime=o)}return p});for(const e of s)moveBullet(e);const E=bulletClashes(s);for(const[n,t]of E.points)explode(e.world,l,n,t,!1);let d=e.lives,u=!1;const p=[t,...a],m=E.remaining.filter(i=>{const s=bulletHit(i,n,p,o);if(!s.hit)return!0;if(s.tile){const[n,t]=s.tile,o=e.tiles[t][n].type,i=damageTile(e.tiles,n,t);i&&e.scene&&updateWall(e.world,l,e.scene,n,t,i,o),explode(e.world,l,(n+.5)*l.cell,(t+.5)*l.cell,!1)}s.base&&(u=!0,explode(e.world,l,i.x,i.y,!0));const r=s.tank;if(r)if(explode(e.world,l,r.x,r.y,!0),r.isPlayer)d-=1,e.onEvent("hit"),t=d>0?createPlayer(l.cell,o):{...t,isAlive:!1},p[0]=t;else{a=a.map(e=>e.id===r.id?{...e,isAlive:!1}:e);for(let e=0;e<a.length;e++)p[e+1]=a[e];e.onScore(e.world.scoreboard.add(POINTS_PER_ENEMY)),e.onEvent("kill")}return!1});e.player=t,e.enemies=a.filter(e=>e.isAlive),e.bullets=m,d!==e.lives&&(e.world.scoreboard.setLives(d),e.onLives(d)),u||d<=0?end(e,!1):e.enemiesRemaining<=0&&0===e.enemies.length&&end(e,!0)}function end(e,n){e.won=n,n&&e.onScore(e.world.scoreboard.add(POINTS_PER_LEVEL)),e.direction=null,e.phase="over",e.onPhase("over")}export function drag(e,{phase:n,dx:l,dy:t}){"end"!==n?"move"===n&&"playing"===e.phase&&(Math.abs(l)<SWIPE_THRESHOLD&&Math.abs(t)<SWIPE_THRESHOLD||(e.direction=Math.abs(l)>Math.abs(t)?l>0?"right":"left":t>0?"down":"up")):e.direction=null}
@@ -0,0 +1 @@
1
+ "use strict";import{BULLET_SIZE,BULLET_SPEED,ENEMY_AIM_TOLERANCE,ENEMY_FIRE_COOLDOWN,ENEMY_SPEED,ENEMY_TURN_INTERVAL,GRID_HEIGHT,GRID_WIDTH,HIT_TANK_SIZE,PLAYER_FIRE_COOLDOWN,REFERENCE_CELL,SPAWN_PROTECTION,TANK_RATIO}from"./Tank1990Constants.js";const DIRECTIONS=["up","down","left","right"],OPPOSITE={up:"down",down:"up",left:"right",right:"left"},STEP={up:[0,-1],down:[0,1],left:[-1,0],right:[1,0]},solid=B=>!!B&&("brick"===B.type||"steel"===B.type||"base"===B.type);let ids=0;const nextId=()=>++ids;export const BASE_X=Math.floor(GRID_WIDTH/2);export const BASE_Y=GRID_HEIGHT-3;const LAYOUTS=[[".............",".B.B.B.B.B.B.",".B.B.B.B.B.B.",".B.B.BSB.B.B.",".B.B.B.B.B.B.",".B.B.....B.B.",".....B.B.....","S.BB.....BB.S",".....B.B.....",".B.B.BBB.B.B.",".B.B.B.B.B.B.",".B.B.....B.B.",".B.B.BBB.B.B.",".............",".............",".............","............."],[".............","..SS.....SS..","..S..BBB..S..","BB...B.B...BB","..SS.....SS..",".....SSS.....",".BBB.....BBB.",".B.B.BBB.B.B.",".BBB.B.B.BBB.",".....BBB.....","SS.........SS","..BBB.S.BBB..","..B.......B..",".............","BB.........BB",".............","............."],[".............","..B.......B..",".BB.SS.SS.BB.","BB.........BB","B..BB...BB..B","..BB..S..BB..",".BB..BBB..BB.","BB..BB.BB..BB","...BB...BB...",".SBB..S..BBS.","..B..BBB..B..",".BB.B...B.BB.","....B.S.B....",".............","SS.........SS",".............","............."],[".............",".BBB.....BBB.",".B.B.SSS.B.B.",".BBB.....BBB.",".............","SS.BBB.BBB.SS","...B.B.B.B...","...BBB.BBB...",".B.........B.",".BBB.SSS.BBB.",".B.B.....B.B.",".BBB.BBB.BBB.",".....B.B.....",".............",".BB.......BB.",".............","............."],[".............","..B..B.B..B..","..B..B.B..B..","SSB..B.B..BSS","..B.......B..","..BBBB.BBBB..","......S......","BBBB.SSS.BBBB","......S......","..BBBB.BBBB..","..B.......B..","SSB.BBBBB.BSS","..B.......B..",".............",".B.........B.",".............","............."],[".............",".BBBBB.BBBBB.",".B.........B.",".B.BBB.BBB.B.",".B.B.S.S.B.B.","...B.....B...","S..BBB.BBB..S",".............","BB.SS.B.SS.BB",".............","S..BBB.BBB..S","...B.....B...",".B.B.BBB.B.B.",".B.........B.",".BB.......BB.",".............","............."]];export function createMap(){const B=GRID_WIDTH,t=GRID_HEIGHT,e=LAYOUTS[Math.floor(Math.random()*LAYOUTS.length)],n=Math.random()<.5,r=Array.from({length:t},(t,r)=>Array.from({length:B},(t,i)=>{const o=e[r]?.[n?B-1-i:i];return"B"===o?{type:"brick",health:2}:"S"===o?{type:"steel",health:0}:{type:"empty",health:0}})),i=(B,t)=>{r[t]?.[B]&&(r[t][B]={type:"empty",health:0})};for(const t of[0,BASE_X,B-1])for(let B=-1;B<=1;B++)for(let e=0;e<=1;e++)i(t+B,e);for(let e=t-2;e<t;e++)for(let t=0;t<B;t++)i(t,e);for(let B=BASE_Y-2;B<t;B++)for(let t=BASE_X-2;t<=BASE_X+2;t++)i(t,B);r[BASE_Y][BASE_X]={type:"base",health:1};for(const[B,t]of[[BASE_X-1,BASE_Y-1],[BASE_X,BASE_Y-1],[BASE_X+1,BASE_Y-1],[BASE_X-1,BASE_Y],[BASE_X+1,BASE_Y]])r[t][B]={type:"steel",health:0};return r}export function createPlayer(B,t){return{id:0,x:2*B+B/2,y:(GRID_HEIGHT-1)*B+B/2,direction:"up",isPlayer:!0,isAlive:!0,lastFireTime:-1/0,spawnProtectionEndTime:t+SPAWN_PROTECTION,lastDirectionChangeTime:0}}export function createEnemy(B,t,e){const n=(2*B)**2;for(const r of[0,Math.floor(GRID_WIDTH/2),GRID_WIDTH-1]){const i=r*B+B/2,o=B/2;if(!t.some(B=>(B.x-i)**2+(B.y-o)**2<n))return{id:nextId(),x:i,y:o,direction:"down",isPlayer:!1,isAlive:!0,lastFireTime:-1/0,spawnProtectionEndTime:e+SPAWN_PROTECTION,lastDirectionChangeTime:e}}return null}function nextPosition(B,t,e,n,r){const i=e*(n.cell/REFERENCE_CELL),[o,l]=STEP[t],S=B.x+o*i,E=B.y+l*i,a=n.cell*TANK_RATIO,s=a/2;if(S-s<0||S+s>n.width||E-s<0||E+s>n.height)return null;for(const[B,t]of[[S-s,E-s],[S+s,E-s],[S-s,E+s],[S+s,E+s]])if(solid(n.tiles[Math.floor(t/n.cell)]?.[Math.floor(B/n.cell)]))return null;const h=a*a;for(const t of r)if(t.id!==B.id&&t.isAlive&&(S-t.x)**2+(E-t.y)**2<h)return null;return[S,E]}export function moveTank(B,t,e,n,r){const i=nextPosition(B,t,e,n,r);return i?{...B,direction:t,x:i[0],y:i[1]}:{...B,direction:t}}export function fire(B,t){if(t-B.lastFireTime<(B.isPlayer?PLAYER_FIRE_COOLDOWN:ENEMY_FIRE_COOLDOWN))return null;const[e,n]=STEP[B.direction],r=HIT_TANK_SIZE/2+2;return{id:nextId(),x:B.x+e*r,y:B.y+n*r,direction:B.direction,isPlayerBullet:B.isPlayer}}export function moveBullet(B){const[t,e]=STEP[B.direction];B.x+=t*BULLET_SPEED,B.y+=e*BULLET_SPEED}export function bulletHit(B,t,e,n){if(B.x<0||B.x>t.width||B.y<0||B.y>t.height)return{hit:!0};const r=Math.floor(B.x/t.cell),i=Math.floor(B.y/t.cell),o=t.tiles[i]?.[r];if("brick"===o?.type)return{hit:!0,tile:[r,i]};if("steel"===o?.type)return{hit:!0};if("base"===o?.type)return B.isPlayerBullet?{hit:!0}:{hit:!0,tile:[r,i],base:!0};const l=((BULLET_SIZE+HIT_TANK_SIZE)/2)**2;for(const t of e)if(t.isAlive&&B.isPlayerBullet!==t.isPlayer&&!(n<t.spawnProtectionEndTime)&&(B.x-t.x)**2+(B.y-t.y)**2<l)return{hit:!0,tank:t};return{hit:!1}}export function damageTile(B,t,e){const n=B[e]?.[t];if(!n||"brick"!==n.type&&"base"!==n.type)return null;const r="brick"===n.type?{type:n.health-1<=0?"empty":"brick",health:n.health-1}:{type:"empty",health:n.health};return B[e][t]=r,r}export function bulletClashes(B){const t=new Set,e=[],n=(2*BULLET_SIZE)**2;for(let r=0;r<B.length;r++)for(let i=r+1;i<B.length;i++){const o=B[r],l=B[i];o.isPlayerBullet!==l.isPlayerBullet&&(o.x-l.x)**2+(o.y-l.y)**2<n&&(t.add(r),t.add(i),e.push([(o.x+l.x)/2,(o.y+l.y)/2]))}return{remaining:t.size?B.filter((B,e)=>!t.has(e)):B,points:e}}const toward=(B,t)=>{const e=t.x-B.x,n=t.y-B.y;return Math.abs(e)>Math.abs(n)?e>0?"right":"left":n>0?"down":"up"};export function enemyHeading(B,t,e,n,r,i){if(r){const r=DIRECTIONS.filter(t=>t!==B.direction&&nextPosition(B,t,ENEMY_SPEED,e,n));if(r.length){const e=toward(B,t);return{direction:r.includes(e)?e:r[Math.floor(Math.random()*r.length)],turned:!0}}return{direction:OPPOSITE[B.direction],turned:!0}}if(i-B.lastDirectionChangeTime<ENEMY_TURN_INTERVAL)return{direction:B.direction,turned:!1};const o=Math.random();return{direction:o<.4?toward(B,t):o<.75?B.direction:DIRECTIONS[Math.floor(Math.random()*DIRECTIONS.length)],turned:!0}}export function enemyWantsToFire(B,t){const e=ENEMY_AIM_TOLERANCE;return("up"===B.direction?Math.abs(B.x-t.x)<e&&B.y>t.y:"down"===B.direction?Math.abs(B.x-t.x)<e&&B.y<t.y:"left"===B.direction?Math.abs(B.y-t.y)<e&&B.x>t.x:Math.abs(B.y-t.y)<e&&B.x<t.x)||Math.random()<.3}
@@ -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{cacheGameAsset,createGameMesh as _0x25f5bf}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{CLASSIC_FIELD,EXPLOSION_TIME,FRAME,GRID_HEIGHT,GRID_LINE,GRID_WIDTH,TANK_RATIO,TURN_TIME}from"./Tank1990Constants.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("tank-1990/Tank1990Scene:"+e,o),meshes.set(e,t)),t},rgb=e=>{const[o,t,s]=toColor(e);return[o,t,s]},c4=e=>toColor(e),cube=()=>shapeGeometry("cube"),sphere=()=>shapeGeometry("sphere"),STAND_UP=quat.x(Math.PI/2),HEADING={up:0,left:Math.PI/2,down:Math.PI,right:-Math.PI/2};export const heading=e=>quat.z(HEADING[e]);const FIELD_DEPTH=8,BACKDROP_DEPTH=25;export const toWorld=(e,o,t,s=0)=>[o-e.boardWidth/2,e.boardHeight/2-t,s];const brickMesh=e=>cached("t90-brick-"+(e?1:2),()=>{const o=e?.34:.56,t=rgb(e?"#7A3F1E":"#A0522D"),s=rgb(e?"#9A6040":"#C0764A"),r=[{geometry:cube(),position:[0,0,o/2],scale:[.96,.96,o],color:[...rgb("#2E1A0C"),1]},{geometry:cube(),position:[0,0,(o-.04)/2],scale:[.98,.98,o-.04],color:[...t,1]}];for(let t=0;t<4;t++){const l=(t+.5)/4-.5,i=t%2?-.25:0;for(let a=0;a<3;a++){const n=Math.max(-.48,-.5+i+.5*a+.02),d=Math.min(.48,-.5+i+.5*(a+1)-.02);if(d-n<.06)continue;if(e&&(t+a)%3==0)continue;const p=.9+(7*t+3*a)%5*.04;r.push({geometry:cube(),position:[(n+d)/2,l,o+.025],scale:[d-n,.2,.05],color:[s[0]*p,s[1]*p,s[2]*p,1]})}}return _0x25f5bf(merge(r),{center:!1,shine:.1})}),STEEL={edge:"#252B33",body:"#5F6B7A",plate:"#9AA6B4",rivet:"#E6EBF1"},steelMesh=()=>cached("t90-steel-v2",()=>{const e=[{geometry:cube(),position:[0,0,.29],scale:[.98,.98,.58],color:[...rgb(STEEL.edge),1]},{geometry:cube(),position:[0,0,.3],scale:[.9,.9,.6],color:[...rgb(STEEL.body),1]},{geometry:cube(),position:[0,0,.62],scale:[.62,.62,.04],color:[...rgb(STEEL.plate),1]},{geometry:cube(),position:[0,0,.645],scale:[.5,.5,.01],color:[...rgb(STEEL.body),1]}];for(const[o,t]of[[-.36,-.36],[.36,-.36],[-.36,.36],[.36,.36]])e.push({geometry:sphere(),position:[o,t,.6],scale:[.12,.12,.08],color:[...rgb(STEEL.rivet),1]});return _0x25f5bf(merge(e),{center:!1,shine:.85})}),baseMesh=()=>cached("t90-base",()=>_0x25f5bf(merge([{geometry:shapeGeometry("roundedBox"),position:[0,0,.14],scale:[.92,.92,.28],color:[...rgb("#FFC107"),1]},{geometry:cube(),position:[0,0,.29],scale:[.7,.7,.03],color:[...rgb("#FF8F00"),1]},{geometry:extrude((new Path).addStar(0,0,.32,.14),{depth:.12}),position:[0,0,.36],color:[...rgb("#FFE082"),1]}]),{center:!1,shine:.7})),PLAYER_PAINT={hull:"#FFD700",top:"#FFE44D",track:"#8B7209",turret:"#FFF176",barrel:"#B8860B"},ENEMY_PAINT={hull:"#6B7D94",top:"#8A9AAE",track:"#2E3C4E",turret:"#7A8EA4",barrel:"#4A5E74"},tankMesh=e=>cached("t90-tank-"+(e?"player":"enemy"),()=>{const o=e?PLAYER_PAINT:ENEMY_PAINT,t=[];for(const e of[1,-1]){t.push({geometry:shapeGeometry("roundedBox"),position:[.37*e,0,.13],scale:[.24,1,.26],color:c4(o.track)});for(let o=0;o<6;o++)t.push({geometry:cube(),position:[.37*e,.168*o-.42,.265],scale:[.25,.06,.02],color:[.12,.12,.12,1]})}return t.push({geometry:shapeGeometry("roundedBox"),position:[0,0,.22],scale:[.56,.84,.24],color:c4(o.hull)},{geometry:cube(),position:[0,-.08,.345],scale:[.46,.5,.02],color:c4(o.top)},{geometry:lathe([[.001,.2],[.12,.19],[.2,.14],[.23,.06],[.23,0]],{segments:24}),position:[0,-.04,.34],rotation:STAND_UP,color:c4(o.turret)},{geometry:tube([[0,.12,.43],[0,.66,.43]],{radius:.055,sides:12}),color:c4(o.barrel)},{geometry:tube([[0,.6,.43],[0,.68,.43]],{radius:.075,sides:12}),color:c4(o.barrel)}),_0x25f5bf(merge(t),{center:!1,shine:e?.55:.4})}),fieldMesh=(e,o)=>cached("t90-field:"+e.boardWidth+"x"+e.boardHeight+":"+o,()=>_0x25f5bf(extrude((new Path).addRoundedRect(-e.boardWidth/2,-e.boardHeight/2,e.boardWidth,e.boardHeight,o),{depth:8}),{shine:.1})),gridMesh=e=>cached("t90-grid:"+e.cell,()=>{const o=[];for(let t=1;t<GRID_WIDTH;t++)o.push({geometry:cube(),position:[t*e.cell-e.boardWidth/2,0,0],scale:[1,e.boardHeight,.2]});for(let t=1;t<GRID_HEIGHT;t++)o.push({geometry:cube(),position:[0,e.boardHeight/2-t*e.cell,0],scale:[e.boardWidth,1,.2]});return _0x25f5bf(merge(o),{center:!1})}),frameWidth=e=>Math.min(FRAME,.5*e.cell),frameMesh=e=>cached("t90-frame:"+e.boardWidth+"x"+e.boardHeight,()=>{const o=frameWidth(e),t=.6*e.cell,s=e.boardWidth,r=e.boardHeight,l=(e,t,l,i)=>({geometry:extrude((new Path).addRoundedRect(-s/2-o+e,-r/2-o+e,s+2*(o-e),r+2*(o-e),Math.max(1,.5*o-e)).addRect(-s/2-.2*e,-r/2-.2*e,s+.4*e,r+.4*e),{depth:t,fillRule:"evenodd"}),position:[0,0,i],color:[...rgb(l),1]}),i=[l(0,t,STEEL.body,t/2),l(.22*o,.06*t,STEEL.plate,t+.03*t)],a=(e,s)=>i.push({geometry:sphere(),position:[e,s,t+.06*t],scale:[.3*o,.3*o,.2*o],color:[...rgb(STEEL.rivet),1]}),n=o/2;for(let o=0;o<=GRID_WIDTH;o++){const t=-s/2+o*e.cell;a(t,r/2+n),a(t,-r/2-n)}for(let o=1;o<GRID_HEIGHT;o++){const t=-r/2+o*e.cell;a(-s/2-n,t),a(s/2+n,t)}return _0x25f5bf(merge(i),{center:!1,shine:.85})}),fieldColor=e=>toColor("classic"===e.mode?CLASSIC_FIELD:e.BOARD.SURFACE),wallMesh=e=>"brick"===e.type?brickMesh(e.health<2):"steel"===e.type?steelMesh():"base"===e.type?baseMesh():null;export function buildScene(e,o,t,s){const r=spawnBackdrop(e,o.width,o.height,-25,t);return placeTiltedBackdrop(e,r,o,25),{backdrop:r,field:e.spawn({mesh:fieldMesh(o,"classic"===t.mode?10:6),position:[0,0,-4],color:fieldColor(t),pickable:!1}),frame:e.spawn({mesh:frameMesh(o),position:[0,0,0],pickable:!1}),grid:e.spawn({mesh:gridMesh(o),position:[0,0,.15],color:toColor(GRID_LINE),pickable:!1}),walls:s.map((t,s)=>t.map((t,r)=>spawnWall(e,o,t,r,s))),tanks:new Map,bullets:new Map}}function spawnWall(e,o,t,s,r){const l=wallMesh(t);return l?e.spawn({mesh:l,position:toWorld(o,(s+.5)*o.cell,(r+.5)*o.cell),scale:o.cell,pickable:!1}):null}export function removeScene(e,o){const t=[...Array.from(o.tanks.values(),e=>e.body),...Array.from(o.bullets.values())];for(const s of[o.backdrop,o.field,o.frame,o.grid,...t,...o.walls.flat()])null!=s&&e.despawn(s)}export function setSceneTheme(e,o,t,s){setBackdropTheme(e,t.backdrop,s),e.set(t.field,{mesh:fieldMesh(o,"classic"===s.mode?10:6),color:fieldColor(s)})}export function updateWall(e,o,t,s,r,l,i){const a=t.walls[r][s],n=wallMesh(l);null!=a&&n?e.set(a,{mesh:n}):null!=a&&(e.despawn(a),t.walls[r][s]=null),effects.shatter(e,{position:toWorld(o,(s+.5)*o.cell,(r+.5)*o.cell,.5*o.cell),count:n?6:12,size:.14*o.cell,speed:3*o.cell,direction:[0,0,1],spread:1.2,lifetime:.5,gravity:9*-o.cell,colors:"base"===i?[c4("#FFC107"),c4("#FF8F00"),c4("#5A5A5A")]:[c4("#A0522D"),c4("#6B3410"),c4("#C0764A")],flash:!1})}export function rebuildWalls(e,o,t,s){for(const o of t.walls.flat())null!=o&&e.despawn(o);t.walls=s.map((t,s)=>t.map((t,r)=>spawnWall(e,o,t,r,s)))}const SHIELD=[.12,.55,1,.28],SHELL=[2.4,1.5,.45,1],SHELL_GLOW=[2.2,1.1,.3,.45];export function syncUnits(e,o,t,s,r,l){const i=o.cell*TANK_RATIO,a=new Set;for(const r of s){if(!r.isAlive)continue;a.add(r.id);let s=t.tanks.get(r.id);const n=toWorld(o,r.x,r.y);if(!s){const o=e.spawn({mesh:tankMesh(r.isPlayer),position:n,rotation:heading(r.direction),scale:i,pickable:!1});s={body:o,shield:e.spawn({mesh:"sphere",parent:o,position:[0,0,.3],scale:0,color:SHIELD,pickable:!1}),direction:r.direction,shielded:!1,x:r.x,y:r.y},t.tanks.set(r.id,s),e.set(o,{scale:.3*i}),e.animate(o,{scale:i},{duration:.25,easing:"back"})}(s.x!==r.x||s.y!==r.y)&&(e.set(s.body,{position:n}),s.x=r.x,s.y=r.y),s.direction!==r.direction&&(s.direction=r.direction,e.animate(s.body,{rotation:heading(r.direction)},{duration:TURN_TIME,easing:"easeOut"}));const d=l<r.spawnProtectionEndTime;d!==s.shielded&&(s.shielded=d,e.stopAnimation(s.shield),e.set(s.shield,{scale:d?1.45:0}),d&&e.animate(s.shield,{scale:1.6},{duration:.35,repeat:"forever",yoyo:!0,easing:"easeInOut"}))}for(const[o,s]of t.tanks)!a.has(o)&&(e.despawn(s.body),t.tanks.delete(o));const n=new Set,d=e.transforms;for(const s of r){n.add(s.id);const r=toWorld(o,s.x,s.y,.34*o.cell),l=t.bullets.get(s.id);if(null==l){const l=e.spawn({mesh:"sphere",position:r,scale:.24*o.cell,color:SHELL,pickable:!1});e.spawn({mesh:"puff",parent:l,scale:2.4,color:SHELL_GLOW,pickable:!1}),t.bullets.set(s.id,l)}else d.position(l,r[0],r[1],r[2])}d.flush();for(const[o,s]of t.bullets)!n.has(o)&&(e.despawn(s),t.bullets.delete(o))}export function muzzleFlash(e,o,t){const s=o.cell*TANK_RATIO,r=s/2+.5*s,[l,i]="up"===t.direction?[0,-1]:"down"===t.direction?[0,1]:"left"===t.direction?[-1,0]:[1,0];effects.dust(e,{position:toWorld(o,t.x+l*r,t.y+i*r,.43*s),count:3,size:.35*s,speed:1.5*s,direction:[l,-i,.3],spread:.5,lifetime:.1,color:[[2.6,2.6,2.2,.95],[2.4,2,.8,.8]],endSize:1.8})}export function explode(e,o,t,s,r){const l=o.cell*(r?.9:.5);effects.explosion(e,{position:toWorld(o,t,s,.4*o.cell),count:r?22:10,size:l,speed:l*(r?3:2),lifetime:EXPLOSION_TIME,direction:[0,0,1],spread:1.3,gravity:10*-o.cell,debris:r?[c4("#3E4A58"),c4("#FFB74D"),c4("#5A5A5A")]:void 0})}
@@ -1 +1 @@
1
- "use strict";const _0x33d8f9=_0x164f;!function(){const e=_0x164f,o=_0x2501();for(;;)try{if(459181==-parseInt(e(506,"T$^6"))/1*(-parseInt(e(421,"5RLE"))/2)+parseInt(e(522,"6TR1"))/3*(parseInt(e(474,"h4xj"))/4)+parseInt(e(426,"D^)e"))/5+parseInt(e(475,"JNqI"))/6+-parseInt(e(492,"%gf&"))/7+-parseInt(e(431,"ED0p"))/8+-parseInt(e(501,"PnfZ"))/9*(parseInt(e(425,"5RLE"))/10))break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x3d4165,{useEffect,useRef,useCallback,useMemo}from"react";import{View,StyleSheet}from"react-native";import{useTicTacToeStore,useIsPlaying,useIsGameOver}from"./TicTacToeStore.js";import{GameBoard}from"./components/GameBoard.js";import{ScoreBoard}from"./components/ScoreBoard.js";function _0x2501(){const e=["WPbfDmoOW4NcUSkRkq","h8oLjwxdL3e","W7RcGKhdGZ7cOmklh8kif8k7lW","Amoof8kRW4O","WRKqW5DdW40rW7S","W6v8W7fTWRjAtq","sSoxnGfslfO","W7HvW6Gwmq","WRPYW6fcW4eeW6JdGG","ydmdWOb0h8kSWPtcV8kMWQDcW4q","k3FcHqi3","W7BcTmkAW5lcMSo9W5VdTW","u8osW77dLSkGWO4hbhSkFtHx","W7feW5e3amkB","ot40B0ayW6OuW7KZWRKyEW","hGdcPKSLW4VdJZSX","hSkDrCkwqhdcIW","B2fHpXLnWPyqW6C9WRm1uq","W69IWOJcHLJdH1rCWQm","W7/cI8kVW4/cPa","fCoxvSoDz34","WPrvCSojW5JcTCkR","jSoAwCohiLpcO8kLW4RcMSoK","WPnWEJxdTCkOWPK","WQtcNhXTWRu","W6RdPW0DW4tcT8o0hSo0W4fgWRtdPmkEySoMWOfCW7hdMWaeW4e","nmoCWOmfhmkUW6tcHCku","sHnYW4PhW7jRWQe","smoZkajK","AmkPW4lcUfRcVg0","W7BcN3ddJtpcVmkXhSkA","WRdcOLXdWRqdgmorh8onW65+EHC","W6LSWRNcUuy","cqBcQeWXW4NdJsW","sSomANhcRCkYCCkTkNHbWPOovG","BSokb8kAW4CGjG5+WP5UwKRcNa","eCoWqK/cG8kYEa","W7jnWQT5WQ8","W7ddGsWTW7tcJ8kxnSojW6bW","W6b4WONcKw7dIK8","CIVcSbrB","xSo3adb5","W6qKW7b6W68e","Aqb+W5G0W75QW7iD","BwP0dGfjWQOu","eCottmoTDNpcSmkH","WRjWqwZcIq","yXNcIXrEmKtdOH91W4mA","WOhdGx3cH3abWQCY","smkVW4xcG8kM","iZ3cKHW6W6FdSX11","DH7cGa8","q3LdW60","fuP7cfznWRZcPW","EHTX","W6LuWPztWQ7cPMC9","jH8yW6BcRfXjvXWNAG","WRC+WRORW6aadCo7WPamk8kfuq","W4uXphhcP8oZW59+rqdcR8oKEq","t8kxBCkjD2BcMSkh","xSolkH1sma","qmorfb9wo0FdKmkw","e15OWQhdUG","W7ZcMvldKZFcQ8kS","heVcMWOJ","WOb8xfdcP8oJomoC","Aen/W7pdUmksWP/cTmorm8k1hmoZ","kaiMWRJcUSoLW4VcR8of","g1XlkunB","W7zpWOPg","y8owd8kzW70IjrvH","AHDRW7WtW7XXW6u","FmkFy8k4v3FcQ8kjWPO","W4ZdJrZdOcHFWQq","ymkqqCkkrG","m8kxw8oCWPXWFXzEWPr/EN8","W7ZcMSkFW7xcMW","qmomlqDEi0ldL8klW4BdUIr7WPW","W6jvW5yXaq","W47dPJCFW7u","mhrEW5G2sG","W4VdPIWxW4ZcOSkeg8o4W5Xg","W43dUYSaW4hcUq","w3RdKrGBWOLYW4fKf2C","fcmFWQjYWQZcQCoyWQRcQsNcNSkEAq","WPXvW7/cK1WkwttcISoyyfbr","W6fSW7DmWQnvtCoU","E8kIqCk+yG","WOxdKxVcPMeoWQC","xK1De8oQDN/dVmkByCorW54","W7TsW6SQcmkmEWNcUGG","WP9JBJtdTCkY","CvXRW5bGW4RdJSoi","cKLUWPKvymoxW4m","mv5VWQddHvO","WPhdMCkxW5RcGtJcRejs","WOPtWPT8W7/cSCkCra","x8kFBSk/vxVcJCkd","W7fSWO/cHG","WO0HW759AmkTwG","W7ddIJGcW5a","zXXhW4iY","WOrSwNhcTSoSoa","t8ktDmk/qNxcI8kd","W6iXW5j7W6Sh","sSoVdNZdHhNdLG","h8oRjxldK3tdJmktW7S","W4iunmknWORdRSoTlCoTWPddVWK2","gbtcK2Kq","W7dcGNpdItpcT8k9","W4q1W79fW6G","rmkzC8kj","W77cMSkuW5HXDCk5pG"];return(_0x2501=function(){return e})()}import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x22a3f4}from"../../helpers/index.js";import{TIC_TAC_TOE_CONSTANTS}from"./TicTacToeConstants.js";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";import{jsx as _0x196931,jsxs as _0x51842d}from"react/jsx-runtime";function _0x164f(e,o){e-=413;const t=_0x2501();let W=t[e];if(void 0===_0x164f.SKcmeg){const e=function(e,o){let t,W,n=[],r=0,s="";for(e=function(e){let o="",t="";for(let t,W,n=0,r=0;W=e.charAt(r++);~W&&(t=n%4?64*t+W:W,n++%4)?o+=String.fromCharCode(255&t>>(-2*n&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++)n[W]=W;for(W=0;W<256;W++)r=(r+n[W]+o.charCodeAt(W%o.length))%256,t=n[W],n[W]=n[r],n[r]=t;W=0,r=0;for(let o=0;o<e.length;o++)W=(W+1)%256,r=(r+n[W])%256,t=n[W],n[W]=n[r],n[r]=t,s+=String.fromCharCode(e.charCodeAt(o)^n[(n[W]+n[r])%256]);return s};_0x164f.fMntna=e,_0x164f.HLxSNu={},_0x164f.SKcmeg=!0}const n=t[0];_0x164f.vMLXjS!==n&&(_0x164f.HLxSNu={},_0x164f.vMLXjS=n);const r=_0x164f.HLxSNu[e];return void 0===r?(void 0===_0x164f.BELaAq&&(_0x164f.BELaAq=!0),W=_0x164f.fMntna(W,o),_0x164f.HLxSNu[e]=W):W=r,W}export const TicTacToe=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:W,onShare:n,onShareScreenshot:r,onShowLeaderboard:s,bannerAd:a})=>{const T="BpWd",S=_0x164f,d={pPHoi:S(436,"9ZMY"),jnXmU:function(e,o){return e(o)},UiioZ:function(e,o){return e===o},wUDCN:S(449,"Enef"),ojyEd:S(525,"7lPk"),VmryG:S(471,"Wc[h"),jRgNn:S(486,")ymP"),XwZSj:S(439,"vmS#"),mKqtu:function(e){return e()},hmRZF:function(e,o,t){return e(o,t)},jtWUT:function(e,o,t){return e(o,t)},HfAfp:function(e,o,t){return e(o,t)},aQlqS:function(e,o,t){return e(o,t)}},m=useIsPlaying(),i=d[S(493,"9ZMY")](useIsGameOver),f=useRef(!1),u=useRef(e);u[S(456,"Enef")]=e;const k=useRef(t);k[S(516,"9BQd")]=t;const C=useRef(W);C[S(438,"BpWd")]=W;const x=useCallback(e=>{const o=S;if(o(495,"KR@#")!==d[o(457,")X(h")]){if(k.current&&!f.current){const t=useTicTacToeStore[o(417,T)]();let W=0;W="win"===e?TIC_TAC_TOE_CONSTANTS[o(514,"oNpT")]:"cancel"===e?0:t[o(499,"lK$!")]?TIC_TAC_TOE_CONSTANTS[o(487,"%gf&")]:TIC_TAC_TOE_CONSTANTS[o(512,"M6HY")],k[o(422,"h4xj")]({status:e,score:W.toString()}),f[o(438,T)]=!0}}else _0x5af8cb("win")},[]);useEffect(()=>{const e=S,o={TBWpp:function(e,o){return d[_0x164f(518,"Wc[h")](e,o)}};return useTicTacToeStore.getState()[e(451,"L9vZ")](),()=>{const t=e;useTicTacToeStore.getState()[t(478,"JGMB")]&&!f[t(505,"XAn@")]&&o[t(517,"lK$!")](x,t(437,"vmS#")),useTicTacToeStore[t(513,"R&77")]()[t(450,"7lPk")](),useTicTacToeStore[t(520,"oNpT")]().resetGame()}},[]),d[S(454,")ymP")](useEffect,()=>{const e=S;if(i&&!f[e(423,"JGMB")]){const o=useTicTacToeStore[e(482,"hWIe")]();d[e(479,"O&7@")](o[e(477,"JGMB")],"O")?d[e(458,"JGMB")]!==d[e(420,"%gf&")]?d[e(496,"lK$!")](x,d[e(481,"5M3m")]):_0x19b51d(e(415,"oNpT")):"X"===o.winner||o[e(507,"KR@#")]?x(d.jRgNn):o.isDraw&&x(e(418,"6TR1"))}!i&&(f[e(480,"@dw9")]=!1)},[i,x]);const l=d.hmRZF(useCallback,()=>{const e=S;f[e(519,"hWIe")]=!1,useTicTacToeStore[e(428,"9ZMY")]()[e(484,"Olzu")]();const o={};o[e(468,")X(h")]=e(444,"Wc[h"),o.pitch=1.2,o[e(515,"Enef")]=1.2,playSound(GAME_SOUNDS[e(473,"AUa&")]?.[e(504,"oNpT")]||o,u[e(446,"G1Bz")][e(419,"@dw9")]),playHaptic(HapticType.MEDIUM,u[e(446,"G1Bz")][e(434,"ED0p")])},[]),h=d.jtWUT(useCallback,()=>{const e=S;x("cancel"),useTicTacToeStore[e(465,"XAn@")]()[e(472,")ymP")](),useTicTacToeStore[e(488,"Wc[h")]().resetGame(),useTicTacToeStore[e(461,"ED0p")]()[e(452,"%gf&")]()},[x]),_=useCallback(()=>{const e=S;"rWPsj"===e(414,"5RLE")?_0x536b13=_0x25c24d[e(521,"5RLE")]?_0x3bbcc3[e(460,"Wc[h")]:_0x9a4e43[e(443,"4y6)")]:(C[e(490,"6hsP")]?.(),f.current=!1,useTicTacToeStore[e(470,"sRcb")]().resetGame(),useTicTacToeStore[e(503,"h4xj")]()[e(494,"JGMB")]())},[]),G=useCallback(e=>{const o=S,t=useTicTacToeStore[o(482,"hWIe")]();t[o(447,"@dw9")]&&!t.isGameOver&&t[o(416,"SrqW")](e,u[o(440,"JNqI")])},[]),p=d[S(491,"oNpT")](useMemo,()=>({isPlaying:m,gameOver:i,onStartGame:l,onStopGame:h,onShare:n,onShowLeaderboard:s,startButtonSubtext:S(448,"KIHc")}),[m,i,l,h,n,s]),O=d[S(445,"JGMB")](useMemo,()=>{const e=S,o=useTicTacToeStore[e(462,"vmS#")](),t=i?o[e(511,"O&7@")]:null,W=!!i&&o[e(485,"sRcb")];return{isVisible:i,score:"O"===t?TIC_TAC_TOE_CONSTANTS.winScore:W?TIC_TAC_TOE_CONSTANTS[e(432,"7lPk")]:TIC_TAC_TOE_CONSTANTS[e(435,"Enef")],onPlayAgain:_,buttonText:d[e(466,"shKi")],title:"O"===t?e(510,"D^)e"):d[e(463,"hWIe")](t,"X")?e(467,"7lPk"):W?e(441,"KIHc"):e(509,"PnfZ"),message:"O"===t?"You beat the robot!":"X"===t?"The robot wins!":W?e(442,"lK$!"):"You ran out of time!"}},[i,_]),R=useMemo(()=>({gameId:GAME_IDS[S(455,"lK$!")],settings:e,onSettingsChange:o}),[e,o]),N=e?.[S(508,"JNqI")]??0,P={};P.paddingTop=N;const A=useMemo(()=>[styles[S(476,"oNpT")],P],[N]),I={};I[S(459,"5RLE")]=N;const E={};E[S(498,"lK$!")]=G;const M={...p},j={...O};j[S(413,"@dw9")]=r,j.bannerAd=a;const K={...R};return _0x196931(View,{style:styles[S(523,"6TR1")],children:_0x51842d(_0x22a3f4,{children:[d[S(427,"5M3m")](_0x196931,ScoreBoard,I),_0x196931(View,{style:A,children:d[S(424,"KR@#")](_0x196931,GameBoard,E)}),_0x196931(GameControlButton,M),_0x196931(GameOverModal,j),_0x196931(GameSettingsModal,K)]})})};TicTacToe[_0x33d8f9(500,"F&3s")]=_0x33d8f9(489,"oNpT");const _0x25c530={};_0x25c530[_0x33d8f9(469,"PnfZ")]=1,_0x25c530.backgroundColor=BACKGROUND_COLOR;const styles=StyleSheet[_0x33d8f9(497,"D^)e")]({container:_0x25c530,gameArea:{...StyleSheet[_0x33d8f9(464,")X(h")],justifyContent:_0x33d8f9(430,"KR@#"),alignItems:"center"}});
1
+ "use strict";import{useMemo}from"react";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{textColumn,timerColumn}from"../shared/EngineHud.js";import{toRgb}from"../shared/EngineUtils.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{COLORS,getLayout,LIGHT,TIME_LIMIT}from"./TicTacToeConstants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,shownScore,start,tick}from"./TicTacToeGame.js";import{jsx as _0x8c6c16}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.TIC_TAC_TOE,LOW_TIME=30,FEEDBACK={place:{sound:SOUNDS.PLACE,haptic:HapticType.LIGHT},robot:{sound:SOUNDS.ROBOT,haptic:HapticType.LIGHT},win:{sound:SOUNDS.WIN,haptic:HapticType.SUCCESS},lose:{sound:SOUNDS.LOSE,haptic:HapticType.ERROR},draw:{sound:SOUNDS.DRAW,haptic:HapticType.MEDIUM}},TITLES={win:["YOU WON!","You beat the robot!"],lose:["YOU LOST!","The robot wins!"],draw:["DRAW!","Nobody wins this round!"],timeout:["TIME UP!","You ran out of time!"]};export const TicTacToe=engineGame(GAME_IDS.TIC_TAC_TOE,e=>{const[t,o]=useLiveState("O"),[s,r]=useLiveState(TIME_LIMIT),{game:i,theme:a,screen:n,gameOver:m}=useEngineGame(e,{gameId:GAME_IDS.TIC_TAC_TOE,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,o,s)=>{const r=getLayout(t,o,s,isTablet);return setLayout(e,r),r.size+2*r.pad},drag:drag,outcome:e=>"win"===e.result?"win":"draw"===e.result?"draw":"lose",reportScore:(e,t)=>"win"===t?e.finalScore:0,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.MEDIUM),onOver:(e,t,o)=>{"timeout"===o.result&&e(SOUNDS.TIME_UP,HapticType.ERROR)},wire:(e,t)=>{e.onTurn=o,e.onTime=r,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}}),T=useMemo(()=>toRgb(a.BACKGROUND),[a.BACKGROUND]),[S,u]=TITLES[i.result??"timeout"];return _0x8c6c16(EngineGameScreen,{...n,light:LIGHT,background:T,columns:[textColumn("YOU","O",COLORS.O_BADGE),timerColumn(s,a,30,"O"===t?"YOUR TURN":"AI THINKING..."),textColumn("AI","X",COLORS.X_BADGE)],subtext:"Play vs Robot!",gameOver:m({title:S,message:u,scoreLabel:"Final Score",score:shownScore(i),buttonText:"Play Again!"})})});
@@ -1 +1 @@
1
- "use strict";const _0x597635=_0x22b0;!function(){const W=_0x22b0,_=_0x631e();for(;;)try{if(131431==parseInt(W(381,"I7n7"))/1*(-parseInt(W(433,"]Ybw"))/2)+parseInt(W(352,"U%W5"))/3+parseInt(W(365,"!8FV"))/4*(parseInt(W(407,"QhM#"))/5)+-parseInt(W(421,"^xkZ"))/6+-parseInt(W(424,"F(Qs"))/7+parseInt(W(369,"i0[U"))/8*(parseInt(W(429,"^xkZ"))/9)+parseInt(W(388,"G1jU"))/10)break;_.push(_.shift())}catch(W){_.push(_.shift())}}();import{PRIMARY_COLOR,BACKGROUND_COLOR,lighten,darken}from"../../services/GamesConstants.js";import{getGameDimensions,isTablet}from"../../services/UtilsService.js";const{width:width,height:height}=getGameDimensions(),_0xd952f0={};_0xd952f0[_0x597635(358,"G1jU")]=BACKGROUND_COLOR,_0xd952f0[_0x597635(410,"%WlF")]=PRIMARY_COLOR,_0xd952f0[_0x597635(420,"i0[U")]=_0x597635(400,"Y)3^"),_0xd952f0[_0x597635(402,"T#2[")]="#4CAF50",_0xd952f0[_0x597635(418,"T#2[")]=_0x597635(371,"FDM1"),_0xd952f0.GRID_LINE=_0x597635(359,"Y)3^"),_0xd952f0[_0x597635(353,"I7n7")]=_0x597635(355,"K#jM"),_0xd952f0.CELL_HOVER=_0x597635(389,"Gh2m"),_0xd952f0[_0x597635(403,"7tAy")]=[_0x597635(435,"&UMn"),_0x597635(362,"pMvp"),_0x597635(384,"U%W5"),_0x597635(375,"9ZFo"),_0x597635(432,"7tAy"),_0x597635(399,"%WlF"),_0x597635(378,"$WNm"),_0x597635(386,"g&dZ"),_0x597635(411,"ThWa"),"#2196F3",_0x597635(419,"g&dZ"),_0x597635(356,"r[t%")];export const TIC_TAC_TOE_COLORS=_0xd952f0;const BOARD_SIZE=Math[_0x597635(390,"I7n7")](.85*width,isTablet?420:350),CELL_SIZE=BOARD_SIZE/3,_0x4fe4ca={};_0x4fe4ca.SCREEN_WIDTH=width,_0x4fe4ca[_0x597635(366,"M5f6")]=height,_0x4fe4ca[_0x597635(392,"pMvp")]=BOARD_SIZE,_0x4fe4ca[_0x597635(427,"Fq5i")]=CELL_SIZE,_0x4fe4ca[_0x597635(360,"9ZFo")]=4,_0x4fe4ca[_0x597635(412,"aBq)")]=.6*CELL_SIZE,_0x4fe4ca[_0x597635(354,"VqUG")]=10;export const TIC_TAC_TOE_GAME_CONFIG=_0x4fe4ca;const _0x1e130c={maxTime:180,winScore:1e4,drawScore:5e3};_0x1e130c[_0x597635(405,"pMvp")]=0;export const TIC_TAC_TOE_CONSTANTS=_0x1e130c;export const WINNING_COMBINATIONS=[[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]];const _0x589d18={};_0x589d18[_0x597635(417,"^xkZ")]=isTablet?10:8,_0x589d18[_0x597635(416,"K#jM")]=isTablet?10:8,_0x589d18[_0x597635(387,"vfQ]")]=isTablet?16:12,_0x589d18[_0x597635(391,"hCnX")]=_0x597635(431,"zeJg"),_0x589d18[_0x597635(395,"Y)3^")]=_0x597635(396,"VqUG"),_0x589d18[_0x597635(425,"]Ybw")]=_0x597635(414,"dhtb"),_0x589d18.BOARD_HIGHLIGHT=_0x597635(363,"I7n7");export const BOARD_3D=_0x589d18;const _0x436839={};_0x436839[_0x597635(379,"9Kp$")]=_0x597635(394,"%WlF"),_0x436839[_0x597635(374,"x3hU")]="#8d6e5a",_0x436839[_0x597635(372,"w)yy")]="rgba(0,0,0,0.35)",_0x436839.highlight=_0x597635(350,"$WNm"),_0x436839[_0x597635(393,"U%W5")]=3;export const GRID_3D=_0x436839;const X_BASE="#E53935";export const X_3D={stroke:[lighten(X_BASE,.35),X_BASE,darken(X_BASE,.2)],shadow:darken(X_BASE,.55),highlight:lighten(X_BASE,.6),outerGlow:_0x597635(368,"I7n7"),glow:[lighten(X_BASE,.4),X_BASE,_0x597635(415,"G1jU")],winStroke:[_0x597635(364,"]Ybw"),"#FFC107",_0x597635(382,"pTDs")]};const O_BASE=_0x597635(406,"!8FV");export const O_3D={stroke:[lighten(O_BASE,.4),O_BASE,darken(O_BASE,.15)],shadow:darken(O_BASE,.55),highlight:lighten(O_BASE,.65),outerGlow:_0x597635(408,"]Ybw"),glow:[lighten(O_BASE,.45),O_BASE,_0x597635(409,"QhM#")],winStroke:["#FFD54F","#FFC107","#FF8F00"]};const _0x538545={};_0x538545[_0x597635(367,"DN$8")]=[_0x597635(373,"vfQ]"),"#FFC107",_0x597635(383,"F(Qs")],_0x538545[_0x597635(376,"]Qc3")]=[_0x597635(361,"iJ6b"),_0x597635(397,"Y)3^"),_0x597635(426,"Y)3^")],_0x538545[_0x597635(377,"%WlF")]=_0x597635(401,"%WlF");export const WIN_3D=_0x538545;const _0x14c7a6={};function _0x22b0(W,_){W-=350;const x=_0x631e();let o=x[W];if(void 0===_0x22b0.Edqlzz){const W=function(W,_){let x,o,d=[],t=0,e="";for(W=function(W){let _="",x="";for(let x,o,d=0,t=0;o=W.charAt(t++);~o&&(x=d%4?64*x+o:o,d++%4)?_+=String.fromCharCode(255&x>>(-2*d&6)):0)o="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(o);for(let W=0,o=_.length;W<o;W++)x+="%"+("00"+_.charCodeAt(W).toString(16)).slice(-2);return decodeURIComponent(x)}(W),o=0;o<256;o++)d[o]=o;for(o=0;o<256;o++)t=(t+d[o]+_.charCodeAt(o%_.length))%256,x=d[o],d[o]=d[t],d[t]=x;o=0,t=0;for(let _=0;_<W.length;_++)o=(o+1)%256,t=(t+d[o])%256,x=d[o],d[o]=d[t],d[t]=x,e+=String.fromCharCode(W.charCodeAt(_)^d[(d[o]+d[t])%256]);return e};_0x22b0.uADgcG=W,_0x22b0.ZHFPuQ={},_0x22b0.Edqlzz=!0}const d=x[0];_0x22b0.TmUryk!==d&&(_0x22b0.ZHFPuQ={},_0x22b0.TmUryk=d);const t=_0x22b0.ZHFPuQ[W];return void 0===t?(void 0===_0x22b0.ksBIgj&&(_0x22b0.ksBIgj=!0),o=_0x22b0.uADgcG(o,_),_0x22b0.ZHFPuQ[W]=o):o=t,o}function _0x631e(){const W=["maxcUmo2WPNdRGu","BYm1WO8","kmkbW5WBWQHvcSo4xmo4","kIqWWOXlWQiz","W6hcRhSIFCkoWR1Je2O","q1amFSoqWQNcQmkUWQddRLfWoSouW6vAW4zAqW","C1xcHCoQkbiE","W43dTmoRW4ZcL8oAWQy","eCk7DL8wWRBdSG","W6ddPgK5W61Jjq","W6HWW5jxywBcOG/cJXdcTSkoDa","WOVcOaJcMmozW7K","WPZcPmoOWPJdNSoCWQeJWRtcLaRdIuJdPmkmWRWxW4lcGuq","BCkKFqiCiCoGcCk+","W6WLWPpcS8k+FCkkWP/dHmohW6Xe","ptJdLXG5sSoc","WQG4rN3dKIm","W71cWOpdUCk+b3K","W6jbdCofxG7cJCoAiW","WO7cO3nEgSoPW4q","WRrWW6XV","W6ldNf/dG8kbBq","WPhdUSkpAamOqW","WP1Qrmks","WRJcUSkXdYBcRvRcOJr6vHVdHXjrWRJcGmkCf2S","W5RdSmosWPBcUCkLW6bE","qvFdJ8k/W5hdR2O","jCkTWQ3cP0GiWRK","W53cMNdcM8kHW6C5","WQXJWQFdNmkJaG0XkCoKlSoDWOeRdCkZx2ebbW","gHFdH8kelCkBW7a","WOXfWOhdTmoEya","wmo5WQ1JW5S3fmomvmo4vXa","lbPnWQzvWQuaW7pdPmo7DSoiW7VdVsVcSG4hseT/WP/cMSkaAW","WOpcQSoK","acJdO8krW7bPWPXIW5e","eLZdSmkmx357eMTV","WPRcUuBdMSo+","WRlcG1/cKSkplM0","sW0xWRHPWPS5c8kBWP3dGq","p8oqW4vFW5zxWQi","EYu0WOSfW7zkBmo4W6lcRmo9W6jAWPpcRmoyWRD2Ba","WPddMbuVW4pcVZZdRwmyyq7dTa","WRldT3RdO8kTkwe","kGrIW54EW7Dj","W6pdK1ZdHSogkg3cKH4dWQ4ksmoDWOdcPgpdUNS","WPaZWRpcPmkXDhe","W6tcT8kjFmoPqhXmmH9HW49+W54bkCoP","bCotDN8b","phZdGSk7sejhkvq","W7FcSN94W6mOzG","aSkRW7/cICofcCo3bHmJWQiyW70","qmkAuNOlWRBcGSo2WQDRDu3cTh10c8kqEbhcKW","r8oPWQRdLSkhqmkJpXaCWRS","W4hdPNFdQSkVsae","W7WLWPBdGSoldCoK","xSkvCwNcS0a5nCk9WO9m","hSonpmkbWQxdPCkGg3WlhXq","W4PknCoUWRSMWQm","hSkYW74+WPX3jmoFD8osEW","WPRdMSkpCenlFq","W6xcNfdcRNO","WOGLWR7cTmkXCM1P","gHtcSCkikSoHW70","b8omdcKzd8oh","WPddQdxdIWxdTSk9WQT0WQvAW6HG","W7JcOSo5bZ41AWWYr8kCW7W","n8oBW5/cRJ8bWRZdVfbYmIZdRa","mmoEW5NcPZCpW57dRKvidYm","CmkYCuLNW53dVCkuW5GCeG","Fta3WOrEWRqEk8kXWR3dOq","W6FdN2SsWRjbecZcGa","WRL0W4xdPCojjCkK","WPpdQJBdJGhcG8o9WOzsWOf7","WPlcKSkzqCoKAKi","W6FdPIaupX9c","WOxcSmkmDmkFiGq","b8oibgfuW6BdG8kXW58","cXtdGCkjkmoVWR7cUt95WO0","mqRdJSoLW57cLw8","WPhdT8kPexuQqW","W69JF3BdSH/cVSoQ","W43dRapcNCkGW6frW5FdPbL4WOi","WQ3cHSogWRxcQCkSW5jzW5pdPM/cQIJcMCoK","t8k9W6KUWQSPW4xdJ8odW6rHv0u/Ax/cVSkaWO4","WRJdVmkPvsi3d1Hyi8o2WOD4W4iKCXXtpmkbWRntrKlcUG"];return(_0x631e=function(){return W})()}_0x14c7a6[_0x597635(357,"Y)3^")]=_0x597635(385,"vfQ]"),_0x14c7a6[_0x597635(428,"ThWa")]=_0x597635(380,"ka93"),_0x14c7a6[_0x597635(404,"qqOR")]="rgba(122,90,69,0.10)";export const CELL_3D=_0x14c7a6;
1
+ "use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const TIME_LIMIT=120;export const WIN_SCORE=1e4;export const DRAW_SCORE=5e3;export const LOSE_SCORE=0;export const TIME_BONUS=50;export const ROBOT_DELAY=.5;export const COLORS={X:"#E53935",O:"#2E7D32",WIN:"#FFC107",FRAME:"#5c4033",WELL:"#3a2518",SURFACE:"#6b4c3b",SURFACE_ALT:"#735342",GRID:"#8d6e5a",X_BADGE:"#F44336",O_BADGE:"#4CAF50"};export const TILT=.42;export const LIGHT=frontLight([-.4,.5,1],.45);const SCOREBOARD_HEIGHT=92,CONTROLS_HEIGHT=120;export function getLayout(t,o,e,r){const n=r?10:8,s=getScoreBoardTop(e)+92,a=Math.max(180,o-s-120),i=a/Math.cos(.42)-2*n-30,l=3*Math.floor(Math.max(150,Math.min(gameWidthFor(t)-2*n,i))/3);return{width:t,height:o,tilt:.42,centerY:s+a/2,cell:l/3,size:l,pad:n}}export function cellCentre(t,o){return[(o%3-1)*t.cell,(1-Math.floor(o/3))*t.cell]}export function cellAt(t,o,e){const r=Math.floor((o+t.size/2)/t.cell),n=Math.floor((t.size/2-e)/t.cell);return r<0||r>2||n<0||n>2?-1:3*n+r}
@@ -0,0 +1 @@
1
+ "use strict";import{World}from"@nayan-ui/engine";import{aimTilted,unproject}from"../shared/EngineTilt.js";import{cellAt,DRAW_SCORE,LOSE_SCORE,ROBOT_DELAY,TIME_BONUS,TIME_LIMIT,WIN_SCORE}from"./TicTacToeConstants.js";import{emptyBoard,robotMove,winningLine}from"./TicTacToeRules.js";import{buildScene,clearPieces,hideGhost,markWin,place,removeScene,setSceneTheme,showGhost,shrug}from"./TicTacToeScene.js";const WORLD_CAPACITY=240;export function createGame(e){const o=new World(240),r={world:o,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",board:emptyBoard(),turn:"O",result:null,finalScore:0,line:null,get timeLeft(){return o.scoreboard.shownSeconds},press:-1,onPhase:e=>{},onTurn:e=>{},onTime:e=>{},onEvent:e=>{}};return o.scoreboard.reset(0,TIME_LIMIT),o.scoreboard.handlers={onSecond:e=>r.onTime(e),onTimeUp:()=>"playing"===r.phase&&end(r,"timeout")},r}export const scoreFor=(e,o)=>"win"===e?WIN_SCORE+Math.max(0,o)*TIME_BONUS:"draw"===e?DRAW_SCORE+Math.max(0,o)*(TIME_BONUS/2):LOSE_SCORE;export const shownScore=e=>e.result?e.finalScore:LOSE_SCORE;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.board),e.line&&markWin(e.world,o,e.scene,e.line)}export function setTheme(e,o){e.theme=o,e.layout&&e.scene&&setSceneTheme(e.world,e.layout,e.scene,o)}function clear(e){e.world.cancelTimers(),e.board=emptyBoard(),e.turn="O",e.result=null,e.line=null,e.world.scoreboard.reset(0,TIME_LIMIT),e.press=-1,e.scene&&clearPieces(e.world,e.scene),e.onTurn("O"),e.onTime(TIME_LIMIT)}export function start(e){"ready"===e.phase&&(clear(e),e.world.scoreboard.startCountdown(TIME_LIMIT),e.phase="playing",e.onPhase("playing"))}export function reset(e){clear(e),e.phase="ready",e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function tick(e,o){e.world.isDisposed||e.world.update(o)}function end(e,o){e.result=o,e.world.cancelTimers(),e.world.scoreboard.stop(),e.finalScore=scoreFor(o,e.timeLeft),e.press=-1,e.scene&&hideGhost(e.world,e.scene),e.phase="over",e.onPhase("over")}function put(e,o,r){e.board[o]=r;const{layout:n,scene:t}=e;n&&t&&place(e.world,n,t,o,r),e.onEvent("O"===r?"place":"robot");const s=winningLine(e.board);return s?(e.line=s,n&&t&&markWin(e.world,n,t,s),e.onEvent("O"===r?"win":"lose"),void end(e,"O"===r?"win":"lose")):e.board.every(e=>null!==e)?(n&&t&&shrug(e.world,n,t),e.onEvent("draw"),void end(e,"draw")):(e.turn="O"===r?"X":"O",void e.onTurn(e.turn))}export function play(e,o){"playing"!==e.phase||"O"!==e.turn||null!==e.board[o]||o<0||o>8||(put(e,o,"O"),"playing"===e.phase&&e.world.after(ROBOT_DELAY,()=>{if("playing"!==e.phase||"X"!==e.turn)return;const o=robotMove(e.board);o>=0&&put(e,o,"X")}))}export function cellUnder(e,o,r){const n=e.layout;if(!n)return-1;const[t,s]=unproject(n,o,r,1);return cellAt(n,t,s)}export function drag(e,{phase:o,x:r,y:n}){const{layout:t,scene:s}=e,a=cellUnder(e,r,n),l="playing"===e.phase&&"O"===e.turn&&a>=0&&null===e.board[a];if("start"===o?e.press=l?a:-1:a!==e.press&&(e.press=-1),"end"===o){const o=e.press;return e.press=-1,s&&hideGhost(e.world,s),void(o>=0&&play(e,o))}t&&s&&(e.press>=0?showGhost(e.world,t,s,e.press):hideGhost(e.world,s))}
@@ -0,0 +1 @@
1
+ "use strict";export const LINES=[[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]];export const emptyBoard=()=>Array(9).fill(null);export function winningLine(n){for(const t of LINES){const[r,o,e]=t;if(n[r]&&n[r]===n[o]&&n[r]===n[e])return t}return null}export const winnerOf=n=>{const t=winningLine(n);return t?n[t[0]]:null};const empties=n=>n.flatMap((n,t)=>null===n?[t]:[]),MISS_BLOCK=.4,SLIP=.7;function minimax(n,t,r,o){let e=0;for(const t of n)e=3*e+("X"===t?1:"O"===t?2:0);const i=32*e+2*r+("X"===t?1:0),l=o.get(i);if(void 0!==l)return l;const s=winnerOf(n);if("X"===s)return 10-r;if("O"===s)return r-10;let f="X"===t?-1/0:1/0,u=!1;for(let e=0;e<n.length;e++){if(null!==n[e])continue;u=!0,n[e]=t;const i=minimax(n,"X"===t?"O":"X",r+1,o);n[e]=null,f="X"===t?Math.max(f,i):Math.min(f,i)}const a=u?f:0;return o.set(i,a),a}const pick=n=>n[Math.floor(Math.random()*n.length)];export function robotMove(n){const t=empties(n);if(!t.length)return-1;const r=r=>t.filter(t=>{const o=[...n];return o[t]=r,winnerOf(o)===r}),o=r("X")[0];if(void 0!==o)return o;const e=r("O");if(e.length){const n=t.filter(n=>!e.includes(n));return n.length&&Math.random()<.4?pick(n):pick(e)}if(Math.random()<.7)return pick(t);const i=[...n],l=new Map;let s=-1/0,f=[];for(const n of t){i[n]="X";const t=minimax(i,"O",1,l);i[n]=null,t>s?(s=t,f=[n]):t===s&&f.push(n)}return pick(f)}
@@ -0,0 +1 @@
1
+ "use strict";import{effects,extrude,merge,Path,quat,tube}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{popBurst}from"../shared/EngineBlasts.js";import{cacheGameAsset,createGameMesh as _0x11fb6c}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{cellCentre,COLORS}from"./TicTacToeConstants.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("tic-tac-toe/TicTacToeScene:"+e,o),meshes.set(e,t)),t},BOARD_DEPTH=12,BACKDROP_DEPTH=30,STROKE=.075,SPAN=.23,BAR=.1,WIN_GOLD=toColor(COLORS.WIN),xMesh=()=>cached("ttt-x-v2",()=>{const e=(e,o)=>({geometry:tube([e,o],{radius:.075,sides:16,smoothness:2,caps:!0})});return _0x11fb6c(merge([e([-.23,-.23,.075],[.23,.23,.075]),e([.23,-.23,.0765],[-.23,.23,.0765])]),{center:!1,shine:.75})}),oMesh=()=>cached("ttt-o-v2",()=>{const e=Array.from({length:41},(e,o)=>{const t=o/40*Math.PI*2;return[.23*Math.cos(t),.23*Math.sin(t),.075]});return _0x11fb6c(tube(e,{radius:.075,sides:16,smoothness:2,caps:!1}),{center:!1,shine:.75})}),panelMesh=(e,o,t,s=0)=>cached("ttt-panel:"+e+":"+o+":"+t+":"+s,()=>_0x11fb6c(extrude((new Path).addRoundedRect(-e/2,-e/2,e,e,o),{depth:t}),{shine:s})),pieceColor=e=>toColor("X"===e?COLORS.X:COLORS.O);function spawnBoard(e,o,t){const s=[],l=o=>s.push(e.spawn({pickable:!1,...o})),a=o.size+2*o.pad,n="classic"===t.mode,r=Math.max(6,.075*o.cell),i=.1*o.cell;if(n){l({mesh:panelMesh(a,14,12),position:[0,0,-6],color:toColor(COLORS.FRAME)}),l({mesh:panelMesh(o.size+4,10,1),position:[0,0,.4],color:toColor(COLORS.WELL)}),l({mesh:panelMesh(o.size,6,1),position:[0,0,.8],color:toColor(COLORS.SURFACE)});for(let e=0;e<9;e++)if((Math.floor(e/3)+e)%2==1){const[t,s]=cellCentre(o,e);l({mesh:"cube",position:[t,s,1.3],scale:[o.cell,o.cell,.02],color:toColor(COLORS.SURFACE_ALT)})}}else{l({mesh:panelMesh(a,8,12),position:[0,0,-6],color:toColor(t.BOARD.SURFACE)});for(let e=0;e<9;e++){const[s,a]=cellCentre(o,e);l({mesh:panelMesh(Math.round(o.cell-2*r),10,3),position:[s,a,1.5],scale:1,color:toColor(t.BOARD.CELL_EMPTY)})}}const p=toColor(n?COLORS.GRID:t.BOARD.GRID_LINE),h=[0,0,0,.18],u=o.size-.16*o.cell,d=quat.z(Math.PI/2);for(const e of[-.5,.5])l({mesh:"capsule",position:[e*o.cell+.25*r,.25*-r,1.05],scale:[1.5*r,u,.6],color:h}),l({mesh:"capsule",position:[.25*r,e*o.cell-.25*r,1.05],rotation:d,scale:[1.5*r,u,.6],color:h}),l({mesh:"capsule",position:[e*o.cell,0,1+i/2],scale:[r,u,i],color:p}),l({mesh:"capsule",position:[0,e*o.cell,1+i/2],rotation:d,scale:[r,u,i],color:p});return s}export function buildScene(e,o,t,s){const l=spawnBackdrop(e,o.width,o.height,-30,t);placeTiltedBackdrop(e,l,o,30);const a=e.spawn({mesh:oMesh(),scale:0,color:toColor(COLORS.O,.35),pickable:!1}),n={backdrop:l,board:spawnBoard(e,o,t),pieces:Array(9).fill(null),ghost:a,line:null};return s.forEach((t,s)=>{t&&place(e,o,n,s,t,!1)}),n}export function removeScene(e,o){for(const t of[o.backdrop,...o.board,...o.pieces,o.ghost,o.line])null!=t&&e.despawn(t)}export function setSceneTheme(e,o,t,s){setBackdropTheme(e,t.backdrop,s);for(const o of t.board)e.despawn(o);t.board=spawnBoard(e,o,s)}const BOARD_TOP=1;export function place(e,o,t,s,l,a=!0){const[n,r]=cellCentre(o,s),i=e.spawn({mesh:"X"===l?xMesh():oMesh(),position:[n,r,BOARD_TOP],rotation:quat.z(a?"X"===l?-.6:.6:0),scale:a?0:o.cell,color:pieceColor(l),pickable:!1});e.spawn({mesh:"sphere",parent:i,position:[.04,-.04,.01],scale:[.23*2.5,.23*2.5,.01],color:[0,0,0,.2],pickable:!1}),a&&(e.animate(i,[{scale:1.18*o.cell,at:.6},{scale:.94*o.cell,at:.82},{scale:o.cell}],{duration:.36,easing:"easeOut"}),e.animate(i,{rotation:[0,0,0,1]},{duration:.3,easing:"easeOut"}),e.after(.2,()=>popBurst(e,{position:[n,r,BOARD_TOP+.15*o.cell],size:.7*o.cell,color:pieceColor(l),count:7}))),t.pieces[s]=i,hideGhost(e,t)}export function showGhost(e,o,t,s){const[l,a]=cellCentre(o,s);e.set(t.ghost,{position:[l,a,BOARD_TOP+.5],scale:.92*o.cell}),e.animate(t.ghost,{scale:.98*o.cell},{duration:.5,repeat:"forever",yoyo:!0,easing:"easeInOut"})}export function hideGhost(e,o){e.stopAnimation(o.ghost),e.set(o.ghost,{scale:0})}export function markWin(e,o,t,s){s.forEach((s,l)=>{const a=t.pieces[s];if(null==a)return;const[n,r]=cellCentre(o,s);e.animate(a,{color:WIN_GOLD},{duration:.25,delay:.08*l}),e.animate(a,[{position:[n,r,BOARD_TOP+.35*o.cell],at:.4},{position:[n,r,BOARD_TOP]}],{duration:.45,delay:.08*l,easing:"easeOut"})});const[l,a]=cellCentre(o,s[0]),[n,r]=cellCentre(o,s[2]),i=Math.hypot(n-l,r-a)+.5*o.cell,p=Math.atan2(r-a,n-l),h=.07*o.cell,u=BOARD_TOP+.075*o.cell*2+h,d=quat.z(p-Math.PI/2);t.line=e.spawn({mesh:"capsule",position:[(l+n)/2,(a+r)/2,u],rotation:d,scale:[2*h,.01,2*h],color:[1.6,1.25,.3,1],pickable:!1}),e.animate(t.line,{scale:[2*h,i,2*h]},{duration:.32,delay:.15,easing:"easeOut"}),e.animate(t.line,{color:[1.2,.95,.25,1]},{duration:.6,delay:.5,easing:"easeInOut",repeat:"forever",yoyo:!0}),effects.sparkle(e,{position:[(l+n)/2,(a+r)/2,u+4],count:30,size:.06*o.cell,speed:2.5*o.cell,lifetime:.7,gravity:2*-o.cell,colors:["#FFD54F","#FFC107","#FFFFFF"].map(e=>toColor(e))})}export function shrug(e,o,t){for(const s of t.pieces)null!=s&&e.animate(s,{shake:.04*o.cell},{duration:.4})}export function clearPieces(e,o){for(const t of o.pieces)null!=t&&(e.stopAnimation(t),e.set(t,{lifetime:.25}));o.pieces=Array(9).fill(null),null!=o.line&&e.despawn(o.line),o.line=null,hideGhost(e,o)}
@@ -1 +1 @@
1
- "use strict";const _0x2f5f66=_0x341f;!function(){const e=_0x341f,o=_0xf6a7();for(;;)try{if(335294==parseInt(e(494,"NPfc"))/1*(parseInt(e(521,"(Oqq"))/2)+parseInt(e(439,"XVYR"))/3*(parseInt(e(507,"smLq"))/4)+-parseInt(e(427,"NPfc"))/5+parseInt(e(473,"@ZIm"))/6+-parseInt(e(501,"Eyew"))/7+parseInt(e(514,"cwlC"))/8+-parseInt(e(445,"*w]g"))/9)break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x52f2c2,{useCallback,useEffect,useMemo,useRef,useState}from"react";import{View,StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{useTileHomeStore,useIsPlaying,useIsGameOver,useIsWin,useSlotTiles}from"./TileHomeStore.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameBoard}from"./components/GameBoard.js";import{TileSlot}from"./components/TileSlot.js";function _0x341f(e,o){e-=421;const t=_0xf6a7();let s=t[e];if(void 0===_0x341f.njETIc){const e=function(e,o){let t,s,n=[],r=0,W="";for(e=function(e){let o="",t="";for(let t,s,n=0,r=0;s=e.charAt(r++);~s&&(t=n%4?64*t+s:s,n++%4)?o+=String.fromCharCode(255&t>>(-2*n&6)):0)s="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(s);for(let e=0,s=o.length;e<s;e++)t+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(t)}(e),s=0;s<256;s++)n[s]=s;for(s=0;s<256;s++)r=(r+n[s]+o.charCodeAt(s%o.length))%256,t=n[s],n[s]=n[r],n[r]=t;s=0,r=0;for(let o=0;o<e.length;o++)s=(s+1)%256,r=(r+n[s])%256,t=n[s],n[s]=n[r],n[r]=t,W+=String.fromCharCode(e.charCodeAt(o)^n[(n[s]+n[r])%256]);return W};_0x341f.BYfinh=e,_0x341f.bOfYkw={},_0x341f.njETIc=!0}const n=t[0];_0x341f.Fxvcwc!==n&&(_0x341f.bOfYkw={},_0x341f.Fxvcwc=n);const r=_0x341f.bOfYkw[e];return void 0===r?(void 0===_0x341f.UivpIE&&(_0x341f.UivpIE=!0),s=_0x341f.BYfinh(s,o),_0x341f.bOfYkw[e]=s):s=r,s}import{AnimatingTileComponent}from"./components/AnimatingTile.js";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x24d4f9}from"../../helpers/index.js";import{GAME_IDS,DEFAULT_GAME_SETTINGS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";function _0xf6a7(){const e=["oHBcIuLUaWVcK8oX","WOf+vCk3W5rpzq","WOylWOZcJWRdHYnv","EmoIW67dN3jWW7hcJSkkW7tdQComWQC","qaNcHbHZW5ddMCotyM4Tcq","W7Pon8kIAmoDotHrW5tdVG","lmo0W7vP","CCkaW47cRtxdNmo3WOnIevWeWRm","khbHWQC4","BaBcLmo5","W6xdRCkMWQ5SDJy","aSokW4tcJWf+mW","yLKyWOK8uCokFeu1","pSoXW7X0WRi","W7NdG1nbwbpcMb4","W7ddNmkktSoJdSonqq","gsblorddM3S","WOO/W5enWPRdISoG","W7xcGSo0WPZdHaONW5CjW7T1W7ddOG","WOCLjhqUWO4Y","WRhcHCkbo1JcH8oIfbKbbSkDo28","W6hdVCkGWO99EtyS","W7ldUf4UWQVcQ8oUsei","W7fkW7ykB8kcWRu","W7ddUHq+","W5hcQe/cHCkUyCoPrSkQWR3cVSk/W7e","mX9DW4iiw8ow","vSo3W5/cGGZcISkAW71jo8oMhmk/W4RdTW","WRTJCmkzfaTohSkhl0FcPmk3","laVcN1mw","vSknc1ZcNbRcPa","etNdQItcTNu2","xJZcSsLp","WRddLXHQmSkXcMGiiW","W5SGw0FcQbjGBG","f8owW4xcLaz8iG","k8ohWQ7dTgBcKCkMWO9J","WQhcPWbWWPtcNmoJC0eA","W4NcJcPOWPqB","b8kmWOZcOqOuW53cJa","W7tdSumAWRhcMCo/qq","W4TWW5fyxCkJWO9d","WOqeWOdcIcFdKa5vWPFcNvxcPCoR","lCkJDSoorWFcHSoKWRm5WQqtnG","WO3dSa7dMmoUnmkCwCkLWPxcRG","bgNdL8olBMpdLCoZWQe","AqdcN8o5Aq","W6hdSuqSWRhcV8oQsue","a8oyWPlcUhpcGCkJWOr3q2ibWRr/W6DNWOecWR7cJYFcSa","itnfW7q7","W6Dyt8kkia","WQhcRq99W7ldJSk9BuyiWOSWeW","WO3dIWG+gSk3b2GCzWhcH8oXlq","WPrIvmkSW5nnDa","W7ddSvK9WQdcIG","WRhdULSyW7KUW7C5WOSCW7W","rmorW53dNa","Bmkxda7cIXxcVSkJW7TTC8oucCkWeuxcSCkfWRHs","W6vLsSk+n8k/ya","kvD9WPy/WOlcP8oQ","W41hiSkipmo9kJW","oa3cHhihW657aa","W5ldNgn1lKGNvZBcQKG","W6VcPZ1jWQaKW4S","WOFdGa8+fSkKphmhCJBcG8oU","W7/dPWi6WOBdLW","WO7cHciOBH1ssdNcGLHrWPa","iCobWOZdQMlcHSk7","W4uJf8oTWOeumWtcIv5HiCkC","WRFcO2FdH8k/CZ51W5O","ALldJvvckrG","BvhdIbveWRK5lmkfpYKiqW","W7FdQLZdL1NdQW","W7VdSbmiWOBdK3fM","ehJdGSoQBKxdGmo7","fs3dQa","FSo7lSkAhNNdGCoUWRio","kCoTW6jJWQtcQa0","EqS5W7bZW5tcI8onrMNdRXq","W6RdO1xdKa","W4hcVsNdSqS3WPxcJG","mWFcG0q","FmoYkCkjfui","Amo+kq","wSo0W4VdVKy","E0ldJejtaa3cN8oS","iYj2gqq","BqRcLmo/za","pb3cGLmwW6f7","WQ8tW40pWRCaEJa","W4xdGmksB8oa","W7NdOfpdG1ldLSovxLpdKW","W5BcOK/cImkGkCkazmkoWRtcKG","WPv4xSoZW5HmBG4","W6BdNmk4smo1m8omvG","DXRcQ8oHymkivWDG","Fmo2kCkEfvW","WRFcKCklietcLq","B8o4lSktbfxdH8ooWQKyWQm1aq","WQugWRrnmSoBWPKGw8kIhve","WOaKW4OlWPBdHCo4W63dOmk9ArxdI8ki","WPj7vSkLeq","WQhcGKfusd/cVZ/cVG","FmoInCkpfv7dGq","W6FdHSkRsmo0cCox"];return(_0xf6a7=function(){return e})()}import{playHaptic,HapticType}from"../../services/HapticsService.js";import{jsx as _0x53eecf,jsxs as _0x4edf11}from"react/jsx-runtime";export const TileHome=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:s,onShare:n,onShareScreenshot:r,onShowLeaderboard:W,bannerAd:f})=>{const a="8CNd",d=_0x341f,i={kgkno:function(e,o){return e(o)},wGSys:d(426,"oj9T"),AsKUQ:function(e,o,t){return e(o,t)},aHwFr:function(e){return e()},qYjDV:function(e,o,t){return e(o,t)},YwORq:function(e,o,t){return e(o,t)},HuYWL:function(e,o,t){return e(o,t)}},m=useIsPlaying(),l=useIsGameOver(),x=useIsWin(),S=i[d(452,"MMNq")](useSlotTiles),u=useRef(!1),_=useRef(0),[k,b]=useState(0),[C,G]=useState(0),p=useRef(!1);useEffect(()=>{const e=d;return u[e(524,"MPaB")]=useTileHomeStore.getState()[e(497,"U!rn")],useTileHomeStore[e(471,"AF]R")](o=>o[e(438,"cwlC")],o=>{u[e(490,"@ZIm")]=o})},[]);const O=useRef(e);O[d(518,"vqhT")]=e;const h=useRef(t);h.current=t;const T=useCallback(e=>{const o=d;h[o(455,"Tos!")]&&!p[o(517,"WbOb")]&&(_[o(428,")j@p")]=useTileHomeStore[o(423,"WbOb")]()[o(431,"@ZIm")],h[o(421,"5ypR")]({status:e,score:_[o(472,"smLq")][o(522,"MZWd")]()}),p[o(425,"Eyew")]=!0)},[]);useEffect(()=>{const e=d;return useTileHomeStore[e(463,"@ZIm")]().initializeGame(),()=>{const o=e;useTileHomeStore[o(441,"k!p1")]()[o(504,"(Oqq")]&&!p[o(469,"cwlC")]&&T("cancel"),useTileHomeStore[o(476,"@tsr")]()[o(487,"smLq")]()}},[]);const R=useRef(!1);useEffect(()=>{const e=d;"fBhbs"===e(515,a)?(l&&!R[e(479,"WL5V")]&&(i.kgkno(T,x?e(485,"*w]g"):i.wGSys),_[e(425,"Eyew")]=useTileHomeStore[e(491,"9rjw")]().score),R[e(506,"MZWd")]=l,!l&&(p.current=!1)):(_0x97c21b&&!_0x2461a4[e(505,"*w]g")]&&(_0x33765d(_0x3febbd?"win":e(483,"@ZIm")),_0x4a32be[e(523,"s6Hr")]=_0x28a796[e(461,a)]()[e(489,"U!rn")]),_0x1856dc[e(433,"T4V!")]=_0x363613,!_0x3d9960&&(_0xef7777[e(432,"FY&!")]=!1))},[l,x,T]);const H=useCallback(()=>{const e=d;p.current=!1,useTileHomeStore[e(442,"XVYR")]()[e(447,"@tsr")](),i[e(492,"MZWd")](playSound,GAME_SOUNDS.TILE_HOME[e(434,"15d&")],O.current.enableSounds),playHaptic(HapticType[e(440,"!Q7F")],O.current[e(444,"!yXF")])},[]),y=i[d(486,"NzOd")](useCallback,()=>{const e=d;T(e(498,"*w]g")),useTileHomeStore[e(475,"oj9T")]().resetGame(),useTileHomeStore[e(482,"IBwD")]()[e(454,"ZYW*")]()},[T]),I=useCallback(()=>{const e=d;s?.(),useTileHomeStore[e(462,"Dgd3")]()[e(449,"XVYR")](),useTileHomeStore.getState()[e(502,"MPaB")]()},[s]),v=i[d(451,")j@p")](useMemo,()=>({isVisible:l,score:_[d(460,"MMNq")],onPlayAgain:I,buttonText:x?d(512,"Dgd3"):d(435,"ZYW*"),scoreLabel:x?"You Won!":"Game Over",title:x?d(443,"Eyew"):"TIME UP!",message:x?d(450,"cwlC"):d(459,"FY&!")}),[l,I,x]),g=useMemo(()=>({gameId:GAME_IDS.TILE_HOME,settings:e,onSettingsChange:o}),[e,o]),q=e?.[d(474,"2q4(")]??0,w=l,B=i.AsKUQ(useMemo,()=>({isPlaying:!w&&m,gameOver:l,onStartGame:H,onStopGame:y,onShare:n,onShowLeaderboard:W,startButtonSubtext:d(511,"15d&")}),[w,l,m,H,y,n,W]),L=useMemo(()=>({overflow:d(437,"vqhT")}),[]),M={};M.paddingTop=q||0;const N=i[d(488,"s6Hr")](useMemo,()=>[styles[d(466,"ZYW*")],M],[q]),Q=useCallback(e=>b(e[d(446,"NPfc")].layout.y),[]),P=useCallback(e=>G(e[d(464,"5RB6")][d(499,"Vp&6")].y),[]),V={};V[d(520,"WL5V")]=S;const j={};j.settings=e;const A={};A.settings=e,A[d(496,"MZWd")]=C,A.slotTop=k;const E={...B},K={...v};K[d(465,"!Q7F")]=r,K.bannerAd=f;const F={...g};return _0x53eecf(GestureHandlerRootView,{style:styles[d(481,"2q4(")],children:i[d(503,"9xlo")](_0x4edf11,_0x24d4f9,{offset:q,children:[_0x53eecf(ScoreBoard,{offset:q}),_0x53eecf(View,{style:N,children:i.qYjDV(_0x4edf11,View,{style:styles.gameArea,children:[_0x53eecf(View,{onLayout:Q,children:_0x53eecf(TileSlot,V)}),_0x4edf11(View,{style:L,onLayout:P,children:[i.HuYWL(_0x53eecf,GameBoard,j),_0x53eecf(AnimatingTileComponent,A)]})]})}),_0x53eecf(GameControlButton,E),_0x53eecf(GameOverModal,K),_0x53eecf(GameSettingsModal,F)]})})};const _0x2f0a6f={};_0x2f0a6f[_0x2f5f66(458,"rWL4")]=1,_0x2f0a6f[_0x2f5f66(429,"2XY7")]=BACKGROUND_COLOR;const _0x1bb8ed={};_0x1bb8ed[_0x2f5f66(513,"WL5V")]=1,_0x1bb8ed[_0x2f5f66(422,"Vp&6")]="center",_0x1bb8ed[_0x2f5f66(493,"2q4(")]=_0x2f5f66(456,"XVYR"),_0x1bb8ed[_0x2f5f66(430,"9xlo")]="box-none",_0x1bb8ed[_0x2f5f66(448,"U!rn")]="100%";const _0x5bde92={};_0x5bde92[_0x2f5f66(478,"*w]g")]="center",_0x5bde92.justifyContent=_0x2f5f66(484,"*w]g"),_0x5bde92[_0x2f5f66(424,"XVYR")]="center",_0x5bde92[_0x2f5f66(477,"T4V!")]=10,_0x5bde92[_0x2f5f66(500,"*w]g")]=_0x2f5f66(495,"Tos!"),_0x5bde92.overflow=_0x2f5f66(508,"Tos!");const _0x4b97d8={};_0x4b97d8[_0x2f5f66(516,"U!rn")]=_0x2f0a6f,_0x4b97d8[_0x2f5f66(510,"NzOd")]=_0x1bb8ed,_0x4b97d8[_0x2f5f66(509,"!yXF")]=_0x5bde92;const styles=StyleSheet[_0x2f5f66(467,"oj9T")](_0x4b97d8);TileHome.displayName=_0x2f5f66(436,"IA6s");
1
+ "use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{formatTime,GAME_IDS}from"../../services/UtilsService.js";import{getFruit,isFruitBuilt}from"../shared/EngineFruits.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,LIGHT,POINTS_PER_SET,TILE_TYPES,TIME_LIMIT,TOTAL_SETS}from"./TileHomeConstants.js";import{addFruit,createGame,dispose,reset,setLayout,setTheme,start,tap,tick}from"./TileHomeGame.js";import{jsx as _0x3d96d7}from"react/jsx-runtime";const SFX=GAME_SOUNDS.TILE_HOME,formatScore=e=>e.toLocaleString(),FRUIT_DETAIL=.25;export const TileHome=engineGame(GAME_IDS.TILE_HOME,e=>{const[t,r]=useLiveState(0),[i,a]=useLiveState(TIME_LIMIT),{status:s,screen:o,gameOver:n}=useEngineGame(e,{gameId:GAME_IDS.TILE_HOME,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,r,i)=>{const a=getLayout(t,r,i);return setLayout(e,a),a.boardWidth},tap:tap,onStart:e=>e(SFX.START,HapticType.MEDIUM),wire:(e,t)=>{e.onScore=r,e.onTime=a,e.onPick=()=>t(SFX.PICK,HapticType.LIGHT),e.onMatch=()=>t(SFX.MATCH,HapticType.MEDIUM),e.onWin=()=>t(SFX.WIN,HapticType.SUCCESS),e.onLose=()=>t(SFX.GAME_OVER,HapticType.HEAVY);const i=[...new Set(TILE_TYPES.map(e=>e.fruit))];for(const t of i)isFruitBuilt(t,.25)&&addFruit(e,t,getFruit(t,.25));const s=i.filter(e=>!isFruitBuilt(e,.25));let o=0;const n=()=>{const t=s.shift();t&&!e.world.isDisposed&&(addFruit(e,t,getFruit(t,.25)),s.length&&(o=requestAnimationFrame(n)))};return s.length&&(o=requestAnimationFrame(n)),()=>{o&&cancelAnimationFrame(o)}}}),m=Math.max(0,TOTAL_SETS-Math.floor(t/POINTS_PER_SET));return _0x3d96d7(EngineGameScreen,{...o,light:LIGHT,columns:[{label:"SCORE",value:formatScore(t)},{label:"SETS",value:String(m)},{label:"TIME",value:formatTime(Math.max(0,Math.ceil(i)))}],subtext:"Match tiles!",gameOver:n({title:"win"===s?"YOU WON!":"TIME UP!",message:"win"===s?"All tiles sorted home!":"You ran out of time!",scoreLabel:"win"===s?"You Won!":"Game Over",score:t,formatter:formatScore,buttonText:"win"===s?"Play Again!":"Try Again!"})})});
@@ -1 +1 @@
1
- "use strict";const _0x85311c=_0x43ff;!function(){const x=_0x43ff,W=_0x45bb();for(;;)try{if(263759==-parseInt(x(348,"WQvK"))/1*(-parseInt(x(317,"V2SC"))/2)+parseInt(x(339,"GjLF"))/3*(parseInt(x(302,"%Ay%"))/4)+-parseInt(x(356,"(WE@"))/5*(-parseInt(x(326,"qwZV"))/6)+-parseInt(x(346,"F$77"))/7*(-parseInt(x(367,"Fv%b"))/8)+parseInt(x(362,"$@P!"))/9*(parseInt(x(318,"05*)"))/10)+-parseInt(x(354,"fBmU"))/11*(parseInt(x(306,"18OC"))/12)+-parseInt(x(342,"GjLF"))/13*(parseInt(x(337,"09TE"))/14))break;W.push(W.shift())}catch(x){W.push(W.shift())}}();import{PRIMARY_COLOR,BACKGROUND_COLOR}from"../../services/GamesConstants.js";const _0x27edfc={};_0x27edfc[_0x85311c(347,"SuDV")]=BACKGROUND_COLOR,_0x27edfc[_0x85311c(335,"]Gm&")]=PRIMARY_COLOR,_0x27edfc[_0x85311c(320,"3XYm")]=_0x85311c(334,"VrQA"),_0x27edfc[_0x85311c(311,"Fv%b")]=_0x85311c(338,"crnB"),_0x27edfc[_0x85311c(321,"fBmU")]="rgba(0, 0, 0, 0.15)",_0x27edfc[_0x85311c(315,"w$4V")]=_0x85311c(373,"]Gm&"),_0x27edfc.SLOT_BORDER=_0x85311c(309,"%Ay%"),_0x27edfc[_0x85311c(323,"V2SC")]=_0x85311c(328,"ErX*");export const TILE_HOME_COLORS=_0x27edfc;const _0x303c1a={};function _0x45bb(){const x=["fqddV1e","W5xcSd/dTG","uZtcIMasFCo/","WOlcQ8o0amoda8kBBXb6W6CmiW","lCo6WOn8tSkfWP1iW5rRFe8aW7JdRSknmgeVA1z1WRpdMW","W61nqaqIo8odarVcQG","wcSLb8klW4pcUq","fJtdVri","WORdPmk3qGRdHvCBW4BdPW","W6fisKqX","dCoRW6D9","sLlcQWhdSSoPn2FdPeLDW6Wy","W4VcVJ/dTLDZW6FcUmkLW6pcNG","rmkstSob","WR7dTvOeC8kAW60","CmonW4r/W7RdReFcL19RWOdcSmk1","aW7cHwmM","D8kBW78IWPVcGwDImmkH","waxcPLddV8k5oW","W6ddKrtcLKJdUCoocCorWR5fWP1L","W4VcSgPzkd3dPCoUyWWF","W4FdTK8/AG","tIf0a8kiW4ldLCkNWR3dKSkMWOG","WQPgW5NdTSkPW6hcLW","cri7jSk+tdNcHKCummocWPBdVYa","mHrKuhJcN3i","W749W7hdMmkRw8ooW7ZdN8kfWOnX","vtfrndurWO53W7/cRq","W4ZdKmkHcZW","W4xcO33cNSk7W5zkaSodWP7cS8ogmqRcJW","kIddUmoPWOZcNCoKdmo6hCkk","W7tcL8oxpZVdNw02W5tdTSo3W6W","WOHFWO3cQ8ohlCo3W7hdUmkoWR51WOrfWO8","WQ0YW5bDBSoQWPq7","W5tdVeiZCa","WOJcQ8o7cmkuC8oytbDx","wvGGW7W","aHVcI8k5qeFdGYHlvmkXW7VdKJ3cGmobWOFcTCkuW5PfWQpdVvVdVW","WPS7gSkfW5pdMmk5W6i","dXpcIgiZBq","WPlcOHngW5K","xq/dLSooWRxdVmky","ArqWW5TE","x8o5W5iRe1vQ","d8opWQHqj8oLW7e","WRPLW51rmmk3W6q","W4NdV0KzWP8kwaD7tt0VW4S","mHm0bh/dIsq","WQPvW59FrCoYWQ0","WPa5eXVdJYhcUCkEWQdcSSod","W5NdTSkUx8kf","WQGZW7fKrSogWRmj","xCksv8obW5atW4xdV8kxcq","W5NdGue2j2GVuNiaeei","vSkGh8oQvrHLww0","W6Hgh1OOmmoroG","W63dVSkolWKrpaGotq","W5/dHmkWuSk1scO","EtOxqmoxpe4","W6NdLCknzmkOD8oSDWjwW48spW","W77dVfiknq","WOK6zCkXWQpcRmkZ","WPBcVX5zW45o","tfVdLCoCWQBcMSofaG","WOu+fHpdKtJcSCkdWQNcPmojcCorWQZcL8ojWQ0o","WONdOmk5tZ7dMLCJW7hdIq","pmoYWO1Yfa","WR7dTHVdSsCToW","uM9lDW","WR7cPf1wjSkEW68","WRpcGJ57W69IpG5SzHuRW4K","WP45y8oRW5tdJSkCW7ZcNCki","W6Xgs04","mHa0wc/cNhm","esXRn8okWQzTtq","W51QW7pcH8ooWORdS8orhLPgWQBdPSkk","WQRdIHePrK3dV8oTtdeBW6u","imofWQD0WQS"];return(_0x45bb=function(){return x})()}_0x303c1a.id=0,_0x303c1a[_0x85311c(304,"S5pA")]="apple",_0x303c1a[_0x85311c(333,"Kf!u")]=_0x85311c(349,"w$4V");const _0x46f38c={id:1};_0x46f38c[_0x85311c(376,"au]%")]=_0x85311c(330,"3ip0"),_0x46f38c[_0x85311c(357,"]Gm&")]="#f97316";const _0x2e6c3c={id:2,name:"banana"};_0x2e6c3c.color=_0x85311c(332,"fBmU");const _0xcc98c0={id:3};_0xcc98c0[_0x85311c(369,"%Ay%")]=_0x85311c(353,"09TE"),_0xcc98c0[_0x85311c(333,"Kf!u")]=_0x85311c(360,"$o8b");const _0x2ba1b2={};function _0x43ff(x,W){x-=299;const _=_0x45bb();let o=_[x];if(void 0===_0x43ff.FSyMSQ){const x=function(x,W){let _,o,d=[],f=0,t="";for(x=function(x){let W="",_="";for(let _,o,d=0,f=0;o=x.charAt(f++);~o&&(_=d%4?64*_+o:o,d++%4)?W+=String.fromCharCode(255&_>>(-2*d&6)):0)o="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(o);for(let x=0,o=W.length;x<o;x++)_+="%"+("00"+W.charCodeAt(x).toString(16)).slice(-2);return decodeURIComponent(_)}(x),o=0;o<256;o++)d[o]=o;for(o=0;o<256;o++)f=(f+d[o]+W.charCodeAt(o%W.length))%256,_=d[o],d[o]=d[f],d[f]=_;o=0,f=0;for(let W=0;W<x.length;W++)o=(o+1)%256,f=(f+d[o])%256,_=d[o],d[o]=d[f],d[f]=_,t+=String.fromCharCode(x.charCodeAt(W)^d[(d[o]+d[f])%256]);return t};_0x43ff.ZhsdUm=x,_0x43ff.ffumHu={},_0x43ff.FSyMSQ=!0}const d=_[0];_0x43ff.DQJxgJ!==d&&(_0x43ff.ffumHu={},_0x43ff.DQJxgJ=d);const f=_0x43ff.ffumHu[x];return void 0===f?(void 0===_0x43ff.PgCrxB&&(_0x43ff.PgCrxB=!0),o=_0x43ff.ZhsdUm(o,W),_0x43ff.ffumHu[x]=o):o=f,o}_0x2ba1b2.id=4,_0x2ba1b2[_0x85311c(363,"GbO[")]="kiwi",_0x2ba1b2[_0x85311c(331,"09TE")]="#84cc16";const _0x4ef6b1={id:5};_0x4ef6b1[_0x85311c(301,"UufN")]="strawberry",_0x4ef6b1[_0x85311c(351,"$o8b")]=_0x85311c(314,"PeJh");const _0x29c907={id:6};_0x29c907[_0x85311c(369,"%Ay%")]="mango",_0x29c907[_0x85311c(319,"SuDV")]=_0x85311c(364,"crnB");const _0x4c8640={id:7};_0x4c8640[_0x85311c(370,"(bky")]="cherries",_0x4c8640[_0x85311c(368,"vp@o")]=_0x85311c(316,"crnB");const _0x3a7d5a={id:8,name:"pineapple"};_0x3a7d5a[_0x85311c(300,"GbO[")]=_0x85311c(336,"GjLF");const _0x3f61a4={id:9};_0x3f61a4[_0x85311c(327,"^S[0")]=_0x85311c(343,"S5pA"),_0x3f61a4[_0x85311c(341,"qwZV")]=_0x85311c(352,"$@P!");const _0x523727={id:10};_0x523727[_0x85311c(359,"5e*2")]=_0x85311c(312,"Ttj@"),_0x523727[_0x85311c(307,"3ip0")]=_0x85311c(305,"$o8b");const _0x1666b4={id:11};_0x1666b4.name=_0x85311c(303,"(bky"),_0x1666b4[_0x85311c(325,"Ttj@")]=_0x85311c(375,"LrJ5");export const TILE_TYPES=[_0x303c1a,_0x46f38c,_0x2e6c3c,_0xcc98c0,_0x2ba1b2,_0x4ef6b1,_0x29c907,_0x4c8640,_0x3a7d5a,_0x3f61a4,_0x523727,_0x1666b4];const _0x140769={BOARD_COLS:6,BOARD_ROWS:7};_0x140769[_0x85311c(345,"(#EG")]=54,_0x140769[_0x85311c(340,"44Y[")]=2,_0x140769[_0x85311c(361,"09TE")]=12,_0x140769[_0x85311c(322,"(WE@")]=10,_0x140769[_0x85311c(350,"qwZV")]=7,_0x140769.MATCH_COUNT=3,_0x140769.LAYER_COUNT=3,_0x140769[_0x85311c(366,"PeJh")]=6,_0x140769[_0x85311c(355,"44Y[")]=200;export const TILE_HOME_GAME_CONFIG=_0x140769;
1
+ "use strict";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const BOARD_COLS=6;export const BOARD_ROWS=7;export const LAYER_COUNT=3;export const TILES_PER_TYPE=6;export const SLOT_CAPACITY=7;export const MATCH_COUNT=3;export const TIME_LIMIT=300;export const POINTS_PER_SET=500;export const TILE_TYPES=[{fruit:"apple",color:"#dc2626"},{fruit:"orange",color:"#f97316"},{fruit:"banana",color:"#fbbf24"},{fruit:"grapes",color:"#7c3aed"},{fruit:"kiwi",color:"#84cc16"},{fruit:"strawberry",color:"#ef4444"},{fruit:"mango",color:"#f59e0b"},{fruit:"cherries",color:"#be123c"},{fruit:"pineapple",color:"#eab308"},{fruit:"watermelon",color:"#22c55e"},{fruit:"peach",color:"#fda4af"},{fruit:"pomegranate",color:"#9f1239"}];export const TOTAL_SETS=6*TILE_TYPES.length/3;export const FLY_TIME=.25;export const LIFT_AT=.28;export const LIFT_SCALE=1.08;export const MATCH_CHECK_DELAY=.3;export const MATCH_REMOVE_DELAY=.4;export const MATCH_BURST_TIME=.55;export const SHADE_TIME=.22;export const SHIFT_SPRING={stiffness:200,damping:15};export const LAND_SPRING={stiffness:260,damping:9};export const LAND_SQUASH=1.12;export const INTRO_SPRING={stiffness:400,damping:18,mass:1};export const RIPPLE_TIME=.3;export const LAYER_STAGGER=.07;export const shadeFor=t=>t>0?Math.min(.2+.15*t,.6):0;export const LIGHT=frontLight([-.35,.6,1],.5);export const TILE_FACE="#fffdf7";export const TILE_THICKNESS=.4;export const CLASSIC_BOARD="rgba(255, 255, 255, 0.35)";export const CLASSIC_TRAY="rgba(255, 255, 255, 0.45)";export const CLASSIC_TRAY_BORDER="rgba(255, 255, 255, 0.6)";export const CLASSIC_SLOT="rgba(255, 255, 255, 0.25)";export const CLASSIC_SLOT_BORDER="rgba(255, 255, 255, 0.5)";const BOARD_PADDING=8,TRAY_PADDING=8,TRAY_BORDER=1,SLOT_GAP=4,TRAY_BOARD_GAP=10;export function getLayout(t,o,r){const e=gameWidthFor(t),n=(e-16)/6,s=n-2,p=7*n+16,T=Math.floor((e-16-24)/7),a=T+16,i=r+(o-r-(a+10+p))/2,_=(t-e)/2;return{width:t,height:o,boardLeft:_,boardTop:i+a+10,boardWidth:e,boardHeight:p,cell:n,tile:s,fruit:s-12,trayLeft:_,trayTop:i,trayWidth:e,trayHeight:a,slot:T}}export const tileOrigin=(t,o,r,e)=>[t.boardLeft+8+o*t.cell+e*(t.cell/2),t.boardTop+8+r*t.cell+e*(t.cell/2)];export const slotOrigin=(t,o)=>[t.trayLeft+1+8+o*(t.slot+4),t.trayTop+1+8];
@@ -0,0 +1 @@
1
+ "use strict";import{World}from"@nayan-ui/engine";import{TIME_BONUS_PER_SECOND}from"../../services/ScoringService.js";import{popAndBurst}from"../shared/EngineBlasts.js";import{introPlayed,toColor}from"../shared/EngineUtils.js";import{BOARD_COLS,BOARD_ROWS,FLY_TIME,INTRO_SPRING,LAND_SPRING,LAND_SQUASH,LAYER_COUNT,LAYER_STAGGER,LIFT_AT,LIFT_SCALE,MATCH_BURST_TIME,MATCH_CHECK_DELAY,MATCH_COUNT,MATCH_REMOVE_DELAY,POINTS_PER_SET,RIPPLE_TIME,SHADE_TIME,shadeFor,SHIFT_SPRING,SLOT_CAPACITY,slotOrigin,TILE_TYPES,tileOrigin,TILES_PER_TYPE,TIME_LIMIT}from"./TileHomeConstants.js";import{addTileFruit,buildScenery,layerZ,spawnTile,toWorld,trayZ,Z_FLYING}from"./TileHomeScene.js";const WORLD_CAPACITY=900,shuffle=o=>{for(let t=o.length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1));[o[t],o[r]]=[o[r],o[t]]}return o};function generateBoard(){const o=shuffle(TILE_TYPES.flatMap((o,t)=>Array.from({length:TILES_PER_TYPE},()=>t))),t=[];for(let o=0;o<LAYER_COUNT;o++)for(let r=0;r<BOARD_ROWS-o;r++)for(let n=0;n<BOARD_COLS-o;n++)t.push({col:n,row:r,layer:o});return shuffle(t),o.slice(0,t.length).map((o,r)=>({typeId:o,...t[r],blocking:0,covers:[],root:null,shade:null,fruit:null,parts:[]}))}function countBlocking(o){for(const t of o)t.blocking=0,t.covers.length=0;for(const t of o){const r=t.col+.5*t.layer,n=t.row+.5*t.layer;for(const e of o)e.layer<=t.layer||Math.abs(e.col+.5*e.layer-r)<1&&Math.abs(e.row+.5*e.layer-n)<1&&(t.blocking++,e.covers.push(t))}}const introDelay=o=>{const t=(BOARD_COLS-1)/2,r=(BOARD_ROWS-1)/2,n=Math.hypot(t+1,r+1),e=Math.hypot(o.col+.5*o.layer-t,o.row+.5*o.layer-r);return Math.min(e,n)/n*RIPPLE_TIME+o.layer*LAYER_STAGGER};export function createGame(o){const t=new World(900),r=generateBoard();countBlocking(r);const n={world:t,camera:{eye:[0,0,500],target:[0,0,0],fov:1,ortho:1},theme:o,layout:null,fruits:{},scenery:[],phase:"ready",get score(){return t.scoreboard.score},won:!1,board:r,slot:[],flying:null,matching:[],intro:!0,introAge:-1,onPhase:o=>{},onScore:o=>{},onTime:o=>{},onPick:()=>{},onMatch:()=>{},onWin:()=>{},onLose:()=>{}};return showFullTime(n),t.scoreboard.handlers={onScore:o=>n.onScore(o),onSecond:o=>n.onTime(o),onTimeUp:()=>"playing"===n.phase&&end(n,!1)},n}const after=(o,t,r)=>o.world.after(t,r);function showFullTime(o){const t=o.world.scoreboard;t.reset(),t.startCountdown(TIME_LIMIT),t.stop()}export function addFruit(o,t,r){if(o.world.isDisposed||o.fruits[t])return;o.fruits[t]=r;const n=o.layout;if(!n)return;const e=[...o.board,...o.slot,...o.flying?[o.flying.tile]:[]];for(const l of e)null!=l.root&&null==l.fruit&&TILE_TYPES[l.typeId].fruit===t&&(l.fruit=addTileFruit(o.world,n,l.root,r,!0),l.parts.push(l.fruit))}export function setLayout(o,t){const r=o.layout;o.layout=t,o.camera.ortho=t.height/2;for(const t of o.scenery)o.world.despawn(t);if(o.scenery=buildScenery(o.world,t,o.theme),r&&r.tile===t.tile&&r.slot===t.slot){const r=o.world.transforms;for(const n of o.board){if(null==n.root)continue;const[o,e,l]=boardPosition(t,n);r.position(n.root,o,e,l)}o.slot.forEach((o,n)=>{if(null==o.root)return;const[e,l,s]=slotPosition(t,n);r.position(o.root,e,l,s)}),r.flush()}else spawnAll(o)}export function setTheme(o,t){o.theme=t;const r=o.layout;if(r&&!o.world.isDisposed){for(const t of o.scenery)o.world.despawn(t);o.scenery=buildScenery(o.world,r,t)}}const boardPosition=(o,t)=>{const[r,n]=tileOrigin(o,t.col,t.row,t.layer);return toWorld(o,r+o.tile/2,n+o.tile/2,layerZ(t.layer))},slotPosition=(o,t,r=trayZ)=>{const[n,e]=slotOrigin(o,t);return toWorld(o,n+o.slot/2,e+o.slot/2,r)},slotScale=o=>o.slot/o.tile;function despawnTile(o,t){null!=t.root&&o.world.despawn(t.root),t.root=null,t.shade=null,t.fruit=null,t.parts=[]}function spawnAll(o){const t=o.layout,r=o.fruits;if(!t)return;o.flying&&land(o);for(const t of[...o.board,...o.slot])despawnTile(o,t);const n=o.intro;n&&(o.introAge=0);for(const e of o.board){const[l,s]=tileOrigin(t,e.col,e.row,e.layer),i=spawnTile(o.world,t,r[TILE_TYPES[e.typeId].fruit],l+t.tile/2,s+t.tile/2,layerZ(e.layer),n?0:1);e.root=i.root,e.shade=i.shade,e.fruit=i.fruit,e.parts=i.parts,o.world.set(i.shade,{color:[0,0,0,shadeFor(e.blocking)]}),n&&o.world.animate(i.root,{scale:1},{spring:INTRO_SPRING,delay:introDelay(e)})}o.slot.forEach((n,e)=>{if(o.matching.includes(n))return;const[l,s]=slotOrigin(t,e),i=spawnTile(o.world,t,r[TILE_TYPES[n.typeId].fruit],l+t.slot/2,s+t.slot/2,trayZ,slotScale(t));n.root=i.root,n.shade=i.shade,n.fruit=i.fruit,n.parts=i.parts})}export function start(o){"ready"===o.phase&&(o.phase="playing",o.world.scoreboard.startCountdown(TIME_LIMIT),o.onPhase("playing"))}export function reset(o){o.world.cancelTimers(),o.flying&&despawnTile(o,o.flying.tile),o.flying=null;for(const t of[...o.board,...o.slot,...o.matching])despawnTile(o,t);o.board=generateBoard(),countBlocking(o.board),o.slot=[],o.matching=[],o.intro=!0,spawnAll(o),showFullTime(o),o.won=!1,o.phase="ready",o.onScore(0),o.onTime(TIME_LIMIT),o.onPhase("ready")}export function dispose(o){o.world.cancelTimers(),o.world.dispose()}function end(o,t){o.world.cancelTimers(),o.world.scoreboard.stop(),o.won=t,o.phase="over",t?o.onWin():o.onLose(),o.onPhase("over")}export function tick(o,t){o.world.isDisposed||(introPlayed(o,t),o.world.update(t))}export function tap(o,t,r){const n=o.layout;if(!n||"playing"!==o.phase||o.flying)return;const e=o.board.findIndex(o=>{if(o.blocking>0)return!1;const[e,l]=tileOrigin(n,o.col,o.row,o.layer);return t>=e&&t<=e+n.tile&&r>=l&&r<=l+n.tile});if(e<0)return;const l=o.board.splice(e,1)[0];for(const t of l.covers)t.blocking--,null!=t.shade&&o.world.animate(t.shade,{color:[0,0,0,shadeFor(t.blocking)]},{duration:SHADE_TIME});const s=o.slot.findIndex(o=>o.typeId===l.typeId),i=s>=0?s+1:o.slot.length;if(o.flying={tile:l,index:i},arrangeSlot(o),null!=l.root){const t=boardPosition(n,l);o.world.set(l.root,{position:[t[0],t[1],Z_FLYING]}),o.world.animate(l.root,{position:slotPosition(n,i,Z_FLYING)},{duration:FLY_TIME}),o.world.animate(l.root,[{scale:LIFT_SCALE,at:LIFT_AT},{scale:slotScale(n)}],{duration:FLY_TIME})}after(o,FLY_TIME,()=>land(o)),o.onPick()}function land(o){const t=o.flying,r=o.layout;if(!t||!r)return;o.flying=null;const n=t.tile,e=o.slot.findIndex(o=>o.typeId===n.typeId),l=e>=0?e+1:o.slot.length;if(o.slot.splice(l,0,n),null!=n.root){const t=slotScale(r);o.world.stopAnimation(n.root),o.world.set(n.root,{position:slotPosition(r,l),scale:t*LAND_SQUASH}),o.world.animate(n.root,{scale:t},{spring:LAND_SPRING})}arrangeSlot(o,n),after(o,MATCH_CHECK_DELAY,()=>checkMatches(o))}function arrangeSlot(o,t){const r=o.layout;if(!r)return;const n=o.flying?.index??-1;o.slot.forEach((e,l)=>{e!==t&&null!=e.root&&o.world.animate(e.root,{position:slotPosition(r,n>=0&&l>=n?l+1:l)},{spring:SHIFT_SPRING})})}function checkMatches(o){if("playing"===o.phase&&!o.matching.length){for(let t=0;t<TILE_TYPES.length;t++){const r=o.slot.filter(o=>o.typeId===t);if(!(r.length<MATCH_COUNT))return o.matching=r.slice(0,MATCH_COUNT),burstMatch(o),o.onMatch(),void after(o,MATCH_REMOVE_DELAY,()=>removeMatch(o))}o.slot.length>=SLOT_CAPACITY&&end(o,!1)}}function burstMatch(o){const t=o.layout;o.matching.forEach((r,n)=>{const e=r.root;if(null==e)return;const l=slotPosition(t,o.slot.indexOf(r)),s=toColor(TILE_TYPES[r.typeId].color);popAndBurst(o.world,e,{scale:slotScale(t),flash:r.parts,delay:n/o.matching.length*.1*MATCH_BURST_TIME,duration:MATCH_BURST_TIME},{position:[l[0],l[1],l[2]+40],size:t.slot,color:s,glowZ:l[2]-2}).then(()=>{o.world.despawn(e)}),r.root=null,r.parts=[]})}function removeMatch(o){if("playing"!==o.phase)return;const t=new Set(o.matching);o.slot=o.slot.filter(o=>!t.has(o)),o.matching=[],o.world.scoreboard.add(POINTS_PER_SET),arrangeSlot(o),0===o.board.length&&0===o.slot.length&&!o.flying&&(o.world.scoreboard.awardTimeBonus(TIME_BONUS_PER_SECOND),end(o,!0))}
@@ -0,0 +1 @@
1
+ "use strict";import{extrude,Path}from"@nayan-ui/engine";import{spawnBackdrop}from"../shared/EngineBackdrop.js";import{spawnRaisedBlock}from"../shared/EngineBlocks.js";import{cacheGameAsset,createGameMesh as _0x4e9b43}from"../shared/EngineMeshes.js";import{toColor}from"../shared/EngineUtils.js";import{CLASSIC_BOARD,CLASSIC_SLOT,CLASSIC_SLOT_BORDER,CLASSIC_TRAY,CLASSIC_TRAY_BORDER,SLOT_CAPACITY,slotOrigin,TILE_FACE,TILE_THICKNESS}from"./TileHomeConstants.js";export const Z_BACKDROP=1;const Z_PANELS=4,Z_LAYER=120,Z_TILE_BASE=20;export const Z_FLYING=420;const FRUIT_LIFT=32,SHADE_LIFT=70;export const layerZ=e=>20+120*e;export const trayZ=20;export const toWorld=(e,t,o,s=0)=>[t-e.width/2,e.height/2-o,s];const meshes=new Map,cached=(e,t)=>{let o=meshes.get(e);return!o&&(o=cacheGameAsset("tile-home/TileHomeScene:"+e,t),meshes.set(e,o)),o};function flatLayer(e,t,o){const s=extrude(e,{depth:0,fillRule:"evenodd"}),r=s.vertices;for(let e=0;e<r.length;e+=11){const[s,a,n]=o(r[e],-r[e+1]);r[e+2]=t,r[e+6]=s,r[e+7]=a,r[e+8]=n}return s}const shadeMesh=e=>cached("shade:"+e,()=>_0x4e9b43(flatLayer((new Path).addRoundedRect(0,0,e,e,8),0,()=>[1,1,1]),{center:!1})),panelMesh=(e,t,o,s=0)=>cached("panel:"+e+":"+t+":"+o+":"+s,()=>{const r=(new Path).addRoundedRect(0,0,e,t,o);return s>0&&r.addRoundedRect(s,s,e-2*s,t-2*s,o-s),_0x4e9b43(flatLayer(r,0,()=>[1,1,1]),{center:!1})});export function buildScenery(e,t,o){const s="classic"===o.mode,r=[spawnBackdrop(e,t.width,t.height,1,o)],a=(o,s,a,n,i,d,l=0,h=4)=>r.push(e.spawn({mesh:panelMesh(a,n,i,l),position:toWorld(t,o,s,h),color:toColor(d),pickable:!1})),n=s?16:8;a(t.boardLeft,t.boardTop,t.boardWidth,t.boardHeight,n,s?CLASSIC_BOARD:o.BOARD.SURFACE),s||a(t.boardLeft,t.boardTop,t.boardWidth,t.boardHeight,n,o.BOARD.BORDER,1,4.2);const i=s?12:8;a(t.trayLeft,t.trayTop,t.trayWidth,t.trayHeight,i,s?CLASSIC_TRAY:o.BOARD.SURFACE),a(t.trayLeft,t.trayTop,t.trayWidth,t.trayHeight,i,s?CLASSIC_TRAY_BORDER:o.BOARD.BORDER,1,4.2);for(let e=0;e<SLOT_CAPACITY;e++){const[r,n]=slotOrigin(t,e);a(r,n,t.slot,t.slot,8,s?CLASSIC_SLOT:o.BOARD.CELL_EMPTY,0,4.4),a(r,n,t.slot,t.slot,8,s?CLASSIC_SLOT_BORDER:o.BOARD.BORDER,1.5,4.6)}return r}export function spawnTile(e,t,o,s,r,a,n){const i=t.tile,d=[-i/2,i/2,0],l=i*TILE_THICKNESS,h=e.spawn({mesh:"none",position:toWorld(t,s,r,a),scale:n,pickable:!1}),p=spawnRaisedBlock(e,{parent:h,position:[0,0,-l/2],size:[i,i,l],color:toColor(TILE_FACE),gloss:!1,shadow:!1}),R=e.spawn({mesh:shadeMesh(i),parent:h,position:[d[0],d[1],70],color:[0,0,0,0],pickable:!1}),A=o?addTileFruit(e,t,h,o,!1):null;return{root:h,shade:R,fruit:A,parts:null==A?[p]:[p,A]}}export function addTileFruit(e,t,o,s,r){const a=t.fruit/Math.max(s.whole.size[0],s.whole.size[1]),n=e.spawn({mesh:s.whole,parent:o,position:[-s.center[0]*a,1-s.center[1]*a,32-s.center[2]*a],scale:r?0:a,color:[1,1,1,1],pickable:!1});return r&&e.animate(n,{scale:a},{duration:.22,easing:"back"}),n}
@@ -0,0 +1 @@
1
+ "use strict";import{c as _0x1e6925}from"react/compiler-runtime";import{memo,useCallback,useEffect,useMemo,useState}from"react";import{StyleSheet,View}from"react-native";import{haptics}from"@nayan-ui/engine";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{getSceneInputInsets,livesColumn,scoreColumn,textColumn}from"../shared/EngineHud.js";import{EngineTouchSurface}from"../shared/EngineTouchSurface.js";import{GameLoading}from"../shared/GameLoading.js";import{GameLoadingTransition}from"../shared/GameLoadingTransition.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{ENEMY_COUNT,GEM_GOAL,getCachedAssets,loadAssets,MAX_HEALTH,MINIMAP_SIZE,NATURE_LIGHT,NIGHT_LIGHT,NIGHT_SKY,SKY}from"./TreasureHuntConstants.js";import{endSwipe,moveSwipe,resetSwipe,startSwipe}from"./TreasureHuntControls.js";import{clearInput,createGame,dispose,punch,reset,start,update}from"./TreasureHuntGame.js";import{drawMiniMap}from"./TreasureHuntScene.js";import{jsx as _0x485619,jsxs as _0x4d179f}from"react/jsx-runtime";const Run=memo(function(e){const{settings:t}=e,[s,n]=useLiveState(null,0),[a,r]=useState(null),{game:o,theme:i,phase:m,status:u,screen:d,gameOver:p}=useEngineGame(e,{gameId:GAME_IDS.TREASURE_HUNT,create:()=>createGame(e.assets),start:start,reset:reset,dispose:dispose,tick:update,hud:(e,t)=>drawMiniMap(t,e.state),resultsDelay:e=>"win"===e?1500:1200,reportData:e=>({gems:e.state.gems,defeated:e.state.defeated,seconds:Math.floor(e.state.time)}),sounds:GAME_SOUNDS.TREASURE_HUNT,onStart:e=>e(GAME_SOUNDS.TREASURE_HUNT.START),onOver:(e,t)=>{"win"!==t&&e(GAME_SOUNDS.TREASURE_HUNT.LOSE)},wire:e=>{e.onChange=()=>n({...snapshot(e.state),preparing:e.preparing}),e.onChange()}});useEffect(()=>{haptics.enabled=t.enableHaptics},[t.enableHaptics]),useEffect(()=>()=>{haptics.enabled=!0},[]);const l=useCallback(e=>{e||(clearInput(o),o.footsteps.stop(),o.movementReference.active=!1)},[o]),S=useCallback(()=>punch(o),[o]),E=useCallback(e=>r(e.message),[]),f=useMemo(()=>getSceneInputInsets(t.offset),[t.offset]),g="dark"===i.mode,T=o.preparing,h=T&&!!o.nextRun,_="playing"===m&&!T;return _0x4d179f(EngineGameScreen,{...d,onStart:()=>{o.preparing||d.onStart()},hudCapacity:MINIMAP_SIZE*MINIMAP_SIZE+1024,light:g?NIGHT_LIGHT:NATURE_LIGHT,background:g?NIGHT_SKY:SKY,fog:.006,errorMessage:a??void 0,onAudioChange:l,onError:E,columns:[scoreColumn(s?.score??0),livesColumn(s?.health??MAX_HEALTH,MAX_HEALTH,"HEALTH"),textColumn("GEMS",(s?.gems??0)+"/"+GEM_GOAL),textColumn("ROBOTS",(s?.defeated??0)+"/"+ENEMY_COUNT)],subtext:"Swipe to explore \xb7 Tap to punch",gameOver:p({title:"win"===u?"FOREST EXPLORED!":"EXPEDITION OVER",message:(s?.gems??0)+" diamonds found and "+(s?.defeated??0)+" robots defeated.",scoreLabel:"Adventure score",score:s?.score??0,buttonText:"Explore Again!"}),children:[_0x485619(SwipeNavigation,{input:o.swipe,enabled:_&&!t.isVisible&&!a,onTap:S,insets:f}),_0x485619(View,{pointerEvents:h?"auto":"none",style:StyleSheet.absoluteFill,children:_0x485619(GameLoadingTransition,{ready:!h,loader:_0x485619(GameLoading,{gameId:GAME_IDS.TREASURE_HUNT,theme:t.theme,offset:t.offset,visible:!t.isVisible}),children:null})})]})});export const TreasureHunt=engineGame(GAME_IDS.TREASURE_HUNT,e=>{const[t,s]=useState(getCachedAssets),[n,a]=useState(null);return useEffect(()=>{if(t)return;let e=!0;return loadAssets().then(t=>{e&&s(t)}).catch(t=>{e&&a(t instanceof Error?t.message:String(t))}),()=>{e=!1}},[t]),_0x485619(GameLoadingTransition,{ready:!!t,loader:_0x485619(GameLoading,{gameId:GAME_IDS.TREASURE_HUNT,theme:e.settings.theme,offset:e.settings.offset,error:!!n,message:n??void 0}),children:t&&_0x485619(Run,{...e,assets:t})})});function snapshot(e){return{health:e.health,gems:e.gems,defeated:e.defeated,score:e.score}}const SwipeNavigation=memo(function(e){const t=_0x1e6925(17),{input:s,enabled:n,onTap:a,insets:r}=e;let o;t[0]!==s?(o=e=>{startSwipe(s,e,e.timeStamp)},t[0]=s,t[1]=o):o=t[1];const i=o;let m;t[2]!==s?(m=e=>{moveSwipe(s,e)},t[2]=s,t[3]=m):m=t[3];const u=m;let d;t[4]!==n||t[5]!==s||t[6]!==a?(d=e=>{endSwipe(s,e,e.timeStamp)&&n&&a()},t[4]=n,t[5]=s,t[6]=a,t[7]=d):d=t[7];const p=d;let l;t[8]!==s?(l=()=>resetSwipe(s),t[8]=s,t[9]=l):l=t[9];const S=l;let E;return t[10]!==n||t[11]!==r||t[12]!==S||t[13]!==p||t[14]!==u||t[15]!==i?(E=_0x485619(EngineTouchSurface,{enabled:n,insets:r,onStart:i,onMove:u,onEnd:p,onCancel:S}),t[10]=n,t[11]=r,t[12]=S,t[13]=p,t[14]=u,t[15]=i,t[16]=E):E=t[16],E});
@@ -0,0 +1 @@
1
+ "use strict";import _0x5eb407 from"../../assets/models/explorer/source.json";export const HUMAN_PUNCH_TIME=.52;export const HUMAN_CONTACT_TIME=.16;export const HUMAN_GUARD_TIME=1.15;const smooth=t=>{const e=Math.max(0,Math.min(1,t));return e*e*(3-2*e)};function curve(t,e,o){if(t<=e[0])return o[0];for(let s=1;s<e.length;s++)if(t<=e[s]){const r=smooth((t-e[s-1])/(e[s]-e[s-1]));return o[s-1]+(o[s]-o[s-1])*r}return o.at(-1)}export function fightingPose(t,e){const o=[0,.075,.16,.185,.32,.44,.52],s=t?curve(e,o,[0,-.06,1,.96,.18,0,0]):0,r=t?curve(e,o,[0,-7,18,16,4,0,0])*("Right"===t?1:-1):0,n=t?0:.35*Math.sin(e/1.3*Math.PI*2),a={Hips:[0,0,0],Spine:[3+5*Math.max(0,s),0,0],Spine1:[4+2*Math.max(0,s)+n,.65*r,0],Spine2:[2+.5*n,.35*r,-Math.max(0,s)*("Right"===t?-1.5:1.5)],Neck:[-2,.3*-r,0],Head:[-4,.7*-r,0],LeftUpLeg:[9,0,3],RightUpLeg:[-5,0,-3],LeftLeg:[-14,0,0],RightLeg:[-9,0,0],LeftFoot:[5,0,0],RightFoot:[7,0,0]};for(const t of["Left","Right"]){for(const e of["Index","Middle","Ring","Pinky"])a[t+"Hand"+e+"1"]=[80,0,0],a[t+"Hand"+e+"2"]=[100,0,0],a[t+"Hand"+e+"3"]=[65,0,0];a[t+"HandThumb2"]=[45,0,0],a[t+"HandThumb3"]=[55,0,0]}const i=e=>{const o="Left"===e?1:-1,r=t===e?s:0;return{pos:[o*(.155-.075*r),.015-.05*Math.max(0,r),.235+.37*r],pole:[.7*o,-.65,.12],dir:[0,.15*(1-Math.max(0,r)),1],palm:[-o*(1-Math.max(0,r)),-Math.max(0,r),0]}};return{bones:a,root:{ground:!0},ik:{Left:i("Left"),Right:i("Right")},thumbs:{Left:1,Right:1}}}export function createCombatClips(t){const e=(e,o=!1)=>({id:o?"explorer_punch_start":"explorer_punch_"+e.toLowerCase(),name:o?"Fight entry punch":e+" straight punch",category:"Actions",duration:.52,loop:!1,sample:s=>{const r=fightingPose(e,s);return o&&s<.075?{...r,blend:{sample:t.sample(0),w:1-smooth(s/.075)}}:r}});return[e("Right",!0),e("Right"),e("Left"),{id:"explorer_guard",name:"Boxing guard",category:"Actions",duration:1.3,loop:!0,sample:t=>fightingPose(null,t)},{id:"explorer_guard_exit",name:"Lower guard",category:"Actions",duration:.18,loop:!1,sample:e=>({...fightingPose(null,0),blend:{sample:t.sample(0),w:smooth(e/.18)}})}]}export const HUMAN_HEIGHT=_0x5eb407.height;export const HUMAN_CAMERA_HEIGHT=_0x5eb407.cameraHeight;export const HUMAN_CLIPS=_0x5eb407.clips;export const HUMAN_CLIP_TIME=Object.fromEntries(Object.entries(HUMAN_CLIPS).map(([t,e])=>[t,e.duration]));export const HUMAN_LOOPS=new Set(Object.keys(HUMAN_CLIPS).filter(t=>HUMAN_CLIPS[t].loop));export function locomotionAnimation(t,e=null){return t<.05?"idle":t>=("run"===e?3.2:3.8)?"run":"walk"}export function locomotionRate(t,e){const o=Math.max(.65,Math.min(1.6,t));return void 0!==e&&Math.abs(o-e)<.18?e:Math.max(.65,Math.min(1.6,Math.round(4*t)/4))}export const WORLD_EDGE=128;export const TERRAIN_PROFILES=16;export const MINIMAP_SIZE=124;export const MAX_HEALTH=5;export const GEM_GOAL=24;export const POINTS_GEM=200;export const POINTS_ROBOT_HIT=50;export const POINTS_ROBOT_DEFEAT=300;export const POINTS_HEALTH_BONUS=400;export const PLAYER_SPEED=6;export const PLAYER_RADIUS=.5;export const MOVEMENT_START=.08;export const MOVEMENT_STOP=.04;export const ATTACK_RANGE=1.9;export const ATTACK_COOLDOWN=.52;export const ATTACK_HIT_TIME=.16;export const ENEMY_COUNT=8;export const SKY=[.62,.77,.86];export const NATURE_LIGHT={direction:[-.55,.85,-.3],ambient:.5,shadows:!0,shadowExtent:30,color:[1.15,1.09,.94]};export const NIGHT_SKY=[.07,.13,.2];export const NIGHT_LIGHT={...NATURE_LIGHT,ambient:.52,color:[.8,.95,1.08]};export let sounds;let assetsLoading,cachedAssets=null;export const getCachedAssets=()=>cachedAssets;export function loadAssets(){return assetsLoading??=(async()=>{const[{audio:t,loadTexture:e},{loadHumanAssets:o}]=await Promise.all([import("@nayan-ui/engine"),import("./TreasureHuntModel")]);sounds??=t.load({gem:require("../../assets/sfx/coin.wav"),punch:require("../../assets/sfx/swoosh.wav"),impact:require("../../assets/sfx/clang.wav"),defeat:require("../../assets/sfx/boom.wav"),hurt:require("../../assets/sfx/hurt.wav"),win:require("../../assets/sfx/win.wav"),footstepWalk:require("../../assets/sfx/footstep_walk.wav"),footstepRun:require("../../assets/sfx/footstep_run.wav")}),sounds.ready.catch(()=>{});const[s,r,n,a,i,p,u]=await Promise.all([e(require("../../assets/textures/meadow.jpg")),e(require("../../assets/textures/limestone.jpg")),e(require("../../assets/textures/bark.jpg")),e(require("../../assets/textures/pine.png")),e(require("../../assets/textures/leaves.png")),e(require("../../assets/textures/river.jpg")),o()]);return cachedAssets={meadow:s,stone:r,bark:n,pine:a,leaves:i,water:p,human:u},cachedAssets})().catch(t=>{throw assetsLoading=void 0,t}),assetsLoading}export function*warmAssets(){yield loadAssets}