@nayan-ui/games 1.18.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 -38
  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";const _0xb24256=_0x3c03;!function(){const e="7zJ$",o=_0x3c03,t=_0x530b();for(;;)try{if(976416==-parseInt(o(245,"zGkv"))/1*(parseInt(o(244,"V6RG"))/2)+parseInt(o(147,"e^RN"))/3*(-parseInt(o(151,"CO#y"))/4)+-parseInt(o(130,"7zJ$"))/5*(parseInt(o(156,"#s6P"))/6)+parseInt(o(166,"OBMQ"))/7*(parseInt(o(214,"O%7$"))/8)+parseInt(o(173,"OBMQ"))/9*(-parseInt(o(183,"#s6P"))/10)+-parseInt(o(162,e))/11*(-parseInt(o(225,e))/12)+-parseInt(o(138,"VjJ4"))/13)break;t.push(t.shift())}catch(e){t.push(t.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x2dce7c,{useEffect,useRef,useMemo,useCallback}from"react";import{View,StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{useTangramStore}from"./TangramStore.js";import{TangramService}from"./TangramService.js";import{GameBoard}from"./components/GameBoard.js";function _0x530b(){const e=["W4JcPxBcU8kTWQSubx3dPa","cCknzIddRSkhW6NcGSkWWOLNySkO","s8k7xgfBW7tcVa","WOj0xmogWPHBW7S","WPrmi2bq","W6JcSSoABw3cIWNcHa","emozlhHQsmk/q1C","fmoVle5AW5FdUcS","W7L3vmo+WPS","W7zNumoPWPjRW74","iX/cJCkWW7ZdKCkB","yga0mWBcHKDdW4KuwvxcKe/dQSkR","lSoYlCkYW4i","dCozdND6","WQDdE0hdKa","W6u+WR4lWQPJW5O","xSo0tKJcOSk9scJcJZJcPW","W6xcLrddGSkKgMJcKSou","WR1trf/dLmkoWQrOWRy","W6ddKCozpSkodqBdRdVdLqK","qwBdVtvO","CaWaW5Ssg03dVG","Cmk8vhvmW6e","qxNdVmofWOVcTmkrW4jCWRJcOHa","ymk5aCkPomk1h8ocs8kYW6O","mxq0mIhcV00","WQNdSSosvfJcVbhcPCkp","W7j9aSoUWOu","l1HaWRPrt2ddRCohn0tdIG","W6lcKWBdL8kK","FCkfuSkMA8kLWOLz","jL7cRLmApmo7W4ddNW","W6jSwZ7cVsyb","AmkdW6xcTryvW7pdLCkNumoTdSo1W5G","W6JcTmkce17cOtxcUCkoW5e","g8k/amoYeSkMWPpcGYPE","WPCEWPRcSauRWQpdLmkE","a8knvcRdO8kqW4q","W7VcTMldVSkTWR4qdq","W4q/EmkAtSk1tL9L","WR/cNCofW4FdHKldRgyCW4G","mvxcVfqchSosW4ZdIK0nkCoV","WQFdK0dcH8o1xLJcNCotoLGl","fcpcVCkdW5xdO8kXW6fFWQ/cJq","wSo5umk1fmkOWR/cNYTJ","ahRcK3e8oSox","aHSbDGW","k3ddOJjddCkU","ASoHW4NcMCkOveC","W4dcV0eOWO3dOG","W7LxsxODW5FcUNNdK8ou","WOqtD8kAv8kJAa","s8kBFef7W5tcNa","uwtcTCkZzICm","W7xcPfJdTmkc","tvldIdFdO8k9tCokjCkFFCkP","suZcMMZdVmkzhKa","W4LIdSoxWQW","oZ3cKM7cGa","W6f7vSo3WPi","WRaHghRdQGSZxmouWPWs","WQDypCo2W4e","W5JcPw7dVmomW6PvghlcTCorW4lcMCo6dmozCa4Xz0hdHmonWQTLWQxdKJT4WOVdH8o+vmkkWRpcS8kFp15AWRhcRSopjCozW6xdUe0","D8oJwmoUW6L/y8ouW6ddVwlcLW","A1RcJCkzDq","tGybWQGug1FcU8obfgxcH8oPW7dcGSkart4zfq","W63cSSkkeXRdGKFcU8kWW5lcImoNW6a","dGlcKW","h8kWaXBdTW","W5q+A8kAx8kCwW","WOvhmSoRWQfqkIO","jCk2cmkK","eZ/cVmkbW5ZdRmk8","WRdcGSoNW54","FCoNW4/cJCkU","W7fmW5OJhZK","WPDKWQ/dV8k9W6VcSmoRW4T2","WO9hBSkyW5qScY0+iCozWPu","W6/cTgddQCkj","ECk5W47cVSoecmoUW5u","w8ktd8oYc8kJWR0","pCoYoCk9W4ddImk+WONcTq","h8oLk3G","W6ddMCoViCkkaa","DxFdTWX7","WQOWW6OFgMWRmSk6W61NWPFcSmoddG","WPnTeCobW5tcTuJcUG","WRCPuZZcTd8gAW","kmoUcZmFWQZdPSo2tbhdISkVqW","bHWsyIC/fq","o8oismoczG","E3BdGITSlSkieti","nSo7sSoJA8kSka","WOXKxCohWPXsW6O","W5XBW4C2sWZdQmkufLddS28","vSoFWOreWPxcO1NdSa","WRDvzKhdKmkzWRK","W6z8xr/cRcKbyq","WQlcNCo2W4ddIa","eIVcRCkyW57dSmkNW5PqWQBcQZHrd8kn","DrWaW7Wjfg3dVSowfq","hG7cIvBcP8oODCoO","W7rsW5O6","DSokW6PwWQ5Y","W4LIj8k1dG","DwddPHr5nSkvgG","Bmkqu8k4wSk+WQvyxq","W4/cJWFcKCk1dwdcG8ocjx8UW4pdQv7dM0DikCkAW4dcHmobyM3cLW","W6Hqg8oXWR1Ey8o/W6/cSq","DSoEW7zhWQ5WW5O","dCkLamoIcSkxWQNcGtPcxry","bmoCWP1lWP5LftW","WPv9WRtdQSk2W4ZcSa","W7HahCo2WQH8CG","WRNdS8obveNcLqq","mIOkWRBdOa","W7flW40WdJldQq","W7RcHqtdLmkR","tmkAtICOf8oLE0FcT103WRK","qwVcPCkquW","WPmkWQxcVZa","tgRcGfNdQW","WPD5dSowW7dcQvK","wLRcMLNdQW"];return(_0x530b=function(){return e})()}import{ScoreBoard}from"./components/ScoreBoard.js";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x24e3a3}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 _0x5393af,jsxs as _0x6cd22f}from"react/jsx-runtime";function _0x3c03(e,o){e-=127;const t=_0x530b();let r=t[e];if(void 0===_0x3c03.mMsQrO){const e=function(e,o){let t,r,a=[],W=0,n="";for(e=function(e){let o="",t="";for(let t,r,a=0,W=0;r=e.charAt(W++);~r&&(t=a%4?64*t+r:r,a++%4)?o+=String.fromCharCode(255&t>>(-2*a&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let e=0,r=o.length;e<r;e++)t+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(t)}(e),r=0;r<256;r++)a[r]=r;for(r=0;r<256;r++)W=(W+a[r]+o.charCodeAt(r%o.length))%256,t=a[r],a[r]=a[W],a[W]=t;r=0,W=0;for(let o=0;o<e.length;o++)r=(r+1)%256,W=(W+a[r])%256,t=a[r],a[r]=a[W],a[W]=t,n+=String.fromCharCode(e.charCodeAt(o)^a[(a[r]+a[W])%256]);return n};_0x3c03.Ycjjav=e,_0x3c03.qHiEgf={},_0x3c03.mMsQrO=!0}const a=t[0];_0x3c03.DUPNDa!==a&&(_0x3c03.qHiEgf={},_0x3c03.DUPNDa=a);const W=_0x3c03.qHiEgf[e];return void 0===W?(void 0===_0x3c03.jNyhLI&&(_0x3c03.jNyhLI=!0),r=_0x3c03.Ycjjav(r,o),_0x3c03.qHiEgf[e]=r):r=W,r}export const Tangram=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:r,onShare:a,onShareScreenshot:W,onShowLeaderboard:n,bannerAd:s})=>{const d="VjJ4",m="ZqQl",S=_0x3c03,u={BVokS:function(e,o,t){return e(o,t)},nFpSh:function(e,o){return e!==o},bCnfc:S(215,"x[HY"),dLaDn:S(163,"CO#y"),greKv:function(e,o,t){return e(o,t)},tstfc:function(e,o){return e(o)},PJdwW:S(178,"%Ocf"),aegjv:S(240,"pN^%"),CUrJj:S(203,d),grafN:S(161,"Z)2x"),YKJXv:function(e,o){return e||o},RWaSa:function(e,o,t){return e(o,t)},BxxCg:function(e,o,t){return e(o,t)}},k=u[S(219,"saIk")](useTangramStore,e=>e[S(150,"LGge")]),x=useTangramStore(e=>e[S(136,"bG3X")]),f=useTangramStore(e=>e[S(238,"aY[u")]),i=u[S(249,d)](useRef,!1),C=useRef(e?.[S(206,"7W[l")]??!0);C[S(188,"V6RG")]=e?.enableSounds??!0;const l=useRef(e?.[S(221,"sL@A")]??!0);l[S(165,"e^RN")]=e?.[S(137,"KPbw")]??!0;const g=useRef(new TangramService);useEffect(()=>{const e=S;return useTangramStore[e(237,"VjJ4")](o=>o[e(187,"pN^%")],o=>{const t=e;i.current=o,o?g[t(149,"x[HY")][t(131,"7W[l")](()=>{useTangramStore.getState().decrementTime()}):g[t(235,"$J^Q")][t(202,"y$c!")]()})},[]);const _=u[S(164,"NoIU")](useRef,!1),R=u[S(170,"#^X)")](useRef,0),G=u[S(194,"bG3X")](useRef,!1),p=useRef(t);p[S(209,"um(E")]=t;const O=useRef(r);O[S(235,"$J^Q")]=r;const T=useCallback(e=>{const o=S;if(p.current&&!_[o(209,"um(E")]){const t=useTangramStore[o(227,"%Ocf")]();p[o(185,"RN7A")]({status:e,score:t.score[o(207,"xX)V")]()}),_[o(149,"x[HY")]=!0}},[]);useEffect(()=>{const e=S;if(u[e(186,"V6RG")](u[e(217,"saIk")],e(247,"um(E")))return useTangramStore[e(193,"#s6P")]().setupLevel(0),()=>{const o=e;useTangramStore[o(241,"Z)2x")]().isPlaying&&!_.current&&T(o(199,"ZqQl")),g.current.cleanup(),useTangramStore[o(152,"saIk")]()[o(127,"KPbw")]()};_0x5079c5[e(205,"ZqQl")]=!1,_0x65ef86.getState()[e(246,"7zJ$")](),u[e(224,"TX[x")](_0x4b338f,_0x18f809.TANGRAM.START,_0x43c731[e(209,"um(E")])},[T]),useEffect(()=>{const e=S;k&&!_[e(168,"an4f")]&&(G[e(192,"aY[u")]=!0,playSound(GAME_SOUNDS[e(141,"KPbw")].WIN,C[e(205,m)]),playHaptic(HapticType[e(230,"an4f")],l[e(205,"ZqQl")]),T(u.dLaDn)),x&&!_[e(205,m)]&&(G.current=!1,u.greKv(playSound,GAME_SOUNDS.TANGRAM[e(132,"e$)P")],C[e(229,"FYKe")]),playHaptic(HapticType[e(211,"o#cN")],l[e(208,"1[k6")]),u[e(233,"O%7$")](T,u.PJdwW)),!k&&!x&&(_[e(212,"vD)c")]=!1)},[k,x,T]);const h=u[S(200,"]%LE")](useCallback,()=>{const e=S;_[e(189,"KFnk")]=!1,useTangramStore[e(197,"CO#y")]()[e(135,"e^RN")](),u[e(154,"CO#y")](playSound,GAME_SOUNDS.TANGRAM[e(157,"JMQh")],C.current)},[]),b=useCallback(()=>{const e=S;T("cancel"),useTangramStore[e(201,"pN^%")]()[e(177,"dBr%")](),useTangramStore[e(191,"VQVM")]()[e(204,"um(E")](0)},[T]),P=useCallback(()=>{const e=S;_.current=!1,O[e(210,"7zJ$")]?.();const o=useTangramStore.getState(),t=G[e(218,"JMQh")]?o[e(228,"FYKe")]+1:o[e(213,"VjJ4")];o[e(146,"&L#B")](t)},[]),N=u[S(160,"x[HY")](k,x);N&&0===R[S(128,"#s6P")]&&(R[S(128,"#s6P")]=useTangramStore[S(175,"J33H")]()[S(174,"LGge")]),!N&&(R.current=0);const v=useMemo(()=>({isPlaying:!N&&f,gameOver:N,onStartGame:h,onStopGame:b,onShare:a,onShowLeaderboard:n,startButtonSubtext:S(158,"LGge")}),[N,f,h,b,a,n]),L=useMemo(()=>{const e=S,o=k,t={};return t[e(226,"O%7$")]=N,t[e(234,"aY[u")]=R[e(144,"#^X)")],t.scoreLabel=u[e(232,"dBr%")],t[e(239,"A09F")]=P,t[e(196,"Z)2x")]=o?e(190,"vD)c"):e(220,"LGge"),t[e(155,"FYKe")]=o?e(129,"mlA6"):"TIME UP!",t[e(223,"KFnk")]=o?u[e(216,"e$)P")]:u[e(142,"RN7A")],t},[k,N,P]),A=u[S(180,"pN^%")](useMemo,()=>({gameId:GAME_IDS[S(148,"o7bb")],settings:e||DEFAULT_GAME_SETTINGS,onSettingsChange:o}),[e,o]),Q=e?.[S(242,"o7bb")]??0,y=useMemo(()=>({...styles[S(182,"JMQh")],marginTop:Q}),[Q]),I={};I[S(181,"h7@A")]=C,I[S(231,"zGkv")]=l;const J={};J[S(179,"A09F")]=Q;const K={...v},V={...L};V[S(133,"sL@A")]=W,V[S(250,"y$c!")]=s;const q={...A};return u[S(153,"um(E")](_0x5393af,View,{style:styles.container,children:u.BxxCg(_0x5393af,GestureHandlerRootView,{style:styles.gestureRoot,children:u.greKv(_0x6cd22f,_0x24e3a3,{children:[_0x5393af(View,{style:y,children:_0x5393af(GameBoard,I)}),_0x5393af(ScoreBoard,J),_0x5393af(GameControlButton,K),_0x5393af(GameOverModal,V),_0x5393af(GameSettingsModal,q)]})})})};const _0x10c53c={};_0x10c53c[_0xb24256(167,"S@Zz")]=1,_0x10c53c[_0xb24256(195,"an4f")]=BACKGROUND_COLOR;const _0x2df1e4={};_0x2df1e4[_0xb24256(198,"vD)c")]=1;const _0x5c8737={};_0x5c8737[_0xb24256(169,"bG3X")]=1,_0x5c8737.justifyContent=_0xb24256(145,"beOs"),_0x5c8737[_0xb24256(172,"1[k6")]="center";const _0x28cb63={};_0x28cb63.container=_0x10c53c,_0x28cb63.gestureRoot=_0x2df1e4,_0x28cb63[_0xb24256(134,"LGge")]=_0x5c8737;const styles=StyleSheet[_0xb24256(171,"vD)c")](_0x28cb63);Tangram[_0xb24256(139,"an4f")]=_0xb24256(222,"o7bb");
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 _0x1b14b7=_0x52ad;!function(){const t=_0x52ad,o=_0x35b8();for(;;)try{if(678478==-parseInt(t(351,"IU@V"))/1*(parseInt(t(380,"!&iP"))/2)+parseInt(t(390,"I%AP"))/3+-parseInt(t(303,"1#Du"))/4*(parseInt(t(334,"dCCR"))/5)+-parseInt(t(297,"^d!Y"))/6*(-parseInt(t(256,"tiQb"))/7)+-parseInt(t(308,"t2Z["))/8+-parseInt(t(319,"a%ic"))/9*(-parseInt(t(335,"wT6u"))/10)+parseInt(t(293,"*$bz"))/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[_0x1b14b7(320,"[8AK")],SCREEN_H=DIMS.height,TOTAL_BOARD_UNITS=6.2,RESERVED_CHROME=280,AVAILABLE_H=Math[_0x1b14b7(398,"DNXB")](360,SCREEN_H-280),UNIT_BY_WIDTH=.998*GAME_WIDTH/4,UNIT_BY_HEIGHT=AVAILABLE_H/6.2;export const UNIT=Math[_0x1b14b7(381,"s*eQ")](32,Math.floor(Math[_0x1b14b7(356,"Abd&")](UNIT_BY_WIDTH,UNIT_BY_HEIGHT)));export const BOARD_W=GAME_WIDTH;export const BOARD_H=Math[_0x1b14b7(310,"yi&$")](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 _0x3bcb37={};_0x3bcb37[_0x1b14b7(317,"dCCR")]=120,_0x3bcb37.POINTS_PER_PIECE=1e3,_0x3bcb37.TIME_BONUS_PER_SECOND=10,_0x3bcb37[_0x1b14b7(353,"Gk#!")]=7;export const TANGRAM_GAME_CONFIG=_0x3bcb37;const _0x3cad99={};_0x3cad99[_0x1b14b7(363,"IU@V")]=_0x1b14b7(291,"ey#Q"),_0x3cad99[_0x1b14b7(421,"h8)8")]=_0x1b14b7(313,"cRaL"),_0x3cad99[_0x1b14b7(376,"56rM")]=_0x1b14b7(298,"lQVW"),_0x3cad99[_0x1b14b7(286,"wT6u")]=_0x1b14b7(324,"%Ovx"),_0x3cad99[_0x1b14b7(253,"t2Z[")]=_0x1b14b7(307,"a%ic"),_0x3cad99[_0x1b14b7(339,"ZAT)")]="#F4C724",_0x3cad99.teal=_0x1b14b7(373,"cM^h");const TAN_COLORS=_0x3cad99,_0x21e401={};_0x21e401[_0x1b14b7(395,"tiQb")]=BACKGROUND_COLOR,_0x21e401[_0x1b14b7(372,"a%ic")]=PRIMARY_COLOR,_0x21e401[_0x1b14b7(383,"%Ovx")]="rgba(255, 255, 255, 0.12)",_0x21e401[_0x1b14b7(416,"IU@V")]=_0x1b14b7(364,"lQVW"),_0x21e401[_0x1b14b7(407,"M7f2")]=_0x1b14b7(369,"%Ovx"),_0x21e401.TEXT_PRIMARY=_0x1b14b7(273,"7zy%");export const TANGRAM_COLORS=_0x21e401;function _0x52ad(t,o){t-=246;const n=_0x35b8();let r=n[t];if(void 0===_0x52ad.Auejdk){const t=function(t,o){let n,r,x=[],e=0,W="";for(t=function(t){let o="",n="";for(let n,r,x=0,e=0;r=t.charAt(e++);~r&&(n=x%4?64*n+r:r,x++%4)?o+=String.fromCharCode(255&n>>(-2*x&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,r=o.length;t<r;t++)n+="%"+("00"+o.charCodeAt(t).toString(16)).slice(-2);return decodeURIComponent(n)}(t),r=0;r<256;r++)x[r]=r;for(r=0;r<256;r++)e=(e+x[r]+o.charCodeAt(r%o.length))%256,n=x[r],x[r]=x[e],x[e]=n;r=0,e=0;for(let o=0;o<t.length;o++)r=(r+1)%256,e=(e+x[r])%256,n=x[r],x[r]=x[e],x[e]=n,W+=String.fromCharCode(t.charCodeAt(o)^x[(x[r]+x[e])%256]);return W};_0x52ad.qJdyKJ=t,_0x52ad.igZaQF={},_0x52ad.Auejdk=!0}const x=n[0];_0x52ad.nbeKnQ!==x&&(_0x52ad.igZaQF={},_0x52ad.nbeKnQ=x);const e=_0x52ad.igZaQF[t];return void 0===e?(void 0===_0x52ad.EirMjH&&(_0x52ad.EirMjH=!0),r=_0x52ad.qJdyKJ(r,o),_0x52ad.igZaQF[t]=r):r=e,r}const _0xa46827={};_0xa46827.type=_0x1b14b7(246,"9DSi"),_0xa46827[_0x1b14b7(262,"1#Du")]=TAN_COLORS[_0x1b14b7(414,"56rM")],_0xa46827[_0x1b14b7(404,"SXt5")]=[[0,0],[0,4],[2,2]];const _0x466e16={};_0x466e16[_0x1b14b7(367,"rUO1")]=_0x1b14b7(279,"wT6u"),_0x466e16[_0x1b14b7(250,"^d!Y")]=TAN_COLORS[_0x1b14b7(385,"t2Z[")],_0x466e16[_0x1b14b7(397,"IU@V")]=[[0,0],[4,0],[2,2]];const _0x3ff0df={};_0x3ff0df[_0x1b14b7(272,"[8AK")]="medium",_0x3ff0df.color=TAN_COLORS[_0x1b14b7(340,"ZVo]")],_0x3ff0df.pts=[[4,4],[2,4],[4,2]];const _0x327127={};_0x327127[_0x1b14b7(389,"By3T")]=_0x1b14b7(349,"yi&$"),_0x327127[_0x1b14b7(249,"h8)8")]=TAN_COLORS.orange,_0x327127[_0x1b14b7(269,"%Ovx")]=[[0,4],[2,4],[1,3]];const _0x46d95d={};_0x46d95d[_0x1b14b7(247,"S!14")]=_0x1b14b7(400,"tiQb"),_0x46d95d[_0x1b14b7(278,"cRaL")]=TAN_COLORS[_0x1b14b7(329,"$qPG")],_0x46d95d[_0x1b14b7(302,"lQVW")]=[[2,2],[3,3],[3,1]];const _0x350aac={};_0x350aac.type=_0x1b14b7(417,"8@rz"),_0x350aac.color=TAN_COLORS[_0x1b14b7(289,"!&iP")],_0x350aac[_0x1b14b7(404,"SXt5")]=[[1,3],[2,4],[3,3],[2,2]];const _0x4e3fe1={};_0x4e3fe1[_0x1b14b7(247,"S!14")]="para",_0x4e3fe1[_0x1b14b7(294,"*$bz")]=TAN_COLORS[_0x1b14b7(290,"2mtD")],_0x4e3fe1[_0x1b14b7(344,"S!14")]=[[3,3],[4,2],[4,0],[3,1]];const BASE_TANS=[_0xa46827,_0x466e16,_0x3ff0df,_0x327127,_0x46d95d,_0x350aac,_0x4e3fe1],_0x362910={};_0x362910[_0x1b14b7(354,"&L&X")]=360,_0x362910[_0x1b14b7(264,"Abd&")]=360,_0x362910.small=360,_0x362910.square=90,_0x362910[_0x1b14b7(305,"z[EL")]=180;const SYMMETRY=_0x362910,LEVEL_ROTATIONS=[0,90,180,270],_0x30b84e={};function _0x35b8(){const t=["ACo6smo3","Bmo4DfD3W6VcVq","WRX5bwfe","W6GCeCoQu10","WOaxxmoxva","efvAWQnGWPncWPNdUCoFb8oKba","W6r0W6WFWPa","WQ7dSaZcPg1cWPnoWQiiWOmw","WQNcGSoyW6Ha","quiaW7ldVa","pfb4gJ0","W4hdTfmxaq","DGNcSKmFFmkF","mSo9CgKk","dff1WOBdNmk2","dshdOg9q","WOpdUmofl1a","W5PTW5eOWP3dHW","awXggIFdSa","ptBdT21D","WOO4rmoNsa","t8khkwnt","zsrMWPriWPH+WOG","C8orW6xcVe1lofm","W7e8kCoAsa","WPmqwSocCq","W48mna","s2NcHM4SoG","WPTNW5SBW7y","umkVe2Lo","bwb9WOf+","D8o6F8oIW5e","w11T","WQrXW44cFa","qJpdH8oqWOLG","eKb4WQhdTW","bvP+WQ9r","W67cKSohWRlcGq","nCkkASoKW5q","fSkyfKv2W51t","W4rZW6KNg3xdLmkf","vxFdT8ksnWFcMdRcIYGUW7u","W641FJ3dJW","u8kik0Lw","AhRcRW","W7xdOeupW58","W64XyJ3dNHu","WQhdVcuvba","WRNdOCkZWOhcUW","W44ikHxdPSop","WRunW442bq","rCkslgK","mCo6WPhcGNNdIunAuwTlW43cIh4FW4OLWR59kwdcNmkzW5lcLa","WQtdSmo9jKS","o8kiW4ZcMNXZ","W4tdGdFdNa","WPjdW7OiBuS","jYJdPwmbFmkzW7FcJMxcLg0FW6jnWR8wW5jaW5LSWRqCx0i","W53dMdC","ysiLW5unW6fHWR7dImoObCo5","W4RcKN3dMrOGWRW","W71AsCoHjCkPW7G","BfNdKW","vCkyWR42W4VdMCk1ACkatCogWRtdIq","WPSXW4ahiq","W6RcRLddVZe","WQxcU3e/WQu","W4FcQmo8WRpcIa","xa4RW4hcI8oYB8krW4uJW7ZdIG","W73dJ3G","W4LuW5qkWOi","bGBdI0PMg8oPWPBdTGddUr5JWOiH","wmkVWQ9EW5S","aXHN","vfZcJCkSpG","W68bE8oOWQq","DMm2W4xcPW","WOxdGSkxDG","W7OXtXyjW7dcS8oNWPNdImk1WRZdIa","bSoFfcz+","W5tdSSoLcxpdGCks","k8ovd8kMWOK","W4tcICoEiCoMWQNcGmkdyCkIF30","oCoEywCfWRPyW71Hra","CCkVW4tdLghdJs8OkHikWPi","v8kkkG","dmojW7q","WQxcSwq","cmoYq0aU","t8onuCoBW5O","WQ7dVt8w","WOOrDCoxvW","WRmkBq","mmknrCo6W5y","W6rGW4WkWOy","WPpdGGSJkCo2FmoHyG","hYFdPMv7","W77cKSosW6ddRmo2h0OgFteiW7O","f8o6teS2WOa","WO0rW7iPfq","WOHSW44B","WQ1mW64zW7y","WP4VW5ah","W6ZdRGldUHOaWOS","Dmk3furOW4fFbvVcPtjkW5mXCfrs","W5eCmrpdOmoc","W681Fa","WO3dS8oscLq","WPpdKq8Gpa","lmoZeW","kwPNW5bL","x1bUW50","umkMWODtW4T3","pCo5g8o5oG","W4FdGSkZs1a","DwFcSG","WOxdLmkHESkRW7RcTa","aqHXng7cPG","eJ52uHu","W5/cTSopWQBcOG","tmoMz3GkWQzr","WP3dSSoycee","W4RdKeCEW4i","smk6WPLr","W5xdGve","WRVcUxGBWRaxaJ9NWORdOMiFcG","W7VdRIJdVba","n8owdqzI","AhBcPCkHmqO","amoAW6vNWOC","l8oEz3yi","W4NdHSk6AfG","W6e7ydxdMa","jtVdTa","s0BcJNiu","kSoqBKG4","WQRcKSomW7K","DZPdCr3dReS","aSkVW4lcRvm","eSoOjmkhWPG","W7VdRJC","c8orW4T1WPS","lmoskGXe","j8kaW5VcNNW","W7tdPYpdOq0","W4tdLGhdKhFdGfe","c8oQuuq","W57dGK87bW","t8kQWOC","W7pcRuhdUa","jmktW4JcL35L","W5qxo8oBva","WQhdJCkl","e111WP7dLSkZ","imkQWPtcGW","W6/cKmkKW6/dPmkehW","zmkTWO5zW4y","W7RdPInfW6DvvqzxWQpdMwOK","WQVcV3GCWQ0","WRiUW44wpW","WP9ylujs","WPBcN8oOeXjqWQNcNGpdNSk2WRm","ymkOWRhcOwBdJ08","Cmolw8oeW5u","uCoqACoOW7y","W4qekb4","m8oPWOa","WQ3cS33cOvDtWR/cPSktggNdLW","fCorW7XG","hwHAha","W4lcJSoqi8oNWQFdOmkzz8k+D2ldPW","WRNdUxBcOwiWW5m","qKG0DdBdU8kIWO52WPlcQ38P","WOJdTCos","W6/cKmotWRdcIq","WOVdGXSana"];return(_0x35b8=function(){return t})()}_0x30b84e.x=2,_0x30b84e.y=2;const PIVOT=_0x30b84e,rotatePt=(t,o,n,r,x)=>{const e=_0x1b14b7,W={xkKeT:function(t,o){return t/o}};W[e(341,"IU@V")]=function(t,o){return t*o},W.RtjgA=function(t,o){return t-o},W[e(325,"tiQb")]=function(t,o){return t-o},W[e(314,"I%AP")]=function(t,o){return t+o},W[e(386,"Abd&")]=function(t,o){return t*o};const _=W,b=_[e(263,"cRaL")](_[e(341,"IU@V")](n,Math.PI),180),a=Math[e(276,"1#Du")](b),d=Math[e(284,"2X!b")](b),u=_[e(342,"dCCR")](t,r),i=o-x;return{x:_[e(391,"cRaL")](_[e(388,"iIDy")](r,_[e(271,"tiQb")](u,a)),i*d),y:_[e(258,"F3u)")](x+u*d,i*a)}},centroidOf=t=>{const o=_0x1b14b7,n={};n[o(419,"r)T#")]=function(t,o){return t/o};const r=n;let x=0,e=0;for(const o of t)x+=o.x,e+=o.y;return{x:r[o(275,"UWpG")](x,t[o(361,"8@rz")]),y:e/t.length}},pathFromPoints=t=>{const o=_0x1b14b7;let n="M "+t[0].x[o(415,"1#Du")](2)+" "+t[0].y[o(415,"1#Du")](2);for(let r=1;r<t[o(346,"[&xa")];r++)n+=" L "+t[r].x[o(252,"By3T")](2)+" "+t[r].y[o(281,"rUO1")](2);return n+" Z"},mulberry32=t=>{const o=_0x1b14b7,n={ariby:function(t,o){return t%o}};n[o(336,"L7@O")]=function(t,o){return t!==o},n[o(300,"tz!(")]=o(384,"2X!b"),n[o(318,"$qPG")]=function(t,o){return t^o},n.IFZsJ=function(t,o){return t|o},n[o(393,"UWpG")]=function(t,o){return t>>>o};const r=n;let x=t>>>0;return()=>{const t=o,n={pndkj:function(t,o){return r[_0x52ad(265,"DNXB")](t,o)}};if(r[t(360,"ey#Q")](t(299,"tz!("),r[t(311,"M7f2")])){x|=0,x=x+1831565813|0;let o=Math[t(402,"M7f2")](r[t(283,"s*eQ")](x,x>>>15),r[t(332,"SXt5")](1,x));return o=o+Math[t(285,"a%ic")](o^o>>>7,61|o)^o,((o^r[t(323,"s*eQ")](o,14))>>>0)/4294967296}{let o=(n[t(377,"a%ic")](_0x1254b5-_0x39993d,_0xdedb7e)+_0x1c5f82)%_0x3e5892;return o=_0x51a2a7[t(260,"F3u)")](o,_0x4bc265-o),o<=_0x56c674}}},shuffle=(t,o)=>{const n=_0x1b14b7,r={CiBCV:function(t){return t()}},x=[...t];for(let t=x.length-1;t>0;t--){const e=Math[n(328,"r)T#")](r[n(316,"SXt5")](o)*(t+1));[x[t],x[e]]=[x[e],x[t]]}return x},polysMatch=(t,o,n)=>{const r=_0x1b14b7;if(t[r(410,"tiQb")]!==o[r(368,"F%#]")])return!1;const x=new Array(o[r(358,"&L&X")])[r(301,"8@rz")](!1);for(const e of t){let t=!1;for(let W=0;W<o[r(330,"z[EL")];W++)if(!x[W]&&Math[r(333,"IU@V")](e.x-o[W].x,e.y-o[W].y)<=n){x[W]=!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 r=_0x1b14b7,x={};x[r(362,"56rM")]=function(t,o){return t%o},x[r(277,"DNXB")]=function(t,o){return t-o},x[r(255,"yi&$")]=function(t,o){return t>o};const e=x,W=[45,90,135,180,225,270,315,0][r(326,"!&iP")](n=>{const x=r;if(x(292,"2X!b")!==x(327,"%Ovx")){const t=_0x34a75c(_0x47f1e6(_0x1ecdfb),_0x1c6062,_0x1e8324,_0x16b26d.x,_0x42f8e2.y),o={};return o.x=t.x*_0x2403c6,o.y=t.y*_0xf14524,o}{let r=(e[x(274,"wT6u")](e[x(343,"tz!(")](n,t),o)+o)%o;return r=Math[x(288,"ey#Q")](r,o-r),e[x(321,"&Dg8")](r,30)}});return W[Math.floor(n()*W[r(248,"2X!b")])]??45};export const generateLevel=t=>{const o=_0x1b14b7,n={QYPgn:function(t,o){return t*o},yJdpW:function(t,o){return t(o)},cLwRs:function(t,o){return t+o},MHzUe:function(t,o){return t+o},vzjGL:function(t,o,n,r){return t(o,n,r)},ltbjy:function(t,o){return t*o},qRWKZ:function(t){return t()},PnDVs:function(t,o){return t<o},FBseN:function(t){return t()},xxaSN:function(t,o){return t>o},tvrEq:function(t,o){return t-o},NxoRw:function(t,o){return t/o},Nmktp:function(t,o){return t(o)},lfgro:function(t,o){return t+o},UikHq:function(t,o){return t*o},xfrHc:function(t,o){return t<o},JhagR:function(t,o){return t/o},HRSoG:function(t,o,n){return t(o,n)},qsXiy:function(t,o){return t+o}},r=mulberry32(n.cLwRs(n.ltbjy(t,2654435761),40503)),x=LEVEL_ROTATIONS[Math[o(359,"M7f2")](n[o(411,"56rM")](r)*LEVEL_ROTATIONS.length)],e=n[o(405,"*Ro6")](n[o(254,"7zy%")](r),.5),W=t=>e?4-t:t,_=BASE_TANS.map(t=>t[o(344,"S!14")].map(([t,o])=>{const n=rotatePt(W(t),o,x,PIVOT.x,PIVOT.y),r={};return r.x=n.x*UNIT,r.y=n.y*UNIT,r}));let b=1/0,a=1/0,d=-1/0,u=-1/0;for(const t of _)for(const r of t)r.x<b&&(b=r.x),n[o(337,"SXt5")](r.y,a)&&(a=r.y),r.x>d&&(d=r.x),n[o(347,"!&iP")](r.y,u)&&(u=r.y);const i=n.tvrEq(d,b),f=n[o(406,"$qPG")](n.tvrEq(BOARD_W,i),2)-b,s=SIL_TOP-a,O={};for(const t of BASE_TANS){if(O[t[o(304,"DNXB")]])continue;const r=t[o(251,"Abd&")][o(399,"*$bz")](([t,o])=>({x:W(t)*UNIT,y:o*UNIT})),x=n[o(295,"56rM")](centroidOf,r);O[t[o(259,"2X!b")]]=r[o(370,"rUO1")](t=>({x:t.x-x.x,y:t.y-x.y}))}const R=SIL_TOP+(u-a)+.35*UNIT,S=n[o(280,"1#Du")](R,n[o(350,"*Ro6")](UNIT,.55)),I=BOARD_H-.55*UNIT,T=t=>Math.min(Math[o(309,"r)T#")](t,S),I),C=[T(S),T(I)],k=[4,3],m=[],y=n[o(322,"z[EL")](UNIT,.28);for(let t=0;n[o(257,"r)T#")](t,k[o(315,"L7@O")]);t++){const x=k[t];for(let e=0;n[o(287,"L7@O")](e,x);e++)m[o(282,"tiQb")]({x:n[o(408,"%Ovx")]((e+.5)*BOARD_W,x)+n[o(296,"I%AP")](r()-.5,y),y:C[t]+n.tvrEq(r(),.5)*y})}const P=n.HRSoG(shuffle,m,r),N=BASE_TANS.map((t,e)=>{const W=o,b=O[t.type];let a=0;for(const t of b){const o=Math[W(331,"%Ovx")](t.x,t.y);o>a&&(a=o)}const d=Math.ceil(n[W(413,"ZVo]")](2,a)+.5*UNIT),u=n[W(270,"ZAT)")](centroidOf,_[e]),i=n[W(382,"$qPG")](u.x,f),R=n[W(357,"F3u)")](u.y,s),S=_[e].map(t=>({x:t.x-u.x,y:t.y-u.y})),I=((t,n)=>{const r=o,e=O[t],W=.08*UNIT;for(const t of FIT_STEPS){const o=e[r(338,"8@rz")](o=>rotatePt(o.x,o.y,t,0,0));if(polysMatch(o,n,W))return t}return x})(t.type,S),T=_[e][W(418,"&L&X")](t=>({x:t.x+f,y:t.y+s})),C=pathFromPoints(T),k=SYMMETRY[t[W(412,"ZVo]")]],m=P[e];return{id:e,type:t[W(312,"tz!(")],color:t[W(268,"&L&X")],stroke:darken(t.color,.28),localPoints:b,canvasSize:d,targetCx:i,targetCy:R,targetRot:I,symmetry:k,silPath:C,initialRot:n[W(387,"V#*(")](pickInitialRot,I,k,r),scatterCx:m.x,scatterCy:m.y}}),h={x:n.qsXiy(b,f),y:a+s,w:d-b,h:n[o(355,"IU@V")](u,a)},A={};return A[o(366,"wT6u")]=N,A[o(261,"*$bz")]=h,A};export const isRotationMatched=(t,o,n)=>{const r=_0x1b14b7,x={};x[r(345,"F%#]")]=function(t,o){return t%o},x[r(267,"^d!Y")]=function(t,o){return t%o},x[r(403,"SXt5")]=function(t,o){return t-o};const e=x;let W=e[r(379,"yi&$")](e[r(378,"*$bz")](e.IokCU(t,o),n)+n,n);return W=Math.min(W,n-W),W<=30};export const snappedRotation=(t,o,n)=>{const r=_0x1b14b7,x={};x[r(420,"M7f2")]=function(t,o){return t/o},x[r(365,"r)T#")]=function(t,o){return t-o},x[r(348,"dCCR")]=function(t,o){return t*o};const e=x,W=Math[r(310,"yi&$")](e[r(266,"tiQb")](e.AdWfi(t,o),n));return o+e[r(401,"tz!(")](W,n)};export const localPath=(t,o,n)=>{const r=t[_0x1b14b7(374,"Gk#!")](t=>({x:t.x+o,y:t.y+n}));return pathFromPoints(r)};
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";const _0x42855a=_0x9e28;!function(){const e=_0x9e28,t=_0x473c();for(;;)try{if(582240==parseInt(e(255,"4tMQ"))/1+parseInt(e(222,"s)$I"))/2*(-parseInt(e(332,"2fAy"))/3)+parseInt(e(275,"4&KT"))/4+parseInt(e(327,"ULS)"))/5+-parseInt(e(305,"s)$I"))/6*(-parseInt(e(251,"sKt("))/7)+-parseInt(e(309,"3%Eb"))/8+parseInt(e(244,"RW%W"))/9*(-parseInt(e(291,"Mpl8"))/10))break;t.push(t.shift())}catch(e){t.push(t.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x30455a,{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";function _0x9e28(e,t){e-=213;const o=_0x473c();let n=o[e];if(void 0===_0x9e28.cqrIym){const e=function(e,t){let o,n,r=[],a=0,s="";for(e=function(e){let t="",o="";for(let o,n,r=0,a=0;n=e.charAt(a++);~n&&(o=r%4?64*o+n:n,r++%4)?t+=String.fromCharCode(255&o>>(-2*r&6)):0)n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(n);for(let e=0,n=t.length;e<n;e++)o+="%"+("00"+t.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(o)}(e),n=0;n<256;n++)r[n]=n;for(n=0;n<256;n++)a=(a+r[n]+t.charCodeAt(n%t.length))%256,o=r[n],r[n]=r[a],r[a]=o;n=0,a=0;for(let t=0;t<e.length;t++)n=(n+1)%256,a=(a+r[n])%256,o=r[n],r[n]=r[a],r[a]=o,s+=String.fromCharCode(e.charCodeAt(t)^r[(r[n]+r[a])%256]);return s};_0x9e28.DCZDIy=e,_0x9e28.MmgRYd={},_0x9e28.cqrIym=!0}const r=o[0];_0x9e28.RIEATl!==r&&(_0x9e28.MmgRYd={},_0x9e28.RIEATl=r);const a=_0x9e28.MmgRYd[e];return void 0===a?(void 0===_0x9e28.ZdwoGB&&(_0x9e28.ZdwoGB=!0),n=_0x9e28.DCZDIy(n,t),_0x9e28.MmgRYd[e]=n):n=a,n}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 _0x368401,jsxs as _0x54c116}from"react/jsx-runtime";const scoreFormatter=e=>""+e[_0x42855a(300,"od]y")]();export const Tank1990=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:t,onEndGame:o,onReplayGame:n,onShare:r,onShareScreenshot:a,onShowLeaderboard:s,bannerAd:W})=>{const d="[1@w",u="7V@p",m="Lr7j",i=_0x42855a,k={sikgg:i(263,"&hMe"),lLcCO:i(219,"2gO("),cOzdu:function(e,t){return e>t},KXtWj:i(299,"4tMQ"),sfIEJ:function(e,t){return e(t)},mVokl:function(e,t){return e===t},urJuk:"LPODF",mitGh:function(e,t){return e-t},PmvPg:i(248,"2gO("),rZlqh:function(e,t,o){return e(t,o)},LJSjp:"cancel",WAvUk:function(e){return e()},uNhpT:function(e,t,o){return e(t,o)},RuQHV:function(e,t,o){return e(t,o)},Kulue:function(e,t,o){return e(t,o)},pysgl:function(e,t,o){return e(t,o)},DsIrl:function(e,t,o){return e(t,o)},IMYnx:function(e,t){return e&&t}},{width:S}=k.WAvUk(getGameDimensions),l=useIsPlaying(),x=useIsGameOver(),f=k[i(268,"od]y")](useIsWin),_=useRef(!1),C=useRef(null),R=useRef(e);R.current=e;const G=useRef(o);G[i(216,"favm")]=o;const p=useRef(l);p.current=l;const h=useRef(x);h[i(243,"Lr7j")]=x;const g=useCallback(e=>{const t=i,o={IABvS:function(e,t){return e>=t},tuvSq:function(e,t){return e/t},xndFd:function(e,t,o){return e(t,o)}};if(k.sikgg===t(306,"RW%W")){const e={_0x50b9a2:347,_0x553e39:"U@(M",_0x2a382:"2gO("};let n=0;const r=o[t(238,"G(kK")](1e3,60),a=s=>{const W=t;o[W(e._0x50b9a2,e._0x553e39)](s-n,r)&&(n=s,_0x530b8b[W(276,e._0x2a382)]()[W(310,"^Nn$")](_0x1d36ac.current)),_0x13a5bc[W(339,"UZB)")]=_0x35c255(a)};_0x4479d0[t(331,"Ad]4")]=_0x484453(a);const s=_0x1b306a();_0x3229cb[t(324,u)]=o[t(290,m)](_0x33ce9d,()=>{const e=t;_0x15fa6a[e(246,"yqP&")]()[e(262,"od]y")](_0x5a185c[e(338,"yqP&")])},s[t(346,"(giA")]),_0x458160(()=>_0x51e522[t(273,"&hMe")]().spawnEnemy(_0xb4296d[t(216,"favm")]),1e3)}else if(G[t(324,u)]&&!_[t(338,"yqP&")]){const o=useTank1990Store[t(220,"2fAy")]()[t(326,"V5YO")];G[t(243,m)]({status:e,score:o.toString()}),_[t(250,"od]y")]=!0}},[]),b=useCallback((e,t)=>{const o=i;if(!p.current||h[o(216,"favm")])return;const n=Math[o(340,"&hMe")](e),r=Math[o(345,"Qaot")](t);if(n<5&&r<5)return;let a;a=n>r?e>0?k[o(282,"erK9")]:"left":k.cOzdu(t,0)?k[o(281,"k6Em")]:"up",useTank1990Store.getState()[o(225,"HUHC")](a)},[]),I=k[i(284,"[nNd")](useCallback,()=>{useTank1990Store.getState().setDirection(null)},[]),y=k.RuQHV(useMemo,()=>Gesture.Pan().onUpdate(e=>{const t=i;runOnJS(b)(e.translationX,e[t(278,"(giA")])})[i(258,"vQ[V")](()=>{const e=i;k.mVokl(k.urJuk,e(334,"&bAn"))?runOnJS(I)():k[e(317,"BY4d")](_0x345cfc,_0x1fd124?e(253,"9Z5f"):"lose")}),[b,I]);k[i(254,"X@$2")](useEffect,()=>{const e=i;return useTank1990Store[e(276,"2gO(")]().initializeGame(S),()=>{const t=e;useTank1990Store.getState()[t(288,"4&KT")]&&!_[t(242,"3%Eb")]&&g(t(221,"4tMQ")),C.current&&(clearGameInterval(C.current),C[t(250,"od]y")]=null),useTank1990Store[t(265,"RW%W")]()[t(344,"]R(%")]()}},[S,g]);const P=useRef(!1);useEffect(()=>{const e=i;x&&!P.current&&g(f?e(264,"&bAn"):e(227,"sKt(")),P.current=x,!x&&(_[e(333,"4tMQ")]=!1)},[x,f,g]);const M=k[i(325,"OKh6")](useRef,null);useEffect(()=>{const e=i,t={};t[e(266,"HUHC")]=function(e,t){return e<t},t[e(322,"s)$I")]=function(e,t){return e!==t},t[e(330,"yqP&")]=e(314,"HUHC"),t[e(329,"ENdT")]=k.PmvPg;const o=t;if(l&&!x){let t=0;const o=1e3/60,n=r=>{const a=e;k[a(230,"CTdt")](r,t)>=o&&(t=r,useTank1990Store[a(229,"vQ[V")]()[a(343,"7V@p")](R.current)),M.current=k.sfIEJ(requestAnimationFrame,n)};M[e(256,"t6iI")]=requestAnimationFrame(n);const r=getGameConfig();C.current=setGameInterval(()=>{const t=e;useTank1990Store[t(224,"HUHC")]()[t(289,"erK9")](R[t(279,"W!9o")])},r[e(233,"&hMe")]),k[e(252,"od]y")](setTimeout,()=>useTank1990Store[e(292,"od]y")]()[e(231,"X@$2")](R.current),1e3)}return()=>{const t=e;if(M[t(319,"9Z5f")]&&(cancelAnimationFrame(M[t(331,"Ad]4")]),M[t(214,"!q1q")]=null),C[t(285,"RW%W")])if(o[t(218,"F*3b")](o.TShsu,o[t(223,"4&KT")]))clearGameInterval(C[t(295,"]14%")]),C.current=null;else{if(!_0x5784a4[t(339,"UZB)")]||_0x3dd57d[t(311,"vQ[V")])return;const e=5,o=_0x58d1ae[t(241,"!]V3")](_0x1fda7a),n=_0x32b019[t(267,"s)$I")](_0x4de00c);if(o<e&&PSMTAh[t(235,"sTP5")](n,e))return;let r;r=o>n?_0x259c08>0?"right":t(303,"CTdt"):_0x190c8d>0?t(302,"]14%"):"up",_0x237f0f.getState()[t(335,"U@(M")](r)}}},[l,x]);const O=useCallback(()=>{const e=i;_[e(249,"[nNd")]=!1,useTank1990Store[e(224,"HUHC")]().startGame(),playSound(GAME_SOUNDS[e(237,"&hMe")].START,R[e(321,"2@Vd")][e(297,"yqP&")]),playHaptic(HapticType[e(234,"HUHC")],R[e(242,"3%Eb")][e(307,"2fAy")])},[]),T=useCallback(()=>{const e=i;g(k[e(298,d)]),useTank1990Store[e(292,"od]y")]()[e(337,d)](),useTank1990Store.getState().initializeGame(S)},[g,S]),v=useCallback(()=>{const e=i;_.current=!1,n?.(),useTank1990Store.getState().resetGame(),useTank1990Store[e(257,"]Ah*")]().initializeGame(S)},[S,n]),A=e?.[i(215,"k6Em")]??0,H=k.pysgl(useMemo,()=>({isVisible:x,score:useTank1990Store[i(245,"sKt(")]()[i(260,"W!9o")],onPlayAgain:v,buttonText:f?"Next Level!":i(313,"k6Em"),scoreLabel:f?"Level Complete!":i(287,"W!9o"),scoreFormatter:scoreFormatter,title:f?i(328,"Qaot"):i(342,"Mpl8"),message:f?i(294,"[1@w"):i(304,"sKt(")}),[x,v,f]),q=useMemo(()=>({gameId:GAME_IDS[i(269,"7V@p")],settings:e,onSettingsChange:t}),[e,t]),N={};N[i(247,"3%Eb")]=A||0;const V=useMemo(()=>[styles[i(318,"t6iI")],N],[A]),Q=useMemo(()=>({isPlaying:l,gameOver:x,onStartGame:O,onStopGame:T,onShare:r,onShowLeaderboard:s,startButtonSubtext:i(236,"3%Eb")}),[l,x,O,T,r,s]),E={};E[i(320,"yhye")]=A;const U={...Q},K={...H};K[i(217,"]R(%")]=a,K[i(274,"U@(M")]=W;const j={...q};return k[i(271,"]14%")](_0x368401,GestureHandlerRootView,{style:styles.root,children:_0x54c116(GameBackgroundPattern,{children:[k[i(341,"(giA")](_0x368401,ScoreBoard,E),k.DsIrl(_0x368401,GestureDetector,{gesture:y,children:_0x54c116(View,{style:V,children:[_0x368401(View,{style:styles[i(312,"9Z5f")],children:_0x368401(GameBoard,{})}),k[i(301,"erK9")](l,!x)&&_0x368401(View,{style:styles.gestureHint})]})}),_0x368401(GameControlButton,U),_0x368401(GameOverModal,K),_0x368401(GameSettingsModal,j)]})})};const _0x275278={};_0x275278[_0x42855a(226,"4&KT")]=1,_0x275278.backgroundColor=BACKGROUND_COLOR;const _0x4e46f8={};_0x4e46f8[_0x42855a(296,"Mpl8")]=1,_0x4e46f8[_0x42855a(259,"^Nn$")]="center",_0x4e46f8[_0x42855a(239,"od]y")]=_0x42855a(323,"9Z5f"),_0x4e46f8[_0x42855a(272,"vQ[V")]=15;const _0x1a2271={};function _0x473c(){const e=["z8khW6qnWPe","gCkCFCktqSoJjNJdUuhcNeK","jCopDJHidSoHW61gW40AtG","W7ldJSkPkMlcImkbiCk2","aCoYzSk0gSouWQm","W7evWRCDESk0WRi","xNfR","E8osW7VcSCk4","WPOXWRbcqrFcShnB","jH3dUCkbWQJdHwai","fSk2oZlcQCkdfMVcOa","v8kHtq","BSofW63cU8kTWPtcIsrbtq/cQCkTW5ddVmoSqr8","i8k4s8kHEa","mSkAWR3dPSoGW7xcVtbmAs7cLG","W59MjmoRFCkpjG","W4aeW61UWR3cUG","W611W4JcMKhcI8ky","c8k9gZ/cVmk2eG","W6bojgjf","W7nkW4TBhG","wK4FW5/cQgNcHCoQ","yZrPWOiUW4y","W4JcKZ/cIrj/bqbFW55T","pbJdOK4+","ESkBnv8pw8oZW5e","BSkBnuGssmoIW5DCW4eHrW","cdddTNe","sCo/Bmkp","bmosW7yWrCk9WPFdR1q","WOD1W4VdQYaTm14","WR7dT8oiW4Ck","bmkVWRddNvucaavSFq","WPabW67dStP4WQBdQfxcHWxcNwu","wN19omkAdmkBfSo3qKJcImkhW4dcG13dKKe","umk7buuUDW","jmoVWP50la","WR1zWRrHxIimW5hcRmozW7ZcNHJdP8o8W4NcSa","A1jwhSk8BSostSkW","qCktWRebvG","W4bFWRlcPgmiW6ldIhlcPW","dXnFWRJdQdNcLSoQimozW4NdIq","sSkvWQa","WPPjWQb2vsHy","umoMkSkqjmkGW7u","ebCHWQtcMtBdRmkeBM/cMWa","qSo1A8k5WQxdTuPr","bCoIymkvc8oBWQnK","WOLDWRzGwsHlW7ZcRmoC","W5zXW5Pkha","W6ldNLldISoEWPK+","W4jgWQNcSwGVW6i","eSo4sCkeWR3dVMC","W5nPWRFcSMu","nwm6","pmkQWR3dN14","mM0ZW5v/WPSjW5RcV8k0k04","WQhdRColWOfpumk2","lW/cRSknWObIdSo9","WO9+W7RdLJa","W7FdRmkPW4BdTSozWQPoBmoAWQZdNtFdOq","ACovuCoZdG","W7ldHmk1oW","W5jdWRRcTgmeW7JdIhlcRq","DNfCnSkw","xmk+W4u","t0nIW4pdNMpdVSk4","DmkSk1qW","WPJdH3S","W7zYWQ3cLMy","ft3dMSkVWRVcMZzbWRu","WRpcM1ddQCo0WOqSyG","D8oJvCkibG","WPbXW5VdNd0IihpcO1pdTCoIcuDSaSkb","whzSbSkxpSkFeG","cmkyz8k5tSoJaN8","wM3cOJHsW40swHhcHKlcOCoj","W6zgW5HGhSkCW7nB","rSk2W5KUWR5nyKro","F8ozW6NcUmkNWQVcMdfFtcJcNG","ECodtmoZdSkhWRe","B8oKxJi2WP4","W6q6W79kWRi","WPddMmoCnYW","WO7dM8kPW61pEW","W7tdPuJdImoV","s1nKW6ldJ2ZdVG","WRzlW7PDbSkxW54","xmoFumoGb8ojWPBdSSoDlmko","bY/dG2ufWOrdtre","WO/dPmoEaW1EWPydjSk+","s8o9pmkKjq","W69aWO1wlIVcGhS","W4zwWQ/cKhKGW6ldIa","WRNcUmoNpLRcPfnVW4hdHSkJ","W4hdH8k2B3pcOCkfiCk6oCoFWPyqFZtdQ8oFWRhdQdODW60","zSoms8klc27cIG","WRSCWPH/","b8oPDCkKe8oFWOrUotvPyq","W4ZdOCkjjwy","zdPWWO8","W5vCWPFcRg4GW7RdIeZcObZcKeGW","WRxdMCoMgHS","yCowtSkx","WR/dU8oAW7q","Fmo/ASkyW7hdTL9hW5XJDmowW6iskdP/A1S+W5NcUXO4","W4dcLd3cJbaujYnTW7ntW7q","Cg14W5RdOq","weukW67cSg3cUCoUh8oRW7RdQv8","W61LW5tcNehcL8k7x8kkrWNcLCor","W40iW6q2ahyCW6xcM8olW4NdTJm","W7RdUmk3W5FdK8oqWRX9","WOnLW43dIJeImW","jwS5a8kRmmkuWOC","W7SqW7i9WPNcQCoquJddMa","ESkwofq0","W4GkW6uXbH9kW77cI8olW5G","zmovumkEaeNcISkAvq0","AmkWWPFdV8og","WQhdVCoxWODptmkvWPLqrLipW74","ix8Mfmkplmkf","W5ldRgayW5pcOG","WR3cQmoMoeRcUei","WRtdKxhdLey","iw86eSkpma","iGNdPSkwWOhdHhS","ExBcUSo5WOe","F8oIxZq2","WQSWWRusWR8GWOhdSKGQWORcP0i","ESkgAdFcHSkzWOJdJ8ozaZGGW5a+WOq","WR/dRCk9W4TH","nSouFmk1cG","WOnVgSkIvSocWPy","db9AW67cVK/cNCoCoq","yYb1WPmUW4qA"];return(_0x473c=function(){return e})()}_0x1a2271.width="100%",_0x1a2271[_0x42855a(316,"]14%")]=_0x42855a(280,"V5YO");const _0x552854={};_0x552854[_0x42855a(277,"&bAn")]=10;const _0x4979ba={};_0x4979ba[_0x42855a(261,"[1@w")]=_0x275278,_0x4979ba[_0x42855a(308,"favm")]=_0x4e46f8,_0x4979ba[_0x42855a(312,"9Z5f")]=_0x1a2271,_0x4979ba[_0x42855a(293,"2@Vd")]=_0x552854;const styles=StyleSheet[_0x42855a(283,"ENdT")](_0x4979ba);Tank1990.displayName="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 _0x5995cd=_0xa61c;!function(){const W=_0xa61c,d=_0x4339();for(;;)try{if(505108==parseInt(W(371,"!a!A"))/1*(-parseInt(W(322,"v]C8"))/2)+parseInt(W(375,"S&b["))/3*(-parseInt(W(393,"%t0k"))/4)+-parseInt(W(370,"4VU6"))/5*(parseInt(W(261,"v3jy"))/6)+parseInt(W(294,"a6ea"))/7*(-parseInt(W(311,")0Gm"))/8)+parseInt(W(345,"80zx"))/9+parseInt(W(315,"MxTv"))/10*(parseInt(W(277,"tqE*"))/11)+parseInt(W(389,"GjTX"))/12)break;d.push(d.shift())}catch(W){d.push(d.shift())}}();const _0x1eb4b3={};_0x1eb4b3[_0x5995cd(350,"S&b[")]=_0x5995cd(253,"e79p"),_0x1eb4b3[_0x5995cd(314,"#M0!")]="rgba(0, 0, 0, 0.10)",_0x1eb4b3[_0x5995cd(374,"JtRK")]=_0x5995cd(299,"ejek"),_0x1eb4b3[_0x5995cd(300,"esb9")]=_0x5995cd(296,"p%s#"),_0x1eb4b3[_0x5995cd(284,"z%AE")]=_0x5995cd(252,"a6ea"),_0x1eb4b3.PLAYER_BODY_SHADOW=_0x5995cd(256,"K(X%"),_0x1eb4b3[_0x5995cd(352,"esb9")]=_0x5995cd(346,"v3jy"),_0x1eb4b3[_0x5995cd(365,"Nj3R")]=_0x5995cd(270,"@nAm"),_0x1eb4b3[_0x5995cd(385,"T9Fx")]="#FFF176",_0x1eb4b3[_0x5995cd(292,"z%AE")]=_0x5995cd(358,"JtRK"),_0x1eb4b3.PLAYER_BARREL="#B8860B",_0x1eb4b3[_0x5995cd(249,"JAj0")]=_0x5995cd(373,"MxTv"),_0x1eb4b3[_0x5995cd(282,"n1F^")]=_0x5995cd(332,"egjs"),_0x1eb4b3[_0x5995cd(268,"tIG9")]=_0x5995cd(308,"ejek"),_0x1eb4b3[_0x5995cd(383,"90!f")]="#4A5C72",_0x1eb4b3.ENEMY_BODY_SHADOW="#354558",_0x1eb4b3[_0x5995cd(325,"JAj0")]=_0x5995cd(390,"R@JM"),_0x1eb4b3[_0x5995cd(255,"7h[^")]="#5A7090",_0x1eb4b3[_0x5995cd(354,"tqE*")]=_0x5995cd(291,"sW#2"),_0x1eb4b3[_0x5995cd(338,"qhpG")]="#506478",_0x1eb4b3.ENEMY_BARREL=_0x5995cd(269,"4VU6"),_0x1eb4b3.ENEMY_BARREL_HIGHLIGHT=_0x5995cd(313,"n1F^"),_0x1eb4b3[_0x5995cd(288,"ejek")]=_0x5995cd(287,"80zx"),_0x1eb4b3.BULLET_GLOW="rgba(255, 120, 0, 0.6)",_0x1eb4b3[_0x5995cd(306,"wJEx")]=_0x5995cd(309,"A*Iw"),_0x1eb4b3[_0x5995cd(276,"T9Fx")]=_0x5995cd(334,"BCO9"),_0x1eb4b3[_0x5995cd(295,"e79p")]="#945028",_0x1eb4b3[_0x5995cd(264,"p26d")]=_0x5995cd(372,"K(X%"),_0x1eb4b3[_0x5995cd(330,"iYzY")]=_0x5995cd(339,"Yrpt"),_0x1eb4b3[_0x5995cd(248,"e79p")]="#6B3410",_0x1eb4b3.BRICK_RIGHT_EDGE="#7A3B14",_0x1eb4b3[_0x5995cd(260,"*w^Q")]="#2E1A0C",_0x1eb4b3.BRICK_MORTAR_SHADOW="#1E1008",_0x1eb4b3[_0x5995cd(394,"HV4H")]=_0x5995cd(369,"ejek"),_0x1eb4b3[_0x5995cd(363,"*w^Q")]="rgba(60, 30, 10, 0.2)",_0x1eb4b3.BRICK_DAMAGED_FACE=_0x5995cd(278,"v]C8"),_0x1eb4b3.BRICK_DAMAGED_FACE_ALT="#6E381A",_0x1eb4b3[_0x5995cd(283,"^vKf")]="#9A6040",_0x1eb4b3[_0x5995cd(312,"iYzY")]=_0x5995cd(356,"p%s#"),_0x1eb4b3.BRICK_DAMAGED_BOTTOM="#4A2508",_0x1eb4b3[_0x5995cd(281,"v3jy")]=_0x5995cd(387,"qhpG"),_0x1eb4b3[_0x5995cd(286,"HV4H")]=_0x5995cd(274,"BCO9"),_0x1eb4b3.STEEL_TOP=_0x5995cd(333,"aUF*"),_0x1eb4b3[_0x5995cd(297,"#SCh")]=_0x5995cd(329,"p%s#"),_0x1eb4b3[_0x5995cd(272,"JAj0")]=_0x5995cd(366,"K(X%"),_0x1eb4b3[_0x5995cd(267,"z%AE")]=_0x5995cd(328,"T9Fx"),_0x1eb4b3[_0x5995cd(320,"p%s#")]=_0x5995cd(364,"Lx13"),_0x1eb4b3[_0x5995cd(316,"A*Iw")]="#1E88E5",_0x1eb4b3[_0x5995cd(327,"wJEx")]=_0x5995cd(301,"PFXS"),_0x1eb4b3[_0x5995cd(359,"sW#2")]=_0x5995cd(377,"esb9"),_0x1eb4b3[_0x5995cd(293,"#SCh")]=_0x5995cd(379,"p26d"),_0x1eb4b3[_0x5995cd(280,"80zx")]=_0x5995cd(318,"Yrpt"),_0x1eb4b3[_0x5995cd(351,"T9Fx")]="#2E7D32",_0x1eb4b3.GRASS_TIP=_0x5995cd(344,"T9Fx"),_0x1eb4b3[_0x5995cd(391,"JtRK")]=_0x5995cd(326,"^vKf"),_0x1eb4b3[_0x5995cd(257,"S&b[")]="#FFD700",_0x1eb4b3[_0x5995cd(265,"n1F^")]="#FFC107",_0x1eb4b3[_0x5995cd(357,"v]C8")]=_0x5995cd(336,"Nj3R"),_0x1eb4b3.BASE_EMBLEM=_0x5995cd(266,"T9Fx"),_0x1eb4b3.BASE_SHADOW=_0x5995cd(381,"sW#2"),_0x1eb4b3.EXPLOSION_CORE=_0x5995cd(289,"v3jy"),_0x1eb4b3[_0x5995cd(395,"e79p")]=_0x5995cd(254,"Lx13"),_0x1eb4b3.EXPLOSION_MID="rgba(255, 120, 0, 0.7)",_0x1eb4b3[_0x5995cd(317,"sW#2")]=_0x5995cd(271,"Yrpt"),_0x1eb4b3[_0x5995cd(342,"p%s#")]=_0x5995cd(307,"8h]s"),_0x1eb4b3[_0x5995cd(321,"90!f")]=_0x5995cd(262,"JtRK"),_0x1eb4b3[_0x5995cd(310,"egjs")]="rgba(255, 255, 255, 1)",_0x1eb4b3[_0x5995cd(303,")0Gm")]=_0x5995cd(302,"PFXS"),_0x1eb4b3[_0x5995cd(361,"#SCh")]="rgba(255, 200, 50, 0.4)",_0x1eb4b3[_0x5995cd(382,"GjTX")]=_0x5995cd(331,"R@JM"),_0x1eb4b3.SPAWN_SHIELD_EDGE=_0x5995cd(279,"GjTX"),_0x1eb4b3[_0x5995cd(355,"R@JM")]=_0x5995cd(347,"Yrpt"),_0x1eb4b3[_0x5995cd(340,"*w^Q")]="rgba(0, 0, 0, 0.2)",_0x1eb4b3[_0x5995cd(273,"egjs")]=_0x5995cd(335,"MxTv"),_0x1eb4b3[_0x5995cd(250,"8h]s")]=_0x5995cd(360,"Yrpt");export const TANK_1990_COLORS=_0x1eb4b3;const _0x4b629e={};_0x4b629e[_0x5995cd(388,"i^ZF")]=13,_0x4b629e[_0x5995cd(368,")0Gm")]=17,_0x4b629e[_0x5995cd(343,"G79@")]=24,_0x4b629e.PLAYER_SPEED=2,_0x4b629e.ENEMY_SPEED=1,_0x4b629e[_0x5995cd(396,"Lx13")]=20,_0x4b629e[_0x5995cd(397,"90!f")]=6,_0x4b629e[_0x5995cd(348,"%t0k")]=4,_0x4b629e[_0x5995cd(341,"n1F^")]=300,_0x4b629e[_0x5995cd(323,"v]C8")]=1500,_0x4b629e.INITIAL_LIVES=3,_0x4b629e.ENEMY_SPAWN_INTERVAL=5e3,_0x4b629e[_0x5995cd(319,"i^ZF")]=4,_0x4b629e[_0x5995cd(362,"Nj3R")]=20,_0x4b629e[_0x5995cd(324,"G79@")]=500,_0x4b629e.POINTS_PER_LEVEL=2e3,_0x4b629e[_0x5995cd(337,"tIG9")]=500,_0x4b629e[_0x5995cd(305,"!a!A")]=2e3;export const TANK_1990_GAME_CONFIG=_0x4b629e;const _0x329b1f={enemySpeed:.6,enemyFireCooldown:2e3};_0x329b1f[_0x5995cd(384,")0Gm")]=3,_0x329b1f.enemiesPerLevel=10,_0x329b1f[_0x5995cd(380,"@nAm")]=6e3;const _0x4c142a={enemySpeed:1,enemyFireCooldown:1500,maxEnemies:4,enemiesPerLevel:15,enemySpawnInterval:5e3},_0x297ec6={};function _0x4339(){const W=["WRfeWRNdOSogxKm","jmkuFSkZmCkJemk4WPVdPCoTESkObvWNoCkx","DmkpWPddRxRcRmo5W7pdPZe2AmoIW5FdV8o+WOCpxW","WRGaj8oEj1JdIq","z0RcVCobWOddJ8oNW5GdWPq+W6ldMeK","jSoAf8khWRtcNYebWRtcJbdcRfZcICobwmoviCkQW6W","W7v1W5pdPCkjtw0AcSoGW6Lpdu3cKG","WORcIa5QW656W5elW40","rmkKW5GQWR1oWOy","W5bLFuyFE8oqa8o5bKJcIe8","W5tcVCk0W60lzGC","W6KJCCkgp17cPmoMaGCzWRm0WQXUnSkFWOnF","W7iiW79UWRTUWQ1Mp1Dx","wwdcRx8Ei8kT","W7xdIeDjfCoAW7hcPwFdMW","imocWQO4W54LW7ZdQSoU","pwJcV2qkmmkvbSoIWO7dQCkN","WQxcSaemWRf7rb40rwtcUW","WPhcPHhdKCkFW5KGWRKajSkIWPW","WRVdICkXqLtdJdOAW6K6","WPnVWRpcNSo+kXW","W6tcS8oKyeJcUXtdQCkFWPW","rf4jzmokWQFdOa","W4FdIg16W5msqteJzv/cUSoChCok","WRGcvCkHusJdJG","BCkpvSkEFt04vIBdUahcUW","W5DmWRRcL8ojkYa/W6yJEeVdKSk9xW0B","zLFcUSowWPNdN8o4W5ChWPqHW6FdI1pcMHWyWQa","W5jjWOj6WQ5HWRG","W4joWR7cG8ofpcW0W6qNAv/dGCkWqa8FcrvRq8oK","W5VdGmkrkmkUfCkW","W4BcVmoeW618BGq3W6JcGSoJbCkK","WRPRmKC9jmoZWPa6WODA","W6ZdO8kqW4JcQ8ozqcueW589W7JcUCouiSk8zZ/cL8k7WPpcNCoBfMm","i8knWRSpW6VcJSkmq8oTa8oe","WQzgiCkvyhJcUa","W5VdHCkuwCkVz8kW","dJ3dSSojBmoeWOS","n1z8Fmk3W4xcJ1aCW5uof8k9WQTB","WOBcSte1z8kWWOVcThpdUmknWOBdHG","W7tdOSksW4rvWPz6W6tcLZi/W4hdMsO","tH3dJN4ojmoZ","W4RdTmk8a8kCtmkdBSk8kauOW70","WPXFWRKkCmoqi8oDWOG7WPJdI8oiWR7cTZTkmqRcKmoOpsb8","W5tcUCorW6HXW57cKhddHeZcHWtdUmoWeeddHCoI","WRpdIWehWRD9sW","dmkBW69mv8ozW7n7v8oja8oL","W4JdRhGbACk9k8ouWR0Cg8kBFCoAmcJdTq","WPbya0ymcCoBWRayWRW","n8oCWQOYW4GOW67dT8o/tSo9zga","W7VdUrrOW6HgW4eB","eSo0W6pcKXpdGSkD","WRxcLSohDSo7kSo9z8kCfa","BSo9WPOOk8kYWPyhxmoEhCouWR/cPW","W5VcTCk6iZBcTu4","ieH8DSkHW4JcMfSuW5KBaCkUWQXF","dmkIWQKcWPhcJCktzhGbWQ9AW77dISoAWO/dVG","WOqzW6bGWQ97WPu","wLhcSCkWW6nYWPZdHMtcO0VdHMFdQCkpwmo+WONdHa","oIpcR3pdQCoFWPJdJJ8YW5VdGmo/ufS","WQu5W7KhW4rXW4fwoW","W4/dT3eaDCk2nSoiWQKaaCkD","psNcTNZdRCotWPpdJIu5W53dGW","WQhdSYq5WOtdJHNdLNvgWO/dGsxdKtZdGqm3W5NdUCojWRik","WQ5vW47dQYStbSo8WQBcSW","WPRcPCo8vG","xK7dQKlcR0ldNW","drZcNv7cJSk+W6tcTf1nWQdcU8keosKPWOC1tSknW7/cJmkxWR7dQW","WOmFW5uTWRmqWR05uKddJSoTiSkDW4DZfs/cUYXhfmoS","m8kSWQBcTCowyCoAlSoJbSotWOBdG8o1B8kOc8oDDCkQhq","W5VcVSoMwCkRy8oi","W7xdIfDhdCohW6VcPgZdJq","WPHxhM4Bp8ogWRWyWQS","WQm6ECozjYVcQuhdNCoeccy","zLFcUSowWPNdN8oMW4GqWOmRW7K","W4BcSCocW6WEgwq3W6hcPa","fx1FrmoAWQxdPsD/WRfMCmozW4GRWOhdI8k6WQldO8kbW7pcRW","W7VdQSkxW4tdQSkoaKvnWO1aWQVdV8kDBG","WQXQWPiOe8k9qSkNW7q","nmoxbCkBWQ7cIZ8eWRG","rmowWQ0UWR1cWOm","AmoBbhzQumocWPjzWP7dKSku","jmkcA8kYj8kVg8k4WPhdO8o2ACk7b00","mCkbW44pWPVdLmoG","WPlcLmkaW4q4WR7dKa","W6KJCCkgp1ZcVCoZhGSbWRm0WQXUnmkpWOTyW4NcGq","WQldQYaLWO3dGXtdNwjrWOK","zmkDs1tdQvOEWOpdNmovq8oSWRmG","jCo7W4VdUe3dK8oK","cmk0CZ/dLw95sW","jCocWQiOW4yLW7FdOSoPwq","W6ddNghcQSo3WRyCWR8ai8knWRW","WOxdHCo2fLhdGX8","lCkSW4X6mCk1WPaFpSk9E8krW7RdGruSwsxdGsLuEqfD","WQ8hdIr0fCkLd8oEnW","WRxdLSk4WPKccxuYW7/cPmoYgmkPW6S5rJBdK8o7W7tdP2HSW5W","m8oye8ktWQJcKJWiWRNcHWRcP1dcLG","nKlcLmkdpSovrCk1WQxcHCoBsCk8mmkVnrq","A8odagPJxCooWPHxWP7dHmkCW7W/WOldLY94","WQhcSq0kWRqGut0MFv8","s1FcVCk2W6rYWONdL2lcPq","W4StcufLESox","W5ZdKCk+W6xdHSk/lLzNWQ1j","WOxdO8ktWRTHzargWP7dHCkhAmoyWPHlpupcQ8kdWOVcKWu","WPxdO8oab8oSpG","WRpcVNGhW4qmpq","A8odagPJxCooWO5nWOJdJ8kgW6OVWOxdIYfXE8oe","D8kBwmkbyYCHvJldOq","tJ7dOu/cRHtdQIpcMc9u","psNcTNZdRCotWPFdGdiOW43dJ8o9qq","WPnRW4xdRCoXlHq","C8kosCkbFsCLvIFdUaVcPa","WRZdQLa2rSkbea","WR3dGSk0W6ZcT8oFnq","pwJcV2qkmmkvemo/WOVdS8kZWObhWQBcGa","pW7cMvH6WQrc","BL3dIxHNW5bcWQRdLCkaWOXEAZZcLsddPSkKehtdUsZcG0S","WRbSivKUkCoPWPaZWOflW7K","eH7cM1BdK8oH","W4rEdCk4wetcKuddGmohjXhdOspdImoQW6VcNhNdICkV","W4RcV8o7ySotFgBdOdNcSGddLa","WO9XW6pdMez0ySkvW57dKuldT8kOiLfxWRhdMI8IWO0","WR3cSSkWWP7dH8osrq","WRFcS8oeWPzpWPb5W6xdUubCWOtcGedcN2SlzCkqlmocWQ/dTa","ASkhx1RdT1anWP/dKCoiva","W48nlu07a8oVWPm","ECowBYRdHN1VuYLGW7TyW7ibWOXNiCoPydNcRvBdTW","vCkGzSoPW4NdTe4","q8klwaJdHvxcKw/dVG","hKNcK8oEdmk5W6Lq","WPlcLCoYWRi1W70bWPNcKq","W5xdKwLZW44EqdCQCLZcPSopemom","WRH1uCosuLZcUa","WR/cHCowBCoHm8oXBSkbgs8","W6DSW5FdRmkuqwaqaCoV","W4JdUM0aF8kXimouWRCAf8krymopncNdVCkh","WPpdI8kpfIFdHbFdGCkkWQyPW70","W6pcVmoYAe7cRrZdRSkiWOSbW7BcMt3dMty9rWy","WPNcGGTOW6v6W4CbW43dPCkFrSoRochcMW","WRtdSsaTWPJdGXldHNvxWPy","vYBdQ8kcn8k8qa","W5/cQ8oJA8oeD2RdOtNcTqJdMYa","rmkOW5nsWR87WOe","WPnSWRVdQ8o0xge","ECowBYRdHN1JwYnPW7buW7ewWPa","WORdOCkDDY7cSezPWOTmwrzLW4JdG8o0zfv5W6/cJtNdJCk4","bmoQrdNdULqx","WPKTWOhcK8kODCkn","jCo+W4pcItRcPmkw","xX7cPmoPFmoeWPCPwaijWP0rkxeEa8kBW68"];return(_0x4339=function(){return W})()}function _0xa61c(W,d){W-=248;const x=_0x4339();let _=x[W];if(void 0===_0xa61c.mEFlLj){const W=function(W,d){let x,_,e=[],b=0,o="";for(W=function(W){let d="",x="";for(let x,_,e=0,b=0;_=W.charAt(b++);~_&&(x=e%4?64*x+_:_,e++%4)?d+=String.fromCharCode(255&x>>(-2*e&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;_++)e[_]=_;for(_=0;_<256;_++)b=(b+e[_]+d.charCodeAt(_%d.length))%256,x=e[_],e[_]=e[b],e[b]=x;_=0,b=0;for(let d=0;d<W.length;d++)_=(_+1)%256,b=(b+e[_])%256,x=e[_],e[_]=e[b],e[b]=x,o+=String.fromCharCode(W.charCodeAt(d)^e[(e[_]+e[b])%256]);return o};_0xa61c.uszauE=W,_0xa61c.TsXIhF={},_0xa61c.mEFlLj=!0}const e=x[0];_0xa61c.VnpEEb!==e&&(_0xa61c.TsXIhF={},_0xa61c.VnpEEb=e);const b=_0xa61c.TsXIhF[W];return void 0===b?(void 0===_0xa61c.DjFBqV&&(_0xa61c.DjFBqV=!0),_=_0xa61c.uszauE(_,d),_0xa61c.TsXIhF[W]=_):_=b,_}_0x297ec6[_0x5995cd(258,")0Gm")]=1.4,_0x297ec6[_0x5995cd(392,"T!2t")]=1e3,_0x297ec6.maxEnemies=5,_0x297ec6[_0x5995cd(263,"ejek")]=20,_0x297ec6.enemySpawnInterval=4e3;const _0x56c8b3={};_0x56c8b3.easy=_0x329b1f,_0x56c8b3[_0x5995cd(304,"e79p")]=_0x4c142a,_0x56c8b3[_0x5995cd(251,"i^ZF")]=_0x297ec6;export const TANK_1990_DIFFICULTY_CONFIG=_0x56c8b3;export const getGameConfig=()=>TANK_1990_DIFFICULTY_CONFIG[_0x5995cd(290,"K(X%")];
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 _0x2219b8=_0x3ab6;!function(){const e=_0x3ab6,o=_0x543b();for(;;)try{if(112301==-parseInt(e(305,"#)lc"))/1*(-parseInt(e(313,"Td[u"))/2)+-parseInt(e(395,"vLMf"))/3*(parseInt(e(354,"FmVI"))/4)+parseInt(e(364,"6HXJ"))/5*(parseInt(e(322,"yA%M"))/6)+-parseInt(e(343,"8xZ["))/7*(-parseInt(e(359,"GxAC"))/8)+-parseInt(e(340,"vLMf"))/9+-parseInt(e(390,"8xZ["))/10*(-parseInt(e(323,"CH#4"))/11)+-parseInt(e(330,"1Hbj"))/12*(-parseInt(e(301,"7yc*"))/13))break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x239466,{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";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x523000}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 _0x5a385a,jsxs as _0x36d811}from"react/jsx-runtime";function _0x3ab6(e,o){e-=282;const t=_0x543b();let a=t[e];if(void 0===_0x3ab6.dwIgGN){const e=function(e,o){let t,a,W=[],r=0,s="";for(e=function(e){let o="",t="";for(let t,a,W=0,r=0;a=e.charAt(r++);~a&&(t=W%4?64*t+a:a,W++%4)?o+=String.fromCharCode(255&t>>(-2*W&6)):0)a="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(a);for(let e=0,a=o.length;e<a;e++)t+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(t)}(e),a=0;a<256;a++)W[a]=a;for(a=0;a<256;a++)r=(r+W[a]+o.charCodeAt(a%o.length))%256,t=W[a],W[a]=W[r],W[r]=t;a=0,r=0;for(let o=0;o<e.length;o++)a=(a+1)%256,r=(r+W[a])%256,t=W[a],W[a]=W[r],W[r]=t,s+=String.fromCharCode(e.charCodeAt(o)^W[(W[a]+W[r])%256]);return s};_0x3ab6.QJZmmx=e,_0x3ab6.ozrWsL={},_0x3ab6.dwIgGN=!0}const W=t[0];_0x3ab6.SZUQhu!==W&&(_0x3ab6.ozrWsL={},_0x3ab6.SZUQhu=W);const r=_0x3ab6.ozrWsL[e];return void 0===r?(void 0===_0x3ab6.HvMCxm&&(_0x3ab6.HvMCxm=!0),a=_0x3ab6.QJZmmx(a,o),_0x3ab6.ozrWsL[e]=a):a=r,a}export const TicTacToe=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:a,onShare:W,onShareScreenshot:r,onShowLeaderboard:s,bannerAd:n})=>{const S=_0x3ab6,u={NiXbE:function(e,o){return e===o},ifxzz:function(e,o){return e(o)},ggSuF:S(350,"vtwu"),YtWkJ:S(389,"OAqM"),YISIR:S(335,"$QLb"),JcSit:function(e){return e()},AuFSh:function(e,o,t){return e(o,t)},kbwGH:function(e,o,t){return e(o,t)},bhuKr:function(e,o,t){return e(o,t)},Tovzs:function(e,o,t){return e(o,t)}},i=useIsPlaying(),T=u[S(352,"F0Ri")](useIsGameOver),d=useRef(!1),m=useRef(e);m[S(391,"W!!r")]=e;const k=useRef(t);k[S(329,"lNDF")]=t;const C=useRef(a);C.current=a;const l=useCallback(e=>{const o=S;if(k[o(392,"i0p7")]&&!d[o(299,"vLMf")]){const t=useTicTacToeStore[o(367,"mMbF")]();let a=0;a=e===o(388,"vtwu")?TIC_TAC_TOE_CONSTANTS[o(382,"i0p7")]:e===o(361,"Td[u")?0:t[o(385,"7yc*")]?TIC_TAC_TOE_CONSTANTS.drawScore:TIC_TAC_TOE_CONSTANTS[o(345,"GxAC")],k[o(386,"9SB]")]({status:e,score:a[o(307,"lNDF")]()}),d[o(355,"xM%G")]=!0}},[]);useEffect(()=>{const e=S,o={};o[e(348,"9ZVN")]=e(375,"5nVJ");const t=o;return useTicTacToeStore[e(320,"W)*&")]()[e(353,"PGJ9")](),()=>{const o=e;useTicTacToeStore.getState()[o(312,"RQT4")]&&!d[o(319,"O[sZ")]&&l(t[o(383,"lNDF")]),useTicTacToeStore[o(365,"9ZVN")]()[o(377,"wn*H")](),useTicTacToeStore[o(357,"F0Ri")]()[o(326,"Ol7u")]()}},[]),useEffect(()=>{const e=S;if(T&&!d[e(300,"@[dx")]){const o=useTicTacToeStore.getState();u[e(303,"lNDF")](o[e(293,"6znb")],"O")?u[e(287,"Ca%X")](l,e(298,"O[sZ")):"X"===o[e(318,"yA%M")]||o[e(292,"7yc*")]?l(e(372,"GxAC")):o[e(337,"vLMf")]&&l(e(370,"i0p7"))}!T&&(d[e(286,"yA%M")]=!1)},[T,l]);const b=u[S(380,"F0Ri")](useCallback,()=>{const e=S;d[e(379,"5nVJ")]=!1,useTicTacToeStore[e(317,"2q@a")]()[e(310,"L31#")]();const o={};o[e(283,"FmVI")]="Game on!",o.pitch=1.2,o[e(315,"lNDF")]=1.2,playSound(GAME_SOUNDS[e(282,"7B07")]?.START||o,m[e(363,"Ca%X")][e(289,"wn*H")]),playHaptic(HapticType[e(381,"#s9R")],m.current[e(339,"9SB]")])},[]),x=useCallback(()=>{const e=S;l(e(358,"qope")),useTicTacToeStore[e(314,"PGJ9")]()[e(288,"PGJ9")](),useTicTacToeStore[e(321,"RQT4")]()[e(304,"i0p7")](),useTicTacToeStore[e(294,"9SB]")]()[e(341,"OAqM")]()},[l]),O=useCallback(()=>{const e=S;C[e(391,"W!!r")]?.(),d[e(392,"i0p7")]=!1,useTicTacToeStore[e(342,"#s9R")]()[e(332,"9SB]")](),useTicTacToeStore[e(346,"@0(j")]()[e(393,"Ol7u")]()},[]),_=useCallback(e=>{const o=S,t=useTicTacToeStore[o(325,"wSdn")]();t[o(296,"qope")]&&!t[o(387,"lNDF")]&&t.makeMove(e,m[o(386,"9SB]")])},[]),f=useMemo(()=>({isPlaying:i,gameOver:T,onStartGame:b,onStopGame:x,onShare:W,onShowLeaderboard:s,startButtonSubtext:S(308,"W!!r")}),[i,T,b,x,W,s]),p=u.kbwGH(useMemo,()=>{const e=S,o=useTicTacToeStore[e(317,"2q@a")](),t=T?o[e(356,")DWu")]:null,a=!!T&&o.isDraw;return{isVisible:T,score:"O"===t?TIC_TAC_TOE_CONSTANTS[e(333,"9ZVN")]:a?TIC_TAC_TOE_CONSTANTS[e(302,"$QLb")]:TIC_TAC_TOE_CONSTANTS[e(297,"Ca%X")],onPlayAgain:O,buttonText:e(306,"OAqM"),title:"O"===t?u.ggSuF:"X"===t?u[e(338,"6znb")]:a?u[e(394,"uSsN")]:e(351,"8xZ["),message:"O"===t?e(376,"#)lc"):u[e(373,"9BK*")](t,"X")?e(360,"sRoa"):a?e(295,"W)*&"):e(344,"@0(j")}},[T,O]),N=u[S(331,"9ZVN")](useMemo,()=>({gameId:GAME_IDS[S(347,"PGJ9")],settings:e,onSettingsChange:o}),[e,o]),G=e?.[S(328,"RQT4")]??0,R={};R[S(336,"O[sZ")]=G;const h=useMemo(()=>[styles.gameArea,R],[G]),A={};A[S(291,"wn*H")]=G;const I={};I.onCellPress=_;const P={...f},v={...p};v[S(311,"9SB]")]=r,v[S(349,"7B07")]=n;const y={...N};return _0x5a385a(View,{style:styles[S(290,"CH#4")],children:u[S(366,"#)lc")](_0x36d811,_0x523000,{children:[_0x5a385a(ScoreBoard,A),_0x5a385a(View,{style:h,children:_0x5a385a(GameBoard,I)}),u[S(309,"uSsN")](_0x5a385a,GameControlButton,P),_0x5a385a(GameOverModal,v),_0x5a385a(GameSettingsModal,y)]})})};function _0x543b(){const e=["WQWVeqSIWQWrpZS","hSkttrhcLtaqW4lcUq","cMRcLW","a2xdIvbTWQlcKa","W7fVtayQfSkX","zcHKm8kBzSo5WOzG","z0RcU8ohW5ldQv8HWP4","jH4IWPZcJa","W4rSemobqv7cHSkRnG","WPBcQCkmWPakW5SLW6W","W5FdJConDGigWRr+E8kcfW","hbGPWORcUXK4kq","uW4hW4zrmSkIWPldSmoMdCk/W7xcJa","Amo+WOeyrW","h8k8W40NjCoJu25d","nSkBEXlcO2LG","WPyLcSovW77dVSoSiua","gci8kauHW5ueWO8","wmoWW6OzW6uBmqe","gHyoWPS","W7r2wWW","hCoqW59rW6BcP8kjkW","fCoODSo7vCk2","hNBcIZVcSxvP","W7uZW5zTWQtdKCkcWOG","WPGZlSoQW6VdPSoXkG","u8k5ESoasmk1CCkO","h3DIW4ycW4RcN8kRrYuDW58","W6tdHmocE0C1","W4BdRI87WP7dTKtcKa","WO0KWQL4qvqiz8oM","W45XWPH0whuCqa","WPaWpmokW7RdSW","cWiiWOZcRb4I","wCorW6hdQSowzZJdV8kidcS","oNrPo8k9","k8kqwX/cTLXKqbK","l3vYi8kSWRFcICoe","AWhdHCk2WQipEvxcPG","r2RcM8oNWQa","dwlcNs3cVxv6ntzg","cwpdV1bPWRS","pSoshcnu","pmkBsrJcRN5ntaZdOSknaJi","usdcJbaXW7ZdNmkjrCk+W7e5qW","W67dJ8ofE0SMWR92AmkjCq91bW","W58zk8oAWQtcI8oinG","bmkCz8kQW67dN8kEW4RcNmoHWPG","W7ZdQNTTm23dOSkPxbVdSSopW6hdIfLNW4bhdCod","dg4FWQpcQ8kZqHS/","W4ldOhOEnw3dUmoS","A8oCW50vW4u7bJVdSMu0","h09Lm8kc","pIRcJbmgcelcIq","W7dcSmk+WPbDxmo7WOW","yCoNg8oAW7FdM8kyWRW","WQ1bmIldNW","vSo7W7C+W7GBkq3dNe82smkcxa","bL/dMKpdGNJcUuzb","W4vpW7tdMSojWP7dNW","uh7dN8kDoCk0","WObhfrJdN8k2WOFdLW","WQy9lWqMWRK","vdnyWRxcS8k+FGmX","WOuAEavAW6H5W4u/W5ZdH8kIuSoHWQO","txbQhJik","awxdQXCXWQG","eCkjtaBcOZ0l","W7PoWRDfWRvdWR8NW79XW5K","p3LOi8k7WRNcJ8oe","W4/dSSkRWRO6","W4RdIMbJBSkoFSkP","yGavW5aDmCkLW5FdPmoGa8k8","uH3cJ2NdNNa","W5vOdCohuhu","W4HGA8kmWQRcTCovawpcTCkzna","dg4FWQm","ECkDW5NdUSkv","aCkCySoSWPZdOmkBW7FcJW","uCkXEb9AWOK","W73dV8kPW50qW7WRW5ldJCk9umkfmsZdN8keWRnKrG","Dmk2amolrenoW48","WQnMWPumW6NcGmooWQn7WPfHqCkn","uCkLza5AWOSm","WQzxjXJdGW","W7u5g8oaWOxcPW","W4fGdCo3vNBcLCkJ","lYqdWR3cHa","W6FdUhGJWRBcI8oEWPSEW4BcUW","p28xmSk0Fa","oSkawGJcP3vX","aqq9WP/cPbuzoaby","W57cLSkf","W57dRSo5l24iWOblmW","bmkEfmo2WRRdQmk9W5C","ybCuW40ukSkL","W5v8eCowuhFcKW","WPyVWRnPxhify8o5W7lcOSk8maq","zCoyWQqRzG","uYNcIeLHWO7cRSkVvq","calcOsi3o0dcSMjApa","rqRcKNW","zSk5DsHEWOySgYW","WRlcOZPKW6/cQCo2WPWtW5lcUa","aCo0ASoNvCkQFa","g8kArG7cVa","tmoHW7e6W5yBkae","ySkSdSozB0DWW4u7f8kTW48","sY49WODwWPhcOCkaCq","AmkKcCoizLy","p28hkCk4BSoqWOPreq","emopjsz7WRm","pSkqxcNcTNPXsa","W5W5W4brWRtdICowWPPkWO9Za8k0WQCDbq/dGCkkahhcK8kO"];return(_0x543b=function(){return e})()}TicTacToe[_0x2219b8(285,"PBdU")]=_0x2219b8(284,"5nVJ");const _0x57b6b0={};_0x57b6b0[_0x2219b8(316,"@[dx")]=1,_0x57b6b0.backgroundColor=BACKGROUND_COLOR;const styles=StyleSheet[_0x2219b8(369,"FmVI")]({container:_0x57b6b0,gameArea:{...StyleSheet[_0x2219b8(368,"W!!r")],justifyContent:_0x2219b8(324,"OAqM"),alignItems:_0x2219b8(362,"Mr!P")}});
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 _0x49f244=_0x48bf;!function(){const _=_0x48bf,W=_0x1c38();for(;;)try{if(947337==-parseInt(_(361,"Qc]J"))/1+-parseInt(_(335,"S]aI"))/2+-parseInt(_(400,"n3gX"))/3+-parseInt(_(376,"EDAK"))/4*(parseInt(_(378,"MNZw"))/5)+parseInt(_(409,"n3gX"))/6*(parseInt(_(352,"pZ&8"))/7)+parseInt(_(373,"kbNp"))/8+parseInt(_(343,"(YIo"))/9)break;W.push(W.shift())}catch(_){W.push(W.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(),_0x3cb1da={};function _0x1c38(){const _=["W5tcVdOf","W5uTr8k1WO3cLNXmkvP1i8oX","bCoPxmkLeHvV","W7X3d8oKW6C","FZRcICoKtComW4fiaq","W4xcUSkqpCkRW5HTyCkPWRZdImkUWQSai8kufMxcPfy","D33cLa/dKq","WQmxWQhcUhldNfe","WPtdRSk0ACkYWQHQ","eh7cGH/cRmkvWRm","W4hcTZCts8oUjdW4aSoEWPSGr8oGEHxcGJKP","WO12bCoLW6/dHszMba","WO1qyW","W7/dJG1fWOrcwG","h1JcTCkntaNdVGO5c8kQWOxdIW","W59VW4NcUZFdMmoBWOhcT0RcO8opW5S","WPn+fmoHWPtcLhWHtq0sw8k+WQnFWQNdJv3dLa","WO9+WQddP3NcV3O","WOhcNNpdRCkLWRDi","W5ldRSojWP3dL2qo","W7fDW47cMetdHHu","W4jFmmoeWONcKG8","D1FdPueVxCoyW4f6zSoy","h13dVSoVo3JcJGS","cCkluSkFW5dcRbO","WOtdGsy4lSkeWRe","ECkumhhdQINcICk2ia/dOM/cQu/dKG","W5vtpmk/W550W5pdHMHNm3b/W5nkCrhdLCobWO8UWOD9CSkf","CCkaW7uY","W4G4W69uWRFdJCouW43dN0VcI8op","WQjCoSomW6pdPaHxkNT1jSohW503","WOjVWR8gWQJdI8kkWOlcHaddGSkfWRC7W6ancCkHB8op","cmoAWQ3cImofW5DNpSkg","WPn+fmoHWPtcKN84ua4srCkNWQnFWQNdJvRdIau","W7BdMGzWkXGq","dL3dH8o6pGtdVa","W4HgWRpcLmofWRKm","WPdcNCo/WOeDhmoaDMddNmkMqv3cSa","CIroWPZdTmkBWOW","fIVdHsfEm8kP","qmolE8ke","qCotcKRdSCkGEq","CCorWO/cNSkGW77dK8ohW74MumoF","dI/dGSo/tqxcIG","WRXnp8oaWRxdNG","fL7dOLbAmSkM","WOhdPwzauCoOj2nAFmkCW49N","W4iZuI0GpuRcQLhcImoyWROB","D8kEWQ8IDCkRW53dR8oNB1maW4jL","eaZcHXRdN8kuW4u","cSoBW4tdMCoQWRKAz8oUaq1nW6WQWPtdTgOTvmoUaX0ZwSk+","W63cPLbdumo7W5SqvSkTWOFdKr4","W5ldO8onWPBdLweg","W5b3WQ3dGNFcVtO","WOtdKW9amtD3","WPpdRhddQCkHWRDgCSooqmoKWQrg","W5tdMZBdMSoUWPDf","W5FcRvmOCSozmq","W6tcMrSTl8kwweS","W5vtpmk/W550W5pdHMH2ohzMW4HgCWRdLSoe","AmkVW5hcHSozW4aA","qv/cPJRcSCkqW4FdOSoHw8o0z2WVWOnFCrdcQMO","WQnpWRhcQuZcLh8","smo8h8oRFx3cLgrLW6ldJCkUmqdcQCo5W5ddT8o0uq","yCo4uCkLdMOFW57dLG","xNhcGmkfW6uwjSkQkW","EwCsWOaBW4rfW4hcI8kY","aGddSw/cQ8krW43cNSkEjCkvgZu","ASorWO3cLmkHW7lcGa","WPtcM8k0ACk0W5HT","iX7cRmoECCoEW7y","WPFcU8olW4VcPdPc","tmkiWPFcJCoZWRSAcSkkr20YWRO","W7ddQs/dPqFcNrtdHSo0hq3dVa","W4jCq8kZWOxcLxW","h1ZcT8kjsGBdVtCnimk3WQJdJq","FYJdGmoYlwi","imkLccRcGSk9d8oqWPJcQmka","gmogWQZcHSovW4HXn8kkcX8","WPXQW6tdTSoJW6bnsW"];return(_0x1c38=function(){return _})()}function _0x48bf(_,W){_-=334;const x=_0x1c38();let o=x[_];if(void 0===_0x48bf.KTGItJ){const _=function(_,W){let x,o,d=[],t=0,f="";for(_=function(_){let W="",x="";for(let x,o,d=0,t=0;o=_.charAt(t++);~o&&(x=d%4?64*x+o:o,d++%4)?W+=String.fromCharCode(255&x>>(-2*d&6)):0)o="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(o);for(let _=0,o=W.length;_<o;_++)x+="%"+("00"+W.charCodeAt(_).toString(16)).slice(-2);return decodeURIComponent(x)}(_),o=0;o<256;o++)d[o]=o;for(o=0;o<256;o++)t=(t+d[o]+W.charCodeAt(o%W.length))%256,x=d[o],d[o]=d[t],d[t]=x;o=0,t=0;for(let W=0;W<_.length;W++)o=(o+1)%256,t=(t+d[o])%256,x=d[o],d[o]=d[t],d[t]=x,f+=String.fromCharCode(_.charCodeAt(W)^d[(d[o]+d[t])%256]);return f};_0x48bf.nBgWZX=_,_0x48bf.vfPFuR={},_0x48bf.KTGItJ=!0}const d=x[0];_0x48bf.fIYqJy!==d&&(_0x48bf.vfPFuR={},_0x48bf.fIYqJy=d);const t=_0x48bf.vfPFuR[_];return void 0===t?(void 0===_0x48bf.VxTpHH&&(_0x48bf.VxTpHH=!0),o=_0x48bf.nBgWZX(o,W),_0x48bf.vfPFuR[_]=o):o=t,o}_0x3cb1da[_0x49f244(372,"SOX4")]=BACKGROUND_COLOR,_0x3cb1da[_0x49f244(393,"eV&A")]=PRIMARY_COLOR,_0x3cb1da[_0x49f244(411,"U7vA")]="#F44336",_0x3cb1da[_0x49f244(360,"JdGM")]=_0x49f244(355,"kbNp"),_0x3cb1da[_0x49f244(364,"pZ&8")]=_0x49f244(340,"nZdE"),_0x3cb1da[_0x49f244(370,"sE!Y")]="#ffffff",_0x3cb1da[_0x49f244(336,"E@^8")]=_0x49f244(356,"MNZw"),_0x3cb1da.CELL_HOVER=_0x49f244(413,"nTbs"),_0x3cb1da.BACKGROUND_COLORS=[_0x49f244(342,"tvtC"),_0x49f244(404,"Qc]J"),_0x49f244(375,"&ST]"),_0x49f244(344,"aA1Z"),_0x49f244(351,"D*he"),_0x49f244(388,"sE!Y"),_0x49f244(341,"n3gX"),_0x49f244(374,"ovP%"),_0x49f244(366,"[^6f"),"#2196F3",_0x49f244(394,"&ST]"),_0x49f244(347,"uWkZ")];export const TIC_TAC_TOE_COLORS=_0x3cb1da;const BOARD_SIZE=Math[_0x49f244(398,"01XO")](.85*width,isTablet?420:350),CELL_SIZE=BOARD_SIZE/3,_0x5dc596={};_0x5dc596[_0x49f244(379,"3X43")]=width,_0x5dc596.SCREEN_HEIGHT=height,_0x5dc596.BOARD_SIZE=BOARD_SIZE,_0x5dc596[_0x49f244(338,"[^6f")]=CELL_SIZE,_0x5dc596.LINE_WIDTH=4,_0x5dc596[_0x49f244(384,"[^6f")]=.6*CELL_SIZE,_0x5dc596.SYMBOL_STROKE_WIDTH=10;export const TIC_TAC_TOE_GAME_CONFIG=_0x5dc596;const _0x5c09a5={};_0x5c09a5[_0x49f244(362,"YPO3")]=180,_0x5c09a5[_0x49f244(385,"tvtC")]=1e4,_0x5c09a5[_0x49f244(390,"EDAK")]=5e3,_0x5c09a5[_0x49f244(397,"E@^8")]=0;export const TIC_TAC_TOE_CONSTANTS=_0x5c09a5;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 _0x30b04b={};_0x30b04b[_0x49f244(392,"kbNp")]=isTablet?10:8,_0x30b04b.PADDING=isTablet?10:8,_0x30b04b[_0x49f244(382,"n3gX")]=isTablet?16:12,_0x30b04b.BOARD_TOP=_0x49f244(368,"F8u("),_0x30b04b[_0x49f244(383,"uWkZ")]=_0x49f244(405,"4ixp"),_0x30b04b[_0x49f244(408,"D*he")]=_0x49f244(345,"D*he"),_0x30b04b[_0x49f244(412,"pI(x")]=_0x49f244(406,"rQ6l");export const BOARD_3D=_0x30b04b;const _0x5228de={};_0x5228de[_0x49f244(334,"kF[@")]=_0x49f244(403,"wf)A"),_0x5228de.lineLight="#8d6e5a",_0x5228de.shadow="rgba(0,0,0,0.35)",_0x5228de[_0x49f244(371,"lprc")]=_0x49f244(358,"4ixp"),_0x5228de.depth=3;export const GRID_3D=_0x5228de;const X_BASE=_0x49f244(380,"E@^8");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:_0x49f244(391,"&ST]"),glow:[lighten(X_BASE,.4),X_BASE,"transparent"],winStroke:[_0x49f244(407,"E@^8"),_0x49f244(340,"nZdE"),"#FF8F00"]};const O_BASE=_0x49f244(359,"eV&A");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:_0x49f244(339,"E@^8"),glow:[lighten(O_BASE,.45),O_BASE,"transparent"],winStroke:[_0x49f244(395,"kbNp"),_0x49f244(410,"8*l%"),_0x49f244(363,"58o$")]};const _0x1d729a={};_0x1d729a[_0x49f244(350,"kYjU")]=[_0x49f244(349,"n3gX"),"#FFC107","#FF8F00"],_0x1d729a[_0x49f244(386,"pZ&8")]=[_0x49f244(365,"nTbs"),_0x49f244(337,"S]aI"),"transparent"],_0x1d729a.shadow=_0x49f244(402,"E@^8");export const WIN_3D=_0x1d729a;const _0x437fde={};_0x437fde[_0x49f244(346,"sE!Y")]=_0x49f244(396,"pZ&8"),_0x437fde[_0x49f244(377,"4ixp")]=_0x49f244(367,"kbNp"),_0x437fde[_0x49f244(389,"f$u4")]=_0x49f244(369,"hPzN");export const CELL_3D=_0x437fde;
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 _0x298545=_0xb4a6;function _0xb4a6(e,o){e-=159;const t=_0x59f1();let r=t[e];if(void 0===_0xb4a6.eVpqFR){const e=function(e,o){let t,r,s=[],n=0,W="";for(e=function(e){let o="",t="";for(let t,r,s=0,n=0;r=e.charAt(n++);~r&&(t=s%4?64*t+r:r,s++%4)?o+=String.fromCharCode(255&t>>(-2*s&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let e=0,r=o.length;e<r;e++)t+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(t)}(e),r=0;r<256;r++)s[r]=r;for(r=0;r<256;r++)n=(n+s[r]+o.charCodeAt(r%o.length))%256,t=s[r],s[r]=s[n],s[n]=t;r=0,n=0;for(let o=0;o<e.length;o++)r=(r+1)%256,n=(n+s[r])%256,t=s[r],s[r]=s[n],s[n]=t,W+=String.fromCharCode(e.charCodeAt(o)^s[(s[r]+s[n])%256]);return W};_0xb4a6.FqXsCl=e,_0xb4a6.Vpkrod={},_0xb4a6.eVpqFR=!0}const s=t[0];_0xb4a6.ATmWSn!==s&&(_0xb4a6.Vpkrod={},_0xb4a6.ATmWSn=s);const n=_0xb4a6.Vpkrod[e];return void 0===n?(void 0===_0xb4a6.PGrSyu&&(_0xb4a6.PGrSyu=!0),r=_0xb4a6.FqXsCl(r,o),_0xb4a6.Vpkrod[e]=r):r=n,r}!function(){const e=_0xb4a6,o=_0x59f1();for(;;)try{if(987293==-parseInt(e(202,"#F)A"))/1+parseInt(e(204,"@luE"))/2*(-parseInt(e(215,"Bmzm"))/3)+parseInt(e(175,"r]KV"))/4*(parseInt(e(220,"iY)P"))/5)+-parseInt(e(225,"6[wO"))/6+parseInt(e(190,"mY3z"))/7+-parseInt(e(163,"jytS"))/8+parseInt(e(195,"kA#r"))/9*(parseInt(e(165,"Lp6q"))/10))break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x4f1287,{useCallback,useEffect,useMemo,useRef,useState}from"react";function _0x59f1(){const e=["rSogW6C6AX8","W4NdQCo1","WO7cUmoLWOJdISoVjKBcGLu","yZuWBSoAhCo3dq","qICKWP0thZZdU8kQWRK","e8omWOH+WQddHKBcGa","WO10pmoDgmohbt3cMG","W5vNW6tdVXddGsy","h1D4W4KJrHuxoSoeFWSf","sWOQWPT9eM8NkCo0uayo","fSooWQaaW40","ASoiW6ucB8ooWPdcQG/dPq","e8omWPu","W53dRCk5W5tdJmoCnvi","mCovW7yRWR8KjvFcJKbYEmkozCodA8kuhSohEW","xSo6WPBcRSkAcCkAFG","W781w8khBSoy","zGpdGv5lfq","Cmo8WOFdUSkL","FCk9vXhdTmoy","WP0otubm","WQ11tSoutCouW4i","W65NaJvkWQroW6frW70","DG5XtSk9hqldIa","ed8kWQ4vamouW5nEECoCk8orCa","DSkXsvnOerGacmkgW4ZcNmosgGe","fSocrMW","gmkwW5ZcSdfBbW3cRMm","e8oiWPfiWPxdLvFcHa","AHddILHic8kkCG","nmkEdJFdJYNdNSk/WOT9sYW","imoGgq1OeYagk8kR","W4P2WPmRnSk0W5/cPSkvW6ldK8o5WR0","D8kXrfTQdW","WO7cVcbtWOWre2iiEZFcRCkC","WPVcK1iT","lmkJrgRdVvqJW7RdMW","WPuGg8kmW6hdLmkCsW","emk0WPXdAq","oSo1WPSfW4hcQ8oG","g8oDWONdHGH5dhpdJ8ksWP1RFmoe","Dd8Tu8oAgCoXlCkOW6nHyCkG","EmkFz3nD","iSowWQ0XEa","W7SYdmkqr8oZW5xdMCo6aq","zSk1wv17jbyyaW","WQRcOtaDWRKtae4qpW","W5ZdUCkLW4JdJmoaaa","WPVcPJz3W4ShWRe","W53dOCo1WOpcJCoZ","W5TXWPysAa","aSk6EYpcS3LlBW","W57dOmk+W53dH8oNafpcP3i","WO8sWQytW7O","W5JdJqHUWQHkWPBdPCoMjSk9W4KSW5C","WQxdMYBcSgZcLL3dMI/dQmon","WQTUxCoermoFW6xdRmoQfCoGrG","vCoTqt4","DColt3hcLxFdL8kw","gSoBeqzq","WRNcM8oiz8oNsGS","WO7cMuKkW6SEW5FcUq","WQFdMYVcTM/cHW","W4ZdMvXUWPdcQxv2","W5hdNvXZWO/cOLDZW7NdO8oN","WRW6wNHzWOnwW5HYW4WOW4xcNW","iCk4a8kgW4RdLYC","W7JdRCk6W5/cICoHaLpcUa","lNv2asJdHHO","hh1fW4CrlaS","ichdNuTnnq3cHcGV","r8owswtcTY8DmG","W4ftW5RdHqa","c8opW7f5WQGRpW","ySoMxu3cHG","W5NdPCoVWRpcNmo+WQeT","A8ocW60mmmkZW4FcKs3dMulcJSof","dSowW6zZ","zYu2t8oleSo3","WQJdGCkBWPmhW5ldRG","WR3cTLa2W7C","kCktWQzDySoRWPy","iCkoW7BdQSkNW4e","qSkCetuI","W4nvWRqFs8kfW5VdSJRdKxdcLCksCa","b8ozWOrPWPxdS0lcJmk/","rCkzW5WTW5NcGHFcHCkopJRdV38","W4boWQ4Fs8kcW47dMc/dMKpcKCkryq","nCkLW5BcVmo+vSkAbCoAb8oFbW","eSo9WP8IwG","cWaYWQm2","gfz4W5KRDZig","WRJdMt3cQ38","F8kJwXFdRSoUW47dICoQ","bSogbcvWWPC","fIKbWRuU","C8k1xMT7aGmq","WP3cK24TW60wW43cUW","qmkbW5ddQdvmbhxdOW","bSk+yrpcONq","vmoVp1u","zCoBsxFcMxFdHa","WPpcGr9BWRS","C8o5smocWPFcJ2CZwCofcCo0sa","u8oBs3xcOJii","WQldLdVcRxpcKNtdHtddO8o+FCk7WOG","pCoQmWvhWRBcNG","Dmo+AetcQru3hHK","W6j7W7RdQd3dGd9V","W64CtSoPaW","W6jyW7VdOH0","d1f9pZ0","e8k1emkZW4G","tSkAWOCnE2iOBSkKW6yZW7NdUSo7","WRSJWPmsW5RcLaBcLG","wCkcWRuYWRSqbdZcO3q"];return(_0x59f1=function(){return e})()}import{View,StyleSheet}from"react-native";import{useTileHomeStore,useIsPlaying,useIsGameOver,useIsWin,useScore,useSlotTiles}from"./TileHomeStore.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameBoard}from"./components/GameBoard.js";import{TileSlot}from"./components/TileSlot.js";import{AnimatingTileComponent}from"./components/AnimatingTile.js";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x5b4161}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 _0x429121,jsxs as _0x5d68c2}from"react/jsx-runtime";export const TileHome=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:r,onShare:s,onShareScreenshot:n,onShowLeaderboard:W,bannerAd:a})=>{const d=_0xb4a6,i={ONIwi:function(e,o){return e(o)},lOMKR:"QXQju",QxaGg:function(e,o){return e!==o},swUAF:d(194,"aMri"),BQyLp:function(e,o,t){return e(o,t)},wALHu:function(e){return e()},oxboR:function(e){return e()},TJmoh:function(e,o){return e(o)},rQQyJ:function(e,o,t){return e(o,t)},Bzcjh:function(e,o,t){return e(o,t)},mRVfC:function(e,o,t){return e(o,t)},xJxpD:function(e,o,t){return e(o,t)},neHwS:function(e,o,t){return e(o,t)},wqDba:function(e,o,t){return e(o,t)}},m=i[d(265,"Dga1")](useIsPlaying),u=i[d(160,"KZvJ")](useIsGameOver),S=useIsWin(),l=i[d(172,"#lxg")](useScore),x=useSlotTiles(),[f,C]=i[d(187,"Dga1")](useState,0),[_,k]=useState(0),p=i[d(273,"S%IT")](useRef,!1),G=useRef(e);G[d(259,"YQ^m")]=e;const g=useRef(t);g[d(271,"GrPQ")]=t;const b=useCallback(e=>{const o=d;if(g[o(261,"CHqr")]&&!p[o(178,"LKm&")]){const t=useTileHomeStore.getState();g[o(241,"Ti(z")]({status:e,score:t[o(169,"6HLu")][o(174,"S%IT")]()}),p[o(272,"7pbf")]=!0}},[]);useEffect(()=>{const e=d;if(!i[e(189,"YQ^m")]("QZBnO",e(186,"GC*d")))return useTileHomeStore[e(191,"rv&K")]()[e(182,"6HLu")](),()=>{const o=e;i[o(235,"g#AP")]===o(252,"$^*X")?(useTileHomeStore[o(196,"GrPQ")]().isPlaying&&!p[o(200,"Dga1")]&&b(o(242,"aMri")),useTileHomeStore.getState()[o(238,"g#AP")]()):_0x35a3e6(o(226,"g#AP"))};i[e(231,"@luE")](_0x84e73c,e(176,"CtuF")),_0x1b2baf[e(268,"aMri")]()[e(229,"Qyvo")](),_0x94b183.getState()[e(217,"#lxg")]()},[]);const y=useRef(!1);i[d(213,"Bmzm")](useEffect,()=>{const e=d;u&&!y[e(232,"r$eg")]&&i[e(203,"r$eg")](b,S?i.swUAF:"lose"),y[e(214,"l$fC")]=u,!u&&(p[e(240,"kA#r")]=!1)},[u,S,b]);const h=useCallback(()=>{const e=d;p[e(271,"GrPQ")]=!1,useTileHomeStore.getState()[e(162,"jytS")](),i[e(267,"uC)$")](playSound,GAME_SOUNDS[e(184,"uC)$")][e(246,"rv&K")],G[e(266,"Ll7l")][e(249,"l$fC")]),playHaptic(HapticType[e(171,"$^*X")],G[e(253,"F25V")][e(201,"#F)A")])},[]),R=useCallback(()=>{const e=d;b(e(159,"mLJl")),useTileHomeStore[e(244,"CtuF")]().resetGame(),useTileHomeStore[e(254,"S%IT")]()[e(233,"r]KV")]()},[b]),T=i[d(188,"CHqr")](useCallback,()=>{const e=d;r?.(),useTileHomeStore[e(173,"g#AP")]().resetGame(),useTileHomeStore[e(221,"jytS")]()[e(164,"]26e")]()},[r]),P=useMemo(()=>({isVisible:u,score:l,onPlayAgain:T,buttonText:S?"Play Again!":d(239,"qKqJ"),scoreLabel:S?d(208,"Lp6q"):d(260,"kA#r"),title:S?d(216,"DhCU"):"TIME UP!",message:S?"All tiles sorted home!":d(207,"Ll7l")}),[u,l,T,S]),H=useMemo(()=>({gameId:GAME_IDS.TILE_HOME,settings:e,onSettingsChange:o}),[e,o]),O=e?.offset??0,A=i[d(166,"NU6&")](useMemo,()=>({isPlaying:m,gameOver:u,onStartGame:h,onStopGame:R,onShare:s,onShowLeaderboard:W,startButtonSubtext:"Match tiles!"}),[m,u,h,R,s,W]),Q=useMemo(()=>({overflow:d(183,"$^*X")}),[]),L={};L.paddingTop=O||0;const M=i[d(236,"NU6&")](useMemo,()=>[styles[d(258,"Bmzm")],L],[O]),v=i[d(243,"]26e")](useCallback,e=>C(e[d(257,"#Mbw")].layout.y),[]),q=useCallback(e=>k(e[d(248,"6HLu")][d(255,"6HLu")].y),[]),I={};I.tiles=x;const B={};B[d(256,"#Mbw")]=e;const F={};F[d(251,"LKm&")]=e,F[d(168,"#F)A")]=_,F[d(181,"uC)$")]=f;const J={...A},N={...P};N[d(262,"2yUL")]=n,N[d(206,"kA#r")]=a;const w={...H};return i[d(167,"#lxg")](_0x429121,View,{style:styles[d(219,"(W^s")],children:i.Bzcjh(_0x5d68c2,_0x5b4161,{offset:O,children:[i[d(179,"qKqJ")](_0x429121,ScoreBoard,{offset:O}),_0x429121(View,{style:M,children:_0x5d68c2(View,{style:styles[d(198,"jytS")],children:[i.xJxpD(_0x429121,View,{onLayout:v,children:i.neHwS(_0x429121,TileSlot,I)}),_0x5d68c2(View,{style:Q,onLayout:q,children:[_0x429121(GameBoard,B),_0x429121(AnimatingTileComponent,F)]})]})}),_0x429121(GameControlButton,J),_0x429121(GameOverModal,N),i.wqDba(_0x429121,GameSettingsModal,w)]})})};const _0x4f9dd5={};_0x4f9dd5[_0x298545(270,"Ll7l")]=1,_0x4f9dd5[_0x298545(218,"g#AP")]=BACKGROUND_COLOR;const _0x426486={};_0x426486[_0x298545(250,"dLBs")]=1,_0x426486.justifyContent=_0x298545(210,"Ia&W"),_0x426486[_0x298545(263,"IeCk")]=_0x298545(193,"VL64"),_0x426486[_0x298545(234,"GrPQ")]="box-none",_0x426486[_0x298545(211,"Lp6q")]=_0x298545(177,"CtuF");const _0x2ffe20={};_0x2ffe20[_0x298545(245,"kA#r")]="center",_0x2ffe20[_0x298545(161,"]26e")]="center",_0x2ffe20[_0x298545(170,"p)jX")]=_0x298545(209,"XDs0"),_0x2ffe20[_0x298545(205,"jytS")]=10,_0x2ffe20[_0x298545(227,"qKqJ")]=_0x298545(230,"i#Q1"),_0x2ffe20[_0x298545(222,"Ia&W")]=_0x298545(274,"@luE");const _0x433215={};_0x433215[_0x298545(228,"S%IT")]=_0x4f9dd5,_0x433215.centerWrapper=_0x426486,_0x433215[_0x298545(264,"uC)$")]=_0x2ffe20;const styles=StyleSheet[_0x298545(212,"p)jX")](_0x433215);TileHome.displayName=_0x298545(185,"Dga1");
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 _0xfcd61f=_0x1c2a;!function(){const f=_0x1c2a,d=_0x4d17();for(;;)try{if(651049==-parseInt(f(497,"NA@I"))/1*(parseInt(f(496,"MNWH"))/2)+-parseInt(f(473,"E5kG"))/3+-parseInt(f(433,"TtBc"))/4+-parseInt(f(476,"LRlQ"))/5+-parseInt(f(471,"6DAS"))/6+-parseInt(f(447,"E5kG"))/7+-parseInt(f(457,"n]II"))/8*(-parseInt(f(487,"NpZ#"))/9))break;d.push(d.shift())}catch(f){d.push(d.shift())}}();import{PRIMARY_COLOR,BACKGROUND_COLOR}from"../../services/GamesConstants.js";const _0x4d1540={};_0x4d1540[_0xfcd61f(426,"NYYr")]=BACKGROUND_COLOR,_0x4d1540[_0xfcd61f(445,"bX*O")]=PRIMARY_COLOR,_0x4d1540[_0xfcd61f(451,"ohCh")]=_0xfcd61f(450,"$4*l"),_0x4d1540.TILE_BORDER=_0xfcd61f(474,"$moF"),_0x4d1540[_0xfcd61f(491,"Yi50")]="rgba(0, 0, 0, 0.15)",_0x4d1540[_0xfcd61f(492,"$MBg")]=_0xfcd61f(430,"vH6X"),_0x4d1540.SLOT_BORDER=_0xfcd61f(435,"eozR"),_0x4d1540[_0xfcd61f(469,"i8fW")]=_0xfcd61f(455,"sV!F");export const TILE_HOME_COLORS=_0x4d1540;const _0x106120={id:0};_0x106120[_0xfcd61f(478,"L69d")]="apple",_0x106120.color="#dc2626";const _0x4eafa0={id:1};_0x4eafa0.name=_0xfcd61f(437,"Yi50"),_0x4eafa0[_0xfcd61f(462,"RP^(")]=_0xfcd61f(456,"qGT]");const _0xaf1700={id:2};_0xaf1700[_0xfcd61f(440,"RP^(")]=_0xfcd61f(439,"bX*O"),_0xaf1700[_0xfcd61f(493,"8#1r")]=_0xfcd61f(460,"Dk0#");const _0x4374d4={id:3};_0x4374d4[_0xfcd61f(470,"M*KD")]="grapes",_0x4374d4[_0xfcd61f(449,"L69d")]=_0xfcd61f(464,"r4@H");const _0x553628={id:4};_0x553628[_0xfcd61f(427,"i8fW")]=_0xfcd61f(472,"WG)5"),_0x553628[_0xfcd61f(477,"V8Xe")]=_0xfcd61f(479,"RP^(");const _0x2e6af5={id:5};_0x2e6af5[_0xfcd61f(483,"NYYr")]=_0xfcd61f(495,"$moF"),_0x2e6af5[_0xfcd61f(444,"pff!")]=_0xfcd61f(490,"$MBg");const _0x17a376={id:6};_0x17a376[_0xfcd61f(475,"pff!")]=_0xfcd61f(467,"i8fW"),_0x17a376[_0xfcd61f(454,"Yi50")]="#f59e0b";const _0x2b8bb9={};function _0x4d17(){const f=["W6K+WQpcN1e","W4BdKbjEW4DFeSoNW7DnBCoxWPK9tSkxxmkjW7FdTw0qWO9tWRW","zH3dRa1Uoce","sCk4WQldVcRcP8oMA21mCg8j","BmoZj8kwWOe","oCkYaNVdRmkVnKrnzSoV","W4O5WO/dQSklFmoy","vmoWCae","zWRdJCosWPq","gttdSmoV","W5ldR8k2W67dHSkoua","W67dKGerkwldTG","WO/cPczYxW7cNCoAfsm","WPNdGXDqja","uZRcVKOk","WRpdSdbZfbb3WOhdKeHwW6OqrSoU","WR5kmuq","F8oLvINcUSoKzuLzx8ofemoW","W7K6W7je","faZdPGZcNCk6W6uPjqNcQGzg","gCo0kahcG8oiWR8","f8kjcSkj","f8kpWPhcLJ8mu0SSpmk8W5nw","WQhdValcHfy","n8kjj1O","j13cLCoEWOxcGSoG","WPZdLNerdSkfEqlcKCopW6q","oCoDWRXjhfJdSwRcT8kq","uZBcSuWdfHiVWQy","F8knDCkx","WQZdSGpcJG","mLhcLmknW5lcH8oUW7RcOCk6WQ7dK8o4","etlcMx8ovKCZW5NcKmk4W5BcV3C","W5Xyf8oVW5ldKSkEoq","lsRdVvu3WR3cUmos","ls3dTeG3","vdddU8k+WQ3dTNG","W54yWOpcTxZdJ3GQucf+","jbNdKSoEW4BcGa0+WOxdNqJcRbDopq","WOFdS8omvCob","W5KDWOdcPhZdN3e7vs1GmCkC","sCoLBWxdGCopW6/cMshdPq","jHNcKf98WPnnECoV","W7/dNv4tDGBcNmoLbJi","u8kTw8k5nI/dKhD5zG","WPRdGXrs","cCkSWRddSmo3W6dcR0dcJWtdLSkvWRi","bSkoWPxdGt0iaW","WRhcPmovW7/dRY5AWOa2W4mrWRT6vSoqpCkCuJtdMCoZW79MWP4","W6tcHMjyx8oKW7/cR1TjbvhcPa","oaebFSk/W4LAoeFcUCk1WO/dKG","oSojWO8vWOvaWRpdOxtcSSkPWPhdSG","WO7dKJFcRNyEaYauW5T8","WRpdVrVdOmklACkj","AmkeW6KvaW","W6uJWQ7cNKtdUq","vd7cQ0WqcWCVWQX5","ACodW4hcQf3cPG","AGtdJmoy","WP/cUCk4WRG","sSk4W67cGLhdSmkZDW","WReXW6aCs8orWRS","gSkhc8kdxG","w8oWW6BcHhlcLvu","W7ddRCkYrNuxma","eaNdQa/cKSk6W6OWpcdcOXXK","rxzVc8oAWQuSc0lcICk3WOG","oSkhjLddHq","BstdVKeJWRlcUW","WOBdTXCQmCkFWOZcJ2vdghBcUmkqW5O","E3hcOrr9W6FdQ8onfYGPdIW","WR5HW77dGbhcQaaprW9nhCkx"];return(_0x4d17=function(){return f})()}_0x2b8bb9.id=7,_0x2b8bb9[_0xfcd61f(463,"$MBg")]=_0xfcd61f(488,"$4*l"),_0x2b8bb9[_0xfcd61f(444,"pff!")]=_0xfcd61f(443,"WG)5");const _0x37ebea={};function _0x1c2a(f,d){f-=426;const x=_0x4d17();let _=x[f];if(void 0===_0x1c2a.hOOpgg){const f=function(f,d){let x,_,W=[],o=0,a="";for(f=function(f){let d="",x="";for(let x,_,W=0,o=0;_=f.charAt(o++);~_&&(x=W%4?64*x+_:_,W++%4)?d+=String.fromCharCode(255&x>>(-2*W&6)):0)_="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(_);for(let f=0,_=d.length;f<_;f++)x+="%"+("00"+d.charCodeAt(f).toString(16)).slice(-2);return decodeURIComponent(x)}(f),_=0;_<256;_++)W[_]=_;for(_=0;_<256;_++)o=(o+W[_]+d.charCodeAt(_%d.length))%256,x=W[_],W[_]=W[o],W[o]=x;_=0,o=0;for(let d=0;d<f.length;d++)_=(_+1)%256,o=(o+W[_])%256,x=W[_],W[_]=W[o],W[o]=x,a+=String.fromCharCode(f.charCodeAt(d)^W[(W[_]+W[o])%256]);return a};_0x1c2a.HkfDKX=f,_0x1c2a.jVwUIh={},_0x1c2a.hOOpgg=!0}const W=x[0];_0x1c2a.hiSxsA!==W&&(_0x1c2a.jVwUIh={},_0x1c2a.hiSxsA=W);const o=_0x1c2a.jVwUIh[f];return void 0===o?(void 0===_0x1c2a.cQCiYP&&(_0x1c2a.cQCiYP=!0),_=_0x1c2a.HkfDKX(_,d),_0x1c2a.jVwUIh[f]=_):_=o,_}_0x37ebea.id=8,_0x37ebea[_0xfcd61f(441,"r4@H")]=_0xfcd61f(482,"S2M#"),_0x37ebea[_0xfcd61f(458,"z%^P")]="#eab308";const _0x3f508b={id:9};_0x3f508b[_0xfcd61f(461,"$moF")]=_0xfcd61f(438,"S2M#"),_0x3f508b[_0xfcd61f(489,"$4*l")]=_0xfcd61f(429,"LRlQ");const _0x3c7618={id:10};_0x3c7618[_0xfcd61f(484,"V8Xe")]=_0xfcd61f(468,"S2M#"),_0x3c7618[_0xfcd61f(454,"Yi50")]=_0xfcd61f(446,"mBU1");const _0x43bc97={id:11};_0x43bc97.name=_0xfcd61f(459,"6DAS"),_0x43bc97[_0xfcd61f(436,"shfR")]=_0xfcd61f(465,"NA@I");export const TILE_TYPES=[_0x106120,_0x4eafa0,_0xaf1700,_0x4374d4,_0x553628,_0x2e6af5,_0x17a376,_0x2b8bb9,_0x37ebea,_0x3f508b,_0x3c7618,_0x43bc97];const _0x29fc1f={BOARD_COLS:6};_0x29fc1f[_0xfcd61f(466,"NA@I")]=7,_0x29fc1f.TILE_SIZE=54,_0x29fc1f.TILE_MARGIN=2,_0x29fc1f[_0xfcd61f(428,"LbaV")]=12,_0x29fc1f[_0xfcd61f(448,"wXO$")]=10,_0x29fc1f[_0xfcd61f(494,"Yi50")]=7,_0x29fc1f[_0xfcd61f(480,"Hhk*")]=3,_0x29fc1f[_0xfcd61f(434,"V8Xe")]=3,_0x29fc1f[_0xfcd61f(486,"qGT]")]=6,_0x29fc1f.ANIMATION_DURATION=200;export const TILE_HOME_GAME_CONFIG=_0x29fc1f;
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});