@nayan-ui/games 1.19.0 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1808) hide show
  1. package/README.md +53 -191
  2. package/lib/module/assets/fonts/Inter-SemiBold.ttf +0 -0
  3. package/lib/module/assets/models/explorer/explorer.glb +0 -0
  4. package/lib/module/assets/models/explorer/params.json +51 -0
  5. package/lib/module/assets/models/explorer/source.json +222 -0
  6. package/lib/module/assets/models/play-with-tua/play-with-tua.glb +0 -0
  7. package/lib/module/assets/models/play-with-tua/sources.json +141 -0
  8. package/lib/module/assets/sfx/balloon_pop.wav +0 -0
  9. package/lib/module/assets/sfx/blocked.wav +0 -0
  10. package/lib/module/assets/sfx/boing.wav +0 -0
  11. package/lib/module/assets/sfx/bonus.wav +0 -0
  12. package/lib/module/assets/sfx/boom.wav +0 -0
  13. package/lib/module/assets/sfx/bump.wav +0 -0
  14. package/lib/module/assets/sfx/cannon.wav +0 -0
  15. package/lib/module/assets/sfx/capture.wav +0 -0
  16. package/lib/module/assets/sfx/card_flip.wav +0 -0
  17. package/lib/module/assets/sfx/card_place.wav +0 -0
  18. package/lib/module/assets/sfx/catch.wav +0 -0
  19. package/lib/module/assets/sfx/chime.wav +0 -0
  20. package/lib/module/assets/sfx/chomp.wav +0 -0
  21. package/lib/module/assets/sfx/chomp_alt.wav +0 -0
  22. package/lib/module/assets/sfx/clack.wav +0 -0
  23. package/lib/module/assets/sfx/clang.wav +0 -0
  24. package/lib/module/assets/sfx/clash.wav +0 -0
  25. package/lib/module/assets/sfx/click.wav +0 -0
  26. package/lib/module/assets/sfx/coin.wav +0 -0
  27. package/lib/module/assets/sfx/combo.wav +0 -0
  28. package/lib/module/assets/sfx/crash.wav +0 -0
  29. package/lib/module/assets/sfx/crunch.wav +0 -0
  30. package/lib/module/assets/sfx/dance.wav +0 -0
  31. package/lib/module/assets/sfx/deselect.wav +0 -0
  32. package/lib/module/assets/sfx/dice_roll.wav +0 -0
  33. package/lib/module/assets/sfx/die.wav +0 -0
  34. package/lib/module/assets/sfx/draw.wav +0 -0
  35. package/lib/module/assets/sfx/drop.wav +0 -0
  36. package/lib/module/assets/sfx/eat.wav +0 -0
  37. package/lib/module/assets/sfx/engine.wav +0 -0
  38. package/lib/module/assets/sfx/error.wav +0 -0
  39. package/lib/module/assets/sfx/flag.wav +0 -0
  40. package/lib/module/assets/sfx/flap.wav +0 -0
  41. package/lib/module/assets/sfx/flip_disc.wav +0 -0
  42. package/lib/module/assets/sfx/footstep_run.wav +0 -0
  43. package/lib/module/assets/sfx/footstep_walk.wav +0 -0
  44. package/lib/module/assets/sfx/game_over.wav +0 -0
  45. package/lib/module/assets/sfx/gate.wav +0 -0
  46. package/lib/module/assets/sfx/hit.wav +0 -0
  47. package/lib/module/assets/sfx/hop.wav +0 -0
  48. package/lib/module/assets/sfx/hurt.wav +0 -0
  49. package/lib/module/assets/sfx/invalid.wav +0 -0
  50. package/lib/module/assets/sfx/jump.wav +0 -0
  51. package/lib/module/assets/sfx/ladder.wav +0 -0
  52. package/lib/module/assets/sfx/land.wav +0 -0
  53. package/lib/module/assets/sfx/laugh.wav +0 -0
  54. package/lib/module/assets/sfx/lose.wav +0 -0
  55. package/lib/module/assets/sfx/merge.wav +0 -0
  56. package/lib/module/assets/sfx/miss.wav +0 -0
  57. package/lib/module/assets/sfx/nitro.wav +0 -0
  58. package/lib/module/assets/sfx/pew.wav +0 -0
  59. package/lib/module/assets/sfx/place.wav +0 -0
  60. package/lib/module/assets/sfx/pling.wav +0 -0
  61. package/lib/module/assets/sfx/point.wav +0 -0
  62. package/lib/module/assets/sfx/pop.wav +0 -0
  63. package/lib/module/assets/sfx/pop_soft.wav +0 -0
  64. package/lib/module/assets/sfx/power_up.wav +0 -0
  65. package/lib/module/assets/sfx/reveal.wav +0 -0
  66. package/lib/module/assets/sfx/robot.wav +0 -0
  67. package/lib/module/assets/sfx/rotate.wav +0 -0
  68. package/lib/module/assets/sfx/run_steps.wav +0 -0
  69. package/lib/module/assets/sfx/select.wav +0 -0
  70. package/lib/module/assets/sfx/shuffle.wav +0 -0
  71. package/lib/module/assets/sfx/six.wav +0 -0
  72. package/lib/module/assets/sfx/slice.wav +0 -0
  73. package/lib/module/assets/sfx/slide.wav +0 -0
  74. package/lib/module/assets/sfx/snake.wav +0 -0
  75. package/lib/module/assets/sfx/snap.wav +0 -0
  76. package/lib/module/assets/sfx/splash.wav +0 -0
  77. package/lib/module/assets/sfx/star.wav +0 -0
  78. package/lib/module/assets/sfx/start.wav +0 -0
  79. package/lib/module/assets/sfx/swoosh.wav +0 -0
  80. package/lib/module/assets/sfx/tap.wav +0 -0
  81. package/lib/module/assets/sfx/thud.wav +0 -0
  82. package/lib/module/assets/sfx/thunk.wav +0 -0
  83. package/lib/module/assets/sfx/tick.wav +0 -0
  84. package/lib/module/assets/sfx/time_up.wav +0 -0
  85. package/lib/module/assets/sfx/tock.wav +0 -0
  86. package/lib/module/assets/sfx/walk_steps.wav +0 -0
  87. package/lib/module/assets/sfx/warning.wav +0 -0
  88. package/lib/module/assets/sfx/whack.wav +0 -0
  89. package/lib/module/assets/sfx/whoosh.wav +0 -0
  90. package/lib/module/assets/sfx/win.wav +0 -0
  91. package/lib/module/assets/sfx/zap.wav +0 -0
  92. package/lib/module/assets/textures/ad_bolt.png +0 -0
  93. package/lib/module/assets/textures/ad_bubbles.png +0 -0
  94. package/lib/module/assets/textures/ad_chevrons.png +0 -0
  95. package/lib/module/assets/textures/asphalt.png +0 -0
  96. package/lib/module/assets/textures/bark.jpg +0 -0
  97. package/lib/module/assets/textures/explorer-atlas.png +0 -0
  98. package/lib/module/assets/textures/facade.png +0 -0
  99. package/lib/module/assets/textures/grass.png +0 -0
  100. package/lib/module/assets/textures/leaves.png +0 -0
  101. package/lib/module/assets/textures/limestone.jpg +0 -0
  102. package/lib/module/assets/textures/meadow.jpg +0 -0
  103. package/lib/module/assets/textures/nature-sources.json +87 -0
  104. package/lib/module/assets/textures/pine.png +0 -0
  105. package/lib/module/assets/textures/river.jpg +0 -0
  106. package/lib/module/assets/textures/soft_glow.png +0 -0
  107. package/lib/module/games/arrows/Arrows.js +1 -1
  108. package/lib/module/games/arrows/ArrowsConstants.js +1 -1
  109. package/lib/module/games/arrows/ArrowsGame.js +1 -0
  110. package/lib/module/games/arrows/ArrowsScene.js +1 -0
  111. package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -1
  112. package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -1
  113. package/lib/module/games/balloon-blaster/BalloonBlasterGame.js +1 -0
  114. package/lib/module/games/balloon-blaster/BalloonBlasterPhysics.js +1 -0
  115. package/lib/module/games/balloon-blaster/BalloonBlasterScene.js +1 -0
  116. package/lib/module/games/bike-racing/BikeMeshes.js +1 -0
  117. package/lib/module/games/bike-racing/BikeRacing.js +1 -1
  118. package/lib/module/games/bike-racing/BikeRacingConstants.js +1 -1
  119. package/lib/module/games/bike-racing/BikeRacingGame.js +1 -0
  120. package/lib/module/games/bike-racing/BikeRacingScene.js +1 -0
  121. package/lib/module/games/block-blast/BlockBlast.js +1 -1
  122. package/lib/module/games/block-blast/BlockBlastConstants.js +1 -1
  123. package/lib/module/games/block-blast/BlockBlastGame.js +1 -0
  124. package/lib/module/games/block-blast/BlockBlastScene.js +1 -0
  125. package/lib/module/games/block-breaker/BlockBreaker.js +1 -1
  126. package/lib/module/games/block-breaker/BlockBreakerConstants.js +1 -1
  127. package/lib/module/games/block-breaker/BlockBreakerGame.js +1 -0
  128. package/lib/module/games/block-breaker/BlockBreakerScene.js +1 -0
  129. package/lib/module/games/bluk/Bluk.js +1 -1
  130. package/lib/module/games/bluk/BlukConstants.js +1 -1
  131. package/lib/module/games/bluk/BlukGame.js +1 -0
  132. package/lib/module/games/bluk/BlukRules.js +1 -0
  133. package/lib/module/games/bluk/BlukScene.js +1 -0
  134. package/lib/module/games/bubble-shooter/BubbleShooter.js +1 -1
  135. package/lib/module/games/bubble-shooter/BubbleShooterConstants.js +1 -1
  136. package/lib/module/games/bubble-shooter/BubbleShooterGame.js +1 -0
  137. package/lib/module/games/bubble-shooter/BubbleShooterScene.js +1 -0
  138. package/lib/module/games/candy-crush/CandyCrush.js +1 -1
  139. package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -1
  140. package/lib/module/games/candy-crush/CandyCrushGame.js +1 -0
  141. package/lib/module/games/candy-crush/CandyCrushScene.js +1 -0
  142. package/lib/module/games/car-racing/CarMeshes.js +1 -0
  143. package/lib/module/games/car-racing/CarRacing.js +1 -1
  144. package/lib/module/games/car-racing/CarRacingConstants.js +1 -1
  145. package/lib/module/games/car-racing/CarRacingFacade.js +1 -0
  146. package/lib/module/games/car-racing/CarRacingGame.js +1 -0
  147. package/lib/module/games/car-racing/CarRacingScene.js +1 -0
  148. package/lib/module/games/car-racing/CarRacingScenery.js +1 -0
  149. package/lib/module/games/chameleon-run/ChameleonRun.js +1 -1
  150. package/lib/module/games/chameleon-run/ChameleonRunBackdrop.js +1 -0
  151. package/lib/module/games/chameleon-run/ChameleonRunConstants.js +1 -1
  152. package/lib/module/games/chameleon-run/ChameleonRunGame.js +1 -0
  153. package/lib/module/games/chameleon-run/ChameleonRunMeshes.js +1 -0
  154. package/lib/module/games/chameleon-run/ChameleonRunRules.js +1 -0
  155. package/lib/module/games/chameleon-run/ChameleonRunScene.js +1 -0
  156. package/lib/module/games/checkers/Checkers.js +1 -1
  157. package/lib/module/games/checkers/CheckersAI.js +1 -0
  158. package/lib/module/games/checkers/CheckersConstants.js +1 -1
  159. package/lib/module/games/checkers/CheckersGame.js +1 -0
  160. package/lib/module/games/checkers/CheckersRules.js +1 -0
  161. package/lib/module/games/checkers/CheckersScene.js +1 -0
  162. package/lib/module/games/color-switch/ColorSwitch.js +1 -1
  163. package/lib/module/games/color-switch/ColorSwitchConstants.js +1 -1
  164. package/lib/module/games/color-switch/ColorSwitchGame.js +1 -0
  165. package/lib/module/games/color-switch/ColorSwitchScene.js +1 -0
  166. package/lib/module/games/colors-sort/ColorsSort.js +1 -1
  167. package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -1
  168. package/lib/module/games/colors-sort/ColorsSortGame.js +1 -0
  169. package/lib/module/games/colors-sort/ColorsSortScene.js +1 -0
  170. package/lib/module/games/connect-em-all/ConnectEmAll.js +1 -1
  171. package/lib/module/games/connect-em-all/ConnectEmAllConstants.js +1 -1
  172. package/lib/module/games/connect-em-all/ConnectEmAllGame.js +1 -0
  173. package/lib/module/games/connect-em-all/ConnectEmAllScene.js +1 -0
  174. package/lib/module/games/crossy-road/CrossyRoad.js +1 -1
  175. package/lib/module/games/crossy-road/CrossyRoadCamera.js +1 -0
  176. package/lib/module/games/crossy-road/CrossyRoadConstants.js +1 -1
  177. package/lib/module/games/crossy-road/CrossyRoadGame.js +1 -0
  178. package/lib/module/games/crossy-road/CrossyRoadMeshes.js +1 -0
  179. package/lib/module/games/crossy-road/CrossyRoadPerson.js +1 -0
  180. package/lib/module/games/crossy-road/CrossyRoadRules.js +1 -0
  181. package/lib/module/games/crossy-road/CrossyRoadScene.js +1 -0
  182. package/lib/module/games/dino-jump/DinoJump.js +1 -1
  183. package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -1
  184. package/lib/module/games/dino-jump/DinoJumpGame.js +1 -0
  185. package/lib/module/games/dino-jump/DinoJumpScene.js +1 -0
  186. package/lib/module/games/dots-and-boxes/DotsAndBoxes.js +1 -1
  187. package/lib/module/games/dots-and-boxes/DotsAndBoxesConstants.js +1 -1
  188. package/lib/module/games/dots-and-boxes/DotsAndBoxesGame.js +1 -0
  189. package/lib/module/games/dots-and-boxes/DotsAndBoxesScene.js +1 -0
  190. package/lib/module/games/falling-sticks/FallingSticks.js +1 -1
  191. package/lib/module/games/falling-sticks/FallingSticksConstants.js +1 -1
  192. package/lib/module/games/falling-sticks/FallingSticksGame.js +1 -0
  193. package/lib/module/games/falling-sticks/FallingSticksRules.js +1 -0
  194. package/lib/module/games/falling-sticks/FallingSticksScene.js +1 -0
  195. package/lib/module/games/find-different-number/FindDifferentNumber.js +1 -1
  196. package/lib/module/games/find-different-number/FindDifferentNumberConstants.js +1 -1
  197. package/lib/module/games/find-different-number/FindDifferentNumberGame.js +1 -0
  198. package/lib/module/games/find-different-number/FindDifferentNumberRules.js +1 -0
  199. package/lib/module/games/find-different-number/FindDifferentNumberScene.js +1 -0
  200. package/lib/module/games/flappy-bird/FlappyBird.js +1 -1
  201. package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -1
  202. package/lib/module/games/flappy-bird/FlappyBirdGame.js +1 -0
  203. package/lib/module/games/flappy-bird/FlappyBirdScene.js +1 -0
  204. package/lib/module/games/fruit-merger/FruitMerger.js +1 -1
  205. package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -1
  206. package/lib/module/games/fruit-merger/FruitMergerGame.js +1 -0
  207. package/lib/module/games/fruit-merger/FruitMergerRules.js +1 -0
  208. package/lib/module/games/fruit-merger/FruitMergerScene.js +1 -0
  209. package/lib/module/games/fruit-ninja/FruitNinja.js +1 -1
  210. package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -1
  211. package/lib/module/games/fruit-ninja/FruitNinjaGame.js +1 -0
  212. package/lib/module/games/fruit-ninja/FruitNinjaScene.js +1 -0
  213. package/lib/module/games/fruit-ninja/FruitNinjaWorld.js +1 -0
  214. package/lib/module/games/game-2048/Game2048.js +1 -1
  215. package/lib/module/games/game-2048/Game2048Constants.js +1 -1
  216. package/lib/module/games/game-2048/Game2048Game.js +1 -0
  217. package/lib/module/games/game-2048/Game2048Rules.js +1 -0
  218. package/lib/module/games/game-2048/Game2048Scene.js +1 -0
  219. package/lib/module/games/knife-hit/KnifeHit.js +1 -1
  220. package/lib/module/games/knife-hit/KnifeHitConstants.js +1 -1
  221. package/lib/module/games/knife-hit/KnifeHitGame.js +1 -0
  222. package/lib/module/games/knife-hit/KnifeHitScene.js +1 -0
  223. package/lib/module/games/ludo-king/LudoKing.js +1 -1
  224. package/lib/module/games/ludo-king/LudoKingConstants.js +1 -1
  225. package/lib/module/games/ludo-king/LudoKingGame.js +1 -0
  226. package/lib/module/games/ludo-king/LudoKingRules.js +1 -0
  227. package/lib/module/games/ludo-king/LudoKingScene.js +1 -0
  228. package/lib/module/games/maze-runner/MazeRunner.js +1 -1
  229. package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -1
  230. package/lib/module/games/maze-runner/MazeRunnerGame.js +1 -0
  231. package/lib/module/games/maze-runner/MazeRunnerRules.js +1 -0
  232. package/lib/module/games/maze-runner/MazeRunnerScene.js +1 -0
  233. package/lib/module/games/memory-match/MemoryMatch.js +1 -1
  234. package/lib/module/games/memory-match/MemoryMatchConstants.js +1 -1
  235. package/lib/module/games/memory-match/MemoryMatchGame.js +1 -0
  236. package/lib/module/games/memory-match/MemoryMatchRules.js +1 -0
  237. package/lib/module/games/memory-match/MemoryMatchScene.js +1 -0
  238. package/lib/module/games/mine-sweeper/MineSweeper.js +1 -1
  239. package/lib/module/games/mine-sweeper/MineSweeperConstants.js +1 -1
  240. package/lib/module/games/mine-sweeper/MineSweeperGame.js +1 -0
  241. package/lib/module/games/mine-sweeper/MineSweeperRules.js +1 -0
  242. package/lib/module/games/mine-sweeper/MineSweeperScene.js +1 -0
  243. package/lib/module/games/mob-control/MobControl.js +1 -1
  244. package/lib/module/games/mob-control/MobControlConstants.js +1 -1
  245. package/lib/module/games/mob-control/MobControlGame.js +1 -0
  246. package/lib/module/games/mob-control/MobControlMeshes.js +1 -0
  247. package/lib/module/games/mob-control/MobControlRenderer.js +1 -0
  248. package/lib/module/games/mob-control/MobControlRules.js +1 -0
  249. package/lib/module/games/mob-control/MobControlScene.js +1 -0
  250. package/lib/module/games/number-search/NumberSearch.js +1 -1
  251. package/lib/module/games/number-search/NumberSearchNumbers.js +1 -0
  252. package/lib/module/games/nuts-and-bolts/NutsAndBolts.js +1 -1
  253. package/lib/module/games/nuts-and-bolts/NutsAndBoltsConstants.js +1 -1
  254. package/lib/module/games/nuts-and-bolts/NutsAndBoltsGame.js +1 -0
  255. package/lib/module/games/nuts-and-bolts/NutsAndBoltsRules.js +1 -0
  256. package/lib/module/games/nuts-and-bolts/NutsAndBoltsScene.js +1 -0
  257. package/lib/module/games/pac-man/PacMan.js +1 -1
  258. package/lib/module/games/pac-man/PacManConstants.js +1 -1
  259. package/lib/module/games/pac-man/PacManGame.js +1 -0
  260. package/lib/module/games/pac-man/PacManRules.js +1 -0
  261. package/lib/module/games/pac-man/PacManScene.js +1 -0
  262. package/lib/module/games/paper-io/PaperIo.js +1 -1
  263. package/lib/module/games/paper-io/PaperIoConstants.js +1 -1
  264. package/lib/module/games/paper-io/PaperIoGame.js +1 -0
  265. package/lib/module/games/paper-io/PaperIoMeshes.js +1 -0
  266. package/lib/module/games/paper-io/PaperIoRules.js +1 -0
  267. package/lib/module/games/paper-io/PaperIoScene.js +1 -0
  268. package/lib/module/games/penguin-run/PenguinMeshes.js +1 -0
  269. package/lib/module/games/penguin-run/PenguinModel.js +1 -0
  270. package/lib/module/games/penguin-run/PenguinRun.js +1 -0
  271. package/lib/module/games/penguin-run/PenguinRunConstants.js +1 -0
  272. package/lib/module/games/penguin-run/PenguinRunGame.js +1 -0
  273. package/lib/module/games/penguin-run/PenguinRunScene.js +1 -0
  274. package/lib/module/games/perfect-circle/PerfectCircle.js +1 -1
  275. package/lib/module/games/perfect-circle/PerfectCircleConstants.js +1 -1
  276. package/lib/module/games/perfect-circle/PerfectCircleGame.js +1 -0
  277. package/lib/module/games/perfect-circle/PerfectCircleRules.js +1 -0
  278. package/lib/module/games/perfect-circle/PerfectCircleScene.js +1 -0
  279. package/lib/module/games/pipe-connect/PipeConnect.js +1 -1
  280. package/lib/module/games/pipe-connect/PipeConnectConstants.js +1 -1
  281. package/lib/module/games/pipe-connect/PipeConnectGame.js +1 -0
  282. package/lib/module/games/pipe-connect/PipeConnectRules.js +1 -0
  283. package/lib/module/games/pipe-connect/PipeConnectScene.js +1 -0
  284. package/lib/module/games/play-with-tua/PlayWithTua.js +1 -0
  285. package/lib/module/games/play-with-tua/PlayWithTuaConstants.js +1 -0
  286. package/lib/module/games/play-with-tua/PlayWithTuaGame.js +1 -0
  287. package/lib/module/games/play-with-tua/PlayWithTuaModel.js +1 -0
  288. package/lib/module/games/play-with-tua/PlayWithTuaScene.js +1 -0
  289. package/lib/module/games/popit-fidget/PopitFidget.js +1 -1
  290. package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -1
  291. package/lib/module/games/popit-fidget/PopitFidgetGame.js +1 -0
  292. package/lib/module/games/popit-fidget/PopitFidgetScene.js +1 -0
  293. package/lib/module/games/reversi/Reversi.js +1 -1
  294. package/lib/module/games/reversi/ReversiConstants.js +1 -1
  295. package/lib/module/games/reversi/ReversiGame.js +1 -0
  296. package/lib/module/games/reversi/ReversiRules.js +1 -0
  297. package/lib/module/games/reversi/ReversiScene.js +1 -0
  298. package/lib/module/games/search-grid/SearchGrid.js +1 -0
  299. package/lib/module/games/search-grid/SearchGridConstants.js +1 -0
  300. package/lib/module/games/search-grid/SearchGridGame.js +1 -0
  301. package/lib/module/games/search-grid/SearchGridScene.js +1 -0
  302. package/lib/module/games/shared/BackdropCard.js +1 -0
  303. package/lib/module/games/shared/EngineBackdrop.js +1 -0
  304. package/lib/module/games/shared/EngineBlasts.js +1 -0
  305. package/lib/module/games/shared/EngineBlocks.js +1 -0
  306. package/lib/module/games/shared/EngineControlText.js +1 -0
  307. package/lib/module/games/shared/EngineDice.js +1 -0
  308. package/lib/module/games/shared/EngineFootprint.js +1 -0
  309. package/lib/module/games/shared/EngineFruits.js +1 -0
  310. package/lib/module/games/shared/EngineGameLoader.js +1 -0
  311. package/lib/module/games/shared/EngineGameScreen.js +1 -0
  312. package/lib/module/games/shared/EngineGameWidth.js +1 -0
  313. package/lib/module/games/shared/EngineGameWidth.web.js +1 -0
  314. package/lib/module/games/shared/EngineGlyphs.js +1 -0
  315. package/lib/module/games/shared/EngineHud.js +1 -0
  316. package/lib/module/games/shared/EngineLoading.js +1 -0
  317. package/lib/module/games/shared/EngineMeadow.js +1 -0
  318. package/lib/module/games/shared/EngineMeshCache.js +1 -0
  319. package/lib/module/games/shared/EngineMeshes.js +1 -0
  320. package/lib/module/games/shared/EngineRacingChase.js +1 -0
  321. package/lib/module/games/shared/EngineRacingHandling.js +1 -0
  322. package/lib/module/games/shared/EngineReadyContext.js +1 -0
  323. package/lib/module/games/shared/EngineTilt.js +1 -0
  324. package/lib/module/games/shared/EngineTouchSurface.js +1 -0
  325. package/lib/module/games/shared/EngineUtils.js +1 -0
  326. package/lib/module/games/shared/GameActivity.js +1 -0
  327. package/lib/module/games/shared/GameLoading.js +1 -0
  328. package/lib/module/games/shared/GameLoadingTransition.js +1 -0
  329. package/lib/module/games/shared/ProceduralCacheVersion.js +1 -0
  330. package/lib/module/games/shared/useEngineGame.js +1 -0
  331. package/lib/module/games/shared/useGameResource.js +1 -0
  332. package/lib/module/games/shared/useLiveState.js +1 -0
  333. package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -1
  334. package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -1
  335. package/lib/module/games/sliding-numbers/SlidingNumbersGame.js +1 -0
  336. package/lib/module/games/sliding-numbers/SlidingNumbersRules.js +1 -0
  337. package/lib/module/games/sliding-numbers/SlidingNumbersScene.js +1 -0
  338. package/lib/module/games/snake-3d/Snake3D.js +1 -1
  339. package/lib/module/games/snake-3d/Snake3DConstants.js +1 -1
  340. package/lib/module/games/snake-3d/Snake3DGame.js +1 -0
  341. package/lib/module/games/snake-3d/Snake3DMotion.js +1 -0
  342. package/lib/module/games/snake-3d/Snake3DRules.js +1 -0
  343. package/lib/module/games/snake-3d/Snake3DScene.js +1 -0
  344. package/lib/module/games/snakes-and-ladders/SnakesAndLadders.js +1 -1
  345. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersConstants.js +1 -1
  346. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersGame.js +1 -0
  347. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersScene.js +1 -0
  348. package/lib/module/games/space-fighter/SpaceFighter.js +1 -1
  349. package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -1
  350. package/lib/module/games/space-fighter/SpaceFighterGame.js +1 -0
  351. package/lib/module/games/space-fighter/SpaceFighterScene.js +1 -0
  352. package/lib/module/games/spider-solitaire/SpiderSolitaire.js +1 -1
  353. package/lib/module/games/spider-solitaire/SpiderSolitaireConstants.js +1 -1
  354. package/lib/module/games/spider-solitaire/SpiderSolitaireGame.js +1 -0
  355. package/lib/module/games/spider-solitaire/SpiderSolitaireRules.js +1 -0
  356. package/lib/module/games/spider-solitaire/SpiderSolitaireScene.js +1 -0
  357. package/lib/module/games/stack-tower/StackTower.js +1 -1
  358. package/lib/module/games/stack-tower/StackTowerConstants.js +1 -1
  359. package/lib/module/games/stack-tower/StackTowerGame.js +1 -0
  360. package/lib/module/games/stack-tower/StackTowerScene.js +1 -0
  361. package/lib/module/games/sudoku/Sudoku.js +1 -1
  362. package/lib/module/games/sudoku/SudokuConstants.js +1 -1
  363. package/lib/module/games/sudoku/SudokuGame.js +1 -0
  364. package/lib/module/games/sudoku/SudokuRules.js +1 -0
  365. package/lib/module/games/sudoku/SudokuScene.js +1 -0
  366. package/lib/module/games/tangram/Tangram.js +1 -1
  367. package/lib/module/games/tangram/TangramConstants.js +1 -1
  368. package/lib/module/games/tangram/TangramGame.js +1 -0
  369. package/lib/module/games/tangram/TangramRules.js +1 -0
  370. package/lib/module/games/tangram/TangramScene.js +1 -0
  371. package/lib/module/games/tank-1990/Tank1990.js +1 -1
  372. package/lib/module/games/tank-1990/Tank1990Constants.js +1 -1
  373. package/lib/module/games/tank-1990/Tank1990Game.js +1 -0
  374. package/lib/module/games/tank-1990/Tank1990Rules.js +1 -0
  375. package/lib/module/games/tank-1990/Tank1990Scene.js +1 -0
  376. package/lib/module/games/tic-tac-toe/TicTacToe.js +1 -1
  377. package/lib/module/games/tic-tac-toe/TicTacToeConstants.js +1 -1
  378. package/lib/module/games/tic-tac-toe/TicTacToeGame.js +1 -0
  379. package/lib/module/games/tic-tac-toe/TicTacToeRules.js +1 -0
  380. package/lib/module/games/tic-tac-toe/TicTacToeScene.js +1 -0
  381. package/lib/module/games/tile-home/TileHome.js +1 -1
  382. package/lib/module/games/tile-home/TileHomeConstants.js +1 -1
  383. package/lib/module/games/tile-home/TileHomeGame.js +1 -0
  384. package/lib/module/games/tile-home/TileHomeScene.js +1 -0
  385. package/lib/module/games/treasure-hunt/TreasureHunt.js +1 -0
  386. package/lib/module/games/treasure-hunt/TreasureHuntConstants.js +1 -0
  387. package/lib/module/games/treasure-hunt/TreasureHuntControls.js +1 -0
  388. package/lib/module/games/treasure-hunt/TreasureHuntGame.js +1 -0
  389. package/lib/module/games/treasure-hunt/TreasureHuntMeshes.js +1 -0
  390. package/lib/module/games/treasure-hunt/TreasureHuntModel.js +1 -0
  391. package/lib/module/games/treasure-hunt/TreasureHuntRules.js +1 -0
  392. package/lib/module/games/treasure-hunt/TreasureHuntScene.js +1 -0
  393. package/lib/module/games/whack-a-mole/WhackAMole.js +1 -1
  394. package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -1
  395. package/lib/module/games/whack-a-mole/WhackAMoleGame.js +1 -0
  396. package/lib/module/games/whack-a-mole/WhackAMoleScene.js +1 -0
  397. package/lib/module/games/word-search/WordSearch.js +1 -1
  398. package/lib/module/games/word-search/WordSearchWords.js +1 -0
  399. package/lib/module/helpers/GamePatternData.js +1 -0
  400. package/lib/module/helpers/GameSettingsModal.js +1 -1
  401. package/lib/module/helpers/GameTheme.js +1 -0
  402. package/lib/module/helpers/IconPaths.js +1 -0
  403. package/lib/module/helpers/index.js +1 -1
  404. package/lib/module/index.js +1 -1
  405. package/lib/module/services/GameAssetLoader.js +1 -0
  406. package/lib/module/services/GameAssets.js +1 -0
  407. package/lib/module/services/GameLoaders.js +1 -0
  408. package/lib/module/services/GamesConstants.js +1 -1
  409. package/lib/module/services/GamesMetadata.js +1 -1
  410. package/lib/module/services/GamesService.js +1 -1
  411. package/lib/module/services/HapticsService.js +1 -1
  412. package/lib/module/services/ScoringService.js +1 -1
  413. package/lib/module/services/SfxSources.js +1 -0
  414. package/lib/module/services/SoundsService.js +1 -1
  415. package/lib/module/services/ThemeService.js +1 -0
  416. package/lib/module/services/UtilsService.js +1 -1
  417. package/lib/module/services/index.js +1 -1
  418. package/lib/typescript/src/games/arrows/Arrows.d.ts +1 -3
  419. package/lib/typescript/src/games/arrows/ArrowsConstants.d.ts +48 -32
  420. package/lib/typescript/src/games/arrows/ArrowsGame.d.ts +60 -0
  421. package/lib/typescript/src/games/arrows/ArrowsScene.d.ts +67 -0
  422. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +1 -3
  423. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +39 -131
  424. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterGame.d.ts +57 -0
  425. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterPhysics.d.ts +16 -0
  426. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterScene.d.ts +31 -0
  427. package/lib/typescript/src/games/bike-racing/BikeMeshes.d.ts +14 -0
  428. package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts +2 -1
  429. package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts +38 -29
  430. package/lib/typescript/src/games/bike-racing/BikeRacingGame.d.ts +104 -0
  431. package/lib/typescript/src/games/bike-racing/BikeRacingScene.d.ts +25 -0
  432. package/lib/typescript/src/games/block-blast/BlockBlast.d.ts +1 -3
  433. package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts +48 -30
  434. package/lib/typescript/src/games/block-blast/BlockBlastGame.d.ts +77 -0
  435. package/lib/typescript/src/games/block-blast/BlockBlastScene.d.ts +36 -0
  436. package/lib/typescript/src/games/block-breaker/BlockBreaker.d.ts +1 -3
  437. package/lib/typescript/src/games/block-breaker/BlockBreakerConstants.d.ts +88 -35
  438. package/lib/typescript/src/games/block-breaker/BlockBreakerGame.d.ts +82 -0
  439. package/lib/typescript/src/games/block-breaker/BlockBreakerScene.d.ts +48 -0
  440. package/lib/typescript/src/games/bluk/Bluk.d.ts +1 -3
  441. package/lib/typescript/src/games/bluk/BlukConstants.d.ts +65 -54
  442. package/lib/typescript/src/games/bluk/BlukGame.d.ts +65 -0
  443. package/lib/typescript/src/games/bluk/BlukRules.d.ts +51 -0
  444. package/lib/typescript/src/games/bluk/BlukScene.d.ts +54 -0
  445. package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts +1 -3
  446. package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts +56 -24
  447. package/lib/typescript/src/games/bubble-shooter/BubbleShooterGame.d.ts +70 -0
  448. package/lib/typescript/src/games/bubble-shooter/BubbleShooterScene.d.ts +26 -0
  449. package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts +1 -3
  450. package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +63 -32
  451. package/lib/typescript/src/games/candy-crush/CandyCrushGame.d.ts +65 -0
  452. package/lib/typescript/src/games/candy-crush/CandyCrushScene.d.ts +28 -0
  453. package/lib/typescript/src/games/car-racing/CarMeshes.d.ts +44 -0
  454. package/lib/typescript/src/games/car-racing/CarRacing.d.ts +2 -1
  455. package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts +60 -29
  456. package/lib/typescript/src/games/car-racing/CarRacingFacade.d.ts +5 -0
  457. package/lib/typescript/src/games/car-racing/CarRacingGame.d.ts +96 -0
  458. package/lib/typescript/src/games/car-racing/CarRacingScene.d.ts +97 -0
  459. package/lib/typescript/src/games/car-racing/CarRacingScenery.d.ts +22 -0
  460. package/lib/typescript/src/games/chameleon-run/ChameleonRun.d.ts +1 -3
  461. package/lib/typescript/src/games/chameleon-run/ChameleonRunBackdrop.d.ts +14 -0
  462. package/lib/typescript/src/games/chameleon-run/ChameleonRunConstants.d.ts +44 -42
  463. package/lib/typescript/src/games/chameleon-run/ChameleonRunGame.d.ts +60 -0
  464. package/lib/typescript/src/games/chameleon-run/ChameleonRunMeshes.d.ts +20 -0
  465. package/lib/typescript/src/games/chameleon-run/ChameleonRunRules.d.ts +52 -0
  466. package/lib/typescript/src/games/chameleon-run/ChameleonRunScene.d.ts +44 -0
  467. package/lib/typescript/src/games/checkers/Checkers.d.ts +1 -3
  468. package/lib/typescript/src/games/checkers/CheckersAI.d.ts +11 -0
  469. package/lib/typescript/src/games/checkers/CheckersConstants.d.ts +32 -72
  470. package/lib/typescript/src/games/checkers/CheckersGame.d.ts +56 -0
  471. package/lib/typescript/src/games/checkers/CheckersRules.d.ts +48 -0
  472. package/lib/typescript/src/games/checkers/CheckersScene.d.ts +41 -0
  473. package/lib/typescript/src/games/color-switch/ColorSwitch.d.ts +1 -3
  474. package/lib/typescript/src/games/color-switch/ColorSwitchConstants.d.ts +27 -31
  475. package/lib/typescript/src/games/color-switch/ColorSwitchGame.d.ts +61 -0
  476. package/lib/typescript/src/games/color-switch/ColorSwitchScene.d.ts +43 -0
  477. package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts +1 -3
  478. package/lib/typescript/src/games/colors-sort/ColorsSortConstants.d.ts +37 -44
  479. package/lib/typescript/src/games/colors-sort/ColorsSortGame.d.ts +41 -0
  480. package/lib/typescript/src/games/colors-sort/ColorsSortScene.d.ts +33 -0
  481. package/lib/typescript/src/games/connect-em-all/ConnectEmAll.d.ts +1 -3
  482. package/lib/typescript/src/games/connect-em-all/ConnectEmAllConstants.d.ts +43 -17
  483. package/lib/typescript/src/games/connect-em-all/ConnectEmAllGame.d.ts +54 -0
  484. package/lib/typescript/src/games/connect-em-all/ConnectEmAllScene.d.ts +49 -0
  485. package/lib/typescript/src/games/crossy-road/CrossyRoad.d.ts +1 -3
  486. package/lib/typescript/src/games/crossy-road/CrossyRoadCamera.d.ts +14 -0
  487. package/lib/typescript/src/games/crossy-road/CrossyRoadConstants.d.ts +82 -50
  488. package/lib/typescript/src/games/crossy-road/CrossyRoadGame.d.ts +64 -0
  489. package/lib/typescript/src/games/crossy-road/CrossyRoadMeshes.d.ts +16 -0
  490. package/lib/typescript/src/games/crossy-road/CrossyRoadPerson.d.ts +10 -0
  491. package/lib/typescript/src/games/crossy-road/CrossyRoadRules.d.ts +36 -0
  492. package/lib/typescript/src/games/crossy-road/CrossyRoadScene.d.ts +38 -0
  493. package/lib/typescript/src/games/dino-jump/DinoJump.d.ts +1 -3
  494. package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts +48 -72
  495. package/lib/typescript/src/games/dino-jump/DinoJumpGame.d.ts +60 -0
  496. package/lib/typescript/src/games/dino-jump/DinoJumpScene.d.ts +35 -0
  497. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxes.d.ts +1 -3
  498. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesConstants.d.ts +31 -36
  499. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesGame.d.ts +44 -0
  500. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesScene.d.ts +31 -0
  501. package/lib/typescript/src/games/falling-sticks/FallingSticks.d.ts +1 -3
  502. package/lib/typescript/src/games/falling-sticks/FallingSticksConstants.d.ts +31 -43
  503. package/lib/typescript/src/games/falling-sticks/FallingSticksGame.d.ts +42 -0
  504. package/lib/typescript/src/games/falling-sticks/FallingSticksRules.d.ts +36 -0
  505. package/lib/typescript/src/games/falling-sticks/FallingSticksScene.d.ts +26 -0
  506. package/lib/typescript/src/games/find-different-number/FindDifferentNumber.d.ts +1 -3
  507. package/lib/typescript/src/games/find-different-number/FindDifferentNumberConstants.d.ts +33 -29
  508. package/lib/typescript/src/games/find-different-number/FindDifferentNumberGame.d.ts +43 -0
  509. package/lib/typescript/src/games/find-different-number/FindDifferentNumberRules.d.ts +8 -0
  510. package/lib/typescript/src/games/find-different-number/FindDifferentNumberScene.d.ts +31 -0
  511. package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts +1 -3
  512. package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts +39 -35
  513. package/lib/typescript/src/games/flappy-bird/FlappyBirdGame.d.ts +66 -0
  514. package/lib/typescript/src/games/flappy-bird/FlappyBirdScene.d.ts +41 -0
  515. package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts +1 -3
  516. package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts +71 -44
  517. package/lib/typescript/src/games/fruit-merger/FruitMergerGame.d.ts +63 -0
  518. package/lib/typescript/src/games/fruit-merger/FruitMergerRules.d.ts +39 -0
  519. package/lib/typescript/src/games/fruit-merger/FruitMergerScene.d.ts +49 -0
  520. package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts +1 -3
  521. package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts +51 -76
  522. package/lib/typescript/src/games/fruit-ninja/FruitNinjaGame.d.ts +76 -0
  523. package/lib/typescript/src/games/fruit-ninja/FruitNinjaScene.d.ts +52 -0
  524. package/lib/typescript/src/games/fruit-ninja/FruitNinjaWorld.d.ts +8 -0
  525. package/lib/typescript/src/games/game-2048/Game2048.d.ts +1 -3
  526. package/lib/typescript/src/games/game-2048/Game2048Constants.d.ts +25 -120
  527. package/lib/typescript/src/games/game-2048/Game2048Game.d.ts +45 -0
  528. package/lib/typescript/src/games/game-2048/Game2048Rules.d.ts +32 -0
  529. package/lib/typescript/src/games/game-2048/Game2048Scene.d.ts +34 -0
  530. package/lib/typescript/src/games/knife-hit/KnifeHit.d.ts +1 -3
  531. package/lib/typescript/src/games/knife-hit/KnifeHitConstants.d.ts +41 -49
  532. package/lib/typescript/src/games/knife-hit/KnifeHitGame.d.ts +49 -0
  533. package/lib/typescript/src/games/knife-hit/KnifeHitScene.d.ts +37 -0
  534. package/lib/typescript/src/games/ludo-king/LudoKing.d.ts +1 -3
  535. package/lib/typescript/src/games/ludo-king/LudoKingConstants.d.ts +50 -28
  536. package/lib/typescript/src/games/ludo-king/LudoKingGame.d.ts +40 -0
  537. package/lib/typescript/src/games/ludo-king/LudoKingRules.d.ts +42 -0
  538. package/lib/typescript/src/games/ludo-king/LudoKingScene.d.ts +53 -0
  539. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +1 -3
  540. package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.d.ts +34 -10
  541. package/lib/typescript/src/games/maze-runner/MazeRunnerGame.d.ts +44 -0
  542. package/lib/typescript/src/games/maze-runner/MazeRunnerRules.d.ts +34 -0
  543. package/lib/typescript/src/games/maze-runner/MazeRunnerScene.d.ts +29 -0
  544. package/lib/typescript/src/games/memory-match/MemoryMatch.d.ts +1 -3
  545. package/lib/typescript/src/games/memory-match/MemoryMatchConstants.d.ts +42 -42
  546. package/lib/typescript/src/games/memory-match/MemoryMatchGame.d.ts +53 -0
  547. package/lib/typescript/src/games/memory-match/MemoryMatchRules.d.ts +14 -0
  548. package/lib/typescript/src/games/memory-match/MemoryMatchScene.d.ts +35 -0
  549. package/lib/typescript/src/games/mine-sweeper/MineSweeper.d.ts +1 -3
  550. package/lib/typescript/src/games/mine-sweeper/MineSweeperConstants.d.ts +43 -82
  551. package/lib/typescript/src/games/mine-sweeper/MineSweeperGame.d.ts +59 -0
  552. package/lib/typescript/src/games/mine-sweeper/MineSweeperRules.d.ts +18 -0
  553. package/lib/typescript/src/games/mine-sweeper/MineSweeperScene.d.ts +23 -0
  554. package/lib/typescript/src/games/mob-control/MobControl.d.ts +1 -3
  555. package/lib/typescript/src/games/mob-control/MobControlConstants.d.ts +99 -85
  556. package/lib/typescript/src/games/mob-control/MobControlGame.d.ts +45 -0
  557. package/lib/typescript/src/games/mob-control/MobControlMeshes.d.ts +2 -0
  558. package/lib/typescript/src/games/mob-control/MobControlRenderer.d.ts +20 -0
  559. package/lib/typescript/src/games/mob-control/MobControlRules.d.ts +68 -0
  560. package/lib/typescript/src/games/mob-control/MobControlScene.d.ts +58 -0
  561. package/lib/typescript/src/games/number-search/NumberSearch.d.ts +1 -3
  562. package/lib/typescript/src/games/number-search/NumberSearchNumbers.d.ts +1 -0
  563. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBolts.d.ts +1 -3
  564. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsConstants.d.ts +27 -79
  565. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsGame.d.ts +56 -0
  566. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsRules.d.ts +65 -0
  567. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsScene.d.ts +48 -0
  568. package/lib/typescript/src/games/pac-man/PacMan.d.ts +1 -3
  569. package/lib/typescript/src/games/pac-man/PacManConstants.d.ts +66 -106
  570. package/lib/typescript/src/games/pac-man/PacManGame.d.ts +48 -0
  571. package/lib/typescript/src/games/pac-man/PacManRules.d.ts +52 -0
  572. package/lib/typescript/src/games/pac-man/PacManScene.d.ts +44 -0
  573. package/lib/typescript/src/games/paper-io/PaperIo.d.ts +1 -3
  574. package/lib/typescript/src/games/paper-io/PaperIoConstants.d.ts +60 -40
  575. package/lib/typescript/src/games/paper-io/PaperIoGame.d.ts +49 -0
  576. package/lib/typescript/src/games/paper-io/PaperIoMeshes.d.ts +13 -0
  577. package/lib/typescript/src/games/paper-io/PaperIoRules.d.ts +71 -0
  578. package/lib/typescript/src/games/paper-io/PaperIoScene.d.ts +39 -0
  579. package/lib/typescript/src/games/penguin-run/PenguinMeshes.d.ts +9 -0
  580. package/lib/typescript/src/games/penguin-run/PenguinModel.d.ts +42 -0
  581. package/lib/typescript/src/games/penguin-run/PenguinRun.d.ts +1 -0
  582. package/lib/typescript/src/games/penguin-run/PenguinRunConstants.d.ts +58 -0
  583. package/lib/typescript/src/games/penguin-run/PenguinRunGame.d.ts +64 -0
  584. package/lib/typescript/src/games/penguin-run/PenguinRunScene.d.ts +65 -0
  585. package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts +1 -3
  586. package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts +23 -45
  587. package/lib/typescript/src/games/perfect-circle/PerfectCircleGame.d.ts +40 -0
  588. package/lib/typescript/src/games/perfect-circle/PerfectCircleRules.d.ts +55 -0
  589. package/lib/typescript/src/games/perfect-circle/PerfectCircleScene.d.ts +32 -0
  590. package/lib/typescript/src/games/pipe-connect/PipeConnect.d.ts +1 -3
  591. package/lib/typescript/src/games/pipe-connect/PipeConnectConstants.d.ts +36 -32
  592. package/lib/typescript/src/games/pipe-connect/PipeConnectGame.d.ts +40 -0
  593. package/lib/typescript/src/games/pipe-connect/PipeConnectRules.d.ts +16 -0
  594. package/lib/typescript/src/games/pipe-connect/PipeConnectScene.d.ts +28 -0
  595. package/lib/typescript/src/games/play-with-tua/PlayWithTua.d.ts +2 -0
  596. package/lib/typescript/src/games/play-with-tua/PlayWithTuaConstants.d.ts +64 -0
  597. package/lib/typescript/src/games/play-with-tua/PlayWithTuaGame.d.ts +34 -0
  598. package/lib/typescript/src/games/play-with-tua/PlayWithTuaModel.d.ts +9 -0
  599. package/lib/typescript/src/games/play-with-tua/PlayWithTuaScene.d.ts +13 -0
  600. package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts +1 -4
  601. package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts +25 -36
  602. package/lib/typescript/src/games/popit-fidget/PopitFidgetGame.d.ts +37 -0
  603. package/lib/typescript/src/games/popit-fidget/PopitFidgetScene.d.ts +19 -0
  604. package/lib/typescript/src/games/reversi/Reversi.d.ts +1 -3
  605. package/lib/typescript/src/games/reversi/ReversiConstants.d.ts +31 -62
  606. package/lib/typescript/src/games/reversi/ReversiGame.d.ts +54 -0
  607. package/lib/typescript/src/games/reversi/ReversiRules.d.ts +22 -0
  608. package/lib/typescript/src/games/reversi/ReversiScene.d.ts +27 -0
  609. package/lib/typescript/src/games/search-grid/SearchGrid.d.ts +20 -0
  610. package/lib/typescript/src/games/search-grid/SearchGridConstants.d.ts +60 -0
  611. package/lib/typescript/src/games/search-grid/SearchGridGame.d.ts +52 -0
  612. package/lib/typescript/src/games/search-grid/SearchGridScene.d.ts +43 -0
  613. package/lib/typescript/src/games/shared/BackdropCard.d.ts +2 -0
  614. package/lib/typescript/src/games/shared/EngineBackdrop.d.ts +19 -0
  615. package/lib/typescript/src/games/shared/EngineBlasts.d.ts +26 -0
  616. package/lib/typescript/src/games/shared/EngineBlocks.d.ts +19 -0
  617. package/lib/typescript/src/games/shared/EngineControlText.d.ts +2 -0
  618. package/lib/typescript/src/games/shared/EngineDice.d.ts +24 -0
  619. package/lib/typescript/src/games/shared/EngineFootprint.d.ts +17 -0
  620. package/lib/typescript/src/games/shared/EngineFruits.d.ts +27 -0
  621. package/lib/typescript/src/games/shared/EngineGameLoader.d.ts +4 -0
  622. package/lib/typescript/src/games/shared/EngineGameScreen.d.ts +48 -0
  623. package/lib/typescript/src/games/shared/EngineGameWidth.d.ts +3 -0
  624. package/lib/typescript/src/games/shared/EngineGameWidth.web.d.ts +3 -0
  625. package/lib/typescript/src/games/shared/EngineGlyphs.d.ts +15 -0
  626. package/lib/typescript/src/games/shared/EngineHud.d.ts +138 -0
  627. package/lib/typescript/src/games/shared/EngineLoading.d.ts +77 -0
  628. package/lib/typescript/src/games/shared/EngineMeadow.d.ts +90 -0
  629. package/lib/typescript/src/games/shared/EngineMeshCache.d.ts +3 -0
  630. package/lib/typescript/src/games/shared/EngineMeshes.d.ts +3 -0
  631. package/lib/typescript/src/games/shared/EngineRacingChase.d.ts +11 -0
  632. package/lib/typescript/src/games/shared/EngineRacingHandling.d.ts +15 -0
  633. package/lib/typescript/src/games/shared/EngineReadyContext.d.ts +2 -0
  634. package/lib/typescript/src/games/shared/EngineTilt.d.ts +19 -0
  635. package/lib/typescript/src/games/shared/EngineTouchSurface.d.ts +20 -0
  636. package/lib/typescript/src/games/shared/EngineUtils.d.ts +18 -0
  637. package/lib/typescript/src/games/shared/GameActivity.d.ts +3 -0
  638. package/lib/typescript/src/games/shared/GameLoading.d.ts +14 -0
  639. package/lib/typescript/src/games/shared/GameLoadingTransition.d.ts +9 -0
  640. package/lib/typescript/src/games/shared/ProceduralCacheVersion.d.ts +1 -0
  641. package/lib/typescript/src/games/shared/useEngineGame.d.ts +69 -0
  642. package/lib/typescript/src/games/shared/useGameResource.d.ts +2 -0
  643. package/lib/typescript/src/games/shared/useLiveState.d.ts +4 -0
  644. package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts +1 -3
  645. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersConstants.d.ts +32 -40
  646. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersGame.d.ts +48 -0
  647. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersRules.d.ts +22 -0
  648. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersScene.d.ts +30 -0
  649. package/lib/typescript/src/games/snake-3d/Snake3D.d.ts +1 -3
  650. package/lib/typescript/src/games/snake-3d/Snake3DConstants.d.ts +31 -68
  651. package/lib/typescript/src/games/snake-3d/Snake3DGame.d.ts +42 -0
  652. package/lib/typescript/src/games/snake-3d/Snake3DMotion.d.ts +3 -0
  653. package/lib/typescript/src/games/snake-3d/Snake3DRules.d.ts +42 -0
  654. package/lib/typescript/src/games/snake-3d/Snake3DScene.d.ts +35 -0
  655. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLadders.d.ts +1 -3
  656. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersConstants.d.ts +58 -50
  657. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersGame.d.ts +45 -0
  658. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersScene.d.ts +50 -0
  659. package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts +1 -3
  660. package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts +33 -23
  661. package/lib/typescript/src/games/space-fighter/SpaceFighterGame.d.ts +58 -0
  662. package/lib/typescript/src/games/space-fighter/SpaceFighterScene.d.ts +51 -0
  663. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaire.d.ts +1 -3
  664. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireConstants.d.ts +52 -35
  665. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireGame.d.ts +67 -0
  666. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireRules.d.ts +39 -0
  667. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireScene.d.ts +60 -0
  668. package/lib/typescript/src/games/stack-tower/StackTower.d.ts +1 -3
  669. package/lib/typescript/src/games/stack-tower/StackTowerConstants.d.ts +31 -23
  670. package/lib/typescript/src/games/stack-tower/StackTowerGame.d.ts +58 -0
  671. package/lib/typescript/src/games/stack-tower/StackTowerScene.d.ts +27 -0
  672. package/lib/typescript/src/games/sudoku/Sudoku.d.ts +1 -3
  673. package/lib/typescript/src/games/sudoku/SudokuConstants.d.ts +50 -55
  674. package/lib/typescript/src/games/sudoku/SudokuGame.d.ts +56 -0
  675. package/lib/typescript/src/games/sudoku/SudokuRules.d.ts +23 -0
  676. package/lib/typescript/src/games/sudoku/SudokuScene.d.ts +44 -0
  677. package/lib/typescript/src/games/tangram/Tangram.d.ts +1 -3
  678. package/lib/typescript/src/games/tangram/TangramConstants.d.ts +33 -52
  679. package/lib/typescript/src/games/tangram/TangramGame.d.ts +68 -0
  680. package/lib/typescript/src/games/tangram/TangramRules.d.ts +61 -0
  681. package/lib/typescript/src/games/tangram/TangramScene.d.ts +42 -0
  682. package/lib/typescript/src/games/tank-1990/Tank1990.d.ts +1 -3
  683. package/lib/typescript/src/games/tank-1990/Tank1990Constants.d.ts +44 -127
  684. package/lib/typescript/src/games/tank-1990/Tank1990Game.d.ts +50 -0
  685. package/lib/typescript/src/games/tank-1990/Tank1990Rules.d.ts +67 -0
  686. package/lib/typescript/src/games/tank-1990/Tank1990Scene.d.ts +38 -0
  687. package/lib/typescript/src/games/tic-tac-toe/TicTacToe.d.ts +1 -3
  688. package/lib/typescript/src/games/tic-tac-toe/TicTacToeConstants.d.ts +35 -72
  689. package/lib/typescript/src/games/tic-tac-toe/TicTacToeGame.d.ts +54 -0
  690. package/lib/typescript/src/games/tic-tac-toe/TicTacToeRules.d.ts +10 -0
  691. package/lib/typescript/src/games/tic-tac-toe/TicTacToeScene.d.ts +26 -0
  692. package/lib/typescript/src/games/tile-home/TileHome.d.ts +1 -3
  693. package/lib/typescript/src/games/tile-home/TileHomeConstants.d.ts +72 -70
  694. package/lib/typescript/src/games/tile-home/TileHomeGame.d.ts +72 -0
  695. package/lib/typescript/src/games/tile-home/TileHomeScene.d.ts +28 -0
  696. package/lib/typescript/src/games/treasure-hunt/TreasureHunt.d.ts +3 -0
  697. package/lib/typescript/src/games/treasure-hunt/TreasureHuntConstants.d.ts +144 -0
  698. package/lib/typescript/src/games/treasure-hunt/TreasureHuntControls.d.ts +75 -0
  699. package/lib/typescript/src/games/treasure-hunt/TreasureHuntGame.d.ts +41 -0
  700. package/lib/typescript/src/games/treasure-hunt/TreasureHuntMeshes.d.ts +26 -0
  701. package/lib/typescript/src/games/treasure-hunt/TreasureHuntModel.d.ts +57 -0
  702. package/lib/typescript/src/games/treasure-hunt/TreasureHuntRules.d.ts +198 -0
  703. package/lib/typescript/src/games/treasure-hunt/TreasureHuntScene.d.ts +40 -0
  704. package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts +1 -3
  705. package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +35 -45
  706. package/lib/typescript/src/games/whack-a-mole/WhackAMoleGame.d.ts +51 -0
  707. package/lib/typescript/src/games/whack-a-mole/WhackAMoleScene.d.ts +31 -0
  708. package/lib/typescript/src/games/word-search/WordSearch.d.ts +1 -3
  709. package/lib/typescript/src/games/word-search/WordSearchWords.d.ts +1 -0
  710. package/lib/typescript/src/helpers/GamePatternData.d.ts +46 -0
  711. package/lib/typescript/src/helpers/GameSettingsModal.d.ts +1 -1
  712. package/lib/typescript/src/helpers/GameTheme.d.ts +18 -0
  713. package/lib/typescript/src/helpers/IconPaths.d.ts +4 -0
  714. package/lib/typescript/src/helpers/index.d.ts +1 -19
  715. package/lib/typescript/src/index.d.ts +3 -0
  716. package/lib/typescript/src/services/GameAssetLoader.d.ts +32 -0
  717. package/lib/typescript/src/services/GameAssets.d.ts +11 -0
  718. package/lib/typescript/src/services/GameLoaders.d.ts +18 -0
  719. package/lib/typescript/src/services/GamesConstants.d.ts +11 -0
  720. package/lib/typescript/src/services/GamesMetadata.d.ts +2 -0
  721. package/lib/typescript/src/services/HapticsService.d.ts +1 -1
  722. package/lib/typescript/src/services/SfxSources.d.ts +79 -0
  723. package/lib/typescript/src/services/SoundsService.d.ts +487 -1566
  724. package/lib/typescript/src/services/ThemeService.d.ts +117 -0
  725. package/lib/typescript/src/services/UtilsService.d.ts +20 -2
  726. package/lib/typescript/src/services/index.d.ts +3 -0
  727. package/lib/web/assets/005ea2045b17-explorer.glb +0 -0
  728. package/lib/web/assets/01e2f0a0bbf6-hurt.wav +0 -0
  729. package/lib/web/assets/01fc0ecf658c-explorer-atlas.png +0 -0
  730. package/lib/web/assets/029329b2c7c0-asphalt.png +0 -0
  731. package/lib/web/assets/0376bda32be3-robot.wav +0 -0
  732. package/lib/web/assets/0719fb0bb38e-soft_glow.png +0 -0
  733. package/lib/web/assets/0b21278bffba-boing.wav +0 -0
  734. package/lib/web/assets/1333c9d1273c-flip_disc.wav +0 -0
  735. package/lib/web/assets/15785f62ee5f-time_up.wav +0 -0
  736. package/lib/web/assets/177f00502e08-bonus.wav +0 -0
  737. package/lib/web/assets/19e47dcfda1f-pling.wav +0 -0
  738. package/lib/web/assets/1a677e0f7f6c-laugh.wav +0 -0
  739. package/lib/web/assets/1ad2914478b1-eat.wav +0 -0
  740. package/lib/web/assets/1b0d703ddd1a-dance.wav +0 -0
  741. package/lib/web/assets/1e4330fddd74-chime.wav +0 -0
  742. package/lib/web/assets/2432a97b0af1-cannon.wav +0 -0
  743. package/lib/web/assets/2574370d6aa0-blocked.wav +0 -0
  744. package/lib/web/assets/2699065037ad-select.wav +0 -0
  745. package/lib/web/assets/28d30f53ad73-ladder.wav +0 -0
  746. package/lib/web/assets/2c1ec05270b2-point.wav +0 -0
  747. package/lib/web/assets/2e1dd99a0213-tick.wav +0 -0
  748. package/lib/web/assets/3084575cecdb-card_flip.wav +0 -0
  749. package/lib/web/assets/308bc31b6af5-engine.wav +0 -0
  750. package/lib/web/assets/336d63b739b5-combo.wav +0 -0
  751. package/lib/web/assets/3a369e2596e4-clash.wav +0 -0
  752. package/lib/web/assets/3a816e20212f-capture.wav +0 -0
  753. package/lib/web/assets/40240217810a-nitro.wav +0 -0
  754. package/lib/web/assets/46edaa54d1ea-crunch.wav +0 -0
  755. package/lib/web/assets/501994226995-coin.wav +0 -0
  756. package/lib/web/assets/5525d7f6a4b8-rotate.wav +0 -0
  757. package/lib/web/assets/5e816e1f0929-dice_roll.wav +0 -0
  758. package/lib/web/assets/60e2dec3cf41-deselect.wav +0 -0
  759. package/lib/web/assets/6ab86ea29e5c-six.wav +0 -0
  760. package/lib/web/assets/6da3b101926d-merge.wav +0 -0
  761. package/lib/web/assets/6e686dea513c-bark.jpg +0 -0
  762. package/lib/web/assets/6ff9a6a13714-limestone.jpg +0 -0
  763. package/lib/web/assets/735c4a1cd22e-invalid.wav +0 -0
  764. package/lib/web/assets/73f75c35ff5d-snake.wav +0 -0
  765. package/lib/web/assets/7506e3efe264-catch.wav +0 -0
  766. package/lib/web/assets/76493a2ada2d-ad_bolt.png +0 -0
  767. package/lib/web/assets/793abe620201-card_place.wav +0 -0
  768. package/lib/web/assets/7da09c57f52d-facade.png +0 -0
  769. package/lib/web/assets/7e1a902176f6-pine.png +0 -0
  770. package/lib/web/assets/7eb943b85c21-play-with-tua.glb +0 -0
  771. package/lib/web/assets/837d43c06dba-ad_bubbles.png +0 -0
  772. package/lib/web/assets/84f1a7dfa368-game_over.wav +0 -0
  773. package/lib/web/assets/850e26ce3b0a-flap.wav +0 -0
  774. package/lib/web/assets/854b31683cb2-draw.wav +0 -0
  775. package/lib/web/assets/8616150393b7-error.wav +0 -0
  776. package/lib/web/assets/87cc6d503ec6-river.jpg +0 -0
  777. package/lib/web/assets/88755845922c-hop.wav +0 -0
  778. package/lib/web/assets/8ec8f469492d-chomp_alt.wav +0 -0
  779. package/lib/web/assets/8f17f89b138c-pew.wav +0 -0
  780. package/lib/web/assets/9210a24472d1-place.wav +0 -0
  781. package/lib/web/assets/930d833ebf89-splash.wav +0 -0
  782. package/lib/web/assets/970f7c59265d-swoosh.wav +0 -0
  783. package/lib/web/assets/9900b8d1b6ad-flag.wav +0 -0
  784. package/lib/web/assets/9ab04403898b-clang.wav +0 -0
  785. package/lib/web/assets/9d8b97a10d45-drop.wav +0 -0
  786. package/lib/web/assets/9d9c02ddc7ed-boom.wav +0 -0
  787. package/lib/web/assets/9e1b5114d56d-pop_soft.wav +0 -0
  788. package/lib/web/assets/a01f22d6dbb3-thud.wav +0 -0
  789. package/lib/web/assets/a44a1cf1a1a8-bump.wav +0 -0
  790. package/lib/web/assets/a76940a48c68-hit.wav +0 -0
  791. package/lib/web/assets/a98ddb724460-leaves.png +0 -0
  792. package/lib/web/assets/aa0960e8bee6-footstep_run.wav +0 -0
  793. package/lib/web/assets/aa570c9d3e15-star.wav +0 -0
  794. package/lib/web/assets/aacb999f3c49-tock.wav +0 -0
  795. package/lib/web/assets/aae0c16c5e89-reveal.wav +0 -0
  796. package/lib/web/assets/ab37cd128509-click.wav +0 -0
  797. package/lib/web/assets/b0bc66f49005-warning.wav +0 -0
  798. package/lib/web/assets/b1edd756ac43-zap.wav +0 -0
  799. package/lib/web/assets/b3894545cf71-slice.wav +0 -0
  800. package/lib/web/assets/b3c6225d055a-meadow.jpg +0 -0
  801. package/lib/web/assets/b60ca65cdfcb-gate.wav +0 -0
  802. package/lib/web/assets/b8900bb2c5c7-win.wav +0 -0
  803. package/lib/web/assets/baff6feda846-lose.wav +0 -0
  804. package/lib/web/assets/bed31305d60d-ad_chevrons.png +0 -0
  805. package/lib/web/assets/c26f4a624e7d-shuffle.wav +0 -0
  806. package/lib/web/assets/c3a9edfad195-die.wav +0 -0
  807. package/lib/web/assets/c4aa9d773f2a-footstep_walk.wav +0 -0
  808. package/lib/web/assets/c5ab3ff0003f-crash.wav +0 -0
  809. package/lib/web/assets/c5eb07deddd4-start.wav +0 -0
  810. package/lib/web/assets/c6c58d9ae452-pop.wav +0 -0
  811. package/lib/web/assets/cea48c3cd9c7-balloon_pop.wav +0 -0
  812. package/lib/web/assets/d15591767778-tap.wav +0 -0
  813. package/lib/web/assets/d1781a52234f-slide.wav +0 -0
  814. package/lib/web/assets/d3bf2d9f793b-snap.wav +0 -0
  815. package/lib/web/assets/d8f59ebd3537-jump.wav +0 -0
  816. package/lib/web/assets/dafea2f28854-power_up.wav +0 -0
  817. package/lib/web/assets/e2e7f5ae2d1b-whoosh.wav +0 -0
  818. package/lib/web/assets/e2f90a23e1bd-chomp.wav +0 -0
  819. package/lib/web/assets/e454e56df89a-clack.wav +0 -0
  820. package/lib/web/assets/e8cbc2b88bc4-Inter-SemiBold.ttf +0 -0
  821. package/lib/web/assets/ed6496b891fc-land.wav +0 -0
  822. package/lib/web/assets/f21920200a81-thunk.wav +0 -0
  823. package/lib/web/assets/f753b43be89d-whack.wav +0 -0
  824. package/lib/web/assets/f798c4b5cf4d-miss.wav +0 -0
  825. package/lib/web/assets/fbe299716916-grass.png +0 -0
  826. package/lib/web/chunk-52ez2s9z.js +15 -0
  827. package/lib/web/chunk-8675t224.js +1 -0
  828. package/lib/web/index.js +2 -0
  829. package/lib/web/package.json +1 -0
  830. package/lib/web/services.js +2 -0
  831. package/package.json +94 -73
  832. package/src/assets/fonts/Inter-SemiBold.ttf +0 -0
  833. package/src/assets/models/explorer/explorer.glb +0 -0
  834. package/src/assets/models/explorer/params.json +51 -0
  835. package/src/assets/models/explorer/source.json +222 -0
  836. package/src/assets/models/play-with-tua/play-with-tua.glb +0 -0
  837. package/src/assets/models/play-with-tua/sources.json +141 -0
  838. package/src/assets/sfx/balloon_pop.wav +0 -0
  839. package/src/assets/sfx/blocked.wav +0 -0
  840. package/src/assets/sfx/boing.wav +0 -0
  841. package/src/assets/sfx/bonus.wav +0 -0
  842. package/src/assets/sfx/boom.wav +0 -0
  843. package/src/assets/sfx/bump.wav +0 -0
  844. package/src/assets/sfx/cannon.wav +0 -0
  845. package/src/assets/sfx/capture.wav +0 -0
  846. package/src/assets/sfx/card_flip.wav +0 -0
  847. package/src/assets/sfx/card_place.wav +0 -0
  848. package/src/assets/sfx/catch.wav +0 -0
  849. package/src/assets/sfx/chime.wav +0 -0
  850. package/src/assets/sfx/chomp.wav +0 -0
  851. package/src/assets/sfx/chomp_alt.wav +0 -0
  852. package/src/assets/sfx/clack.wav +0 -0
  853. package/src/assets/sfx/clang.wav +0 -0
  854. package/src/assets/sfx/clash.wav +0 -0
  855. package/src/assets/sfx/click.wav +0 -0
  856. package/src/assets/sfx/coin.wav +0 -0
  857. package/src/assets/sfx/combo.wav +0 -0
  858. package/src/assets/sfx/crash.wav +0 -0
  859. package/src/assets/sfx/crunch.wav +0 -0
  860. package/src/assets/sfx/dance.wav +0 -0
  861. package/src/assets/sfx/deselect.wav +0 -0
  862. package/src/assets/sfx/dice_roll.wav +0 -0
  863. package/src/assets/sfx/die.wav +0 -0
  864. package/src/assets/sfx/draw.wav +0 -0
  865. package/src/assets/sfx/drop.wav +0 -0
  866. package/src/assets/sfx/eat.wav +0 -0
  867. package/src/assets/sfx/engine.wav +0 -0
  868. package/src/assets/sfx/error.wav +0 -0
  869. package/src/assets/sfx/flag.wav +0 -0
  870. package/src/assets/sfx/flap.wav +0 -0
  871. package/src/assets/sfx/flip_disc.wav +0 -0
  872. package/src/assets/sfx/footstep_run.wav +0 -0
  873. package/src/assets/sfx/footstep_walk.wav +0 -0
  874. package/src/assets/sfx/game_over.wav +0 -0
  875. package/src/assets/sfx/gate.wav +0 -0
  876. package/src/assets/sfx/hit.wav +0 -0
  877. package/src/assets/sfx/hop.wav +0 -0
  878. package/src/assets/sfx/hurt.wav +0 -0
  879. package/src/assets/sfx/invalid.wav +0 -0
  880. package/src/assets/sfx/jump.wav +0 -0
  881. package/src/assets/sfx/ladder.wav +0 -0
  882. package/src/assets/sfx/land.wav +0 -0
  883. package/src/assets/sfx/laugh.wav +0 -0
  884. package/src/assets/sfx/lose.wav +0 -0
  885. package/src/assets/sfx/merge.wav +0 -0
  886. package/src/assets/sfx/miss.wav +0 -0
  887. package/src/assets/sfx/nitro.wav +0 -0
  888. package/src/assets/sfx/pew.wav +0 -0
  889. package/src/assets/sfx/place.wav +0 -0
  890. package/src/assets/sfx/pling.wav +0 -0
  891. package/src/assets/sfx/point.wav +0 -0
  892. package/src/assets/sfx/pop.wav +0 -0
  893. package/src/assets/sfx/pop_soft.wav +0 -0
  894. package/src/assets/sfx/power_up.wav +0 -0
  895. package/src/assets/sfx/reveal.wav +0 -0
  896. package/src/assets/sfx/robot.wav +0 -0
  897. package/src/assets/sfx/rotate.wav +0 -0
  898. package/src/assets/sfx/run_steps.wav +0 -0
  899. package/src/assets/sfx/select.wav +0 -0
  900. package/src/assets/sfx/shuffle.wav +0 -0
  901. package/src/assets/sfx/six.wav +0 -0
  902. package/src/assets/sfx/slice.wav +0 -0
  903. package/src/assets/sfx/slide.wav +0 -0
  904. package/src/assets/sfx/snake.wav +0 -0
  905. package/src/assets/sfx/snap.wav +0 -0
  906. package/src/assets/sfx/splash.wav +0 -0
  907. package/src/assets/sfx/star.wav +0 -0
  908. package/src/assets/sfx/start.wav +0 -0
  909. package/src/assets/sfx/swoosh.wav +0 -0
  910. package/src/assets/sfx/tap.wav +0 -0
  911. package/src/assets/sfx/thud.wav +0 -0
  912. package/src/assets/sfx/thunk.wav +0 -0
  913. package/src/assets/sfx/tick.wav +0 -0
  914. package/src/assets/sfx/time_up.wav +0 -0
  915. package/src/assets/sfx/tock.wav +0 -0
  916. package/src/assets/sfx/walk_steps.wav +0 -0
  917. package/src/assets/sfx/warning.wav +0 -0
  918. package/src/assets/sfx/whack.wav +0 -0
  919. package/src/assets/sfx/whoosh.wav +0 -0
  920. package/src/assets/sfx/win.wav +0 -0
  921. package/src/assets/sfx/zap.wav +0 -0
  922. package/src/assets/textures/ad_bolt.png +0 -0
  923. package/src/assets/textures/ad_bubbles.png +0 -0
  924. package/src/assets/textures/ad_chevrons.png +0 -0
  925. package/src/assets/textures/asphalt.png +0 -0
  926. package/src/assets/textures/bark.jpg +0 -0
  927. package/src/assets/textures/explorer-atlas.png +0 -0
  928. package/src/assets/textures/facade.png +0 -0
  929. package/src/assets/textures/grass.png +0 -0
  930. package/src/assets/textures/leaves.png +0 -0
  931. package/src/assets/textures/limestone.jpg +0 -0
  932. package/src/assets/textures/meadow.jpg +0 -0
  933. package/src/assets/textures/nature-sources.json +87 -0
  934. package/src/assets/textures/pine.png +0 -0
  935. package/src/assets/textures/river.jpg +0 -0
  936. package/src/assets/textures/soft_glow.png +0 -0
  937. package/src/games/arrows/Arrows.tsx +69 -0
  938. package/src/games/arrows/ArrowsConstants.ts +107 -0
  939. package/src/games/arrows/ArrowsGame.ts +735 -0
  940. package/src/games/arrows/ArrowsScene.ts +395 -0
  941. package/src/games/balloon-blaster/BalloonBlaster.tsx +75 -0
  942. package/src/games/balloon-blaster/BalloonBlasterConstants.ts +79 -0
  943. package/src/games/balloon-blaster/BalloonBlasterGame.ts +287 -0
  944. package/src/games/balloon-blaster/BalloonBlasterPhysics.ts +95 -0
  945. package/src/games/balloon-blaster/BalloonBlasterScene.ts +225 -0
  946. package/src/games/bike-racing/BikeMeshes.ts +273 -0
  947. package/src/games/bike-racing/BikeRacing.tsx +211 -0
  948. package/src/games/bike-racing/BikeRacingConstants.ts +103 -0
  949. package/src/games/bike-racing/BikeRacingGame.ts +557 -0
  950. package/src/games/bike-racing/BikeRacingScene.ts +119 -0
  951. package/src/games/block-blast/BlockBlast.tsx +73 -0
  952. package/src/games/block-blast/BlockBlastConstants.ts +179 -0
  953. package/src/games/block-blast/BlockBlastGame.ts +471 -0
  954. package/src/games/block-blast/BlockBlastScene.ts +156 -0
  955. package/src/games/block-breaker/BlockBreaker.tsx +79 -0
  956. package/src/games/block-breaker/BlockBreakerConstants.ts +139 -0
  957. package/src/games/block-breaker/BlockBreakerGame.ts +459 -0
  958. package/src/games/block-breaker/BlockBreakerScene.ts +257 -0
  959. package/src/games/bluk/Bluk.tsx +82 -0
  960. package/src/games/bluk/BlukConstants.ts +121 -0
  961. package/src/games/bluk/BlukGame.ts +323 -0
  962. package/src/games/bluk/BlukRules.ts +154 -0
  963. package/src/games/bluk/BlukScene.ts +514 -0
  964. package/src/games/bubble-shooter/BubbleShooter.tsx +76 -0
  965. package/src/games/bubble-shooter/BubbleShooterConstants.ts +103 -0
  966. package/src/games/bubble-shooter/BubbleShooterGame.ts +459 -0
  967. package/src/games/bubble-shooter/BubbleShooterScene.ts +158 -0
  968. package/src/games/candy-crush/CandyCrush.tsx +77 -0
  969. package/src/games/candy-crush/CandyCrushConstants.ts +94 -0
  970. package/src/games/candy-crush/CandyCrushGame.ts +477 -0
  971. package/src/games/candy-crush/CandyCrushScene.ts +209 -0
  972. package/src/games/car-racing/CarMeshes.ts +440 -0
  973. package/src/games/car-racing/CarRacing.tsx +211 -0
  974. package/src/games/car-racing/CarRacingConstants.ts +167 -0
  975. package/src/games/car-racing/CarRacingFacade.ts +40 -0
  976. package/src/games/car-racing/CarRacingGame.ts +539 -0
  977. package/src/games/car-racing/CarRacingScene.ts +1026 -0
  978. package/src/games/car-racing/CarRacingScenery.ts +265 -0
  979. package/src/games/chameleon-run/ChameleonRun.tsx +96 -0
  980. package/src/games/chameleon-run/ChameleonRunBackdrop.ts +186 -0
  981. package/src/games/chameleon-run/ChameleonRunConstants.ts +47 -0
  982. package/src/games/chameleon-run/ChameleonRunGame.ts +309 -0
  983. package/src/games/chameleon-run/ChameleonRunMeshes.ts +305 -0
  984. package/src/games/chameleon-run/ChameleonRunRules.ts +252 -0
  985. package/src/games/chameleon-run/ChameleonRunScene.ts +310 -0
  986. package/src/games/checkers/Checkers.tsx +83 -0
  987. package/src/games/checkers/CheckersAI.ts +255 -0
  988. package/src/games/checkers/CheckersConstants.ts +68 -0
  989. package/src/games/checkers/CheckersGame.ts +322 -0
  990. package/src/games/checkers/CheckersRules.ts +167 -0
  991. package/src/games/checkers/CheckersScene.ts +308 -0
  992. package/src/games/color-switch/ColorSwitch.tsx +75 -0
  993. package/src/games/color-switch/ColorSwitchConstants.ts +61 -0
  994. package/src/games/color-switch/ColorSwitchGame.ts +329 -0
  995. package/src/games/color-switch/ColorSwitchScene.ts +220 -0
  996. package/src/games/colors-sort/ColorsSort.tsx +82 -0
  997. package/src/games/colors-sort/ColorsSortConstants.ts +119 -0
  998. package/src/games/colors-sort/ColorsSortGame.ts +246 -0
  999. package/src/games/colors-sort/ColorsSortScene.ts +315 -0
  1000. package/src/games/connect-em-all/ConnectEmAll.tsx +70 -0
  1001. package/src/games/connect-em-all/ConnectEmAllConstants.ts +77 -0
  1002. package/src/games/connect-em-all/ConnectEmAllGame.ts +401 -0
  1003. package/src/games/connect-em-all/ConnectEmAllScene.ts +235 -0
  1004. package/src/games/crossy-road/CrossyRoad.tsx +74 -0
  1005. package/src/games/crossy-road/CrossyRoadCamera.ts +59 -0
  1006. package/src/games/crossy-road/CrossyRoadConstants.ts +132 -0
  1007. package/src/games/crossy-road/CrossyRoadGame.ts +293 -0
  1008. package/src/games/crossy-road/CrossyRoadMeshes.ts +195 -0
  1009. package/src/games/crossy-road/CrossyRoadPerson.ts +198 -0
  1010. package/src/games/crossy-road/CrossyRoadRules.ts +99 -0
  1011. package/src/games/crossy-road/CrossyRoadScene.ts +355 -0
  1012. package/src/games/dino-jump/DinoJump.tsx +77 -0
  1013. package/src/games/dino-jump/DinoJumpConstants.ts +80 -0
  1014. package/src/games/dino-jump/DinoJumpGame.ts +344 -0
  1015. package/src/games/dino-jump/DinoJumpScene.ts +686 -0
  1016. package/src/games/dots-and-boxes/DotsAndBoxes.tsx +83 -0
  1017. package/src/games/dots-and-boxes/DotsAndBoxesConstants.ts +77 -0
  1018. package/src/games/dots-and-boxes/DotsAndBoxesGame.ts +271 -0
  1019. package/src/games/dots-and-boxes/DotsAndBoxesScene.ts +249 -0
  1020. package/src/games/falling-sticks/FallingSticks.tsx +72 -0
  1021. package/src/games/falling-sticks/FallingSticksConstants.ts +62 -0
  1022. package/src/games/falling-sticks/FallingSticksGame.ts +220 -0
  1023. package/src/games/falling-sticks/FallingSticksRules.ts +145 -0
  1024. package/src/games/falling-sticks/FallingSticksScene.ts +245 -0
  1025. package/src/games/find-different-number/FindDifferentNumber.tsx +74 -0
  1026. package/src/games/find-different-number/FindDifferentNumberConstants.ts +74 -0
  1027. package/src/games/find-different-number/FindDifferentNumberGame.ts +174 -0
  1028. package/src/games/find-different-number/FindDifferentNumberRules.ts +43 -0
  1029. package/src/games/find-different-number/FindDifferentNumberScene.ts +193 -0
  1030. package/src/games/flappy-bird/FlappyBird.tsx +73 -0
  1031. package/src/games/flappy-bird/FlappyBirdConstants.ts +95 -0
  1032. package/src/games/flappy-bird/FlappyBirdGame.ts +375 -0
  1033. package/src/games/flappy-bird/FlappyBirdScene.ts +630 -0
  1034. package/src/games/fruit-merger/FruitMerger.tsx +73 -0
  1035. package/src/games/fruit-merger/FruitMergerConstants.ts +102 -0
  1036. package/src/games/fruit-merger/FruitMergerGame.ts +285 -0
  1037. package/src/games/fruit-merger/FruitMergerRules.ts +286 -0
  1038. package/src/games/fruit-merger/FruitMergerScene.ts +498 -0
  1039. package/src/games/fruit-ninja/FruitNinja.tsx +129 -0
  1040. package/src/games/fruit-ninja/FruitNinjaConstants.ts +107 -0
  1041. package/src/games/fruit-ninja/FruitNinjaGame.ts +391 -0
  1042. package/src/games/fruit-ninja/FruitNinjaScene.ts +319 -0
  1043. package/src/games/fruit-ninja/FruitNinjaWorld.ts +17 -0
  1044. package/src/games/game-2048/Game2048.tsx +84 -0
  1045. package/src/games/game-2048/Game2048Constants.ts +68 -0
  1046. package/src/games/game-2048/Game2048Game.ts +181 -0
  1047. package/src/games/game-2048/Game2048Rules.ts +101 -0
  1048. package/src/games/game-2048/Game2048Scene.ts +206 -0
  1049. package/src/games/knife-hit/KnifeHit.tsx +78 -0
  1050. package/src/games/knife-hit/KnifeHitConstants.ts +89 -0
  1051. package/src/games/knife-hit/KnifeHitGame.ts +264 -0
  1052. package/src/games/knife-hit/KnifeHitScene.ts +360 -0
  1053. package/src/games/ludo-king/LudoKing.tsx +86 -0
  1054. package/src/games/ludo-king/LudoKingConstants.ts +212 -0
  1055. package/src/games/ludo-king/LudoKingGame.ts +326 -0
  1056. package/src/games/ludo-king/LudoKingRules.ts +143 -0
  1057. package/src/games/ludo-king/LudoKingScene.ts +397 -0
  1058. package/src/games/maze-runner/MazeRunner.tsx +88 -0
  1059. package/src/games/maze-runner/MazeRunnerConstants.ts +65 -0
  1060. package/src/games/maze-runner/MazeRunnerGame.ts +176 -0
  1061. package/src/games/maze-runner/MazeRunnerRules.ts +161 -0
  1062. package/src/games/maze-runner/MazeRunnerScene.ts +245 -0
  1063. package/src/games/memory-match/MemoryMatch.tsx +77 -0
  1064. package/src/games/memory-match/MemoryMatchConstants.ts +105 -0
  1065. package/src/games/memory-match/MemoryMatchGame.ts +222 -0
  1066. package/src/games/memory-match/MemoryMatchRules.ts +38 -0
  1067. package/src/games/memory-match/MemoryMatchScene.ts +268 -0
  1068. package/src/games/mine-sweeper/MineSweeper.tsx +77 -0
  1069. package/src/games/mine-sweeper/MineSweeperConstants.ts +94 -0
  1070. package/src/games/mine-sweeper/MineSweeperGame.ts +234 -0
  1071. package/src/games/mine-sweeper/MineSweeperRules.ts +67 -0
  1072. package/src/games/mine-sweeper/MineSweeperScene.ts +262 -0
  1073. package/src/games/mob-control/MobControl.tsx +73 -0
  1074. package/src/games/mob-control/MobControlConstants.ts +106 -0
  1075. package/src/games/mob-control/MobControlGame.ts +176 -0
  1076. package/src/games/mob-control/MobControlMeshes.ts +85 -0
  1077. package/src/games/mob-control/MobControlRenderer.ts +108 -0
  1078. package/src/games/mob-control/MobControlRules.ts +522 -0
  1079. package/src/games/mob-control/MobControlScene.ts +399 -0
  1080. package/src/games/number-search/NumberSearch.tsx +18 -0
  1081. package/src/games/number-search/NumberSearchNumbers.ts +623 -0
  1082. package/src/games/nuts-and-bolts/NutsAndBolts.tsx +85 -0
  1083. package/src/games/nuts-and-bolts/NutsAndBoltsConstants.ts +75 -0
  1084. package/src/games/nuts-and-bolts/NutsAndBoltsGame.ts +298 -0
  1085. package/src/games/nuts-and-bolts/NutsAndBoltsRules.ts +474 -0
  1086. package/src/games/nuts-and-bolts/NutsAndBoltsScene.ts +498 -0
  1087. package/src/games/pac-man/PacMan.tsx +86 -0
  1088. package/src/games/pac-man/PacManConstants.ts +169 -0
  1089. package/src/games/pac-man/PacManGame.ts +406 -0
  1090. package/src/games/pac-man/PacManRules.ts +255 -0
  1091. package/src/games/pac-man/PacManScene.ts +387 -0
  1092. package/src/games/paper-io/PaperIo.tsx +91 -0
  1093. package/src/games/paper-io/PaperIoConstants.ts +86 -0
  1094. package/src/games/paper-io/PaperIoGame.ts +193 -0
  1095. package/src/games/paper-io/PaperIoMeshes.ts +233 -0
  1096. package/src/games/paper-io/PaperIoRules.ts +315 -0
  1097. package/src/games/paper-io/PaperIoScene.ts +310 -0
  1098. package/src/games/penguin-run/PenguinMeshes.ts +269 -0
  1099. package/src/games/penguin-run/PenguinModel.ts +712 -0
  1100. package/src/games/penguin-run/PenguinRun.tsx +77 -0
  1101. package/src/games/penguin-run/PenguinRunConstants.ts +69 -0
  1102. package/src/games/penguin-run/PenguinRunGame.ts +406 -0
  1103. package/src/games/penguin-run/PenguinRunScene.ts +949 -0
  1104. package/src/games/perfect-circle/PerfectCircle.tsx +74 -0
  1105. package/src/games/perfect-circle/PerfectCircleConstants.ts +52 -0
  1106. package/src/games/perfect-circle/PerfectCircleGame.ts +153 -0
  1107. package/src/games/perfect-circle/PerfectCircleRules.ts +111 -0
  1108. package/src/games/perfect-circle/PerfectCircleScene.ts +176 -0
  1109. package/src/games/pipe-connect/PipeConnect.tsx +69 -0
  1110. package/src/games/pipe-connect/PipeConnectConstants.ts +101 -0
  1111. package/src/games/pipe-connect/PipeConnectGame.ts +179 -0
  1112. package/src/games/pipe-connect/PipeConnectRules.ts +326 -0
  1113. package/src/games/pipe-connect/PipeConnectScene.ts +271 -0
  1114. package/src/games/play-with-tua/PlayWithTua.tsx +123 -0
  1115. package/src/games/play-with-tua/PlayWithTuaConstants.ts +70 -0
  1116. package/src/games/play-with-tua/PlayWithTuaGame.ts +167 -0
  1117. package/src/games/play-with-tua/PlayWithTuaModel.ts +42 -0
  1118. package/src/games/play-with-tua/PlayWithTuaScene.ts +36 -0
  1119. package/src/games/popit-fidget/PopitFidget.tsx +72 -0
  1120. package/src/games/popit-fidget/PopitFidgetConstants.ts +71 -0
  1121. package/src/games/popit-fidget/PopitFidgetGame.ts +148 -0
  1122. package/src/games/popit-fidget/PopitFidgetScene.ts +242 -0
  1123. package/src/games/reversi/Reversi.tsx +94 -0
  1124. package/src/games/reversi/ReversiConstants.ts +67 -0
  1125. package/src/games/reversi/ReversiGame.ts +266 -0
  1126. package/src/games/reversi/ReversiRules.ts +176 -0
  1127. package/src/games/reversi/ReversiScene.ts +240 -0
  1128. package/src/games/search-grid/SearchGrid.tsx +92 -0
  1129. package/src/games/search-grid/SearchGridConstants.ts +178 -0
  1130. package/src/games/search-grid/SearchGridGame.ts +209 -0
  1131. package/src/games/search-grid/SearchGridScene.ts +301 -0
  1132. package/src/games/shared/BackdropCard.tsx +54 -0
  1133. package/src/games/shared/EngineBackdrop.ts +300 -0
  1134. package/src/games/shared/EngineBlasts.ts +136 -0
  1135. package/src/games/shared/EngineBlocks.ts +91 -0
  1136. package/src/games/shared/EngineControlText.ts +17 -0
  1137. package/src/games/shared/EngineDice.ts +250 -0
  1138. package/src/games/shared/EngineFootprint.ts +35 -0
  1139. package/src/games/shared/EngineFruits.ts +1435 -0
  1140. package/src/games/shared/EngineGameLoader.tsx +88 -0
  1141. package/src/games/shared/EngineGameScreen.tsx +325 -0
  1142. package/src/games/shared/EngineGameWidth.ts +3 -0
  1143. package/src/games/shared/EngineGameWidth.web.ts +3 -0
  1144. package/src/games/shared/EngineGlyphs.ts +178 -0
  1145. package/src/games/shared/EngineHud.ts +815 -0
  1146. package/src/games/shared/EngineLoading.ts +477 -0
  1147. package/src/games/shared/EngineMeadow.ts +725 -0
  1148. package/src/games/shared/EngineMeshCache.ts +15 -0
  1149. package/src/games/shared/EngineMeshes.ts +10 -0
  1150. package/src/games/shared/EngineRacingChase.ts +21 -0
  1151. package/src/games/shared/EngineRacingHandling.ts +48 -0
  1152. package/src/games/shared/EngineReadyContext.ts +4 -0
  1153. package/src/games/shared/EngineTilt.ts +44 -0
  1154. package/src/games/shared/EngineTouchSurface.tsx +103 -0
  1155. package/src/games/shared/EngineUtils.ts +52 -0
  1156. package/src/games/shared/GameActivity.ts +13 -0
  1157. package/src/games/shared/GameLoading.tsx +202 -0
  1158. package/src/games/shared/GameLoadingTransition.tsx +61 -0
  1159. package/src/games/shared/ProceduralCacheVersion.ts +2 -0
  1160. package/src/games/shared/useEngineGame.ts +240 -0
  1161. package/src/games/shared/useGameResource.ts +21 -0
  1162. package/src/games/shared/useLiveState.ts +58 -0
  1163. package/src/games/sliding-numbers/SlidingNumbers.tsx +71 -0
  1164. package/src/games/sliding-numbers/SlidingNumbersConstants.ts +65 -0
  1165. package/src/games/sliding-numbers/SlidingNumbersGame.ts +192 -0
  1166. package/src/games/sliding-numbers/SlidingNumbersRules.ts +79 -0
  1167. package/src/games/sliding-numbers/SlidingNumbersScene.ts +193 -0
  1168. package/src/games/snake-3d/Snake3D.tsx +76 -0
  1169. package/src/games/snake-3d/Snake3DConstants.ts +61 -0
  1170. package/src/games/snake-3d/Snake3DGame.ts +192 -0
  1171. package/src/games/snake-3d/Snake3DMotion.ts +22 -0
  1172. package/src/games/snake-3d/Snake3DRules.ts +116 -0
  1173. package/src/games/snake-3d/Snake3DScene.ts +322 -0
  1174. package/src/games/snakes-and-ladders/SnakesAndLadders.tsx +87 -0
  1175. package/src/games/snakes-and-ladders/SnakesAndLaddersConstants.ts +136 -0
  1176. package/src/games/snakes-and-ladders/SnakesAndLaddersGame.ts +310 -0
  1177. package/src/games/snakes-and-ladders/SnakesAndLaddersScene.ts +515 -0
  1178. package/src/games/space-fighter/SpaceFighter.tsx +74 -0
  1179. package/src/games/space-fighter/SpaceFighterConstants.ts +86 -0
  1180. package/src/games/space-fighter/SpaceFighterGame.ts +292 -0
  1181. package/src/games/space-fighter/SpaceFighterScene.ts +550 -0
  1182. package/src/games/spider-solitaire/SpiderSolitaire.tsx +80 -0
  1183. package/src/games/spider-solitaire/SpiderSolitaireConstants.ts +107 -0
  1184. package/src/games/spider-solitaire/SpiderSolitaireGame.ts +387 -0
  1185. package/src/games/spider-solitaire/SpiderSolitaireRules.ts +123 -0
  1186. package/src/games/spider-solitaire/SpiderSolitaireScene.ts +352 -0
  1187. package/src/games/stack-tower/StackTower.tsx +76 -0
  1188. package/src/games/stack-tower/StackTowerConstants.ts +74 -0
  1189. package/src/games/stack-tower/StackTowerGame.ts +236 -0
  1190. package/src/games/stack-tower/StackTowerScene.ts +186 -0
  1191. package/src/games/sudoku/Sudoku.tsx +73 -0
  1192. package/src/games/sudoku/SudokuConstants.ts +127 -0
  1193. package/src/games/sudoku/SudokuGame.ts +250 -0
  1194. package/src/games/sudoku/SudokuRules.ts +125 -0
  1195. package/src/games/sudoku/SudokuScene.ts +304 -0
  1196. package/src/games/tangram/Tangram.tsx +79 -0
  1197. package/src/games/tangram/TangramConstants.ts +64 -0
  1198. package/src/games/tangram/TangramGame.ts +356 -0
  1199. package/src/games/tangram/TangramRules.ts +409 -0
  1200. package/src/games/tangram/TangramScene.ts +203 -0
  1201. package/src/games/tank-1990/Tank1990.tsx +78 -0
  1202. package/src/games/tank-1990/Tank1990Constants.ts +81 -0
  1203. package/src/games/tank-1990/Tank1990Game.ts +331 -0
  1204. package/src/games/tank-1990/Tank1990Rules.ts +390 -0
  1205. package/src/games/tank-1990/Tank1990Scene.ts +434 -0
  1206. package/src/games/tic-tac-toe/TicTacToe.tsx +98 -0
  1207. package/src/games/tic-tac-toe/TicTacToeConstants.ts +69 -0
  1208. package/src/games/tic-tac-toe/TicTacToeGame.ts +200 -0
  1209. package/src/games/tic-tac-toe/TicTacToeRules.ts +103 -0
  1210. package/src/games/tic-tac-toe/TicTacToeScene.ts +245 -0
  1211. package/src/games/tile-home/TileHome.tsx +92 -0
  1212. package/src/games/tile-home/TileHomeConstants.ts +139 -0
  1213. package/src/games/tile-home/TileHomeGame.ts +435 -0
  1214. package/src/games/tile-home/TileHomeScene.ts +154 -0
  1215. package/src/games/treasure-hunt/TreasureHunt.tsx +206 -0
  1216. package/src/games/treasure-hunt/TreasureHuntConstants.ts +266 -0
  1217. package/src/games/treasure-hunt/TreasureHuntControls.ts +280 -0
  1218. package/src/games/treasure-hunt/TreasureHuntGame.ts +402 -0
  1219. package/src/games/treasure-hunt/TreasureHuntMeshes.ts +422 -0
  1220. package/src/games/treasure-hunt/TreasureHuntModel.ts +506 -0
  1221. package/src/games/treasure-hunt/TreasureHuntRules.ts +1210 -0
  1222. package/src/games/treasure-hunt/TreasureHuntScene.ts +586 -0
  1223. package/src/games/whack-a-mole/WhackAMole.tsx +79 -0
  1224. package/src/games/whack-a-mole/WhackAMoleConstants.ts +94 -0
  1225. package/src/games/whack-a-mole/WhackAMoleGame.ts +233 -0
  1226. package/src/games/whack-a-mole/WhackAMoleScene.ts +349 -0
  1227. package/src/games/word-search/WordSearch.tsx +18 -0
  1228. package/src/games/word-search/WordSearchWords.ts +1642 -0
  1229. package/src/helpers/GamePatternData.ts +120 -0
  1230. package/src/helpers/GameSettingsModal.tsx +384 -0
  1231. package/src/helpers/GameTheme.tsx +37 -0
  1232. package/src/helpers/IconPaths.ts +6 -0
  1233. package/src/helpers/index.ts +2 -0
  1234. package/src/index.tsx +60 -0
  1235. package/src/services/GameAssetLoader.ts +111 -0
  1236. package/src/services/GameAssets.ts +149 -0
  1237. package/src/services/GameLoaders.ts +93 -0
  1238. package/src/services/GamesConstants.ts +193 -0
  1239. package/src/services/GamesMetadata.ts +711 -0
  1240. package/src/services/GamesService.ts +116 -0
  1241. package/src/services/HapticsService.ts +48 -0
  1242. package/src/services/ScoringService.ts +19 -0
  1243. package/src/services/SfxSources.ts +81 -0
  1244. package/src/services/SoundsService.ts +582 -0
  1245. package/src/services/ThemeService.ts +281 -0
  1246. package/src/services/UtilsService.ts +134 -0
  1247. package/src/services/index.ts +6 -0
  1248. package/lib/module/games/arrows/ArrowsService.js +0 -1
  1249. package/lib/module/games/arrows/ArrowsStore.js +0 -1
  1250. package/lib/module/games/arrows/components/ArrowsGrid.js +0 -1
  1251. package/lib/module/games/arrows/components/ScoreBoard.js +0 -1
  1252. package/lib/module/games/balloon-blaster/BalloonBlasterService.js +0 -1
  1253. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +0 -1
  1254. package/lib/module/games/balloon-blaster/components/BalloonComponent.js +0 -1
  1255. package/lib/module/games/balloon-blaster/components/GameArea.js +0 -1
  1256. package/lib/module/games/balloon-blaster/components/GameBackground.js +0 -1
  1257. package/lib/module/games/balloon-blaster/components/ScoreBoard.js +0 -1
  1258. package/lib/module/games/bike-racing/BikeRacingService.js +0 -1
  1259. package/lib/module/games/bike-racing/BikeRacingStore.js +0 -1
  1260. package/lib/module/games/bike-racing/components/BikeComponent.js +0 -1
  1261. package/lib/module/games/bike-racing/components/GameBackground.js +0 -1
  1262. package/lib/module/games/bike-racing/components/ScoreBoard.js +0 -1
  1263. package/lib/module/games/block-blast/BlockBlastService.js +0 -1
  1264. package/lib/module/games/block-blast/BlockBlastStore.js +0 -1
  1265. package/lib/module/games/block-blast/components/BlockPieceComponent.js +0 -1
  1266. package/lib/module/games/block-blast/components/GameArea.js +0 -1
  1267. package/lib/module/games/block-blast/components/GridComponent.js +0 -1
  1268. package/lib/module/games/block-blast/components/ScoreBoard.js +0 -1
  1269. package/lib/module/games/block-breaker/BlockBreakerService.js +0 -1
  1270. package/lib/module/games/block-breaker/BlockBreakerStore.js +0 -1
  1271. package/lib/module/games/block-breaker/components/BlastAnimation.js +0 -1
  1272. package/lib/module/games/block-breaker/components/GameArea.js +0 -1
  1273. package/lib/module/games/block-breaker/components/ScoreBoard.js +0 -1
  1274. package/lib/module/games/bluk/BlukService.js +0 -1
  1275. package/lib/module/games/bluk/BlukStore.js +0 -1
  1276. package/lib/module/games/bluk/components/GameArea.js +0 -1
  1277. package/lib/module/games/bluk/components/GameBackground.js +0 -1
  1278. package/lib/module/games/bluk/components/ScoreBoard.js +0 -1
  1279. package/lib/module/games/bubble-shooter/BubbleShooterService.js +0 -1
  1280. package/lib/module/games/bubble-shooter/BubbleShooterStore.js +0 -1
  1281. package/lib/module/games/bubble-shooter/components/GameArea.js +0 -1
  1282. package/lib/module/games/bubble-shooter/components/ScoreBoard.js +0 -1
  1283. package/lib/module/games/candy-crush/CandyCrushService.js +0 -1
  1284. package/lib/module/games/candy-crush/CandyCrushStore.js +0 -1
  1285. package/lib/module/games/candy-crush/components/CandyItem.js +0 -1
  1286. package/lib/module/games/candy-crush/components/GameGrid.js +0 -1
  1287. package/lib/module/games/candy-crush/components/ScoreBoard.js +0 -1
  1288. package/lib/module/games/car-racing/CarRacingService.js +0 -1
  1289. package/lib/module/games/car-racing/CarRacingStore.js +0 -1
  1290. package/lib/module/games/car-racing/components/CarComponent.js +0 -1
  1291. package/lib/module/games/car-racing/components/GameBackground.js +0 -1
  1292. package/lib/module/games/car-racing/components/ScoreBoard.js +0 -1
  1293. package/lib/module/games/chameleon-run/ChameleonRunService.js +0 -1
  1294. package/lib/module/games/chameleon-run/ChameleonRunStore.js +0 -1
  1295. package/lib/module/games/chameleon-run/components/GameArea.js +0 -1
  1296. package/lib/module/games/chameleon-run/components/GameBackground.js +0 -1
  1297. package/lib/module/games/chameleon-run/components/ScoreBoard.js +0 -1
  1298. package/lib/module/games/checkers/CheckersService.js +0 -1
  1299. package/lib/module/games/checkers/CheckersStore.js +0 -1
  1300. package/lib/module/games/checkers/components/GameBoard.js +0 -1
  1301. package/lib/module/games/checkers/components/ScoreBoard.js +0 -1
  1302. package/lib/module/games/color-switch/ColorSwitchService.js +0 -1
  1303. package/lib/module/games/color-switch/ColorSwitchStore.js +0 -1
  1304. package/lib/module/games/color-switch/components/GameArea.js +0 -1
  1305. package/lib/module/games/color-switch/components/ScoreBoard.js +0 -1
  1306. package/lib/module/games/colors-sort/ColorsSortService.js +0 -1
  1307. package/lib/module/games/colors-sort/ColorsSortStore.js +0 -1
  1308. package/lib/module/games/colors-sort/components/ColorContainer.js +0 -1
  1309. package/lib/module/games/colors-sort/components/ScoreBoard.js +0 -1
  1310. package/lib/module/games/connect-em-all/ConnectEmAllService.js +0 -1
  1311. package/lib/module/games/connect-em-all/ConnectEmAllStore.js +0 -1
  1312. package/lib/module/games/connect-em-all/components/GameBoard.js +0 -1
  1313. package/lib/module/games/connect-em-all/components/ScoreBoard.js +0 -1
  1314. package/lib/module/games/crossy-road/CrossyRoadService.js +0 -1
  1315. package/lib/module/games/crossy-road/CrossyRoadStore.js +0 -1
  1316. package/lib/module/games/crossy-road/components/GameArea.js +0 -1
  1317. package/lib/module/games/crossy-road/components/ScoreBoard.js +0 -1
  1318. package/lib/module/games/dino-jump/DinoJumpService.js +0 -1
  1319. package/lib/module/games/dino-jump/DinoJumpStore.js +0 -1
  1320. package/lib/module/games/dino-jump/components/DinoSprite.js +0 -1
  1321. package/lib/module/games/dino-jump/components/GameArea.js +0 -1
  1322. package/lib/module/games/dino-jump/components/GameBackground.js +0 -1
  1323. package/lib/module/games/dino-jump/components/ObstacleSprite.js +0 -1
  1324. package/lib/module/games/dino-jump/components/ScoreBoard.js +0 -1
  1325. package/lib/module/games/dino-jump/components/StarSprite.js +0 -1
  1326. package/lib/module/games/dots-and-boxes/DotsAndBoxesService.js +0 -1
  1327. package/lib/module/games/dots-and-boxes/DotsAndBoxesStore.js +0 -1
  1328. package/lib/module/games/dots-and-boxes/components/GameBoard.js +0 -1
  1329. package/lib/module/games/dots-and-boxes/components/ScoreBoard.js +0 -1
  1330. package/lib/module/games/falling-sticks/FallingSticksService.js +0 -1
  1331. package/lib/module/games/falling-sticks/FallingSticksStore.js +0 -1
  1332. package/lib/module/games/falling-sticks/components/GameArea.js +0 -1
  1333. package/lib/module/games/falling-sticks/components/GameBackground.js +0 -1
  1334. package/lib/module/games/falling-sticks/components/ScoreBoard.js +0 -1
  1335. package/lib/module/games/find-different-number/FindDifferentNumberService.js +0 -1
  1336. package/lib/module/games/find-different-number/FindDifferentNumberStore.js +0 -1
  1337. package/lib/module/games/find-different-number/components/GameGrid.js +0 -1
  1338. package/lib/module/games/find-different-number/components/ScoreBoard.js +0 -1
  1339. package/lib/module/games/flappy-bird/FlappyBirdStore.js +0 -1
  1340. package/lib/module/games/flappy-bird/components/Bird.js +0 -1
  1341. package/lib/module/games/flappy-bird/components/GameArea.js +0 -1
  1342. package/lib/module/games/flappy-bird/components/GameBackground.js +0 -1
  1343. package/lib/module/games/flappy-bird/components/Pipes.js +0 -1
  1344. package/lib/module/games/flappy-bird/components/ScoreBoard.js +0 -1
  1345. package/lib/module/games/fruit-merger/FruitMergerService.js +0 -1
  1346. package/lib/module/games/fruit-merger/FruitMergerStore.js +0 -1
  1347. package/lib/module/games/fruit-merger/components/FruitItem.js +0 -1
  1348. package/lib/module/games/fruit-merger/components/GameArea.js +0 -1
  1349. package/lib/module/games/fruit-merger/components/ScoreBoard.js +0 -1
  1350. package/lib/module/games/fruit-ninja/FruitNinjaService.js +0 -1
  1351. package/lib/module/games/fruit-ninja/FruitNinjaStore.js +0 -1
  1352. package/lib/module/games/fruit-ninja/components/FruitComponent.js +0 -1
  1353. package/lib/module/games/fruit-ninja/components/GameArea.js +0 -1
  1354. package/lib/module/games/fruit-ninja/components/GameBackground.js +0 -1
  1355. package/lib/module/games/fruit-ninja/components/ScoreBoard.js +0 -1
  1356. package/lib/module/games/game-2048/Game2048Service.js +0 -1
  1357. package/lib/module/games/game-2048/Game2048Store.js +0 -1
  1358. package/lib/module/games/game-2048/components/GameGrid.js +0 -1
  1359. package/lib/module/games/game-2048/components/ScoreBoard.js +0 -1
  1360. package/lib/module/games/knife-hit/KnifeHitService.js +0 -1
  1361. package/lib/module/games/knife-hit/KnifeHitStore.js +0 -1
  1362. package/lib/module/games/knife-hit/components/GameArea.js +0 -1
  1363. package/lib/module/games/knife-hit/components/ScoreBoard.js +0 -1
  1364. package/lib/module/games/ludo-king/LudoKingService.js +0 -1
  1365. package/lib/module/games/ludo-king/LudoKingStore.js +0 -1
  1366. package/lib/module/games/ludo-king/components/Dice.js +0 -1
  1367. package/lib/module/games/ludo-king/components/GameBoard.js +0 -1
  1368. package/lib/module/games/ludo-king/components/ScoreBoard.js +0 -1
  1369. package/lib/module/games/maze-runner/MazeRunnerStore.js +0 -1
  1370. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +0 -1
  1371. package/lib/module/games/maze-runner/components/EnhancedGameArea.js +0 -1
  1372. package/lib/module/games/maze-runner/components/ScoreBoard.js +0 -1
  1373. package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +0 -1
  1374. package/lib/module/games/maze-runner/components/WallComponent.js +0 -1
  1375. package/lib/module/games/memory-match/MemoryMatchService.js +0 -1
  1376. package/lib/module/games/memory-match/MemoryMatchStore.js +0 -1
  1377. package/lib/module/games/memory-match/components/Card.js +0 -1
  1378. package/lib/module/games/memory-match/components/GameBoard.js +0 -1
  1379. package/lib/module/games/memory-match/components/ScoreBoard.js +0 -1
  1380. package/lib/module/games/mine-sweeper/MineSweeperService.js +0 -1
  1381. package/lib/module/games/mine-sweeper/MineSweeperStore.js +0 -1
  1382. package/lib/module/games/mine-sweeper/components/GameArea.js +0 -1
  1383. package/lib/module/games/mine-sweeper/components/ScoreBoard.js +0 -1
  1384. package/lib/module/games/mob-control/MobControlService.js +0 -1
  1385. package/lib/module/games/mob-control/MobControlStore.js +0 -1
  1386. package/lib/module/games/mob-control/components/GameArea.js +0 -1
  1387. package/lib/module/games/mob-control/components/ScoreBoard.js +0 -1
  1388. package/lib/module/games/number-search/NumberSearchConstants.js +0 -1
  1389. package/lib/module/games/number-search/NumberSearchService.js +0 -1
  1390. package/lib/module/games/number-search/NumberSearchStore.js +0 -1
  1391. package/lib/module/games/number-search/components/GameBoard.js +0 -1
  1392. package/lib/module/games/number-search/components/NumberList.js +0 -1
  1393. package/lib/module/games/number-search/components/ScoreBoard.js +0 -1
  1394. package/lib/module/games/nuts-and-bolts/NutsAndBoltsService.js +0 -1
  1395. package/lib/module/games/nuts-and-bolts/NutsAndBoltsStore.js +0 -1
  1396. package/lib/module/games/nuts-and-bolts/components/GameBoard.js +0 -1
  1397. package/lib/module/games/nuts-and-bolts/components/ScoreBoard.js +0 -1
  1398. package/lib/module/games/pac-man/PacManService.js +0 -1
  1399. package/lib/module/games/pac-man/PacManStore.js +0 -1
  1400. package/lib/module/games/pac-man/components/GameCanvas.js +0 -1
  1401. package/lib/module/games/pac-man/components/ScoreBoard.js +0 -1
  1402. package/lib/module/games/paper-io/PaperIoService.js +0 -1
  1403. package/lib/module/games/paper-io/PaperIoStore.js +0 -1
  1404. package/lib/module/games/paper-io/components/GameArea.js +0 -1
  1405. package/lib/module/games/paper-io/components/ScoreBoard.js +0 -1
  1406. package/lib/module/games/perfect-circle/PerfectCircleService.js +0 -1
  1407. package/lib/module/games/perfect-circle/PerfectCircleStore.js +0 -1
  1408. package/lib/module/games/perfect-circle/components/DrawingCanvas.js +0 -1
  1409. package/lib/module/games/perfect-circle/components/ScoreBoard.js +0 -1
  1410. package/lib/module/games/pipe-connect/PipeConnectService.js +0 -1
  1411. package/lib/module/games/pipe-connect/PipeConnectStore.js +0 -1
  1412. package/lib/module/games/pipe-connect/components/GameArea.js +0 -1
  1413. package/lib/module/games/pipe-connect/components/ScoreBoard.js +0 -1
  1414. package/lib/module/games/popit-fidget/PopitFidgetService.js +0 -1
  1415. package/lib/module/games/popit-fidget/PopitFidgetStore.js +0 -1
  1416. package/lib/module/games/popit-fidget/components/BubbleComponent.js +0 -1
  1417. package/lib/module/games/popit-fidget/components/FidgetGrid.js +0 -1
  1418. package/lib/module/games/popit-fidget/components/ScoreBoard.js +0 -1
  1419. package/lib/module/games/reversi/ReversiStore.js +0 -1
  1420. package/lib/module/games/reversi/components/GameBoard.js +0 -1
  1421. package/lib/module/games/reversi/components/ScoreBoard.js +0 -1
  1422. package/lib/module/games/sliding-numbers/SlidingNumbersService.js +0 -1
  1423. package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +0 -1
  1424. package/lib/module/games/sliding-numbers/components/NumbersGrid.js +0 -1
  1425. package/lib/module/games/sliding-numbers/components/ScoreBoard.js +0 -1
  1426. package/lib/module/games/snake-3d/Snake3DService.js +0 -1
  1427. package/lib/module/games/snake-3d/Snake3DStore.js +0 -1
  1428. package/lib/module/games/snake-3d/components/GameGrid.js +0 -1
  1429. package/lib/module/games/snake-3d/components/ScoreBoard.js +0 -1
  1430. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersService.js +0 -1
  1431. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersStore.js +0 -1
  1432. package/lib/module/games/snakes-and-ladders/components/Dice.js +0 -1
  1433. package/lib/module/games/snakes-and-ladders/components/GameBoard.js +0 -1
  1434. package/lib/module/games/snakes-and-ladders/components/ScoreBoard.js +0 -1
  1435. package/lib/module/games/space-fighter/SpaceFighterService.js +0 -1
  1436. package/lib/module/games/space-fighter/SpaceFighterStore.js +0 -1
  1437. package/lib/module/games/space-fighter/components/AsteroidComponent.js +0 -1
  1438. package/lib/module/games/space-fighter/components/GameArea.js +0 -1
  1439. package/lib/module/games/space-fighter/components/GameBackground.js +0 -1
  1440. package/lib/module/games/space-fighter/components/ScoreBoard.js +0 -1
  1441. package/lib/module/games/space-fighter/components/Spacecraft3D.js +0 -1
  1442. package/lib/module/games/space-fighter/components/SpacecraftPath.js +0 -1
  1443. package/lib/module/games/spider-solitaire/SpiderSolitaireService.js +0 -1
  1444. package/lib/module/games/spider-solitaire/SpiderSolitaireStore.js +0 -1
  1445. package/lib/module/games/spider-solitaire/components/Card.js +0 -1
  1446. package/lib/module/games/spider-solitaire/components/CardPile.js +0 -1
  1447. package/lib/module/games/spider-solitaire/components/ScoreBoard.js +0 -1
  1448. package/lib/module/games/stack-tower/StackTowerService.js +0 -1
  1449. package/lib/module/games/stack-tower/StackTowerStore.js +0 -1
  1450. package/lib/module/games/stack-tower/components/GameArea.js +0 -1
  1451. package/lib/module/games/stack-tower/components/ScoreBoard.js +0 -1
  1452. package/lib/module/games/sudoku/SudokuService.js +0 -1
  1453. package/lib/module/games/sudoku/SudokuStore.js +0 -1
  1454. package/lib/module/games/sudoku/components/GameArea.js +0 -1
  1455. package/lib/module/games/sudoku/components/ScoreBoard.js +0 -1
  1456. package/lib/module/games/tangram/TangramService.js +0 -1
  1457. package/lib/module/games/tangram/TangramStore.js +0 -1
  1458. package/lib/module/games/tangram/components/GameBoard.js +0 -1
  1459. package/lib/module/games/tangram/components/ScoreBoard.js +0 -1
  1460. package/lib/module/games/tank-1990/Tank1990Service.js +0 -1
  1461. package/lib/module/games/tank-1990/Tank1990Store.js +0 -1
  1462. package/lib/module/games/tank-1990/components/Controls.js +0 -1
  1463. package/lib/module/games/tank-1990/components/GameBoard.js +0 -1
  1464. package/lib/module/games/tank-1990/components/ScoreBoard.js +0 -1
  1465. package/lib/module/games/tic-tac-toe/TicTacToeService.js +0 -1
  1466. package/lib/module/games/tic-tac-toe/TicTacToeStore.js +0 -1
  1467. package/lib/module/games/tic-tac-toe/components/GameBoard.js +0 -1
  1468. package/lib/module/games/tic-tac-toe/components/ScoreBoard.js +0 -1
  1469. package/lib/module/games/tile-home/TileHomeService.js +0 -1
  1470. package/lib/module/games/tile-home/TileHomeStore.js +0 -1
  1471. package/lib/module/games/tile-home/components/AnimatingTile.js +0 -1
  1472. package/lib/module/games/tile-home/components/FlyingTile.js +0 -1
  1473. package/lib/module/games/tile-home/components/GameBoard.js +0 -1
  1474. package/lib/module/games/tile-home/components/ScoreBoard.js +0 -1
  1475. package/lib/module/games/tile-home/components/TileItem.js +0 -1
  1476. package/lib/module/games/tile-home/components/TileSlot.js +0 -1
  1477. package/lib/module/games/whack-a-mole/WhackAMoleService.js +0 -1
  1478. package/lib/module/games/whack-a-mole/WhackAMoleStore.js +0 -1
  1479. package/lib/module/games/whack-a-mole/components/GameBackground.js +0 -1
  1480. package/lib/module/games/whack-a-mole/components/GameGrid.js +0 -1
  1481. package/lib/module/games/whack-a-mole/components/GameHole.js +0 -1
  1482. package/lib/module/games/whack-a-mole/components/MoleCharacter.js +0 -1
  1483. package/lib/module/games/whack-a-mole/components/ScoreBoard.js +0 -1
  1484. package/lib/module/games/word-search/WordSearchConstants.js +0 -1
  1485. package/lib/module/games/word-search/WordSearchService.js +0 -1
  1486. package/lib/module/games/word-search/WordSearchStore.js +0 -1
  1487. package/lib/module/games/word-search/components/GameBoard.js +0 -1
  1488. package/lib/module/games/word-search/components/ScoreBoard.js +0 -1
  1489. package/lib/module/games/word-search/components/WordList.js +0 -1
  1490. package/lib/module/helpers/AnimatedScore.js +0 -1
  1491. package/lib/module/helpers/AnimationFrame.js +0 -1
  1492. package/lib/module/helpers/AnimationTracker.js +0 -1
  1493. package/lib/module/helpers/BlastAnimation.js +0 -1
  1494. package/lib/module/helpers/ErrorHandler.js +0 -1
  1495. package/lib/module/helpers/GameBackgroundPattern.js +0 -1
  1496. package/lib/module/helpers/GameControlButton.js +0 -1
  1497. package/lib/module/helpers/GameOverModal.js +0 -1
  1498. package/lib/module/helpers/GameTimer.js +0 -1
  1499. package/lib/module/helpers/Icons.js +0 -1
  1500. package/lib/module/helpers/ParticleBlast.js +0 -1
  1501. package/lib/module/helpers/ScoreBoardContainer.js +0 -1
  1502. package/lib/module/helpers/assets/apple-fruit.js +0 -1
  1503. package/lib/module/helpers/assets/avocado-item.js +0 -1
  1504. package/lib/module/helpers/assets/banana-fruit.js +0 -1
  1505. package/lib/module/helpers/assets/bomb-item.js +0 -1
  1506. package/lib/module/helpers/assets/broccoli-item.js +0 -1
  1507. package/lib/module/helpers/assets/cherries-fruit.js +0 -1
  1508. package/lib/module/helpers/assets/donut-item.js +0 -1
  1509. package/lib/module/helpers/assets/dragonfruit-item.js +0 -1
  1510. package/lib/module/helpers/assets/fries-item.js +0 -1
  1511. package/lib/module/helpers/assets/fruit-helpers.js +0 -1
  1512. package/lib/module/helpers/assets/grapes-fruit.js +0 -1
  1513. package/lib/module/helpers/assets/icecream-item.js +0 -1
  1514. package/lib/module/helpers/assets/index.js +0 -1
  1515. package/lib/module/helpers/assets/kiwi-fruit.js +0 -1
  1516. package/lib/module/helpers/assets/mango-fruit.js +0 -1
  1517. package/lib/module/helpers/assets/orange-fruit.js +0 -1
  1518. package/lib/module/helpers/assets/papaya-fruit.js +0 -1
  1519. package/lib/module/helpers/assets/papaya-full-fruit.js +0 -1
  1520. package/lib/module/helpers/assets/peach-fruit.js +0 -1
  1521. package/lib/module/helpers/assets/pineapple-fruit.js +0 -1
  1522. package/lib/module/helpers/assets/pomegranate-fruit.js +0 -1
  1523. package/lib/module/helpers/assets/pumpkin-fruit.js +0 -1
  1524. package/lib/module/helpers/assets/raspberry-item.js +0 -1
  1525. package/lib/module/helpers/assets/star-item.js +0 -1
  1526. package/lib/module/helpers/assets/strawberry-fruit.js +0 -1
  1527. package/lib/module/helpers/assets/watermelon-fruit.js +0 -1
  1528. package/lib/module/types.d.js +0 -1
  1529. package/lib/typescript/src/games/arrows/ArrowsService.d.ts +0 -6
  1530. package/lib/typescript/src/games/arrows/ArrowsStore.d.ts +0 -51
  1531. package/lib/typescript/src/games/arrows/components/ArrowsGrid.d.ts +0 -13
  1532. package/lib/typescript/src/games/arrows/components/ScoreBoard.d.ts +0 -6
  1533. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +0 -80
  1534. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +0 -30
  1535. package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts +0 -9
  1536. package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +0 -9
  1537. package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +0 -7
  1538. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +0 -6
  1539. package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +0 -44
  1540. package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +0 -68
  1541. package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +0 -12
  1542. package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +0 -7
  1543. package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +0 -6
  1544. package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +0 -16
  1545. package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +0 -70
  1546. package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +0 -11
  1547. package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +0 -11
  1548. package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +0 -8
  1549. package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +0 -6
  1550. package/lib/typescript/src/games/block-breaker/BlockBreakerService.d.ts +0 -88
  1551. package/lib/typescript/src/games/block-breaker/BlockBreakerStore.d.ts +0 -47
  1552. package/lib/typescript/src/games/block-breaker/components/BlastAnimation.d.ts +0 -15
  1553. package/lib/typescript/src/games/block-breaker/components/GameArea.d.ts +0 -8
  1554. package/lib/typescript/src/games/block-breaker/components/ScoreBoard.d.ts +0 -6
  1555. package/lib/typescript/src/games/bluk/BlukService.d.ts +0 -71
  1556. package/lib/typescript/src/games/bluk/BlukStore.d.ts +0 -52
  1557. package/lib/typescript/src/games/bluk/components/GameArea.d.ts +0 -17
  1558. package/lib/typescript/src/games/bluk/components/GameBackground.d.ts +0 -9
  1559. package/lib/typescript/src/games/bluk/components/ScoreBoard.d.ts +0 -6
  1560. package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +0 -35
  1561. package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +0 -63
  1562. package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +0 -8
  1563. package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +0 -6
  1564. package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts +0 -37
  1565. package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts +0 -53
  1566. package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts +0 -11
  1567. package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts +0 -2
  1568. package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts +0 -5
  1569. package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +0 -44
  1570. package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +0 -68
  1571. package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +0 -12
  1572. package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +0 -7
  1573. package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +0 -6
  1574. package/lib/typescript/src/games/chameleon-run/ChameleonRunService.d.ts +0 -76
  1575. package/lib/typescript/src/games/chameleon-run/ChameleonRunStore.d.ts +0 -48
  1576. package/lib/typescript/src/games/chameleon-run/components/GameArea.d.ts +0 -8
  1577. package/lib/typescript/src/games/chameleon-run/components/GameBackground.d.ts +0 -7
  1578. package/lib/typescript/src/games/chameleon-run/components/ScoreBoard.d.ts +0 -6
  1579. package/lib/typescript/src/games/checkers/CheckersService.d.ts +0 -6
  1580. package/lib/typescript/src/games/checkers/CheckersStore.d.ts +0 -48
  1581. package/lib/typescript/src/games/checkers/components/GameBoard.d.ts +0 -6
  1582. package/lib/typescript/src/games/checkers/components/ScoreBoard.d.ts +0 -6
  1583. package/lib/typescript/src/games/color-switch/ColorSwitchService.d.ts +0 -63
  1584. package/lib/typescript/src/games/color-switch/ColorSwitchStore.d.ts +0 -43
  1585. package/lib/typescript/src/games/color-switch/components/GameArea.d.ts +0 -8
  1586. package/lib/typescript/src/games/color-switch/components/ScoreBoard.d.ts +0 -6
  1587. package/lib/typescript/src/games/colors-sort/ColorsSortService.d.ts +0 -61
  1588. package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts +0 -56
  1589. package/lib/typescript/src/games/colors-sort/components/ColorContainer.d.ts +0 -7
  1590. package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts +0 -6
  1591. package/lib/typescript/src/games/connect-em-all/ConnectEmAllService.d.ts +0 -20
  1592. package/lib/typescript/src/games/connect-em-all/ConnectEmAllStore.d.ts +0 -48
  1593. package/lib/typescript/src/games/connect-em-all/components/GameBoard.d.ts +0 -7
  1594. package/lib/typescript/src/games/connect-em-all/components/ScoreBoard.d.ts +0 -6
  1595. package/lib/typescript/src/games/crossy-road/CrossyRoadService.d.ts +0 -89
  1596. package/lib/typescript/src/games/crossy-road/CrossyRoadStore.d.ts +0 -39
  1597. package/lib/typescript/src/games/crossy-road/components/GameArea.d.ts +0 -8
  1598. package/lib/typescript/src/games/crossy-road/components/ScoreBoard.d.ts +0 -6
  1599. package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts +0 -39
  1600. package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts +0 -97
  1601. package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts +0 -2
  1602. package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts +0 -7
  1603. package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts +0 -7
  1604. package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts +0 -8
  1605. package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts +0 -6
  1606. package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts +0 -2
  1607. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesService.d.ts +0 -45
  1608. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesStore.d.ts +0 -37
  1609. package/lib/typescript/src/games/dots-and-boxes/components/GameBoard.d.ts +0 -7
  1610. package/lib/typescript/src/games/dots-and-boxes/components/ScoreBoard.d.ts +0 -6
  1611. package/lib/typescript/src/games/falling-sticks/FallingSticksService.d.ts +0 -40
  1612. package/lib/typescript/src/games/falling-sticks/FallingSticksStore.d.ts +0 -31
  1613. package/lib/typescript/src/games/falling-sticks/components/GameArea.d.ts +0 -7
  1614. package/lib/typescript/src/games/falling-sticks/components/GameBackground.d.ts +0 -6
  1615. package/lib/typescript/src/games/falling-sticks/components/ScoreBoard.d.ts +0 -6
  1616. package/lib/typescript/src/games/find-different-number/FindDifferentNumberService.d.ts +0 -6
  1617. package/lib/typescript/src/games/find-different-number/FindDifferentNumberStore.d.ts +0 -36
  1618. package/lib/typescript/src/games/find-different-number/components/GameGrid.d.ts +0 -7
  1619. package/lib/typescript/src/games/find-different-number/components/ScoreBoard.d.ts +0 -6
  1620. package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts +0 -68
  1621. package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts +0 -2
  1622. package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts +0 -7
  1623. package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts +0 -7
  1624. package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts +0 -8
  1625. package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts +0 -6
  1626. package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts +0 -3
  1627. package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts +0 -66
  1628. package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts +0 -8
  1629. package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts +0 -8
  1630. package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts +0 -6
  1631. package/lib/typescript/src/games/fruit-ninja/FruitNinjaService.d.ts +0 -73
  1632. package/lib/typescript/src/games/fruit-ninja/FruitNinjaStore.d.ts +0 -38
  1633. package/lib/typescript/src/games/fruit-ninja/components/FruitComponent.d.ts +0 -8
  1634. package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts +0 -7
  1635. package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts +0 -7
  1636. package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +0 -6
  1637. package/lib/typescript/src/games/game-2048/Game2048Service.d.ts +0 -102
  1638. package/lib/typescript/src/games/game-2048/Game2048Store.d.ts +0 -44
  1639. package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts +0 -2
  1640. package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts +0 -6
  1641. package/lib/typescript/src/games/knife-hit/KnifeHitService.d.ts +0 -48
  1642. package/lib/typescript/src/games/knife-hit/KnifeHitStore.d.ts +0 -41
  1643. package/lib/typescript/src/games/knife-hit/components/GameArea.d.ts +0 -8
  1644. package/lib/typescript/src/games/knife-hit/components/ScoreBoard.d.ts +0 -6
  1645. package/lib/typescript/src/games/ludo-king/LudoKingService.d.ts +0 -33
  1646. package/lib/typescript/src/games/ludo-king/LudoKingStore.d.ts +0 -34
  1647. package/lib/typescript/src/games/ludo-king/components/Dice.d.ts +0 -7
  1648. package/lib/typescript/src/games/ludo-king/components/GameBoard.d.ts +0 -7
  1649. package/lib/typescript/src/games/ludo-king/components/ScoreBoard.d.ts +0 -6
  1650. package/lib/typescript/src/games/maze-runner/MazeRunnerStore.d.ts +0 -62
  1651. package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts +0 -10
  1652. package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts +0 -33
  1653. package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +0 -24
  1654. package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts +0 -24
  1655. package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts +0 -9
  1656. package/lib/typescript/src/games/memory-match/MemoryMatchService.d.ts +0 -6
  1657. package/lib/typescript/src/games/memory-match/MemoryMatchStore.d.ts +0 -42
  1658. package/lib/typescript/src/games/memory-match/components/Card.d.ts +0 -6
  1659. package/lib/typescript/src/games/memory-match/components/GameBoard.d.ts +0 -6
  1660. package/lib/typescript/src/games/memory-match/components/ScoreBoard.d.ts +0 -6
  1661. package/lib/typescript/src/games/mine-sweeper/MineSweeperService.d.ts +0 -22
  1662. package/lib/typescript/src/games/mine-sweeper/MineSweeperStore.d.ts +0 -73
  1663. package/lib/typescript/src/games/mine-sweeper/components/GameArea.d.ts +0 -8
  1664. package/lib/typescript/src/games/mine-sweeper/components/ScoreBoard.d.ts +0 -6
  1665. package/lib/typescript/src/games/mob-control/MobControlService.d.ts +0 -74
  1666. package/lib/typescript/src/games/mob-control/MobControlStore.d.ts +0 -66
  1667. package/lib/typescript/src/games/mob-control/components/GameArea.d.ts +0 -11
  1668. package/lib/typescript/src/games/mob-control/components/ScoreBoard.d.ts +0 -6
  1669. package/lib/typescript/src/games/number-search/NumberSearchConstants.d.ts +0 -63
  1670. package/lib/typescript/src/games/number-search/NumberSearchService.d.ts +0 -34
  1671. package/lib/typescript/src/games/number-search/NumberSearchStore.d.ts +0 -70
  1672. package/lib/typescript/src/games/number-search/components/GameBoard.d.ts +0 -7
  1673. package/lib/typescript/src/games/number-search/components/NumberList.d.ts +0 -2
  1674. package/lib/typescript/src/games/number-search/components/ScoreBoard.d.ts +0 -6
  1675. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsService.d.ts +0 -67
  1676. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsStore.d.ts +0 -45
  1677. package/lib/typescript/src/games/nuts-and-bolts/components/GameBoard.d.ts +0 -7
  1678. package/lib/typescript/src/games/nuts-and-bolts/components/ScoreBoard.d.ts +0 -6
  1679. package/lib/typescript/src/games/pac-man/PacManService.d.ts +0 -73
  1680. package/lib/typescript/src/games/pac-man/PacManStore.d.ts +0 -89
  1681. package/lib/typescript/src/games/pac-man/components/GameCanvas.d.ts +0 -2
  1682. package/lib/typescript/src/games/pac-man/components/ScoreBoard.d.ts +0 -6
  1683. package/lib/typescript/src/games/paper-io/PaperIoService.d.ts +0 -70
  1684. package/lib/typescript/src/games/paper-io/PaperIoStore.d.ts +0 -51
  1685. package/lib/typescript/src/games/paper-io/components/GameArea.d.ts +0 -8
  1686. package/lib/typescript/src/games/paper-io/components/ScoreBoard.d.ts +0 -6
  1687. package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +0 -15
  1688. package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +0 -55
  1689. package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +0 -8
  1690. package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +0 -6
  1691. package/lib/typescript/src/games/pipe-connect/PipeConnectService.d.ts +0 -17
  1692. package/lib/typescript/src/games/pipe-connect/PipeConnectStore.d.ts +0 -31
  1693. package/lib/typescript/src/games/pipe-connect/components/GameArea.d.ts +0 -7
  1694. package/lib/typescript/src/games/pipe-connect/components/ScoreBoard.d.ts +0 -6
  1695. package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts +0 -30
  1696. package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +0 -33
  1697. package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts +0 -10
  1698. package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts +0 -10
  1699. package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +0 -6
  1700. package/lib/typescript/src/games/reversi/ReversiStore.d.ts +0 -46
  1701. package/lib/typescript/src/games/reversi/components/GameBoard.d.ts +0 -6
  1702. package/lib/typescript/src/games/reversi/components/ScoreBoard.d.ts +0 -6
  1703. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts +0 -6
  1704. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts +0 -38
  1705. package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts +0 -7
  1706. package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts +0 -6
  1707. package/lib/typescript/src/games/snake-3d/Snake3DService.d.ts +0 -29
  1708. package/lib/typescript/src/games/snake-3d/Snake3DStore.d.ts +0 -49
  1709. package/lib/typescript/src/games/snake-3d/components/GameGrid.d.ts +0 -2
  1710. package/lib/typescript/src/games/snake-3d/components/ScoreBoard.d.ts +0 -6
  1711. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersService.d.ts +0 -22
  1712. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersStore.d.ts +0 -40
  1713. package/lib/typescript/src/games/snakes-and-ladders/components/Dice.d.ts +0 -7
  1714. package/lib/typescript/src/games/snakes-and-ladders/components/GameBoard.d.ts +0 -2
  1715. package/lib/typescript/src/games/snakes-and-ladders/components/ScoreBoard.d.ts +0 -6
  1716. package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts +0 -117
  1717. package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts +0 -54
  1718. package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts +0 -9
  1719. package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts +0 -9
  1720. package/lib/typescript/src/games/space-fighter/components/GameBackground.d.ts +0 -6
  1721. package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +0 -6
  1722. package/lib/typescript/src/games/space-fighter/components/Spacecraft3D.d.ts +0 -11
  1723. package/lib/typescript/src/games/space-fighter/components/SpacecraftPath.d.ts +0 -9
  1724. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireService.d.ts +0 -23
  1725. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireStore.d.ts +0 -71
  1726. package/lib/typescript/src/games/spider-solitaire/components/Card.d.ts +0 -10
  1727. package/lib/typescript/src/games/spider-solitaire/components/CardPile.d.ts +0 -12
  1728. package/lib/typescript/src/games/spider-solitaire/components/ScoreBoard.d.ts +0 -6
  1729. package/lib/typescript/src/games/stack-tower/StackTowerService.d.ts +0 -51
  1730. package/lib/typescript/src/games/stack-tower/StackTowerStore.d.ts +0 -52
  1731. package/lib/typescript/src/games/stack-tower/components/GameArea.d.ts +0 -8
  1732. package/lib/typescript/src/games/stack-tower/components/ScoreBoard.d.ts +0 -6
  1733. package/lib/typescript/src/games/sudoku/SudokuService.d.ts +0 -24
  1734. package/lib/typescript/src/games/sudoku/SudokuStore.d.ts +0 -65
  1735. package/lib/typescript/src/games/sudoku/components/GameArea.d.ts +0 -8
  1736. package/lib/typescript/src/games/sudoku/components/ScoreBoard.d.ts +0 -6
  1737. package/lib/typescript/src/games/tangram/TangramService.d.ts +0 -6
  1738. package/lib/typescript/src/games/tangram/TangramStore.d.ts +0 -34
  1739. package/lib/typescript/src/games/tangram/components/GameBoard.d.ts +0 -7
  1740. package/lib/typescript/src/games/tangram/components/ScoreBoard.d.ts +0 -6
  1741. package/lib/typescript/src/games/tank-1990/Tank1990Service.d.ts +0 -80
  1742. package/lib/typescript/src/games/tank-1990/Tank1990Store.d.ts +0 -48
  1743. package/lib/typescript/src/games/tank-1990/components/Controls.d.ts +0 -2
  1744. package/lib/typescript/src/games/tank-1990/components/GameBoard.d.ts +0 -2
  1745. package/lib/typescript/src/games/tank-1990/components/ScoreBoard.d.ts +0 -6
  1746. package/lib/typescript/src/games/tic-tac-toe/TicTacToeService.d.ts +0 -0
  1747. package/lib/typescript/src/games/tic-tac-toe/TicTacToeStore.d.ts +0 -51
  1748. package/lib/typescript/src/games/tic-tac-toe/components/GameBoard.d.ts +0 -6
  1749. package/lib/typescript/src/games/tic-tac-toe/components/ScoreBoard.d.ts +0 -6
  1750. package/lib/typescript/src/games/tile-home/TileHomeService.d.ts +0 -1
  1751. package/lib/typescript/src/games/tile-home/TileHomeStore.d.ts +0 -57
  1752. package/lib/typescript/src/games/tile-home/components/AnimatingTile.d.ts +0 -9
  1753. package/lib/typescript/src/games/tile-home/components/FlyingTile.d.ts +0 -16
  1754. package/lib/typescript/src/games/tile-home/components/GameBoard.d.ts +0 -7
  1755. package/lib/typescript/src/games/tile-home/components/ScoreBoard.d.ts +0 -6
  1756. package/lib/typescript/src/games/tile-home/components/TileItem.d.ts +0 -11
  1757. package/lib/typescript/src/games/tile-home/components/TileSlot.d.ts +0 -7
  1758. package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts +0 -32
  1759. package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts +0 -39
  1760. package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts +0 -7
  1761. package/lib/typescript/src/games/whack-a-mole/components/GameGrid.d.ts +0 -10
  1762. package/lib/typescript/src/games/whack-a-mole/components/GameHole.d.ts +0 -11
  1763. package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts +0 -6
  1764. package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts +0 -6
  1765. package/lib/typescript/src/games/word-search/WordSearchConstants.d.ts +0 -63
  1766. package/lib/typescript/src/games/word-search/WordSearchService.d.ts +0 -34
  1767. package/lib/typescript/src/games/word-search/WordSearchStore.d.ts +0 -70
  1768. package/lib/typescript/src/games/word-search/components/GameBoard.d.ts +0 -7
  1769. package/lib/typescript/src/games/word-search/components/ScoreBoard.d.ts +0 -6
  1770. package/lib/typescript/src/games/word-search/components/WordList.d.ts +0 -2
  1771. package/lib/typescript/src/helpers/AnimatedScore.d.ts +0 -36
  1772. package/lib/typescript/src/helpers/AnimationFrame.d.ts +0 -40
  1773. package/lib/typescript/src/helpers/AnimationTracker.d.ts +0 -44
  1774. package/lib/typescript/src/helpers/BlastAnimation.d.ts +0 -16
  1775. package/lib/typescript/src/helpers/ErrorHandler.d.ts +0 -123
  1776. package/lib/typescript/src/helpers/GameBackgroundPattern.d.ts +0 -7
  1777. package/lib/typescript/src/helpers/GameControlButton.d.ts +0 -11
  1778. package/lib/typescript/src/helpers/GameOverModal.d.ts +0 -15
  1779. package/lib/typescript/src/helpers/GameTimer.d.ts +0 -26
  1780. package/lib/typescript/src/helpers/Icons.d.ts +0 -12
  1781. package/lib/typescript/src/helpers/ParticleBlast.d.ts +0 -11
  1782. package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts +0 -85
  1783. package/lib/typescript/src/helpers/assets/apple-fruit.d.ts +0 -4
  1784. package/lib/typescript/src/helpers/assets/avocado-item.d.ts +0 -4
  1785. package/lib/typescript/src/helpers/assets/banana-fruit.d.ts +0 -4
  1786. package/lib/typescript/src/helpers/assets/bomb-item.d.ts +0 -4
  1787. package/lib/typescript/src/helpers/assets/broccoli-item.d.ts +0 -4
  1788. package/lib/typescript/src/helpers/assets/cherries-fruit.d.ts +0 -4
  1789. package/lib/typescript/src/helpers/assets/donut-item.d.ts +0 -4
  1790. package/lib/typescript/src/helpers/assets/dragonfruit-item.d.ts +0 -4
  1791. package/lib/typescript/src/helpers/assets/fries-item.d.ts +0 -4
  1792. package/lib/typescript/src/helpers/assets/fruit-helpers.d.ts +0 -154
  1793. package/lib/typescript/src/helpers/assets/grapes-fruit.d.ts +0 -4
  1794. package/lib/typescript/src/helpers/assets/icecream-item.d.ts +0 -4
  1795. package/lib/typescript/src/helpers/assets/index.d.ts +0 -31
  1796. package/lib/typescript/src/helpers/assets/kiwi-fruit.d.ts +0 -4
  1797. package/lib/typescript/src/helpers/assets/mango-fruit.d.ts +0 -4
  1798. package/lib/typescript/src/helpers/assets/orange-fruit.d.ts +0 -4
  1799. package/lib/typescript/src/helpers/assets/papaya-fruit.d.ts +0 -4
  1800. package/lib/typescript/src/helpers/assets/papaya-full-fruit.d.ts +0 -4
  1801. package/lib/typescript/src/helpers/assets/peach-fruit.d.ts +0 -4
  1802. package/lib/typescript/src/helpers/assets/pineapple-fruit.d.ts +0 -4
  1803. package/lib/typescript/src/helpers/assets/pomegranate-fruit.d.ts +0 -4
  1804. package/lib/typescript/src/helpers/assets/pumpkin-fruit.d.ts +0 -4
  1805. package/lib/typescript/src/helpers/assets/raspberry-item.d.ts +0 -4
  1806. package/lib/typescript/src/helpers/assets/star-item.d.ts +0 -4
  1807. package/lib/typescript/src/helpers/assets/strawberry-fruit.d.ts +0 -4
  1808. package/lib/typescript/src/helpers/assets/watermelon-fruit.d.ts +0 -4
@@ -1 +1 @@
1
- "use strict";const _0x4a099e=_0xa9b9;function _0xa9b9(e,o){e-=211;const t=_0x2ab0();let a=t[e];if(void 0===_0xa9b9.zsCGLg){const e=function(e,o){let t,a,r=[],s=0,W="";for(e=function(e){let o="",t="";for(let t,a,r=0,s=0;a=e.charAt(s++);~a&&(t=r%4?64*t+a:a,r++%4)?o+=String.fromCharCode(255&t>>(-2*r&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++)r[a]=a;for(a=0;a<256;a++)s=(s+r[a]+o.charCodeAt(a%o.length))%256,t=r[a],r[a]=r[s],r[s]=t;a=0,s=0;for(let o=0;o<e.length;o++)a=(a+1)%256,s=(s+r[a])%256,t=r[a],r[a]=r[s],r[s]=t,W+=String.fromCharCode(e.charCodeAt(o)^r[(r[a]+r[s])%256]);return W};_0xa9b9.dPpYnf=e,_0xa9b9.kFSFXg={},_0xa9b9.zsCGLg=!0}const r=t[0];_0xa9b9.mmngqN!==r&&(_0xa9b9.kFSFXg={},_0xa9b9.mmngqN=r);const s=_0xa9b9.kFSFXg[e];return void 0===s?(void 0===_0xa9b9.zpeJJI&&(_0xa9b9.zpeJJI=!0),a=_0xa9b9.dPpYnf(a,o),_0xa9b9.kFSFXg[e]=a):a=s,a}!function(){const e=_0xa9b9,o=_0x2ab0();for(;;)try{if(597639==-parseInt(e(262,"EYNH"))/1+-parseInt(e(211,"T5mm"))/2*(parseInt(e(302,"FTi4"))/3)+parseInt(e(277,"%R!F"))/4+-parseInt(e(213,"kH60"))/5*(parseInt(e(275,"NL&&"))/6)+-parseInt(e(268,"x%eF"))/7*(parseInt(e(269,"AIvZ"))/8)+-parseInt(e(261,"4V71"))/9*(parseInt(e(230,"SRwg"))/10)+parseInt(e(227,"QZ%k"))/11)break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x530029,{useEffect,useRef,useCallback,useMemo}from"react";import{View,StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{useNumberSearchStore,useIsPlaying,useIsGameOver,useIsWin}from"./NumberSearchStore.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameBoard}from"./components/GameBoard.js";function _0x2ab0(){const e=["W7mkWQNcRa","WR3cGZqXWR9lrsxdMSkSmSkKma","WRXkzCovWO/dL1a","W6bmWQXkWQe","FSo+y8ohoCobWPrd","W5rZWQPP","kmkIsZpcJNW","ymo3WR4ku8o8","l1FdK8oJWPC","mmoZW69BWRW7r8oEFGy","rmoRWPNcM2NcRSkZWOZcHSkCpSkiaG","WPZdVZRdR8oBWRVcRmo6zhy7WOeE","amoTW5Tsydb8W6lcVmooma","ymoSW6XtWRa","W43cUx7cPmkhW6ldOq","ggJdGCoaWPq","kSouW5S5WRGoECoKvwyMlSkH","rNVdPCk2WOS7tW","WRBcJve9WRVcPI1hE8kaWPbUBa","pIhdNYRcGb/cLG","hSkbWRKUdhyCWOtdIG","W4C+kq","DmojWROaW4/cKmoGCMRdUmkApmkvW7RcT2lcUrG","W7ZdLgj2W6K","WQymsmk1ja","ymo7W7FdPHBcVCoYtW","W4VdLWPpcmkIvmoc","EqJcUCkNW7pcH8oEDNFdJNSbWRu","WQhcHmkMcMFcTqhcNSoVW5/cOW","iuNdS8oMWQNdLSkvt0RdP2ydWRBcNW","W6aKpCkdra","WRjEB8oWWOpdNvdcVG","WRW+A3BdGXjQWRe","v8kRWP0vpa9d","W4VdR8oE","W559uLBdIG","W5TPWQT+WR7dHLG","oSk3WQ0loei","WQxcSKLOW60","W7jPWPzBWRO","W7SJWOxdLeW","sqG0WQ5pgGet","ymoaWRJdSqbhks3dGmkFWQddHmoo","imoxyH5vW7pcM8o7BaNdMq","vSkXWPDknW5zW4q","WPqHWOhdJveAW7C","vSoGWPHuW6tcT8o6qK7dMSk5ECkH","qCo1CXTHWOFdJG","W4NcQxJcHCkwW63dOCo0","W53cUg3cPmkwW4VdTmo8wW","W4H9WR1OWRldHKVcRNj2","bSoUW65wWPmZsmos","aSkXW4BdHIVdUSkoWOJcNCkbcmk6","uXdcGNTqDsK","pLdcI0ZdNwBcJJDXee/dMG","t8ofW553vdOfWP3dHw4ZWQy","W6LRxfhdUJryWPK","lf3dRCo3WOhdGSkjBq","p8kODJpcMwFdR0q","W60miSkwW5ZcGb3cVgJdSCkJW542","pSoAW7nXW4W","lSocySonWPpdV1y","W6LVrwFdJYDjWP0","rSolW5fYvt5fW53dTx8zWPJcKLS","nSo7W6CTDI/dINpdGCoMoSo7FCoJ","rCoeWQC5Fa","oCkOsJm","WPXor8ouWOW","W7ddMrWeomk/vCkwW55NW6pdGmo0W4JdMa","W6rwh8o3ECoOvmkNW6dcJKPMWOFdKW","oaNcL3Hs","v8oBWP07fSoBBSk9","WOOSWPP4WPBdR2RcTW","zmkPzXhcPMKpqW","tHdcUbtdQSkQeq","eSogW7b/bSo+WOGFFCk6W7BcQ8kC","pCoUW6nBWO89smkxF1iatCkgWPJdR8oZhYlcQwS","vSoWWOrsW6tcQ8oz","ntzCng/cVmofhmoxbb3dLMRdOL7dLXroqZa","kLddQCo1WQ7dUCkyAuJdUG","W6tcSYBdN3zAWPeUW6ZcPSo8fa","kSkRtcdcHuFdTuyqWRy","WQNcMCkknGW","F8kdsSozWP7dQgJcQq","C3WOWPWRW7tcU8kmWR5ee2W","rXlcJGq","l8ozW5Xyiq","WRpcUh5BW5K","W7WqWQJcU8o0W4rU","W57cO2xcUmkwW6NdP8ousfWeWQ0H","WQpdPsvdW5a","E8o3CtTd"];return(_0x2ab0=function(){return e})()}import{NumberList}from"./components/NumberList.js";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x27327e}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 _0x4a20d7,jsxs as _0x3c8233}from"react/jsx-runtime";export const NumberSearch=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:a,onShare:r,onShareScreenshot:s,onShowLeaderboard:W,bannerAd:n})=>{const d="4V71",m=_0xa9b9,S={PszTD:"cancel",CqPsf:m(244,"v!5@"),JuOWa:function(e){return e()},WDgJy:function(e,o){return e(o)},dkSqW:m(250,"WoB["),zfpPZ:m(249,"NVEY"),XPuFz:function(e,o,t){return e(o,t)},FVwGJ:function(e,o){return e(o)},NZBuN:function(e,o){return e(o)},aeITd:function(e,o,t){return e(o,t)},oSwvI:function(e,o,t){return e(o,t)},GXaYC:function(e,o,t){return e(o,t)}},u=useIsPlaying(),i=useIsGameOver(),x=useIsWin(),f=useRef(!1),_=S[m(223,"u&ZT")](useRef,t);_[m(235,"Fg]p")]=t;const k=S[m(245,"%zcf")](useRef,e);k.current=e;const l=useCallback(e=>{const o=m;if(_[o(267,"5Yt1")]&&!f.current){const t=useNumberSearchStore[o(214,"#ma9")]();_[o(286,"SRwg")]({status:e,score:t.score[o(231,"NoT4")]()}),f.current=!0}},[]),{initializeGame:p,startGame:b,resetGame:R}=useMemo(()=>({initializeGame:useNumberSearchStore[m(254,"FLJa")]()[m(222,"[qAi")],startGame:useNumberSearchStore[m(291,"J*Ws")]()[m(299,"4V71")],resetGame:useNumberSearchStore.getState().resetGame}),[]);S[m(288,"%zcf")](useEffect,()=>{const e=m;if(e(240,"*Knd")===S[e(225,"zD]m")])return S[e(289,"SRwg")](p),()=>{const o=e;useNumberSearchStore[o(298,d)]()[o(270,"kH60")]&&!f[o(264,d)]&&l(S[o(285,"#ma9")]),R()};if(_0x287bf1.current&&!_0x18474f[e(246,"WoB[")]){const o=_0x1c0dbc.getState();_0x4ba938.current({status:_0x5caf62,score:o[e(273,"%NFP")][e(216,"oXrA")]()}),_0x455b3d[e(219,"Qq!a")]=!0}},[p,R]);const G=useRef(!1);S[m(218,")V72")](useEffect,()=>{const e=m;i&&!G.current&&S[e(290,"Ki&k")](l,x?e(284,"0r1Q"):S[e(258,"%R!F")]),G[e(252,"zD]m")]=i,!i&&(S.zfpPZ===e(228,"T5mm")?f[e(283,"EYNH")]=!1:_0x393fb0(_0x567249?e(271,"QAL("):e(255,"SRwg")))},[i,x,l]);const C=useCallback(()=>{const e=m;f.current=!1,b(),S[e(253,"SRwg")](playSound,GAME_SOUNDS.NUMBER_SEARCH[e(265,"%R!F")],k[e(297,"NVEY")].enableSounds),playHaptic(HapticType[e(287,"kH60")],k.current[e(233,"v!5@")])},[b]),N=S[m(248,"%E$7")](useCallback,()=>{const e=m;l(S[e(280,"QAL(")]),R(),S[e(289,"SRwg")](p)},[l,R,p]),h=useCallback(()=>{a?.(),R(),p()},[R,p,a]),g=e?.offset??0,P=S.GXaYC(useMemo,()=>({isVisible:i,score:useNumberSearchStore.getState()[m(274,"QZ%k")],onPlayAgain:h,buttonText:x?m(278,"*Knd"):m(259,"iLs8"),scoreLabel:x?m(276,"aHOl"):"Game Over",title:x?m(272,"Fg]p"):m(229,"u&ZT"),message:x?"Great number hunting!":m(234,"iLs8")}),[i,h,x]),O=useMemo(()=>({gameId:GAME_IDS[m(266,"iLs8")],settings:e,onSettingsChange:o}),[e,o]),y={};y[m(300,"SRwg")]=g||0;const F=useMemo(()=>[styles[m(292,"2ZI5")],y],[g]),v=useMemo(()=>({isPlaying:u,gameOver:i,onStartGame:C,onStopGame:N,onShare:r,onShowLeaderboard:W,startButtonSubtext:m(236,"%amy")}),[u,i,C,N,r,W]),I={};I.settings=e;const B={...v},J={...P};J[m(232,"aa(^")]=s,J.bannerAd=n;const H={...O};return _0x4a20d7(GestureHandlerRootView,{style:styles[m(224,"oXrA")],children:S[m(263,"[H0N")](_0x3c8233,_0x27327e,{offset:g,children:[_0x4a20d7(ScoreBoard,{offset:g}),_0x4a20d7(View,{style:F,children:_0x3c8233(View,{style:styles[m(220,"#ma9")],children:[_0x4a20d7(NumberList,{}),_0x4a20d7(GameBoard,I)]})}),_0x4a20d7(GameControlButton,B),_0x4a20d7(GameOverModal,J),_0x4a20d7(GameSettingsModal,H)]})})};const _0x3a7898={};_0x3a7898[_0x4a099e(243,"aa(^")]=1,_0x3a7898[_0x4a099e(226,"aHOl")]=BACKGROUND_COLOR;const _0x3b7aff={flex:1};_0x3b7aff[_0x4a099e(279,"%R!F")]="center",_0x3b7aff[_0x4a099e(237,"%R!F")]=_0x4a099e(257,"u&ZT"),_0x3b7aff[_0x4a099e(260,"FTi4")]=_0x4a099e(301,"iLs8");const _0x818587={};_0x818587[_0x4a099e(239,"oXrA")]=_0x4a099e(256,"oXrA"),_0x818587[_0x4a099e(247,"4V71")]=_0x4a099e(294,"EYNH"),_0x818587[_0x4a099e(281,"zD]m")]=500;const _0x3ee491={};_0x3ee491.root=_0x3a7898,_0x3ee491[_0x4a099e(296,"Fg]p")]=_0x3b7aff,_0x3ee491[_0x4a099e(215,"%R!F")]=_0x818587;const styles=StyleSheet.create(_0x3ee491);NumberSearch[_0x4a099e(293,"JrrI")]=_0x4a099e(242,"zOBp");
1
+ "use strict";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{createSearchGame}from"../search-grid/SearchGrid.js";import{NUMBERS}from"./NumberSearchNumbers.js";export const NumberSearch=createSearchGame({gameId:GAME_IDS.NUMBER_SEARCH,list:NUMBERS,alphabet:"0123456789",sounds:GAME_SOUNDS.NUMBER_SEARCH,winTitle:"ALL NUMBERS FOUND!",winMessage:"Great number hunting!",startSubtext:"Find hidden numbers!",variant:"number",displayName:"NumberSearch"});
@@ -0,0 +1 @@
1
+ "use strict";export const NUMBERS=["1234","2345","3456","4567","5678","6789","7890","1111","2222","3333","4444","5555","6666","7777","8888","9999","1010","2020","3030","4040","5050","6060","7070","8080","9090","1212","1313","1414","1515","1616","1717","1818","1919","2121","2323","2424","2525","2626","2727","2828","2929","3131","3232","3434","3535","3636","3737","3838","3939","4141","4242","4343","4545","4646","4747","4848","4949","5151","5252","5353","5454","5656","5757","5858","5959","6161","6262","6363","6464","6565","6767","6868","6969","7171","7272","7373","7474","7575","7676","7878","7979","8181","8282","8383","8484","8585","8686","8787","8989","9191","9292","9393","9494","9595","9696","9797","9898","1000","2000","3000","4000","5000","6000","7000","8000","9000","1001","2002","3003","4004","5005","6006","7007","8008","9009","1122","2233","3344","4455","5566","6677","7788","8899","1100","2200","3300","4400","5500","6600","7700","8800","9900","1221","2332","3443","4554","5665","6776","7887","8998","1331","2442","3553","4664","5775","6886","7997","1248","2468","1357","3579","1369","2481","3692","4826","5937","1470","2580","3690","1590","2460","3570","4680","5790","6810","7920","8130","9240","1024","2048","4096","8192","1536","3072","6144","1025","2050","3075","4100","5125","12345","23456","34567","45678","56789","67890","11111","22222","33333","44444","55555","66666","77777","88888","99999","10101","20202","30303","40404","50505","60606","70707","80808","90909","12121","13131","14141","15151","16161","17171","18181","19191","21212","23232","24242","25252","26262","27272","28282","29292","31313","32323","34343","35353","36363","37373","38383","39393","41414","42424","43434","45454","46464","47474","48484","49494","51515","52525","53535","54545","56565","57575","58585","59595","10001","20002","30003","40004","50005","60006","70007","80008","90009","10010","20020","30030","40040","50050","60060","70070","11011","22022","33033","44044","55055","66066","77077","88088","99099","11211","12321","13431","14541","15651","16761","17871","11221","22332","33443","44554","55665","66776","77887","88998","10203","20304","30405","40506","50607","60708","70809","80910","13579","24680","97531","86420","12468","13692","24816","36924","10000","20000","30000","40000","50000","60000","70000","80000","90000","10100","20200","30300","40400","50500","60600","70700","10240","20480","40960","81920","15360","30720","61440","12800","25600","51200","10250","20500","30750","41000","51250","61500","123456","234567","345678","456789","567890","111111","222222","333333","444444","555555","666666","777777","888888","999999","101010","202020","303030","404040","505050","606060","707070","808080","909090","121212","131313","141414","151515","161616","171717","181818","191919","212121","232323","242424","252525","262626","272727","282828","292929","313131","323232","343434","353535","363636","373737","383838","393939","414141","424242","434343","454545","464646","474747","484848","494949","515151","525252","535353","545454","565656","575757","585858","595959","616161","626262","636363","646464","656565","676767","686868","696969","717171","727272","737373","747474","757575","767676","787878","797979","818181","828282","838383","848484","858585","868686","878787","898989","919191","929292","939393","949494","959595","969696","979797","989898","100001","200002","300003","400004","500005","600006","700007","800008","900009","100100","200200","300300","400400","500500","600600","700700","800800","900900","110011","220022","330033","440044","550055","660066","770077","880088","990099","112211","123321","134431","145541","156651","167761","178871","189981","112233","223344","334455","445566","556677","667788","778899","102030","203040","304050","405060","506070","607080","708090","135790","246800","975310","864200","124680","136920","248160","369240","100000","200000","300000","400000","500000","600000","700000","800000","900000","101000","202000","303000","404000","505000","606000","707000","102400","204800","409600","819200","153600","307200","614400","128000","256000","512000","102500","205000","307500","410000","512500","615000","111222","222333","333444","444555","555666","666777","777888","888999","100200","200300","300400","400500","500600","600700","700800","800900","110110","220220","330330","440440","550550","660660","770770","880880","990990","123123","234234","345345","456456","567567","678678","789789","321321","432432","543543","654654","765765","876876","987987","111000","222000","333000","444000","555000","666000","777000","888000","999000","100010","200020","300030","400040","500050","600060","700070","800080","900090","112112","113113","114114","115115","116116","117117","118118","119119","121121","131131","141141","151151","161161","171171","181181","191191","101101","102102","103103","104104","105105","106106","107107","108108","109109","246810","135791","112358","132134","314159","271828","161803","141421","173205","223606","100101","200201","300301","400401","500501","600601","700701","800801","900901"];
@@ -1 +1 @@
1
- "use strict";const _0x2fc9ec=_0x509b;!function(){const e=_0x509b,t=_0x45a8();for(;;)try{if(946893==parseInt(e(516,"0rb1"))/1+parseInt(e(513,"]9dz"))/2*(parseInt(e(504,"0t%O"))/3)+-parseInt(e(556,"GPzm"))/4+parseInt(e(490,"NE&o"))/5*(-parseInt(e(517,"%WO0"))/6)+parseInt(e(503,"UZgk"))/7*(parseInt(e(510,"UPsd"))/8)+parseInt(e(525,"1c7#"))/9+-parseInt(e(535,"ky%O"))/10)break;t.push(t.shift())}catch(e){t.push(t.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x4ea7a5,{useEffect,useRef,useCallback,useMemo}from"react";import{View,StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{useNutsAndBoltsStore,useIsPlaying,useIsGameOver,useIsWin,useScore}from"./NutsAndBoltsStore.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameBoard}from"./components/GameBoard.js";function _0x45a8(){const e=["BmkammowDv3cRCoO","qbO5yCklWPpdHG","gSkIWQBcVarhW6S","j8kbWOudsslcVvBdPXFdPI3dNq","o8oWW7hdGmoeW6i","WRLAWQnXWROWdCkzWO9hW6S","W7BdVL3cTmkXWOe","WRddJ8ohWR/cHmkt","df3dRColW44","mbi6v8oZxSkr","dCottwOmW45v","hSkYWQdcNrviW6VdGa","WOf+WRRdKWpcVGq3","zaNcNKxcKcSq","CCkVz23dNc7cMxG+","wSozsNm","WP3dU8o9WO/cVSk+paXpfhHEW4RdQq","WPHvr8ozW6m","CSotW59egMi","kmobW4jhr8oHW4q","C3BdKmotCL8yWOX8W4H9WP3cN8oL","WO5eWOL7iSofW5NcPmkNmtxdOMLMd1VcKCkCWRVdSG","jmkeWOedsIddUKxdQHhdOYS","gf/dR8oCW6RdGhVcMq","WRBdGmoiWR7cJCkAoILGiL5XW60","WPxdKmovxgK","WOhdK8o4BNeSWQBdU2pcM8kjW48","FSkLW6pdPmoQW6hdQeq","g8kwW7pdGMyL","dCo2v3PnWOZdJa","WOhcOseoW7pcPaTO","WRHnWPOOnCoq","kYZcGmkFiWDcWOPTW4nFWPxcGW","mSo4lw/dPWBcLwWo","cmklW7/dJwyLWQ3dRmkhW7njW5hcLG","tcGBD8k0","lXxdG8kscSk7pW","ptldO8kiaa","nGKPr8o6vCk2WO7dNHmArG","ymk3W4pcGSk+m8oUW74","o8ovWQ5KFa","nCoWWQxcPmkXW6NdMwzIW4jP","WPJdRsZcLCoJWO7cS8oVxmkpva","kSkdWPxcNdu","hdxdQ8k6i8kqAZnHWQldLHCLnW","sCoqWQhcMYnWW67dVSk1W5DwW7hcVa","W7m0W4ahsxdcS3nsi2/cGW","W5RdL3dcMSkkWOxdP8k/WQpcTq","hmkosK48udZcKa","j8oPWQj8W7bbWOZdICof","EmoArh5SsY7cHXpcVCk1","jmoGW4xcPCk6dmoPW43dVGeQfMi","hCodW6riWRpdRXa","WO/dJmkj","rG3cTSkjWPpcIIRcTMukw0tcUW","Cmk+DxRdNc7cMxG+","raO/qmkAWPZdHHq","BCk8WPJdU8o2uCkVW4BdRbupnfi","W6tcSfFdGCkX","yCoxW5vufN7dRKhdOqq","W7XNWOlcLbzSnfr7","gSoSDNXAWOVdLHu","W5BcVYaTW6jtrSoVpCk2r3tdVYaVWPBcSa","jmozWP1eBG","z8k0W6eVWRa0W5NcLmoiW4dcRCkhrSoH","nmoSi8kVW6WWWQlcRCoDWP1KWRm2","EtKnWQRcKa","WPVdKmkvwCkMW7aa","CaWoWPlcUCoqmxq","WP/dK8o2z1WNW6ldQMpcM8klW5NcNLe","psKyWP4dF8oDW6PjW5FcMh/dHmkfBCkSa2m","mayMrSoZxa","vHhcHmoLWOVcO8kBW69k","W5/dKCkvlmooW70NWPzRyCo5W5BcJ8o9","WOL5WRhdHsFcUa","g8k4WQZdOW9gW7hdGa","WQpdICo/Ea","W4itWPaTW4XSW6e","jmoEWOnXW6S","qqaZpSkaWPldNbq","nK7dLvdcUIOjffW","oa5CWPy"];return(_0x45a8=function(){return e})()}import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0xa3a7c2}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 _0x44cf30,jsxs as _0x32f078}from"react/jsx-runtime";export const NutsAndBolts=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:t,onEndGame:o,onReplayGame:n,onShare:s,onShareScreenshot:r,onShowLeaderboard:a,bannerAd:W})=>{const d=_0x509b,i={oGPdZ:d(560,"aaoK"),kTmVL:function(e,t){return e(t)},GczXM:function(e,t,o){return e(t,o)},ZAglI:function(e,t){return e(t)},ouaTf:function(e){return e()},wzggB:function(e,t){return e(t)},qRRho:function(e,t,o){return e(t,o)},ZvYAY:function(e,t,o){return e(t,o)},pyRtt:function(e,t,o){return e(t,o)}},m=useIsPlaying(),u=useIsGameOver(),x=useIsWin(),f=i[d(534,"7iAN")](useScore),S=useRef(!1),l=useRef(e);l.current=e;const k=useRef(o);k.current=o;const _=useCallback(e=>{const t=d;if(k[t(548,"1AP)")]&&!S[t(500,"tYbU")]){const o=useNutsAndBoltsStore.getState();k[t(507,"HIMV")]({status:e,score:o[t(561,"1c7#")][t(532,"tYbU")]()}),S.current=!0}},[]);useEffect(()=>(useNutsAndBoltsStore.getState().initializeGame(),()=>{const e=_0x509b,t=useNutsAndBoltsStore[e(527,"ZeXg")]();t.isPlaying&&!S[e(562,"nkvL")]&&_(i[e(506,"ZeXg")]),t[e(485,"0t%O")]()}),[]);const p=i[d(488,"Bko)")](useRef,!1);i[d(549,"ky%O")](useEffect,()=>{const e=d;u&&!p[e(554,"ZeXg")]&&i[e(537,"W!OS")](_,x?e(524,"05wI"):e(547,"KI2Z")),p[e(555,"^N8@")]=u,!u&&(S[e(538,"05wI")]=!1)},[u,x,_]);const G=i[d(496,"KI2Z")](useCallback,()=>{const e=d;S[e(523,"4[PH")]=!1,useNutsAndBoltsStore[e(501,"bqDD")]()[e(526,"0t%O")](),playSound(GAME_SOUNDS[e(544,"@w]f")][e(514,"^N8@")],l.current[e(509,"nkvL")]),i.GczXM(playHaptic,HapticType[e(559,"B7cH")],l[e(563,"O&t]")][e(495,"aaoK")])},[]),C=useCallback(()=>{const e=d;i[e(529,"l3Z^")](_,e(542,"nkvL"));const t=useNutsAndBoltsStore.getState();t[e(531,"T)w#")](),t[e(491,"UZgk")]()},[_]),O=useCallback(()=>{const e=d;n?.(),S[e(484,"NV)x")]=!1;const t=useNutsAndBoltsStore[e(482,"^N8@")]();t[e(520,"ky%O")](),t.initializeGame()},[n]),h=e?.[d(502,"mxGe")]??0,P=useMemo(()=>({isVisible:u,score:f,onPlayAgain:O,buttonText:x?d(521,"1zfS"):"Try Again!",scoreLabel:x?d(540,"KI2Z"):d(543,"JtFC"),title:x?d(515,"HIMV"):d(553,"M!(!"),message:x?d(541,"*Z#L"):d(492,"mxGe")}),[u,f,O,x]),b=useMemo(()=>({gameId:GAME_IDS[d(487,"aaoK")],settings:e,onSettingsChange:t}),[e,t]),g={};g[d(530,"GPzm")]=h||0;const N=useMemo(()=>[styles.centerWrapper,g],[h]),R=useMemo(()=>({isPlaying:m,gameOver:u,onStartGame:G,onStopGame:C,onShare:s,onShowLeaderboard:a,startButtonSubtext:"Unscrew the planks!"}),[m,u,G,C,s,a]),B={};B[d(545,"z4^i")]=h;const I={};I[d(498,"xTfM")]=e;const M={...R},v={...P};v.onShare=r,v[d(539,"W!OS")]=W;const y={...b};return _0x44cf30(GestureHandlerRootView,{style:styles[d(486,"1zfS")],children:i[d(511,"7iAN")](_0x32f078,_0xa3a7c2,{children:[i[d(508,"HIMV")](_0x44cf30,ScoreBoard,B),_0x44cf30(View,{style:N,children:_0x44cf30(View,{style:styles[d(483,"z4^i")],children:_0x44cf30(GameBoard,I)})}),_0x44cf30(GameControlButton,M),_0x44cf30(GameOverModal,v),_0x44cf30(GameSettingsModal,y)]})})};const _0x240203={flex:1};_0x240203.backgroundColor=BACKGROUND_COLOR;const _0x82a2ce={flex:1,justifyContent:"center"};_0x82a2ce.alignItems=_0x2fc9ec(557,"sG8m"),_0x82a2ce[_0x2fc9ec(522,"UPsd")]=_0x2fc9ec(550,"ZeXg");const _0xc8a1b6={};function _0x509b(e,t){e-=482;const o=_0x45a8();let n=o[e];if(void 0===_0x509b.qnhQkU){const e=function(e,t){let o,n,s=[],r=0,a="";for(e=function(e){let t="",o="";for(let o,n,s=0,r=0;n=e.charAt(r++);~n&&(o=s%4?64*o+n:n,s++%4)?t+=String.fromCharCode(255&o>>(-2*s&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++)s[n]=n;for(n=0;n<256;n++)r=(r+s[n]+t.charCodeAt(n%t.length))%256,o=s[n],s[n]=s[r],s[r]=o;n=0,r=0;for(let t=0;t<e.length;t++)n=(n+1)%256,r=(r+s[n])%256,o=s[n],s[n]=s[r],s[r]=o,a+=String.fromCharCode(e.charCodeAt(t)^s[(s[n]+s[r])%256]);return a};_0x509b.gbvNYN=e,_0x509b.uGirgC={},_0x509b.qnhQkU=!0}const s=o[0];_0x509b.hqYtQO!==s&&(_0x509b.uGirgC={},_0x509b.hqYtQO=s);const r=_0x509b.uGirgC[e];return void 0===r?(void 0===_0x509b.eTpPSj&&(_0x509b.eTpPSj=!0),n=_0x509b.gbvNYN(n,t),_0x509b.uGirgC[e]=n):n=r,n}_0xc8a1b6[_0x2fc9ec(518,"B7cH")]=_0x2fc9ec(489,"GPzm"),_0xc8a1b6[_0x2fc9ec(533,"5L6M")]=15,_0xc8a1b6[_0x2fc9ec(505,"0rb1")]=_0x2fc9ec(546,"^N8@");const _0x388e8a={};_0x388e8a[_0x2fc9ec(552,"yG!%")]=_0x240203,_0x388e8a.centerWrapper=_0x82a2ce,_0x388e8a[_0x2fc9ec(494,"1c7#")]=_0xc8a1b6;const styles=StyleSheet[_0x2fc9ec(499,"0rb1")](_0x388e8a);NutsAndBolts[_0x2fc9ec(558,"$xMU")]=_0x2fc9ec(497,"KI2Z");
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{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{textColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,LIGHT,TIME_LIMIT}from"./NutsAndBoltsConstants.js";import{createGame,dispose,reset,setLayout,setTheme,start,tap,tick}from"./NutsAndBoltsGame.js";import{jsx as _0x5e1389}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.NUTS_AND_BOLTS,CLASSIC_TEXT="#FFFFFF",FEEDBACK={select:{sound:SOUNDS.SELECT,haptic:HapticType.LIGHT},place:{sound:SOUNDS.PLACE,haptic:HapticType.MEDIUM},complete:{sound:SOUNDS.COMPLETE,haptic:HapticType.SUCCESS}};export const NutsAndBolts=engineGame(GAME_IDS.NUTS_AND_BOLTS,e=>{const[t,s]=useLiveState(0),[a,o]=useLiveState(TIME_LIMIT),[i,n]=useLiveState(null),{game:r,theme:m,status:S,screen:p,gameOver:u}=useEngineGame(e,{gameId:GAME_IDS.NUTS_AND_BOLTS,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,a)=>{const o=getLayout(t,s,a);return setLayout(e,o),o.boardWidth},tap:tap,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.MEDIUM),onOver:(e,t)=>{"win"!==t&&e(SOUNDS.GAME_OVER,HapticType.HEAVY)},wire:(e,t)=>{e.onScore=s,e.onTime=o,e.onPlanks=n,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}}),E="classic"===m.mode?"#FFFFFF":void 0;return _0x5e1389(EngineGameScreen,{...p,light:LIGHT,columns:[textColumn("PLANKS",i??r.planks.length,E),textColumn("SCORE",t.toLocaleString(),E),textColumn("TIMER",formatTime(a),E)],subtext:"Unscrew the planks!",gameOver:u({title:"win"===S?"PUZZLE SOLVED!":"TIME UP!",message:"win"===S?"All bolts matched!":"You ran out of time!",scoreLabel:"win"===S?"Puzzle Solved!":"Game Over",score:t,buttonText:"win"===S?"Play Again!":"Try Again!"})})});
@@ -1 +1 @@
1
- "use strict";const _0x3e397c=_0x1a03;function _0x558d(){const W=["W7ddNCkHW40NjY7cVCkuyNpcHCojFIuiW419","j2PWhfNdJXXfW4BcSri4","W5a6mmoADu1WuCkuW6nJD8o/cs9oD8osW4G","s8owW7ZdUmkEW57dTa","pmoWqb41WPC7F2K","a8oAmCkNW6dcVCkyW6G8W6HlW7G","WPxdIeLumvhcRrm","h8kHv8kEk8kSW6bmdmouWPi9ACowqdn/vmkWtSoYW4ldV8om","pXWdpHGsbG","WO4jWPfajZFcLCkvtvXdhSo+","W6ldKW7dUSoQn34","WPujW4ddJ8osWQxcP8kj","qc3cHxTItCk4","nG1fwmoXWRC5","EtJcSmoaWRrszSomWPXL","g8oLW6zzuKvHWPyiW7GUW5vAiW","i099WQldIqCDWONcKwhcRCo1WRpcVmk+chddS8k6W6BcLSofzv8","nmkTW6NdVmoDDXWOWORdTq","BmkOqsFcHahcMq","WOJcHt7dGGeSW77cV3BdTtNcImoaAW","W6hcVSkBWOGYWPVcPeSXWPfJW7O","vglcLaWKkmoe","vYRdSmkAfCoUeq","W5/dJmkup8k3j3ldLCkzdCoaWOxcJYS5WPNcQG","WPlcTmkCWObjW7ZcSW","dCkHsZFdRh7dVdJcImkWceZdP8kimJy3","W5FcVmoPWPPBW5SWbeXMwhPTWQfajf9Opa","Amo9W49YWRddQmko","emkfW7BdUCoqjJHJbSklW4hcS2K","k28pmb0ub8kfwSkYtSk8","n3/cMYXMW6pdGmkvESoihdBdJSoE","CCo8WOFcNCkKt1G","nmo1WQ5/qg/cHvXHaILCWOPSW4OFjeuobmkSlCo1","zSkXnh7cQ3u0W5vIAx/cVSkDW77cNrHWuX4","FCkigX/cTIFcJNK9WRTmWPyuW7/cR8oDWQ3cTSoyn8oTCxBdHCkL","W6BdVCkauwK1W50WeG3cKa","gSkfW7VdRSolpdb2emkoW5FcRMzyWPZcMCoA","W5ZdLCkUDr5uWQbeEMldTCkkvCozh8kzWR3dNdddKCogWOD8WOVdKW","WQdcVuDAW7mJCSkWW5HxW4xdNq","oCooW4v2msmfW6vVWP5AWRa0i8ojaq/cTGfYhqq","xLxdHSoTbmo0WPy","WQZcHmk8zKldKSoarCk7vrhdTCokWPjppqC","WPhdNhVcG8ksw3rOW5/dHCoiW7roW5C","k1xcIaGnoCofqSk6WP4","WRFdI8kramkDeuK","vcRdSh5KtCoKqCk9WQq8ea","nG5fimo8W4ba","E8kadSouqmkRW5BcOhDtbSkCvwecqmoTWPDEWPBdPN7dJmoBWQi","WQtdGSkAW6XsWRzu","nNLflmoXW4m5","vgqbecldKMq","i099WQldIqqrWORcKwhcRSoXWRpcVmk+d3ZdQSk2W7BcImoABL8","WRdcS0fxW7aTjW","emkfW7VdV8olkI1UhCkaW53cQwTlWOFcKmomW67cHa","W6ZdVCkaqgKPW4aLeXdcMmo9l8kHA8oKW4u","uee0WROUW7LzpwCzW7K4WPSHzMVdKw5eWQfD","WOhdTSkvWR5lhSkS","W6JdGmkKW4u5jZ4","W73dP8k3emousbBcQSoHAmkNW73dR0joW7/dJtOI","cCoWWRSFW5NcM8kkqgNcSmoSW6vEC2K","WOpdN3BcMCkgs2LJW4NdN8owW6roW5a","WQtdH8kqW6mOWRnE","W6ZdVCkaqgKYW50JeWpcGW","jN9nimo+W4e1WO5RDSohWORcRW","tH4hAIhcPbnwW77cNbu9","WQZcKYTOrCodcq","f8osr8kGW6pcVmop","qfVdTaXIpmkW","W6NdVJhcPXPoWOC","W68aW6HqpsBdOW","W6pcT1njcLhcTJFdM8okW6OLimoDWPa3","ygKxWOLcWPaRxHvUWOXg","s8oqW7ZcImoPW5NcGa","WQlcVKLxW7eLi8oVW6LKW6hdQbaE","DSkqWP5oW6tcGMJcIW","mtFcNmknBmo0yCohWP7cTCoO","lmkPpZJdMfpdVq","xHD7uNr0dCk9CmkxtmkQfG","WOaiWR/dSNrmyahdUrnBWPergmkyWPy","xHD7uNr1aCk/AmklxCkReSoXCvpdNSo2W44","WPhdNhVcG8ksw2POW4tdHmooW7HnW4KYdfy","tCkGnsRdGuFdSGfoW5C3W6nSWOC","ex3cPIX6tCkSmSoEW7PvvZJcOCkSW75uW44","DSkqWPniW7/cJM/cGmoelcPtWQ7cQ8kjCmk2bW","W7hcTf5thLZcQsBdNSoAW7W+o8oe","vbD7q3rJhmkNzCkjr8kScmo6zL4","WRVcUCoSrCoftWNdImk/nSoSWPJcIG","W6dcJ8oPW5WKE8omW4KBWOdcPq1D","W6hdRbmoW6GLo8o/WP4FWPxcIhH9AI9oDGK","W4RdTCkpW6Lqr1ldHCoNcGJdT8k0hKX9WRaCemo1bmk/uL8","WOJcHt7dGGe9W7lcV2xdRY3cLSofB8o9W4q","emkfW7VdV8olkI1UhCkDW4hcS2LgWOZcMCoD","W6lcQaldTCoHpaq","zSo6W6hdOSoWkZPi","s8kOimoHn8okWQBdMqqGEmoMna","CM0PWOddKWuy","WR0kW6xcNbJcM8odW6vdeCohWRVdMJbAvG","f8oDnCkJW6BcUSom","WPWkWPXAmZVcMmkgvuLogmoNzq","Dc3dGxv/W6VdHmkjhCkNEeRcQSkLEbrBWOCoiXq","WRZcRIPciMzG","x8kJodddLuRdSXnfW5qU","bZFdPZFdO8oGjHpcJa","WRZcRYHfjHSt","x8o+W5P+j27dPq","qfNdVaXQtCkW","WPzKA8kpzePVm8ocWQeKaSkg","WPilWRldQgbaBrldOXrzWPOAcCkfWPKDkWixpbm","rSk4WR19WOJdRX/dUCk3xLeOW5ZdMmoVa8oaDZTGgmoeuHzh","WP8jW4ddNSosWQtcQ8kiW5SUfsqXW74RW7dcNbCSWR4P","bJ3dPY/dO8oGkGxcLIn/oCoaWQCeWQjyga","b8kHsYBdRgpdQcJcHmk3ba","kSkKW7ZdSCoQWRVcISowzeO","W6NcJdtdK2PkW7m","gSkcW53dM8kfW5VdSmk2bI7cNmoQrZ7dJqv8rwRcL3bNW7NdTSoG","W6dcGCo2W40KE8oFW4mkWPa","W7lcOWRdTmoUmWHGW5VdHmoDW5v7","W7NcVCkwWOmMWOhcQKaLWPf/W61+sW","W4xcV8oKWObpW5CJf1zHwNfMWQzDl01MmLO","WQZcHmk8zKldGSoar8kWqXpdR8olWOHxkbRcPG","WR4HWR91ufBdOmoPpJS9yCkzEe3cPJLjW78tucddSIq","k1xcIaGnomoyrSk8WPCQnv3dJmodWPGVWQddRx3dS8kUWO14","h8kIrI3dUg7dOtpcI8kJffO","kmoZWQ9/qgBcLev6fW"];return(_0x558d=function(){return W})()}!function(){const W="q8IP",e=_0x1a03,d=_0x558d();for(;;)try{if(387903==-parseInt(e(577,"r)fT"))/1+parseInt(e(512,"R3Dn"))/2+-parseInt(e(601,"aYVT"))/3+parseInt(e(610,W))/4*(-parseInt(e(541,"&ijD"))/5)+parseInt(e(564,"Smwo"))/6*(-parseInt(e(593,"Go@u"))/7)+parseInt(e(616,"C(s@"))/8*(parseInt(e(534,"C(s@"))/9)+parseInt(e(521,W))/10)break;d.push(d.shift())}catch(W){d.push(d.shift())}}();import{PRIMARY_COLOR,BACKGROUND_COLOR}from"../../services/GamesConstants.js";const _0x5ed928={};_0x5ed928[_0x3e397c(560,"j3DY")]=BACKGROUND_COLOR,_0x5ed928[_0x3e397c(505,"o1)a")]=PRIMARY_COLOR,_0x5ed928[_0x3e397c(522,"S7]5")]=_0x3e397c(609,"He9h"),_0x5ed928[_0x3e397c(519,"on4$")]=_0x3e397c(619,"Rluz"),_0x5ed928.BOARD_INNER="rgba(255, 255, 255, 0.01)",_0x5ed928[_0x3e397c(508,"Smwo")]="#D8D8D8",_0x5ed928.BOLT_OUTER_FACE=_0x3e397c(585,"CsCu"),_0x5ed928[_0x3e397c(502,"He9h")]=_0x3e397c(509,"j)Ge"),_0x5ed928[_0x3e397c(597,"A&dP")]=_0x3e397c(506,"C(s@"),_0x5ed928[_0x3e397c(525,"aYVT")]="#C0C0C0",_0x5ed928[_0x3e397c(591,"m)rT")]="#909090",_0x5ed928[_0x3e397c(518,"K@7E")]=_0x3e397c(603,"&ijD"),_0x5ed928[_0x3e397c(507,"I78y")]=_0x3e397c(548,"g$2]"),_0x5ed928[_0x3e397c(538,"m)rT")]=_0x3e397c(498,"R3Dn"),_0x5ed928[_0x3e397c(567,"A1M4")]=_0x3e397c(500,"q8IP"),_0x5ed928[_0x3e397c(576,"uC8F")]=_0x3e397c(504,"ogMd"),_0x5ed928[_0x3e397c(535,"ogMd")]="rgba(255, 255, 255, 0.85)",_0x5ed928[_0x3e397c(529,"@tmI")]=_0x3e397c(556,"S7]5"),_0x5ed928[_0x3e397c(510,"He9h")]="rgba(0, 0, 0, 0.12)",_0x5ed928[_0x3e397c(558,"&$bj")]=_0x3e397c(561,"m)rT"),_0x5ed928[_0x3e397c(501,"&ijD")]="#FFD700",_0x5ed928[_0x3e397c(557,"@%rH")]=_0x3e397c(599,"I78y"),_0x5ed928[_0x3e397c(581,"0@lY")]="rgba(255, 215, 0, 0.45)",_0x5ed928[_0x3e397c(539,"&ijD")]=_0x3e397c(543,"HA1j"),_0x5ed928[_0x3e397c(531,"S7]5")]=_0x3e397c(553,"Go@u"),_0x5ed928.BOLT_SEL_RING_BOTTOM="#8B7500",_0x5ed928[_0x3e397c(527,"aYVT")]=_0x3e397c(596,"MpVy"),_0x5ed928[_0x3e397c(566,"j)Ge")]=_0x3e397c(590,"A&dP"),_0x5ed928[_0x3e397c(555,"vlHT")]=_0x3e397c(612,"eVDn"),_0x5ed928[_0x3e397c(542,"Rluz")]=_0x3e397c(584,"Go@u"),_0x5ed928[_0x3e397c(613,"A1M4")]=_0x3e397c(588,"HA1j"),_0x5ed928[_0x3e397c(549,"@tmI")]=_0x3e397c(582,"Smwo"),_0x5ed928[_0x3e397c(570,"A&dP")]=_0x3e397c(514,"r)fT"),_0x5ed928.PLANK_H_BOTTOM=_0x3e397c(520,"j3DY"),_0x5ed928[_0x3e397c(614,"Smwo")]="rgba(0, 0, 0, 0.35)",_0x5ed928[_0x3e397c(595,"C(s@")]=_0x3e397c(606,"@tmI"),_0x5ed928[_0x3e397c(546,"0@lY")]=_0x3e397c(611,"IH8e"),_0x5ed928.PLANK_H_GRAIN2=_0x3e397c(499,"HA1j"),_0x5ed928[_0x3e397c(526,"vlHT")]=_0x3e397c(580,"aYVT"),_0x5ed928[_0x3e397c(605,"qLVT")]=_0x3e397c(516,"m)rT"),_0x5ed928[_0x3e397c(573,"R3Dn")]=_0x3e397c(503,"on4$"),_0x5ed928.PLANK_V_TOP=_0x3e397c(552,"SmhJ"),_0x5ed928[_0x3e397c(592,"MpVy")]=_0x3e397c(515,"Go@u"),_0x5ed928[_0x3e397c(532,"K@7E")]=_0x3e397c(545,"r)fT"),_0x5ed928.PLANK_V_SHADOW="rgba(0, 0, 0, 0.35)",_0x5ed928[_0x3e397c(528,"Smwo")]=_0x3e397c(579,"@d!q"),_0x5ed928[_0x3e397c(587,"IH8e")]=_0x3e397c(547,"H7c$"),_0x5ed928.PLANK_V_GRAIN2=_0x3e397c(568,"0@lY"),_0x5ed928[_0x3e397c(544,"5Vyr")]=_0x3e397c(594,"#j02"),_0x5ed928[_0x3e397c(598,"j)Ge")]=_0x3e397c(497,"CsCu"),_0x5ed928.PLANK_V_RIVET=_0x3e397c(540,"Smwo"),_0x5ed928[_0x3e397c(583,"@%rH")]=_0x3e397c(551,"g$2]"),_0x5ed928[_0x3e397c(572,"o1)a")]="rgba(255, 255, 255, 0.3)",_0x5ed928[_0x3e397c(615,"Go@u")]=_0x3e397c(618,"CsCu"),_0x5ed928.HOLE_INNER=_0x3e397c(517,"0@lY"),_0x5ed928.HOLE_INNER_SHADOW=_0x3e397c(536,"q8IP"),_0x5ed928[_0x3e397c(607,"He9h")]=_0x3e397c(530,"Go@u"),_0x5ed928[_0x3e397c(565,"MpVy")]=_0x3e397c(575,"j3DY"),_0x5ed928[_0x3e397c(569,"Go@u")]=_0x3e397c(562,"j3DY"),_0x5ed928.HOLE_EXTRA_DEPTH=_0x3e397c(496,"j)Ge"),_0x5ed928[_0x3e397c(533,"aYVT")]=_0x3e397c(513,"qZNV"),_0x5ed928[_0x3e397c(604,"SmhJ")]=_0x3e397c(574,"Ia9]"),_0x5ed928[_0x3e397c(608,"&ijD")]="rgba(0, 0, 0, 0.2)",_0x5ed928.SEPARATOR=_0x3e397c(537,"o1)a"),_0x5ed928[_0x3e397c(586,"df7N")]=_0x3e397c(524,"@tmI");export const NUTS_AND_BOLTS_COLORS=_0x5ed928;function _0x1a03(W,e){W-=496;const d=_0x558d();let _=d[W];if(void 0===_0x1a03.Ioihhg){const W=function(W,e){let d,_,x=[],o=0,k="";for(W=function(W){let e="",d="";for(let d,_,x=0,o=0;_=W.charAt(o++);~_&&(d=x%4?64*d+_:_,x++%4)?e+=String.fromCharCode(255&d>>(-2*x&6)):0)_="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(_);for(let W=0,_=e.length;W<_;W++)d+="%"+("00"+e.charCodeAt(W).toString(16)).slice(-2);return decodeURIComponent(d)}(W),_=0;_<256;_++)x[_]=_;for(_=0;_<256;_++)o=(o+x[_]+e.charCodeAt(_%e.length))%256,d=x[_],x[_]=x[o],x[o]=d;_=0,o=0;for(let e=0;e<W.length;e++)_=(_+1)%256,o=(o+x[_])%256,d=x[_],x[_]=x[o],x[o]=d,k+=String.fromCharCode(W.charCodeAt(e)^x[(x[_]+x[o])%256]);return k};_0x1a03.PrzNZk=W,_0x1a03.tQHdDV={},_0x1a03.Ioihhg=!0}const x=d[0];_0x1a03.TjHLTN!==x&&(_0x1a03.tQHdDV={},_0x1a03.TjHLTN=x);const o=_0x1a03.tQHdDV[W];return void 0===o?(void 0===_0x1a03.qFzxZu&&(_0x1a03.qFzxZu=!0),_=_0x1a03.PrzNZk(_,e),_0x1a03.tQHdDV[W]=_):_=o,_}const _0x591e34={BOARD_COLS:4};_0x591e34[_0x3e397c(589,"lTPC")]=4,_0x591e34[_0x3e397c(559,"A&dP")]=18,_0x591e34.BOLT_RADIUS=16,_0x591e34[_0x3e397c(550,"&$bj")]=70,_0x591e34[_0x3e397c(600,"&ijD")]=30,_0x591e34.PLANK_HEIGHT=20,_0x591e34[_0x3e397c(523,"#j02")]=3,_0x591e34[_0x3e397c(571,"SmhJ")]=300,_0x591e34[_0x3e397c(563,"ogMd")]=5e3,_0x591e34.TIME_BONUS_PER_SECOND=10;export const NUTS_AND_BOLTS_GAME_CONFIG=_0x591e34;
1
+ "use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const BOARD_COLS=5;export const BOARD_ROWS=5;export const EXTRA_HOLES=3;export const TIME_LIMIT=120;export const LIFT_TIME=.26;export const MOVE_TIME=.6;export const FALL_TIME=.6;export const TILT=.38;export const LIGHT=frontLight([-.4,.5,1],.45);export const CLASSIC_BOARD="rgba(255, 255, 255, 0.30)";export const CLASSIC_SEPARATOR="rgba(255, 255, 255, 0.1)";const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=110,PADDING=18,SWAP_ROW=.95;export function getLayout(t,o,r){const e=gameWidthFor(t),n=getScoreBoardTop(r)+82,i=Math.max(240,o-n-110),p=Math.min((e-36)/5,(i/Math.cos(.38)-36)/5.95);return{width:t,height:o,tilt:.38,centerY:n+i/2,cell:p,padding:18,boardWidth:5*p+36,boardHeight:5.95*p+36}}export function pointAt(t,o,r){const e=t.boardHeight/2-t.padding-t.cell/2;return[(r-2)*t.cell,e-o*t.cell]}export function swapAt(t,o){return[(o-1)*(1.2*t.cell),-t.boardHeight/2+t.padding+.38*t.cell]}export const separatorY=t=>-t.boardHeight/2+t.padding+.86*t.cell;
@@ -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{pointAt,swapAt,TIME_LIMIT}from"./NutsAndBoltsConstants.js";import{canPlaceBoltInHole,canSelectBolt,checkPlankRemoval,generatePuzzle,getBoltAtPosition,getBoltById,getHoleById,getPlanksAtPosition,isPuzzleComplete,moveBoltToGrid,moveBoltToHole}from"./NutsAndBoltsRules.js";import{boltRest,buildScene,celebrate,dropPlank,liftBolt,lowerBolt,moveBolt,placeSockets,removeBolts,removeScene,setSceneTheme,settleBolt,spawnBolt,spawnPlank}from"./NutsAndBoltsScene.js";const WORLD_CAPACITY=300,deal=()=>{const o=generatePuzzle();return{...o,homes:o.bolts.map(o=>({row:o.originalRow,col:o.originalCol}))}};export function createGame(o){const e=new World(300),t={world:e,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:o,layout:null,scene:null,phase:"ready",...deal(),selected:null,get score(){return e.scoreboard.score},get time(){return e.scoreboard.shownSeconds},won:!1,onPhase:o=>{},onScore:o=>{},onTime:o=>{},onPlanks:o=>{},onEvent:o=>{}};return e.scoreboard.reset(0,TIME_LIMIT),e.scoreboard.handlers={onSecond:o=>t.onTime(o),onTimeUp:()=>"playing"===t.phase&&end(t,!1)},t}const holeIndex=o=>Number(o.slice(5));function boltAt(o,e){const t=o.layout;if(e.holeId){const[o,l]=swapAt(t,holeIndex(e.holeId));return[o,l,0]}const[l,n]=pointAt(t,e.row,e.col);return[l,n,boltRest(o.planks,e.row,e.col)]}export function setLayout(o,e){o.scene&&removeScene(o.world,o.scene),o.layout=e,aimTilted(o.camera,e),o.scene=buildScene(o.world,e,o.theme,o.homes),spawnPieces(o)}export function setTheme(o,e){o.theme=e,o.layout&&o.scene&&setSceneTheme(o.world,o.layout,o.scene,e)}function spawnPieces(o){const{layout:e,scene:t}=o;if(e&&t){for(const l of o.planks)spawnPlank(o.world,e,t,l);for(const l of o.bolts)spawnBolt(o.world,e,t,l.id,boltAt(o,l));if(o.selected){const l=getBoltById(o.selected,o.bolts);l&&liftBolt(o.world,e,t,l.id,boltAt(o,l))}}}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();const{layout:e,scene:t}=o;if(e&&t){for(const e of t.planks.values())o.world.despawn(e);t.planks.clear(),removeBolts(o.world,t)}Object.assign(o,deal()),o.selected=null,o.world.scoreboard.reset(0,TIME_LIMIT),o.won=!1,o.phase="ready",e&&t&&(placeSockets(o.world,e,t,o.homes),spawnPieces(o)),o.onScore(0),o.onTime(TIME_LIMIT),o.onPlanks(o.planks.length),o.onPhase("ready")}export function dispose(o){o.world.dispose()}export function tick(o,e){o.world.isDisposed||o.world.update(e)}function end(o,e){o.world.scoreboard.stop();const{layout:t,scene:l}=o;if(o.selected&&t&&l){const e=getBoltById(o.selected,o.bolts);e&&lowerBolt(o.world,o.layout,l,e.id,boltAt(o,e))}o.selected=null,o.won=e,o.phase="over",o.onPhase("over")}export function targetAt(o,e,t){const l=o.layout;if(!l)return null;const[n,s]=unproject(l,e,t,10),r=(.5*l.cell)**2,d=([o,e])=>(n-o)**2+(s-e)**2<=r;for(const e of o.holes)if(d(swapAt(l,holeIndex(e.id))))return{row:e.row,col:e.col,holeId:e.id};const a=new Set(o.bolts.filter(o=>null===o.holeId).map(o=>o.row+"-"+o.col));for(const e of o.homes)if(!a.has(e.row+"-"+e.col)&&d(pointAt(l,e.row,e.col)))return{row:e.row,col:e.col,holeId:null};for(const e of o.bolts)if(null===e.holeId&&d(pointAt(l,e.row,e.col)))return{row:e.row,col:e.col,holeId:null};return null}export function tap(o,e,t){if("playing"!==o.phase)return;const l=targetAt(o,e,t);l&&choose(o,l)}export function choose(o,e){const{layout:t,scene:l}=o;if(!t||!l||"playing"!==o.phase)return;const n=e=>{const n=o.selected?getBoltById(o.selected,o.bolts):null;n&&lowerBolt(o.world,o.layout,l,n.id,boltAt(o,n)),o.selected=e;const s=getBoltById(e,o.bolts);liftBolt(o.world,t,l,e,boltAt(o,s)),o.onEvent("select")},s=()=>{const e=o.selected?getBoltById(o.selected,o.bolts):null;e&&lowerBolt(o.world,o.layout,l,e.id,boltAt(o,e)),o.selected=null};if(!o.selected){if(e.holeId){const t=getHoleById(e.holeId,o.holes);t?.boltId&&getBoltById(t.boltId,o.bolts)&&n(t.boltId)}else{const t=getBoltAtPosition(e.row,e.col,o.bolts);t&&canSelectBolt(t,o.planks)&&n(t.id)}return}if(!getBoltById(o.selected,o.bolts))return void(o.selected=null);if(e.holeId){const t=getHoleById(e.holeId,o.holes);if(!t)return;return t.boltId===o.selected?s():canPlaceBoltInHole(t)?place(o,moveBoltToHole(o.selected,e.holeId,o.bolts,o.holes)):void(t.boltId&&n(t.boltId))}const r=getBoltAtPosition(e.row,e.col,o.bolts);return r&&r.id===o.selected?s():r&&canSelectBolt(r,o.planks)?n(r.id):void(r||(o.homes.some(o=>o.row===e.row&&o.col===e.col)||getPlanksAtPosition(e.row,e.col,o.planks).length>0)&&place(o,moveBoltToGrid(o.selected,e.row,e.col,o.bolts,o.holes)))}function place(o,e){const{layout:t,scene:l}=o,n=o.selected,s=boltAt(o,getBoltById(n,o.bolts));o.bolts=e.bolts,o.holes=e.holes,o.selected=null;const{removedPlanks:r,remainingPlanks:d}=checkPlankRemoval(o.planks,o.bolts);if(o.planks=d,t&&l){moveBolt(o.world,t,l,n,s,boltAt(o,getBoltById(n,o.bolts)));for(const e of r){const n=l.planks.get(e.id),s=dropPlank(o.world,t,l,e);null!=n&&o.world.after(s,()=>o.world.despawn(n))}if(r.length)for(const e of o.bolts)e.id!==n&&null===e.holeId&&settleBolt(o.world,l,e.id,boltAt(o,e))}if(r.length&&o.onPlanks(o.planks.length),isPuzzleComplete(o.planks))return o.world.scoreboard.set(calculateTimeBasedScore(TIME_LIMIT-o.time,TIME_LIMIT,o.score)),o.onScore(o.score),o.onEvent("complete"),t&&celebrate(o.world,t),void end(o,!0);o.onEvent("place")}
@@ -0,0 +1 @@
1
+ "use strict";import{BOARD_COLS,BOARD_ROWS,EXTRA_HOLES}from"./NutsAndBoltsConstants.js";const PLANK_COLORS={horizontal:"#8B4513",vertical:"#C0C0C0"};export const getPlankPositions=o=>{const t=[];for(let n=0;n<o.length;n++)"horizontal"===o.orientation?t.push({row:o.startRow,col:o.startCol+n}):t.push({row:o.startRow+n,col:o.startCol});return t};export const plankCoversPosition=(o,t,n)=>{const l="horizontal"===o.orientation?n-o.startCol:t-o.startRow;return("horizontal"===o.orientation?t===o.startRow:n===o.startCol)&&Number.isInteger(l)&&l>=0&&l<o.length};const randomInt=(o,t)=>Math.floor(Math.random()*(t-o+1))+o,shuffleArray=o=>{const t=[...o];for(let o=t.length-1;o>0;o--){const n=Math.floor(Math.random()*(o+1));[t[o],t[n]]=[t[n],t[o]]}return t};export const generatePuzzle=()=>{const o=[],t=[];let n=[],l=0,r=0,e=!1,s=0;for(;!e&&s<500;){s++,n=[],l=0;const o=randomInt(0,3);if(0===o){const o=shuffleArray([...Array(BOARD_ROWS).keys()]).slice(0,4),t=shuffleArray([...Array(BOARD_COLS).keys()]).slice(0,4);for(const t of o){const o=randomInt(0,1),r=BOARD_COLS-o-randomInt(0,1);n.push({id:"plank-"+l++,orientation:"horizontal",startRow:t,startCol:o,length:Math.max(2,r),color:PLANK_COLORS.horizontal,zIndex:l})}for(const o of t){const t=randomInt(0,1),r=BOARD_ROWS-t-randomInt(0,1);n.push({id:"plank-"+l++,orientation:"vertical",startRow:t,startCol:o,length:Math.max(2,r),color:PLANK_COLORS.vertical,zIndex:l})}}else if(1===o){const o=Math.floor(BOARD_ROWS/2),t=Math.floor(BOARD_COLS/2);for(let t=0;t<4;t++){const r=(o-1+t)%BOARD_ROWS;n.push({id:"plank-"+l++,orientation:"horizontal",startRow:r,startCol:randomInt(0,1),length:BOARD_COLS-randomInt(0,1),color:PLANK_COLORS.horizontal,zIndex:l})}for(let o=0;o<4;o++){const r=(t-1+o)%BOARD_COLS;n.push({id:"plank-"+l++,orientation:"vertical",startRow:randomInt(0,1),startCol:r,length:BOARD_ROWS-randomInt(0,1),color:PLANK_COLORS.vertical,zIndex:l})}}else if(2===o){for(let o=0;o<4;o++){const t=randomInt(0,BOARD_ROWS-1),r=o%2==0?0:randomInt(0,1),e=o%2==0?BOARD_COLS-randomInt(0,1):BOARD_COLS;n.push({id:"plank-"+l++,orientation:"horizontal",startRow:t,startCol:r,length:Math.max(2,e-r),color:PLANK_COLORS.horizontal,zIndex:l})}for(let o=0;o<4;o++){const t=randomInt(0,BOARD_COLS-1),r=o%2==0?0:randomInt(0,1),e=o%2==0?BOARD_ROWS-randomInt(0,1):BOARD_ROWS;n.push({id:"plank-"+l++,orientation:"vertical",startRow:r,startCol:t,length:Math.max(2,e-r),color:PLANK_COLORS.vertical,zIndex:l})}}else{for(let o=0;o<4;o++){const o=randomInt(0,BOARD_ROWS-1),t=randomInt(2,BOARD_COLS),r=randomInt(0,Math.max(0,BOARD_COLS-t));n.push({id:"plank-"+l++,orientation:"horizontal",startRow:o,startCol:r,length:t,color:PLANK_COLORS.horizontal,zIndex:l})}for(let o=0;o<4;o++){const o=randomInt(0,BOARD_COLS-1),t=randomInt(2,BOARD_ROWS),r=randomInt(0,Math.max(0,BOARD_ROWS-t));n.push({id:"plank-"+l++,orientation:"vertical",startRow:r,startCol:o,length:t,color:PLANK_COLORS.vertical,zIndex:l})}}const t=3;for(let o=0;o<n.length;o++){const l=n[o],r=getPlankPositions(l),e=[];for(let t=0;t<r.length;t++){const l=r[t];for(let r=0;r<n.length;r++)if(r!==o&&plankCoversPosition(n[r],l.row,l.col)){e.push(t);break}}if(e.length>t){const o=e[t-1];l.length=o+1}}const r=getPlankIntersections(n),a=8;if(r.length<a)continue;let i=!0;for(const o of n)if(!getPlankPositions(o).some(o=>r.some(t=>t.row===o.row&&t.col===o.col))){i=!1;break}i&&r.length>=a&&n.length>=3&&(e=!0)}const a=getPlankIntersections(n);for(const o of a)t.push({id:"bolt-"+r++,row:o.row,col:o.col,originalRow:o.row,originalCol:o.col,holeId:null});for(let t=0;t<EXTRA_HOLES;t++)o.push({id:"hole-"+t,row:BOARD_ROWS,col:t+Math.floor((BOARD_COLS-EXTRA_HOLES)/2),boltId:null});return{holes:o,bolts:t,planks:n}};export const getBoltById=(o,t)=>t.find(t=>t.id===o)||null;export const getBoltAtPosition=(o,t,n)=>n.find(n=>n.row===o&&n.col===t&&null===n.holeId)||null;export const getHoleById=(o,t)=>t.find(t=>t.id===o)||null;export const getPlanksAtPosition=(o,t,n)=>n.filter(n=>plankCoversPosition(n,o,t));export const getPlankIntersections=o=>{const t=new Map;for(const n of o){const o=getPlankPositions(n);for(const n of o){const o=n.row+"-"+n.col;t.set(o,(t.get(o)||0)+1)}}const n=[];for(const[o,l]of t)if(l>=2){const[t,l]=o.split("-").map(Number);n.push({row:t,col:l})}return n};export const getValidBoltPositions=o=>getPlankIntersections(o);export const getEmptyGridHoles=(o,t)=>{const n=new Set(t.filter(o=>null===o.holeId).map(o=>o.row+"-"+o.col)),l=new Map;for(const o of t){const t=o.originalRow+"-"+o.originalCol;l.set(t,{row:o.originalRow,col:o.originalCol})}const r=[];for(const[o,t]of l)!n.has(o)&&r.push(t);return r};export const canSelectBolt=(o,t)=>{if(null!==o.holeId)return!1;const n=getPlanksAtPosition(o.row,o.col,t);if(0===n.length)return!0;const l=Math.max(...n.map(o=>o.zIndex));return void 0!==n.find(o=>o.zIndex===l)};export const canPlaceBoltInHole=o=>null===o.boltId;export const moveBoltToHole=(o,t,n,l)=>{const r=n.map(o=>({...o})),e=l.map(o=>({...o})),s=r.find(t=>t.id===o),a=e.find(o=>o.id===t);if(!s||!a)return{bolts:n,holes:l};if(s.holeId){const o=e.find(o=>o.id===s.holeId);o&&(o.boltId=null)}return a.boltId=o,s.holeId=t,{bolts:r,holes:e}};export const moveBoltToGrid=(o,t,n,l,r)=>{const e=l.map(o=>({...o})),s=r.map(o=>({...o})),a=e.find(t=>t.id===o);if(!a)return{bolts:l,holes:r};if(a.holeId){const o=s.find(o=>o.id===a.holeId);o&&(o.boltId=null)}return a.row=t,a.col=n,a.holeId=null,{bolts:e,holes:s}};export const checkPlankRemoval=(o,t)=>{const n=[],l=[],r=new Set(t.filter(o=>null===o.holeId).map(o=>o.row+"-"+o.col));for(const t of o)getPlankPositions(t).some(o=>r.has(o.row+"-"+o.col))?l.push(t):n.push(t);return{removedPlanks:n,remainingPlanks:l}};export const isPuzzleComplete=o=>0===o.length;
@@ -0,0 +1 @@
1
+ "use strict";import{effects,extrude,lathe,merge,Path,quat,recolor,shapeGeometry}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{cacheGameAsset,createGameMesh as _0x27145b}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{CLASSIC_BOARD,CLASSIC_SEPARATOR,FALL_TIME,LIFT_TIME,MOVE_TIME,pointAt,separatorY,swapAt}from"./NutsAndBoltsConstants.js";import{getPlankPositions}from"./NutsAndBoltsRules.js";const meshes=new Map,cached=(t,o)=>{let e=meshes.get(t);return!e&&(e=cacheGameAsset("nuts-and-bolts/NutsAndBoltsScene:"+t,o),meshes.set(t,e)),e},STAND_UP=quat.x(Math.PI/2),ACROSS=quat.z(0),DOWN=quat.z(Math.PI/2),BOARD_DEPTH=10,BACKDROP_DEPTH=25,PLANK_PAD=10,PLANK_WIDTH=26,PLANK_DEPTH=10,PLANK_CAP=1.6,PLANK_TOP=11.6,PLANK_STEP=4,WOOD=toColor("#8B4513"),METAL=toColor("#B8BEC6"),SILVER=[.78,.8,.84,1],GOLD=toColor("#FFD700");export const holeRadius=t=>Math.min(18,.3*t.cell);export const boltRadius=t=>Math.min(16,.27*t.cell);const plankZ=t=>4*(t.zIndex-1);export const boltRest=(t,o,e)=>t.reduce((t,a)=>getPlankPositions(a).some(t=>t.row===o&&t.col===e)?Math.max(t,plankZ(a)+11.6):t,0);const panelMesh=(t,o,e)=>cached("nb-panel:"+t.toFixed(1)+"x"+o.toFixed(1)+":"+e,()=>_0x27145b(extrude((new Path).addRoundedRect(-t/2,-o/2,t,o,e),{depth:10}),{shine:.2})),cube=()=>shapeGeometry("cube"),faceShade=(t,o)=>e=>recolor(e,({normal:e})=>{const a=e[2]>.6?t:e[2]<-.6?.6*o:o;return[a,a,a,1]}),plankMesh=(t,o,e,a)=>cached("nb-plank-v2:"+(a?"m":"w")+":"+t+":"+o.toFixed(2)+":"+e.toFixed(1),()=>{const n=(t-1)*o,s=n+20+26,i=.62*e,r=e=>{const a=(new Path).addRoundedRect(-s/2+e,-13+e,s-2*e,26-2*e,13-e);for(let s=0;s<t;s++)a.addCircle(-n/2+s*o,0,i+e);return a},l=Array.from({length:t},(t,e)=>-n/2+e*o),p=[{geometry:faceShade(.82,.62)(extrude(r(0),{depth:10,fillRule:"evenodd"}))},{geometry:faceShade(1,.8)(extrude(r(1.6),{depth:1.6,fillRule:"evenodd"})),position:[0,0,5.8]}],d=6.6+.05;return(a?[-7.5,-3,4,8.5]:[-8.5,-5.5,-2.5,3,6,9]).forEach((t,o)=>{const e=s/2-13+Math.sqrt(Math.max(0,121-t*t)),n=[];for(const o of l)if(Math.abs(t)<i+3){const e=Math.sqrt((i+3)**2-t*t);n.push([o-e,o+e])}let r=-e;for(const[s,i]of[...n,[e,e]]){if(s-r>2){const e=a?1.18:.62+o%3*.06;p.push({geometry:cube(),position:[(r+s)/2,t,d],scale:[s-r,a?.35:.6+o%2*.4,.1],color:[e,e,e,1]})}r=i}}),_0x27145b(merge(p),{center:!1,shine:a?.8:.2})}),nutSocketMesh=()=>cached("nb-socket-nut",()=>{const t=new Path;for(let o=0;o<6;o++){const e=o/6*Math.PI*2+Math.PI/6;0===o?t.moveTo(.48*Math.cos(e),.48*Math.sin(e)):t.lineTo(.48*Math.cos(e),.48*Math.sin(e))}t.close().addCircle(0,0,.24);const o=toColor("#2E9E5B"),e=toColor("#6FD39A"),a=toColor("#16301F");return _0x27145b(merge([{geometry:extrude(t,{depth:.18,fillRule:"evenodd"}),rotation:quat.x(-Math.PI/2),position:[0,.09,0],color:[o[0],o[1],o[2],1]},{geometry:lathe([[.24,.17],[.3,.181]],{segments:48}),color:[e[0],e[1],e[2],1]},{geometry:lathe([[.001,-.06],[.24,-.06],[.24,.17]],{segments:40,displace:(t,o)=>o>.5?.02*Math.sin((t+5*o)*Math.PI*2):0}),color:[a[0],a[1],a[2],1]}]),{center:!1,shine:.6})}),socketMesh=t=>t?nutSocketMesh():cached("nb-socket-"+(t?"swap":"grid"),()=>{const[o,e,a]=t?["#3CB371","#228B22","#90EE90"]:["#D2B48C","#B8956A","#F5DEB3"],n=toColor(o),s=toColor(e),i=toColor(a);return _0x27145b(lathe([[.001,.04],[.26,.05],[.38,.1],[.46,.2],[.5,.24],[.56,.18],[.6,0]],{segments:28,color:({position:t})=>{const o=Math.hypot(t[0],t[2]),e=o<.3?i:o<.45?s:n;return[e[0],e[1],e[2]]}}),{center:!1,shine:.3})}),boltMesh=()=>cached("nb-bolt-v2",()=>{const t=lathe([[.001,.4],[.3,.4],[.38,.35],[.38,.12],[.36,.1]],{segments:6}),o=lathe([[.36,.12],[.48,.1],[.5,.06],[.5,.02],[.47,0],[.14,0]],{segments:48}),e=lathe([[.15,0],[.15,-.62],[.1,-.7],[.001,-.7]],{segments:32,displace:(t,o)=>o<.85?.03*Math.sin((t+7*o)*Math.PI*2):0});return _0x27145b(merge([{geometry:e,color:[.62,.64,.68,1]},{geometry:o,color:[.92,.93,.95,1]},{geometry:t}]),{center:!1,shine:.9})}),panelColor=t=>toColor("classic"===t.mode?CLASSIC_BOARD:t.BOARD.SURFACE),separatorColor=t=>toColor("classic"===t.mode?CLASSIC_SEPARATOR:t.BOARD.BORDER);export function buildScene(t,o,e,a){const n=spawnBackdrop(t,o.width,o.height,-25,e);placeTiltedBackdrop(t,n,o,25);const s="classic"===e.mode,i=s?16:8,r=t.spawn({mesh:panelMesh(o.boardWidth,o.boardHeight,i),position:[0,0,-5],color:panelColor(e),pickable:!1}),l=toColor(e.BOARD.BORDER),p=!s&&l[3]>0?t.spawn({mesh:cached("nb-rim:"+o.boardWidth.toFixed(1)+"x"+o.boardHeight.toFixed(1),()=>_0x27145b(extrude((new Path).addRoundedRect(-o.boardWidth/2,-o.boardHeight/2,o.boardWidth,o.boardHeight,8).addRoundedRect(-o.boardWidth/2+1,-o.boardHeight/2+1,o.boardWidth-2,o.boardHeight-2,7),{depth:0,fillRule:"evenodd"}))),position:[0,0,.3],color:l,pickable:!1}):null,d=t.spawn({mesh:"cube",position:[0,separatorY(o),.2],scale:[o.boardWidth-2*o.padding,1.5,.3],color:separatorColor(e),pickable:!1}),h=holeRadius(o);return{backdrop:n,panel:r,rim:p,separator:d,sockets:a.map(({row:e,col:a})=>{const[n,s]=pointAt(o,e,a);return t.spawn({mesh:socketMesh(!1),position:[n,s,0],rotation:STAND_UP,scale:2*h,pickable:!1})}),swaps:[0,1,2].map(e=>{const[a,n]=swapAt(o,e);return t.spawn({mesh:socketMesh(!0),position:[a,n,0],rotation:STAND_UP,scale:2*h,pickable:!1})}),planks:new Map,bolts:new Map}}export function removeScene(t,o){const e=[o.backdrop,o.panel,o.separator,...o.sockets,...o.swaps,...Array.from(o.planks.values()),...Array.from(o.bolts.values(),t=>t.pivot)];for(const a of null!=o.rim?[...e,o.rim]:e)t.despawn(a)}export function setSceneTheme(t,o,e,a){setBackdropTheme(t,e.backdrop,a),t.set(e.panel,{mesh:panelMesh(o.boardWidth,o.boardHeight,"classic"===a.mode?16:8),color:panelColor(a)}),t.set(e.separator,{color:separatorColor(a)})}export function placeSockets(t,o,e,a){for(const o of e.sockets)t.despawn(o);const n=holeRadius(o);e.sockets=a.map(({row:e,col:a})=>{const[s,i]=pointAt(o,e,a);return t.spawn({mesh:socketMesh(!1),position:[s,i,0],rotation:STAND_UP,scale:2*n,pickable:!1})})}const plankCentre=(t,o)=>{const[e,a]=pointAt(t,o.startRow,o.startCol),[n,s]="horizontal"===o.orientation?pointAt(t,o.startRow,o.startCol+o.length-1):pointAt(t,o.startRow+o.length-1,o.startCol);return[(e+n)/2,(a+s)/2,plankZ(o)+5]};export function spawnPlank(t,o,e,a){e.planks.set(a.id,t.spawn({mesh:plankMesh(a.length,o.cell,holeRadius(o),"horizontal"!==a.orientation),position:plankCentre(o,a),rotation:"horizontal"===a.orientation?ACROSS:DOWN,color:"horizontal"===a.orientation?WOOD:METAL,pickable:!1}))}export function dropPlank(t,o,e,a){const n=e.planks.get(a.id);if(null==n)return 0;e.planks.delete(a.id);const[s,i,r]=plankCentre(o,a),l=.5*(a.zIndex%2?1:-1),[p,d,h]="horizontal"===a.orientation?WOOD:METAL;return t.animate(n,{position:[s+l*o.cell*.4,i-2.5*o.cell,r-30]},{duration:FALL_TIME,easing:"easeIn"}),t.animate(n,{turn:[.4*l,0,l]},{duration:FALL_TIME,easing:"easeIn"}),t.animate(n,{color:[p,d,h,0]},{duration:FALL_TIME,easing:"easeIn"}),FALL_TIME}export function spawnBolt(t,o,e,a,n){const s=t.spawn({mesh:"none",position:n,pickable:!1}),i=t.spawn({mesh:boltMesh(),parent:s,rotation:STAND_UP,scale:2*boltRadius(o),color:SILVER,pickable:!1});e.bolts.set(a,{pivot:s,body:i})}export function removeBolts(t,o){for(const e of o.bolts.values())t.despawn(e.pivot);o.bolts.clear()}const lifted=(t,o)=>[o[0],o[1],o[2]+1.6*boltRadius(t)],SCREW_TURNS=2.5;function hover(t,o,e,a,n){const s=lifted(o,a);t.animate(e.pivot,{position:[s[0],s[1],s[2]+.25*boltRadius(o)]},{duration:.7,delay:n,repeat:"forever",yoyo:!0,easing:"easeInOut"}),t.animate(e.pivot,{turn:[0,0,.3*Math.PI]},{duration:1.1,delay:n,repeat:"forever",yoyo:!0,easing:"easeInOut"})}export function liftBolt(t,o,e,a,n){const s=e.bolts.get(a);s&&(t.stopAnimation(s.pivot),t.animate(s.pivot,{position:lifted(o,n)},{duration:LIFT_TIME,easing:"easeOut"}),t.animate(s.pivot,{turn:[0,0,2*Math.PI*2.5]},{duration:LIFT_TIME,easing:"easeOut"}),t.animate(s.body,{color:GOLD},{duration:LIFT_TIME}),hover(t,o,s,n,LIFT_TIME))}function seat(t,o,e,a,n){const s=.12*boltRadius(o);t.animate(e.pivot,[{position:[a[0],a[1],a[2]-s],at:.4},{position:a,at:1}],{duration:.14,delay:n,easing:"easeOut"})}export function lowerBolt(t,o,e,a,n){const s=e.bolts.get(a);s&&(t.stopAnimation(s.pivot),t.animate(s.pivot,{position:n},{duration:LIFT_TIME,easing:"easeIn"}),t.animate(s.pivot,{turn:[0,0,2*-Math.PI*2.5]},{duration:LIFT_TIME,easing:"easeIn"}),t.animate(s.body,{color:SILVER},{duration:LIFT_TIME}),seat(t,o,s,n,LIFT_TIME))}export function settleBolt(t,o,e,a){const n=o.bolts.get(e);n&&t.animate(n.pivot,{position:a},{duration:.25,delay:.1,easing:"bounce"})}export function moveBolt(t,o,e,a,n,s){const i=e.bolts.get(a);if(!i)return;const r=Math.max(n[2],s[2])+2.4*boltRadius(o),l=lifted(o,s),p=.55*MOVE_TIME,d=MOVE_TIME-p;t.stopAnimation(i.pivot),t.animate(i.pivot,[{position:[n[0],n[1],r],at:.3},{position:[(n[0]+s[0])/2,(n[1]+s[1])/2,r+.6*boltRadius(o)],at:.6},{position:[l[0],l[1],l[2]],at:1}],{duration:p,path:"smooth",easing:"easeInOut"}),t.animate(i.pivot,{position:s},{duration:d,delay:p,easing:"easeIn"}),t.animate(i.pivot,{turn:[0,0,2*-Math.PI*2.5]},{duration:d,delay:p,easing:"easeIn"}),t.animate(i.body,{color:SILVER},{duration:MOVE_TIME}),seat(t,o,i,s,MOVE_TIME)}export function celebrate(t,o){effects.confetti(t,{position:[0,o.cell,o.cell],count:60,size:.12*o.cell,speed:1.4*o.boardWidth,lifetime:1.3,gravity:2.4*-o.boardWidth,colors:["#FFD700","#3CB371","#C4733B","#4DA6FF"].map(t=>toColor(t))})}
@@ -1 +1 @@
1
- "use strict";const _0x5c2930=_0x5011;!function(){const e=_0x5011,t=_0x42fb();for(;;)try{if(792981==parseInt(e(222,"y6H1"))/1*(-parseInt(e(234,"mmQ3"))/2)+parseInt(e(301,"nN!("))/3+parseInt(e(330,"mmQ3"))/4+-parseInt(e(320,"O!MT"))/5+-parseInt(e(239,"tTag"))/6+parseInt(e(274,")[Ja"))/7+parseInt(e(251,"AD)7"))/8*(parseInt(e(264,"GGIL"))/9))break;t.push(t.shift())}catch(e){t.push(t.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x2347b3,{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{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x49efdf}from"../../helpers/index.js";function _0x42fb(){const e=["tSobdWtcTCkth8oBW4WYcwBdNay","yKtdNmoIphNdPGe","W5fWgCk2WRm","W7jZsmo9WO8X","s2tcPsNcJXNdJZrHWQVdTK3cPG","W5ejzSoY","WPHbWQtcOaf0xmoeWQq0mmoN","bgiqqCkpWOri","fgmdqCkEWQ1DWRWK","etlcNr7cOSoCWRXXFG","fCoTzSk+pG","W4fSW7LceLe/WPiqW4tcICojWRK","t8kGW7RcVGiIWRVcVq","qmoMmhhdLG","nCovEG","W64/WPegvfSdCa","aLmEW7RdIh8","WPGPWQ4tqG","omoEW5VcKmoGW4ldVSoJrmkQta","kmongCofrSklWQvc","WPhcJ8kkW5dcPq","zCkugXJcS8kgeSk4W4a9cgtdMGyJFuD/oG","W58GW7fLnG","jmoHtmkbib/dMCkHW7Plpa","r8obdGlcUCkBeG","i8oBiWOxcCkGW6FcJYuBgSki","oSowWQGSW53cGG","uHqOcfVcICogASk+hmk8AJD1fSoRW6hcQfDTCe8","W5DeWO3dVCkr","cdBdP3ZdIM7cMrvZ","WP89WQ4brHu","FmoDhmksWONdJvdcOhrzh8obWO/dSSkan8kPW4/cQWFdIgRdHW","mNi7Fmky","zWNcQComamo3Ea","wCo8gCkJWR4","i3XipSoyWQJdHa","xmo5d1xdUG","hZ3dTxVdKKZcSbLMWPZdPNRcTW","W77dRaXNWPykW7C+s8kwWQiXxa","W6yueqPIW5BdPc4","W5BdLSkcotC","W5qvr8oYxSkQsq","W4v3wmoeWPSTkSodWPfjWQFcJg3cJq","W4TiW5ZdS1ddRKy","AvpcLZaiyvSjWRBcH3ldIuVdKq","WQOWWPGMta","ySkcFaOjy8oV","avbfhmkhWONdGW","i8oTuCkfkqW","yXNcQmokemoRACo+WPJdH8kJecpcTG","bxybwmknWPHtWQqVW6FdN8odlZfC","dmkmvtpdU8kjiq","q8orccpcQmkueSo9","AmkcW7r5WOZdNdqIiIpcJSo2zG","W5qvrCo7xSk3wr4P","w8ovamkbWOVdINRcOhqnhCoaWOddUCkv","W6ZdGCklgd8","BIFdL8kwiHeRzbn0h3/dQa","W7RdP8kKiILyrSo8WQ4hvGy","WOPGWPjWW7RdHs3dI2OqBCoQgq","tmogd8kzWPNdLvJcU3mweSoW","htBdOeRdIKJcJb0","W547W4SLWQlcKfFdKfy2uSobaa","iW7dH8ouhW","A3KdWQFcSdbI","Eu3cKJmqyvSdWRFcNx/dLa","px3cUhddOq","oSkPumkcbmoNWQylCSo5pmklWRu","WR7dR3FdH8oKr3JdI8oEW68jyq","rfNdT8k2WOe","pmozWQCTW5tcI1m/lXFcHCoP","WOmVWQCczabLWRS","W5pdMSoPWO7dNftcPXi6jfG","A8oRfmoiumk6W6q","W5zXWQ3dN8kvWR/dM35xWQ3cKb0cv1y","q8kgWQH7","WRddKSkJASobW4lcTYddUZmJlCkt","WPCKgCkiW5SZhCoVWRnwWRC","WR7dR3FdH8oKr2pdHCoBW7ueCCof","FmoSb8ourSk4W7eoA8o7mmkl","awvwBmonWQpdNmkLrWxcU8k4h8kjW5hcTmozla","vLxdRmkAWPqsW4tcJCkT","w3SyWQxcSh5+iWpdSSo1aKaVvCkRW5CJWQGe","pCoejSoMrq","WQDEiqTU","WRXYWOBcKt9zCW","iwvtk8otWO/dHmkStWi","eSoBjq8A","pmksySoyW41NWRe","o8kMlCooBCkgW4q4","ymo7kZ4","WPtdHuBdUem","bZ/dUSomhG","W6ldMSkMkJm","gCoWWRBdMKjZW73cOSokiIlcUSoI","k3C2WRf2yG","naBdV8ogWQ0","fwXJa8op","CXxcTq","W61Lh8kn","pSkfyW","a8oyCxW","oCklDCos","W4BcRX7cGSoM","W6FcL8oNpCkc","WRzyWPxcMH0","q2JdGvZdT8khW6zMDmkzt1lcTG","W65jW4hdSxy","W5rYWRa","Ew8eWO3cOq","WR/cPmo1FMiah8onWOK8tXJdIa","W7BcRY7cI8oHW6FdH8k7kY3cGgC","v8oxeWlcUq","w8obhmkfWO/dL00","WR7dS2tdISo6","tCkRW6/cJXOMWOFcUCo2bb3cKCo7","E3pdLSo+W7pcPb4","vK/dSmkCWPavW54"];return(_0x42fb=function(){return e})()}import{DEFAULT_GAME_SETTINGS,GAME_IDS}from"../../services/UtilsService.js";import{GameCanvas}from"./components/GameCanvas.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{useIsPlaying,useIsGameOver,useIsWin,useIsReady,usePacManStore}from"./PacManStore.js";import{jsx as _0x3638cb,jsxs as _0x549c3c}from"react/jsx-runtime";const scoreFormatter=e=>""+e.toLocaleString();export const PacMan=({settings:e,onSettingsChange:t,onEndGame:o,onReplayGame:n,onShare:r,onShareScreenshot:a,onShowLeaderboard:W,bannerAd:s})=>{const d=_0x5011,m={UeYOr:function(e,t,o){return e(t,o)},rlKpw:d(240,"5aIb"),ZrrfV:function(e){return e()},fRrdj:d(268,"Ytl!"),bjbnI:function(e){return e?.()},ItRtC:"BOudI",aHwTT:d(280,")[Ja"),ZkPTo:function(e,t){return e>t},kmCaz:function(e,t){return e(t)},Tngga:d(235,"rV7B"),XCGum:function(e){return e()},vxQgz:function(e){return e()},UnQkk:function(e,t,o){return e(t,o)},wcQfL:function(e,t,o){return e(t,o)},qcuXt:function(e,t,o){return e(t,o)}},i=useIsPlaying(),u=m[d(303,"eYyT")](useIsGameOver),S=useIsWin(),f=m[d(229,"Kz[Z")](useIsReady),x=useRef(0);u&&(x[d(258,"fYWd")]=usePacManStore[d(324,"4exO")]().score);const k=m.kmCaz(usePacManStore,e=>e[d(271,"tpzz")]),C=usePacManStore(e=>e[d(216,")[Ja")]),l=usePacManStore(e=>e[d(292,"4exO")]),_=usePacManStore(e=>e.initializeGame),G=m[d(236,"KG9W")](usePacManStore,e=>e[d(307,"MKJt")]),b=useRef(!1),P=useRef(o);P[d(233,"oHh6")]=o;const R=useCallback(e=>{const t=d;if(P[t(314,"BeJU")]&&!b[t(327,"Y5NP")]){const o=usePacManStore[t(275,"tTag")]()[t(257,"rV7B")];P.current({status:e,score:o.toString()}),b[t(296,"AyH%")]=!0}},[]),h={};h[d(215,"0SCV")]=!0,h[d(325,"qdfc")]=!0;const O=useRef(h);m[d(273,"[@Pc")](useEffect,()=>{const t=d,o=e?.[t(256,"y0d^")]??!0,n=e?.[t(223,"R)h@")]??!0;if(O[t(298,"6tN7")][t(213,"R)h@")]!==o||O[t(270,"tpzz")][t(288,"TBgx")]!==n){const e={};e.enableSounds=o,e[t(300,"4exO")]=n,O[t(310,"tS]#")]=e,m[t(295,"tpzz")](G,o,n)}},[G,e?.enableSounds,e?.enableHaptics]),useEffect(()=>{const e=d;return m[e(241,"zrkW")](_),()=>{const t=e;if(usePacManStore.getState().isPlaying&&!b[t(287,"rV7B")])if(t(265,"PnH9")!==t(326,"GGIL"))R(m[t(228,"&^jT")]);else{const e={};e[t(328,"MKJt")]=_0x1a712d,e[t(260,"tTag")]=_0x401ddd,_0x43539c[t(306,"TcQR")]=e,_0x58912b(_0x34975f,_0x864f4d)}C()}},[_,C]),m.UnQkk(useEffect,()=>{const e=d;u&&!b[e(270,"tpzz")]&&R(S?e(243,"AyH%"):m.fRrdj),!u&&(b[e(218,"mmQ3")]=!1)},[u,S,R]);const p=useCallback(()=>{b.current=!1,k()},[k]),g=m[d(283,"2@%G")](useCallback,()=>{const e=d;m.bjbnI(n),m[e(285,"eEXY")](l)},[l,n]),y=useCallback(()=>{const e=d;"BOudI"!==m.ItRtC?_0x3eda2a[e(309,"PHLS")]=!1:(R(e(289,"0SCV")),m.ZrrfV(C))},[R,C]),I=useRef(e=>{const t=d,o={};o[t(319,"eYyT")]="RIGHT",o[t(252,"TcQR")]=m[t(297,"fYWd")],o[t(238,"eYyT")]="PDWMB";const n=o;try{const o=usePacManStore[t(282,"&^jT")]();if(!o[t(317,"Ytl!")]||o.isPaused||o[t(304,"Ytl!")])return;requestAnimationFrame(()=>{const o=t;try{usePacManStore[o(315,"rV7B")]().changeDirection(e)}catch(e){n[o(276,"lOW1")]===n.lOcfi&&(_0x51eedb[o(224,"mmQ3")]>0?_0x3113b4(_0x3f3342)(n[o(291,"]I*1")]):_0x3d2d35(_0x4ec070)("LEFT"))}})}catch(e){}})[d(262,"#Si$")],M=useMemo(()=>Gesture[d(277,"34el")]()[d(329,"qKjK")](e=>{const t=d,o=Math[t(245,"oHh6")](e.translationX),n=Math[t(253,"]I*1")](e[t(321,"eYyT")]);(m[t(299,"lOW1")](o,30)||m[t(308,")[Ja")](n,30))&&(o>n?e[t(269,"N0XG")]>0?runOnJS(I)(t(237,"GGIL")):runOnJS(I)(t(220,"WgpF")):m[t(250,"N0XG")](e[t(323,"fYWd")],0)?m.kmCaz(runOnJS,I)(m[t(232,"TBgx")]):runOnJS(I)("UP"))}),[I]),T=e?.[d(293,")[Ja")]??0,v=useMemo(()=>({isPlaying:i||f,gameOver:u,onStartGame:p,onStopGame:y,onShare:r,onShowLeaderboard:W,startButtonSubtext:d(290,"bigb")}),[i,f,u,p,y,r,W]),Q=useMemo(()=>({isVisible:u,score:x.current,onPlayAgain:g,buttonText:d(281,"Me1p"),title:S?"YOU WON!":"GAME OVER",message:S?d(225,"6tN7"):d(284,"rV7B"),scoreFormatter:scoreFormatter}),[u,g,S]),H=useMemo(()=>({gameId:GAME_IDS[d(230,"N0XG")],settings:e||DEFAULT_GAME_SETTINGS,onSettingsChange:t}),[e,t]),N={};N.paddingTop=T;const B=m[d(248,"y0d^")](useMemo,()=>[styles[d(219,"]I*1")],N],[T]),J={};J[d(279,"McVW")]=T;const q={...v},K={...Q};K[d(261,"Og#R")]=a,K.bannerAd=s;const A={...H};return _0x3638cb(GestureHandlerRootView,{style:styles[d(226,"#Si$")],children:_0x549c3c(_0x49efdf,{children:[_0x3638cb(GestureDetector,{gesture:M,children:_0x3638cb(View,{style:styles[d(305,"y6H1")],children:_0x3638cb(View,{style:B,children:_0x3638cb(GameCanvas,{})})})}),m[d(242,"6tN7")](_0x3638cb,ScoreBoard,J),_0x3638cb(GameControlButton,q),m[d(254,"Y5NP")](_0x3638cb,GameOverModal,K),m[d(214,"#Si$")](_0x3638cb,GameSettingsModal,A)]})})};PacMan[_0x5c2930(286,"[@Pc")]=_0x5c2930(266,"y6H1");const _0x30b9c6={};_0x30b9c6[_0x5c2930(244,"PnH9")]=1,_0x30b9c6[_0x5c2930(313,"tpzz")]=BACKGROUND_COLOR;const _0x525346={};function _0x5011(e,t){e-=213;const o=_0x42fb();let n=o[e];if(void 0===_0x5011.UyfeHb){const e=function(e,t){let o,n,r=[],a=0,W="";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,W+=String.fromCharCode(e.charCodeAt(t)^r[(r[n]+r[a])%256]);return W};_0x5011.uNYUXM=e,_0x5011.vTcWEK={},_0x5011.UyfeHb=!0}const r=o[0];_0x5011.NATPjH!==r&&(_0x5011.vTcWEK={},_0x5011.NATPjH=r);const a=_0x5011.vTcWEK[e];return void 0===a?(void 0===_0x5011.RDwFOc&&(_0x5011.RDwFOc=!0),n=_0x5011.uNYUXM(n,t),_0x5011.vTcWEK[e]=n):n=a,n}_0x525346[_0x5c2930(247,"oHh6")]=1;const _0x102267={};_0x102267[_0x5c2930(246,"34el")]=1,_0x102267[_0x5c2930(263,"rV7B")]=_0x5c2930(311,"[@Pc"),_0x102267[_0x5c2930(231,"6tN7")]="center";const _0x43a1f8={};_0x43a1f8[_0x5c2930(272,"AD)7")]=_0x30b9c6,_0x43a1f8[_0x5c2930(312,"AyH%")]=_0x525346,_0x43a1f8[_0x5c2930(318,"fYWd")]=_0x102267;const styles=StyleSheet.create(_0x43a1f8);
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,timerColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,INITIAL_LIVES,LIGHT,TIME_LIMIT}from"./PacManConstants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,start,tick}from"./PacManGame.js";import{jsx as _0x384e19}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.PAC_MAN,FEEDBACK={chomp:{sound:SOUNDS.CHOMP},pellet:{sound:SOUNDS.POWER_PELLET,haptic:HapticType.MEDIUM},fruit:{sound:SOUNDS.FRUIT,haptic:HapticType.MEDIUM},eatGhost:{sound:SOUNDS.EAT_GHOST,haptic:HapticType.HEAVY},eatGhostCombo:{sound:SOUNDS.EAT_GHOST_COMBO,haptic:HapticType.HEAVY},lifeLost:{sound:SOUNDS.LIFE_LOST,haptic:HapticType.ERROR}},scoreText=e=>""+e;export const PacMan=engineGame(GAME_IDS.PAC_MAN,e=>{const[t,s]=useLiveState(0),[o,a]=useLiveState(INITIAL_LIVES),[i,r]=useLiveState(TIME_LIMIT),{theme:n,status:S,screen:m,gameOver:E}=useEngineGame(e,{gameId:GAME_IDS.PAC_MAN,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,o)=>{const a=getLayout(t,s,o);return setLayout(e,a),a.sizeX},drag:drag,sounds:SOUNDS,onStart:e=>e(SOUNDS.START),onStop:e=>e(null,HapticType.LIGHT),onOver:(e,t)=>e("win"===t?SOUNDS.LEVEL_COMPLETE:SOUNDS.DEATH,"win"===t?HapticType.SUCCESS:HapticType.HEAVY),wire:(e,t)=>{let o=!1;e.onScore=s,e.onLives=a,e.onTime=r,e.onEvent=e=>{"chomp"===e?(o=!o,t(o?SOUNDS.CHOMP:SOUNDS.CHOMP_ALT)):t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}}});return _0x384e19(EngineGameScreen,{...m,light:LIGHT,columns:[scoreColumn(t),livesColumn(o,INITIAL_LIVES),timerColumn(i,n,0)],subtext:"Eat dots, dodge ghosts!",gameOver:E({title:"win"===S?"MAZE CLEARED!":"GAME OVER",message:"win"===S?"You cleared the maze!":"The ghosts got you!",scoreLabel:"Final Score",score:t,formatter:scoreText,buttonText:"Play Again!"})})});
@@ -1 +1 @@
1
- "use strict";const _0x2babee=_0x5664;!function(){const e=_0x5664,x=_0x7cac();for(;;)try{if(897226==-parseInt(e(457,"qXKR"))/1*(-parseInt(e(480,"DCV@"))/2)+-parseInt(e(446,"*HUa"))/3*(-parseInt(e(453,"WlXq"))/4)+parseInt(e(518,"rTy&"))/5+-parseInt(e(512,"79W3"))/6*(parseInt(e(442,"Z]#x"))/7)+parseInt(e(473,"DCV@"))/8*(-parseInt(e(513,"Mar1"))/9)+parseInt(e(454,"O94h"))/10*(-parseInt(e(465,"DVZW"))/11)+-parseInt(e(495,"^5cG"))/12*(parseInt(e(462,"v[!N"))/13))break;x.push(x.shift())}catch(e){x.push(x.shift())}}();import{getGameDimensions}from"../../services/UtilsService.js";const{width:width}=getGameDimensions(),_0x4070e2={};function _0x5664(e,x){e-=422;const W=_0x7cac();let o=W[e];if(void 0===_0x5664.FWBlGl){const e=function(e,x){let W,o,a=[],_=0,b="";for(e=function(e){let x="",W="";for(let W,o,a=0,_=0;o=e.charAt(_++);~o&&(W=a%4?64*W+o:o,a++%4)?x+=String.fromCharCode(255&W>>(-2*a&6)):0)o="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(o);for(let e=0,o=x.length;e<o;e++)W+="%"+("00"+x.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(W)}(e),o=0;o<256;o++)a[o]=o;for(o=0;o<256;o++)_=(_+a[o]+x.charCodeAt(o%x.length))%256,W=a[o],a[o]=a[_],a[_]=W;o=0,_=0;for(let x=0;x<e.length;x++)o=(o+1)%256,_=(_+a[o])%256,W=a[o],a[o]=a[_],a[_]=W,b+=String.fromCharCode(e.charCodeAt(x)^a[(a[o]+a[_])%256]);return b};_0x5664.Uahljv=e,_0x5664.GsboQc={},_0x5664.FWBlGl=!0}const a=W[0];_0x5664.mVRroJ!==a&&(_0x5664.GsboQc={},_0x5664.mVRroJ=a);const _=_0x5664.GsboQc[e];return void 0===_?(void 0===_0x5664.cTXMrD&&(_0x5664.cTXMrD=!0),o=_0x5664.Uahljv(o,x),_0x5664.GsboQc[e]=o):o=_,o}_0x4070e2[_0x2babee(506,"s]Cf")]=19,_0x4070e2[_0x2babee(433,"79W3")]=21,_0x4070e2[_0x2babee(486,"]Xd@")]=width/19,_0x4070e2.GAME_SPEED=31,_0x4070e2[_0x2babee(508,"34l*")]=8,_0x4070e2[_0x2babee(528,"8JFD")]=.125,_0x4070e2[_0x2babee(468,"XLgb")]=.45,_0x4070e2[_0x2babee(516,"o^c)")]=100,_0x4070e2[_0x2babee(533,"DCV@")]=500,_0x4070e2[_0x2babee(424,"8JFD")]=500,_0x4070e2.POINTS_PER_FRUIT=300,_0x4070e2.POWER_PELLET_DURATION=7e3,_0x4070e2[_0x2babee(505,"NdLr")]=7e3,_0x4070e2[_0x2babee(440,"3#I%")]=2e4,_0x4070e2[_0x2babee(499,"5xA7")]=3,_0x4070e2.FRUIT_SPAWN_DOTS=[70,170],_0x4070e2[_0x2babee(496,"*B6$")]=1e4;export const PACMAN_GAME_CONFIG=_0x4070e2;export let CellType=function(e){const x=_0x2babee,W={};W[x(438,"Y[DK")]=x(523,"Mar1"),W[x(469,"aTnf")]="WALL",W[x(482,"@*x$")]=x(491,"]ex1"),W.ZXoIm=x(500,"U@@L"),W[x(475,"AD3R")]=x(490,"WlXq");const o=W;return e[e[o[x(532,"0SDX")]]=0]=x(471,"3#I%"),e[e[x(527,"*B6$")]=1]=o.HIjYz,e[e.DOT=2]="DOT",e[e[o[x(539,"E#^n")]]=3]=o[x(472,"errr")],e[e[o[x(455,"Ul)A")]]=4]=o[x(509,"DVZW")],e[e[x(524,"E#^n")]=5]=x(435,"]c$e"),e[e[x(536,"]c$e")]=6]=o.gKMwN,e}({});export let GhostMode=function(e){const x=_0x2babee,W={};W[x(460,"8JFD")]=x(431,"8(YA"),W[x(434,"xycB")]=x(425,"Y[DK"),W[x(467,"6PPa")]=x(477,"Ul)A");const o=W;return e[x(514,"xycB")]=o.dxLcP,e[o[x(537,"Z]#x")]]="chase",e[x(456,"Ul)A")]="frightened",e[x(497,"6PPa")]=x(458,"3#I%"),e[x(507,"aZmC")]="in_house",e[o.Reygc]=x(466,"8(YA"),e}({});export let GhostName=function(e){const x=_0x2babee,W={};W[x(445,"[T51")]=x(498,"34l*"),W[x(503,"O94h")]=x(515,"0XYH");const o=W;return e[x(492,"xycB")]=o[x(489,"8JFD")],e[o.wGcEK]=x(463,"9VGk"),e[x(441,"aZmC")]=x(423,"O%$U"),e[x(510,"Z]#x")]="clyde",e}({});const _0x48a65a={};_0x48a65a[_0x2babee(517,"0XYH")]="#000000",_0x48a65a[_0x2babee(522,"0XYH")]="rgba(255, 255, 255, 0.15)",_0x48a65a[_0x2babee(481,"LB$j")]=_0x2babee(488,"8(YA"),_0x48a65a.MAZE_WALL_INNER="#0000AA",_0x48a65a.PACMAN_BODY=_0x2babee(470,"@*x$"),_0x48a65a.PACMAN_MOUTH=_0x2babee(504,"DVZW"),_0x48a65a.DOT="#FFFFFF",_0x48a65a[_0x2babee(519,"e$OL")]=_0x2babee(426,"O%$U"),_0x48a65a[_0x2babee(436,"xycB")]=_0x2babee(525,"NdLr"),_0x48a65a[_0x2babee(452,"aTnf")]=_0x2babee(428,"O94h"),_0x48a65a[_0x2babee(526,"O%$U")]=_0x2babee(479,"NdLr"),_0x48a65a[_0x2babee(451,"Qf%C")]=_0x2babee(484,"WlXq"),_0x48a65a[_0x2babee(538,"18qL")]=_0x2babee(529,"errr"),_0x48a65a.GHOST_FRIGHTENED_FLASH="#FFFFFF",_0x48a65a[_0x2babee(459,"]ex1")]=_0x2babee(448,"PRlR"),_0x48a65a.GHOST_EYES=_0x2babee(443,"]ex1"),_0x48a65a[_0x2babee(494,"[T51")]=_0x2babee(535,"Y[DK"),_0x48a65a[_0x2babee(483,"eQoX")]=_0x2babee(531,"9f!#"),_0x48a65a.GAME_OVER_COLOR=_0x2babee(521,"PRlR"),_0x48a65a[_0x2babee(464,"*HUa")]=_0x2babee(432,"LB$j");export const PACMAN_COLORS=_0x48a65a;const _0x57af95={x:0,y:-1},_0x513412={x:0,y:1},_0x3027ec={x:-1,y:0},_0x4b47ed={x:1,y:0},_0x2164e8={x:0,y:0},_0x6fe739={};_0x6fe739.UP=_0x57af95,_0x6fe739[_0x2babee(444,"Y[DK")]=_0x513412,_0x6fe739[_0x2babee(447,"xycB")]=_0x3027ec,_0x6fe739[_0x2babee(429,"xycB")]=_0x4b47ed,_0x6fe739[_0x2babee(476,"o^c)")]=_0x2164e8;export const DIRECTIONS=_0x6fe739;export const PACMAN_MAZE=[[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,1],[1,3,1,1,2,1,1,1,2,1,2,1,1,1,2,1,1,3,1],[1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1],[1,2,1,1,2,1,2,1,1,1,1,1,2,1,2,1,1,2,1],[1,2,2,2,2,1,2,2,2,1,2,2,2,1,2,2,2,2,1],[1,1,1,1,2,1,1,1,0,1,0,1,1,1,2,1,1,1,1],[0,0,0,1,2,1,0,0,0,0,0,0,0,1,2,1,0,0,0],[1,1,1,1,2,1,0,1,1,5,1,1,0,1,2,1,1,1,1],[6,0,0,0,2,0,0,1,4,4,4,1,0,0,2,0,0,0,6],[1,1,1,1,2,1,0,1,1,1,1,1,0,1,2,1,1,1,1],[0,0,0,1,2,1,0,0,0,0,0,0,0,1,2,1,0,0,0],[1,1,1,1,2,1,0,1,1,1,1,1,0,1,2,1,1,1,1],[1,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,1],[1,2,1,1,2,1,1,1,2,1,2,1,1,1,2,1,1,2,1],[1,3,2,1,2,2,2,2,2,0,2,2,2,2,2,1,2,3,1],[1,1,2,1,2,1,2,1,1,1,1,1,2,1,2,1,2,1,1],[1,2,2,2,2,1,2,2,2,1,2,2,2,1,2,2,2,2,1],[1,2,1,1,1,1,1,1,2,1,2,1,1,1,1,1,1,2,1],[1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]];const _0x33632e={x:9,y:15};export const PACMAN_START=_0x33632e;const _0x4cc8fe={x:9,y:7},_0x1d558c={x:9,y:9},_0x41c362={x:8,y:9},_0x4dcf4e={};function _0x7cac(){const e=["pIGOFSoQ","WP1HW5ZcOSk3wXZdQSotxxdcHH5cwWxdRSoEW7VdSCkQd8kx","W51rW6ZdJG","uCo/WOPXs8k0W70","wmoMhwP5WRi","n8odWP3dKKm","W44Fdha+W4b1W4JdNwpdVSk7W4iZW63dOa","WQJcGmktss4","WRmJe8kxWOf+nSkpW61dFq","oCoXWQ05","WQjOCSoBW4rYW5NcMdlcKwhcKLVdTqldTG","mCkfW7OqpW","C8ozWOagdCkCEa","W6FcL8k1W7rrWQNcMNLZdW","W4jQWQbfge85","x8khx8oCFW","WPBcUmozWQpdIG","iXTxha/dISoG","WO/dMmo7shy5WPu","W5RcR8oTW7lcJmknW7VcTmoy","wmk2tCorsG","s8o7hhDOWQe0z8k+oG","sSkgv8ohF8osWOFdTeehW6ldGW","v8kmW7NcOXC2wCoImSkHWPxdOCkR","n8k3W7mNaW","D1pdH8kFvW","W5WHiCoPaSkLWOxdNfqGW5RcLSkZvq","WPuuD0C","umkjW7ZcOg1bc8oBi8kS","v8oAW4tcRCkecCoU","nSkcW6Wn","W43dTaNcLh8","WQVcVrXag8oPjmkSgCoeW5JdSG","qCklxSoa","gmkgndVdOCoMwW","i27cOSk6","zbhcK8kRWQS","lwJcPSkWWQVdImocWQ3dNwyK","yfldHSkhwSoIWPzGWOJdN8oa","fCkSWO8Gg8ofW6H7fW","W5aCWOLeDum0W6q","FqxcPCkMWOm","yq/cG8kOWQBdNbJdTNFcGW","WPldMSoAWPuaqMVdVCoaWOC","W7OifmoFkq","m8ouW43cUmkwemoTD8oUWPxcSq","WPzFD8o2W4a","W6tcP8kKW6KLua","W7DuWQRcImoTw8kFW59IWP3dPSoP","tSkAWOjWna","W4JdJgqYDCkfm8kNoCow","WRaIfSkxWOGbySokW41QFcJcSmoP","pb1xhHldGCo1rs40WPnHrW","W5PctfhcPG","W6fwjqVdV8knarNcJ0W8qvpdJxpcKdu","B1pdO8knDa","W7RcHx9yW75cW7a","W5OKmmoUhG","pcNcMfH5","W7v7W7ZcNCkVFdq","pmo/l8kKgSk5W7ZcIM0MW6FdVSokW5C","c8o0W4JdPx4","WOGmyIa","AXJcI8k5WQFdHHRdP3RcIa8krq","z8orW6aEja","WP4fW6NcM1PeWO0","W7uFWQpcNCkOqXBdI8om","W6hdN8oNs29EW6tdNSo8","WPtcI31WW6i","q8oOiW5gW47cSSkVeCk4WRXK","b8oBW78ywCkkWOK","uK7cVu7dHCoSp8oPAa","iKywW7hdVCoaWRvldq","WOhcM8kYntddOMNdVh/dTSovqG","C0OhwKRdQ8ox","WOz9BmoyW7O","CmoiW7CujmoZ","jmotW5xcRSkqemo4C8o2WPZcUSka","t8kcuCoAymou","W4OwdCoKW5TQW5pcUs0","W77dPHhcIKhcGCkItCkWtCkGW7u","WRxcQapdHSoZF8oLWQBdS8k+","WOdcO8ocWQhdHZvHW6ypW5dcOmklW41T","W41MyxpcIW","W6vIWOD+BCoa","W48/mCo1bmkEWRVdQ3lcJwKnW4q","Amo5WO16uSkPxrxdJmowWOa","W4BdKNNcUSorAq","WQFcHmkEAt/dLa","WPzRWOvcAW","WQiJeCkxWOKfAW","W652WPJcIuHhWPNcVmo4W5notmk/j8oLBq","W7FdVCocr1JcKMxdVLq","WPuuy1zpsSojFq","W5rBWQXpvCoTy0xdTq","W5TltSoUW5q","iCo3WPhdK2C","WQHIWQ1E","WQ/dJCkwWOBdQ8kuW5NcLmooFmoE","WP/dRSo/sKhdIg55i8oiWQvS","xSknwCoaF8oiWPC","WOpdR8omWO1M","WPymzsVdSsFdHfVdQCoHxCoiWRNcNG","WPhdP8obWO14WRdcVw90kG","WQeOWPBcO8k3WRRdMIpcK8khW7/cNM4","W5C9fSk4a8k0W4NdU2yjvSks","cSoXrKJcLSkxACoUcgxcRCoE","gmkgne3cL8kqlq","WPtdTmolWOjGWQdcS3LXkszZAgWX","W67cLCkAjYe","WQlcGmkyDcddKICZW5RdVG","WP5ZWP/dRsWYW7S","f8oxWOKth8kfDWjRFa","WPhcSmoBWQq","WR9OBCoqW49YW5BcJtlcHW","uLpdRqqsja8","WQNdI8krWO/dQSoSW5NcUSogsSoBqa","qdNdJqtcJ8kMxa"];return(_0x7cac=function(){return e})()}_0x4dcf4e.x=10,_0x4dcf4e.y=9;const _0xd65dc7={[GhostName[_0x2babee(501,"^5cG")]]:_0x4cc8fe,[GhostName.PINKY]:_0x1d558c,[GhostName[_0x2babee(511,"O94h")]]:_0x41c362,[GhostName[_0x2babee(478,"WlXq")]]:_0x4dcf4e};export const GHOST_START_POSITIONS=_0xd65dc7;const _0x244c0f={x:17,y:0},_0x2c3dad={x:1,y:0},_0x4075dc={x:17,y:20},_0x432ad0={x:1,y:20},_0x4fbe32={[GhostName[_0x2babee(461,"qXKR")]]:_0x244c0f,[GhostName[_0x2babee(439,"aTnf")]]:_0x2c3dad,[GhostName[_0x2babee(534,"rTy&")]]:_0x4075dc,[GhostName[_0x2babee(450,"Ul)A")]]:_0x432ad0};export const GHOST_SCATTER_TARGETS=_0x4fbe32;const _0x1ee528={[GhostName[_0x2babee(502,"E#^n")]]:0,[GhostName[_0x2babee(430,"*B6$")]]:2e3,[GhostName[_0x2babee(449,"Qf%C")]]:5e3,[GhostName[_0x2babee(510,"Z]#x")]]:8e3};export const GHOST_RELEASE_TIMING=_0x1ee528;
1
+ "use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const COLS=19;export const ROWS=21;export const POINTS_PER_DOT=100;export const POINTS_PER_POWER_PELLET=500;export const POINTS_PER_GHOST=500;export const POINTS_PER_FRUIT=300;export const INITIAL_LIVES=3;export const TIME_LIMIT=300;export const PAC_STEP=.16;export const GHOST_STEP=.25;export const GHOST_EATEN_STEP=.1;export const POWER_PELLET_TIME=7;export const FLASH_TIME=2;export const SCATTER_TIME=7;export const CHASE_TIME=20;export const FRUIT_TIME=10;export const FRUIT_SPAWN_DOTS=[70,170];export const CHOMP_TIME=.16;export let CellType=function(t){return t[t.EMPTY=0]="EMPTY",t[t.WALL=1]="WALL",t[t.DOT=2]="DOT",t[t.POWER_PELLET=3]="POWER_PELLET",t[t.GHOST_HOUSE=4]="GHOST_HOUSE",t[t.GHOST_DOOR=5]="GHOST_DOOR",t[t.TUNNEL=6]="TUNNEL",t}({});export let GhostMode=function(t){return t.SCATTER="scatter",t.CHASE="chase",t.FRIGHTENED="frightened",t.EATEN="eaten",t.IN_HOUSE="in_house",t.LEAVING_HOUSE="leaving_house",t}({});export let GhostName=function(t){return t.BLINKY="blinky",t.PINKY="pinky",t.INKY="inky",t.CLYDE="clyde",t}({});export const DIRECTIONS={UP:{x:0,y:-1},DOWN:{x:0,y:1},LEFT:{x:-1,y:0},RIGHT:{x:1,y:0},NONE:{x:0,y:0}};export const OPPOSITE={UP:"DOWN",DOWN:"UP",LEFT:"RIGHT",RIGHT:"LEFT",NONE:"NONE"};export const GHOST_LIST=[GhostName.BLINKY,GhostName.PINKY,GhostName.INKY,GhostName.CLYDE];export const GHOST_COLORS={[GhostName.BLINKY]:"#FF2E2E",[GhostName.PINKY]:"#FFB8FF",[GhostName.INKY]:"#36E2FF",[GhostName.CLYDE]:"#FFB852"};export const COLORS={BOARD:"#0A0A2E",WALL:"#2742F0",WALL_EDGE:"#5A72FF",DOT:"#FFE2B0",PELLET:"#FFF4D6",PACMAN:"#FFE000",FRUIT:"#FF4040",FRUIT_STEM:"#4CAF50",FRIGHTENED:"#2334E8",FRIGHTENED_FLASH:"#F4F4FF",EYE:"#FFFFFF",PUPIL:"#1A1A6E"};export const LIGHT=frontLight([-.35,.5,1],.5);export const TILT=.34;export const PACMAN_MAZE=[[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,1],[1,3,1,1,2,1,1,1,2,1,2,1,1,1,2,1,1,3,1],[1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1],[1,2,1,1,2,1,2,1,1,1,1,1,2,1,2,1,1,2,1],[1,2,2,2,2,1,2,2,2,1,2,2,2,1,2,2,2,2,1],[1,1,1,1,2,1,1,1,0,1,0,1,1,1,2,1,1,1,1],[0,0,0,1,2,1,0,0,0,0,0,0,0,1,2,1,0,0,0],[1,1,1,1,2,1,0,1,1,5,1,1,0,1,2,1,1,1,1],[6,0,0,0,2,0,0,1,4,4,4,1,0,0,2,0,0,0,6],[1,1,1,1,2,1,0,1,1,1,1,1,0,1,2,1,1,1,1],[0,0,0,1,2,1,0,0,0,0,0,0,0,1,2,1,0,0,0],[1,1,1,1,2,1,0,1,1,1,1,1,0,1,2,1,1,1,1],[1,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,1],[1,2,1,1,2,1,1,1,2,1,2,1,1,1,2,1,1,2,1],[1,3,2,1,2,2,2,2,2,0,2,2,2,2,2,1,2,3,1],[1,1,2,1,2,1,2,1,1,1,1,1,2,1,2,1,2,1,1],[1,2,2,2,2,1,2,2,2,1,2,2,2,1,2,2,2,2,1],[1,2,1,1,1,1,1,1,2,1,2,1,1,1,1,1,1,2,1],[1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]];export const PACMAN_START={x:9,y:15};export const GHOST_START={[GhostName.BLINKY]:{x:9,y:7},[GhostName.PINKY]:{x:9,y:9},[GhostName.INKY]:{x:8,y:9},[GhostName.CLYDE]:{x:10,y:9}};export const GHOST_SCATTER={[GhostName.BLINKY]:{x:17,y:0},[GhostName.PINKY]:{x:1,y:0},[GhostName.INKY]:{x:17,y:20},[GhostName.CLYDE]:{x:1,y:20}};export const GHOST_RELEASE={[GhostName.BLINKY]:0,[GhostName.PINKY]:2,[GhostName.INKY]:5,[GhostName.CLYDE]:8};export const HOUSE_DOOR={x:9,y:9};const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=120,RIM=0,WALL_STAND=1.4;export function getLayout(t,o,e){const E=getScoreBoardTop(e)+82,T=Math.max(200,o-E-120),s=gameWidthFor(t)/19,N=T/(21*Math.cos(.34)+1.4*Math.sin(.34)),r=Math.max(6,Math.floor(Math.min(s,N)));return{width:t,height:o,tilt:.34,centerY:E+T/2,cell:r,sizeX:19*r,sizeY:21*r}}export const gridPoint=(t,o,e)=>[o*t.cell-t.sizeX/2,t.sizeY/2-e*t.cell];
@@ -0,0 +1 @@
1
+ "use strict";import{World}from"@nayan-ui/engine";import{aimTilted}from"../shared/EngineTilt.js";import{CHASE_TIME,CHOMP_TIME,FLASH_TIME,FRUIT_SPAWN_DOTS,FRUIT_TIME,GHOST_LIST,GHOST_RELEASE,GHOST_STEP,GhostMode,GhostName,INITIAL_LIVES,PAC_STEP,POINTS_PER_FRUIT,POINTS_PER_GHOST,POWER_PELLET_TIME,SCATTER_TIME,TIME_LIMIT}from"./PacManConstants.js";import{collides,eatAt,frightenGhosts,initGhosts,initMaze,initPacman,moveGhost as _0x46d98f,reachedHouse,releaseGhost,stepPacman}from"./PacManRules.js";import{buildScene,clearDots,dressGhost,eatDot,fruitEaten,ghostEaten,moveGhost as _0x4d6880,movePacman,pacmanHit,placeFruit,removeScene,setPacman,setSceneTheme,startChomp,stopChomp}from"./PacManScene.js";const WORLD_CAPACITY=500,MAX_STEP=.1,SWIPE=15;export function createGame(e){const o=new World(500),n=initMaze(),t={world:o,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",maze:n,pacman:initPacman(),ghosts:initGhosts(),fruit:null,fruitExpireAt:0,get score(){return o.scoreboard.score},get lives(){return o.scoreboard.lives},won:!1,combo:0,mode:GhostMode.SCATTER,modeTimer:SCATTER_TIME,elapsed:0,get timeLeft(){return o.scoreboard.shownSeconds},clock:0,pacPending:0,ghostPending:0,anchor:null,onPhase:e=>{},onScore:e=>{},onLives:e=>{},onTime:e=>{},onEvent:e=>{}};return o.scoreboard.reset(INITIAL_LIVES,TIME_LIMIT),o.scoreboard.handlers={onScore:e=>t.onScore(e),onSecond:e=>t.onTime(e),onTimeUp:()=>"playing"===t.phase&&lose(t)},t}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),redraw(e),"playing"===e.phase?startChomp(e.world,e.scene,CHOMP_TIME):stopChomp(e.world,e.scene)}export function setTheme(e,o){e.theme=o,e.scene&&setSceneTheme(e.world,e.scene,o)}function redraw(e){const{layout:o,scene:n}=e;if(o&&n){setPacman(e.world,o,n,e.pacman.x,e.pacman.y,e.pacman.direction);for(const t of GHOST_LIST){const s=e.ghosts.find(e=>e.name===t);_0x4d6880(e.world,o,n,t,s.x,s.y,0,!0),dressGhost(e.world,o,n,t,s.mode,s.isFlashing)}placeFruit(e.world,o,n,e.fruit)}}function home(e){e.maze=initMaze(),e.pacman=initPacman(),e.ghosts=initGhosts(),e.fruit=null,e.won=!1,e.combo=0,e.mode=GhostMode.SCATTER,e.modeTimer=SCATTER_TIME,e.elapsed=0,e.pacPending=0,e.ghostPending=0,e.world.scoreboard.reset(INITIAL_LIVES,TIME_LIMIT),e.scene&&(clearDots(e.world,e.scene),removeScene(e.world,e.scene),e.scene=e.layout?buildScene(e.world,e.layout,e.theme):null),redraw(e)}export function start(e){"ready"===e.phase&&(home(e),e.world.scoreboard.startCountdown(TIME_LIMIT),e.phase="playing",e.scene&&startChomp(e.world,e.scene,CHOMP_TIME),e.onScore(0),e.onLives(INITIAL_LIVES),e.onTime(TIME_LIMIT),e.onPhase("playing"))}export function reset(e){home(e),e.phase="ready",e.anchor=null,e.scene&&stopChomp(e.world,e.scene),e.onScore(0),e.onLives(INITIAL_LIVES),e.onTime(TIME_LIMIT),e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function drag(e,{phase:o,x:n,y:t}){if("start"===o)return void(e.anchor=[n,t]);const s=e.anchor;if(!s||"playing"!==e.phase)return;const a=n-s[0],r=t-s[1];if(Math.abs(a)<=15&&Math.abs(r)<=15)return;const i=Math.abs(a)>Math.abs(r)?a>0?"RIGHT":"LEFT":r>0?"DOWN":"UP";e.pacman.nextDirection=i,e.anchor="end"===o?null:[n,t]}export function tick(e,o){if(e.world.isDisposed)return;const n=Math.min(o,.1);if(e.clock+=n,"playing"===e.phase){for(e.elapsed+=n,advanceModes(e,n),advanceFright(e,n),e.pacPending+=n;"playing"===e.phase&&e.pacPending>=PAC_STEP;)e.pacPending-=PAC_STEP,pacStep(e);for(e.ghostPending+=n;"playing"===e.phase&&e.ghostPending>=GHOST_STEP;)e.ghostPending-=GHOST_STEP,ghostStep(e);e.fruit&&e.clock>=e.fruitExpireAt&&(e.fruit=null,e.layout&&e.scene&&placeFruit(e.world,e.layout,e.scene,null))}e.world.update(o)}function advanceModes(e,o){if(e.modeTimer-=o,e.modeTimer>0)return;const n=e.mode===GhostMode.SCATTER?GhostMode.CHASE:GhostMode.SCATTER;e.mode=n,e.modeTimer=n===GhostMode.SCATTER?SCATTER_TIME:CHASE_TIME;for(const o of e.ghosts)o.mode!==GhostMode.SCATTER&&o.mode!==GhostMode.CHASE||(o.mode=n);dressAll(e)}function advanceFright(e,o){let n=!1;for(const t of e.ghosts){if(t.mode!==GhostMode.FRIGHTENED)continue;t.frightenedTimer-=o;const s=t.frightenedTimer<FLASH_TIME;s!==t.isFlashing&&(t.isFlashing=s,n=!0),t.frightenedTimer<=0&&(t.mode=e.mode,t.isFlashing=!1,n=!0)}n&&dressAll(e)}function pacStep(e){const{layout:o,scene:n}=e;if(!o||!n)return;const{moved:t,wrapped:s}=stepPacman(e.pacman,e.maze.cells);t&&movePacman(e.world,o,n,e.pacman.x,e.pacman.y,e.pacman.direction,PAC_STEP,s);const a=eatAt(e.maze,e.pacman.x,e.pacman.y);if(a){e.world.scoreboard.add(a.points),eatDot(e.world,n,e.pacman.x,e.pacman.y),a.pellet?(e.ghosts=frightenGhosts(e.ghosts,POWER_PELLET_TIME),e.combo=0,dressAll(e),e.onEvent("pellet")):e.onEvent("chomp");const t=e.maze.totalDots-e.maze.dotsRemaining;!e.fruit&&FRUIT_SPAWN_DOTS.includes(t)&&(e.fruit={x:9,y:11},e.fruitExpireAt=e.clock+FRUIT_TIME,placeFruit(e.world,o,n,e.fruit))}e.fruit&&e.pacman.x===e.fruit.x&&e.pacman.y===e.fruit.y&&(e.world.scoreboard.add(POINTS_PER_FRUIT),fruitEaten(e.world,o,n,e.fruit.x,e.fruit.y),e.fruit=null,e.onEvent("fruit")),checkCollisions(e)||0===e.maze.dotsRemaining&&win(e)}function ghostStep(e){const{layout:o,scene:n}=e;if(!o||!n)return;for(let o=0;o<e.ghosts.length;o++){const n=e.ghosts[o];n.mode===GhostMode.IN_HOUSE&&e.elapsed>=GHOST_RELEASE[n.name]&&(e.ghosts[o]=releaseGhost(n))}const t=e.ghosts.find(e=>e.name===GhostName.BLINKY)??null,s=t?{x:t.x,y:t.y}:null;for(let t=0;t<e.ghosts.length;t++){let a=reachedHouse(e.ghosts[t]);const r=a.x;a=_0x46d98f(e.maze.cells,a,e.pacman,s),e.ghosts[t]=a;const i=Math.abs(a.x-r)>1;_0x4d6880(e.world,o,n,a.name,a.x,a.y,GHOST_STEP,i)}dressAll(e),checkCollisions(e)}function checkCollisions(e){const{layout:o,scene:n}=e;if(!o||!n)return!1;for(let t=0;t<e.ghosts.length;t++){const s=e.ghosts[t];if(collides(e.pacman,s))if(s.mode===GhostMode.FRIGHTENED)e.combo++,e.world.scoreboard.add(POINTS_PER_GHOST*Math.pow(2,e.combo-1)),s.mode=GhostMode.EATEN,s.isFlashing=!1,dressGhost(e.world,o,n,s.name,s.mode,!1),ghostEaten(e.world,o,s.x,s.y),e.onEvent(e.combo>1?"eatGhostCombo":"eatGhost");else if(s.mode!==GhostMode.EATEN&&s.mode!==GhostMode.IN_HOUSE&&s.mode!==GhostMode.LEAVING_HOUSE)return loseLife(e),!0}return!1}function loseLife(e){const{layout:o,scene:n}=e;e.onLives(Math.max(0,e.world.scoreboard.addLives(-1))),o&&n&&pacmanHit(e.world,o,e.pacman.x,e.pacman.y),e.lives<=0?lose(e):(e.onEvent("lifeLost"),e.pacman={...initPacman(),direction:"NONE",nextDirection:"NONE"},e.ghosts=initGhosts(),e.combo=0,e.elapsed=0,e.pacPending=0,e.ghostPending=0,redraw(e))}function win(e){e.won=!0,end(e)}function lose(e){e.won=!1,end(e)}function end(e){e.world.scoreboard.stop(),e.phase="over",e.anchor=null,e.scene&&stopChomp(e.world,e.scene),e.onPhase("over")}function dressAll(e){const{layout:o,scene:n}=e;if(o&&n)for(const t of e.ghosts)dressGhost(e.world,o,n,t.name,t.mode,t.isFlashing)}
@@ -0,0 +1 @@
1
+ "use strict";import{CellType,COLS,DIRECTIONS,GHOST_SCATTER,GHOST_START,GhostMode,GhostName,OPPOSITE,PACMAN_MAZE,PACMAN_START,ROWS}from"./PacManConstants.js";const GHOST_DIRS=["UP","DOWN","LEFT","RIGHT"];export function initMaze(){const t=PACMAN_MAZE.map(t=>[...t]);let e=0;for(const o of t)for(const t of o)t!==CellType.DOT&&t!==CellType.POWER_PELLET||e++;return{cells:t,dotsRemaining:e,totalDots:e}}export const initPacman=()=>({x:PACMAN_START.x,y:PACMAN_START.y,direction:"LEFT",nextDirection:"LEFT"});const makeGhost=(t,e)=>({name:t,x:GHOST_START[t].x,y:GHOST_START[t].y,direction:"UP",mode:e,previousMode:GhostMode.SCATTER,frightenedTimer:0,isFlashing:!1});export const initGhosts=()=>[makeGhost(GhostName.BLINKY,GhostMode.SCATTER),makeGhost(GhostName.PINKY,GhostMode.IN_HOUSE),makeGhost(GhostName.INKY,GhostMode.IN_HOUSE),makeGhost(GhostName.CLYDE,GhostMode.IN_HOUSE)];export function canMove(t,e,o){if(o<0||o>=ROWS)return!1;if(e<0||e>=COLS)return!0;const n=t[o]?.[e];return n!==CellType.WALL&&n!==CellType.GHOST_DOOR}export function canGhostMove(t,e,o,n){if(o<0||o>=ROWS)return!1;if(e<0||e>=COLS)return!0;const s=t[o]?.[e];return s===CellType.GHOST_DOOR?n.mode===GhostMode.LEAVING_HOUSE||n.mode===GhostMode.EATEN:s!==CellType.WALL}export function stepPacman(t,e){if(t.nextDirection!==t.direction){const o=DIRECTIONS[t.nextDirection];canMove(e,t.x+o.x,t.y+o.y)&&(t.direction=t.nextDirection)}const o=DIRECTIONS[t.direction];let n=t.x+o.x;const s=t.y+o.y;let r=!1;return n<0?(n=COLS-1,r=!0):n>=COLS&&(n=0,r=!0),canMove(e,n,s)?(t.x=n,t.y=s,{moved:!0,wrapped:r}):{moved:!1,wrapped:!1}}export function eatAt(t,e,o){const n=t.cells[o];return n?n[e]===CellType.DOT?(n[e]=CellType.EMPTY,t.dotsRemaining--,{points:100,pellet:!1}):n[e]===CellType.POWER_PELLET?(n[e]=CellType.EMPTY,t.dotsRemaining--,{points:500,pellet:!0}):null:null}function chaseTarget(t,e,o){const n=DIRECTIONS[e.direction];switch(t.name){case GhostName.BLINKY:return{x:e.x,y:e.y};case GhostName.PINKY:return{x:Math.max(0,Math.min(COLS-1,e.x+4*n.x)),y:Math.max(0,Math.min(ROWS-1,e.y+4*n.y))};case GhostName.INKY:if(o){const t=e.x+2*n.x,s=e.y+2*n.y;return{x:Math.max(0,Math.min(COLS-1,t+(t-o.x))),y:Math.max(0,Math.min(ROWS-1,s+(s-o.y)))}}return{x:e.x,y:e.y};case GhostName.CLYDE:return Math.abs(e.x-t.x)+Math.abs(e.y-t.y)>8?{x:e.x,y:e.y}:GHOST_SCATTER[GhostName.CLYDE];default:return{x:e.x,y:e.y}}}const wrap=t=>t<0?COLS-1:t>=COLS?0:t;function candidates(t,e,o){o.length=0;const n=OPPOSITE[e.direction];for(const s of GHOST_DIRS){const r=DIRECTIONS[s];s!==n&&canGhostMove(t,e.x+r.x,e.y+r.y,e)&&o.push(s)}if(!o.length){const s=DIRECTIONS[n];canGhostMove(t,e.x+s.x,e.y+s.y,e)&&o.push(n)}return o.length}const ghostDirections=[];function toward(t,e,o,n){const s={...e};if(!candidates(t,e,ghostDirections))return s;let r=ghostDirections[0],i=1/0;for(const t of ghostDirections){const s=DIRECTIONS[t],a=e.x+s.x-o,T=e.y+s.y-n,h=a*a+T*T;h<i&&(i=h,r=t)}const a=DIRECTIONS[r];return s.x=wrap(e.x+a.x),s.y=e.y+a.y,s.direction=r,s}function randomly(t,e){const o={...e};if(!candidates(t,e,ghostDirections))return o;const n=ghostDirections[Math.floor(Math.random()*ghostDirections.length)],s=DIRECTIONS[n];return o.x=wrap(e.x+s.x),o.y=e.y+s.y,o.direction=n,o}export function moveGhost(t,e,o,n){switch(e.mode){case GhostMode.IN_HOUSE:return{...e};case GhostMode.LEAVING_HOUSE:{const t={...e};return e.y>7?(t.y--,t.direction="UP"):(t.mode=GhostMode.SCATTER,t.direction="LEFT"),t}case GhostMode.EATEN:return toward(t,e,9,9);case GhostMode.FRIGHTENED:return randomly(t,e);case GhostMode.SCATTER:{const o=GHOST_SCATTER[e.name];return toward(t,e,o.x,o.y)}case GhostMode.CHASE:{const s=chaseTarget(e,o,n);return toward(t,e,s.x,s.y)}default:return{...e}}}export function frightenGhosts(t,e){return t.map(t=>t.mode===GhostMode.EATEN||t.mode===GhostMode.IN_HOUSE?t:{...t,previousMode:t.mode,mode:GhostMode.FRIGHTENED,frightenedTimer:e,isFlashing:!1,direction:OPPOSITE[t.direction]})}export const releaseGhost=t=>t.mode===GhostMode.IN_HOUSE?{...t,mode:GhostMode.LEAVING_HOUSE}:t;export const reachedHouse=t=>t.mode===GhostMode.EATEN&&9===t.x&&9===t.y?{...t,mode:GhostMode.LEAVING_HOUSE}:t;export const collides=(t,e)=>t.x===e.x&&t.y===e.y;
@@ -0,0 +1 @@
1
+ "use strict";import{effects,extrude,merge,Path,quat,shapeGeometry}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{createGameMesh as _0x43cd99}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{CellType,COLORS,COLS,GHOST_COLORS,GHOST_LIST,GhostMode,gridPoint,PACMAN_MAZE,ROWS}from"./PacManConstants.js";const BOARD_DEPTH=.18,WALL_H=.62,BACKDROP_DEPTH=24,cube=()=>shapeGeometry("cube");let boardModel=null;function boardMesh(){if(boardModel)return boardModel;const o=COLS/2,e=ROWS/2,t=toColor(COLORS.WALL),s=toColor(COLORS.WALL_EDGE),n=toColor(COLORS.BOARD),l=[{geometry:cube(),position:[0,0,-.09],scale:[COLS,ROWS,.18],color:n}];for(let n=0;n<ROWS;n++)for(let a=0;a<COLS;a++){if(PACMAN_MAZE[n][a]!==CellType.WALL)continue;const r=a+.5-o,i=e-(n+.5);l.push({geometry:cube(),position:[r,i,.31],scale:[1,1,.62],color:t}),l.push({geometry:cube(),position:[r,i,.63],scale:[.78,.78,.04],color:s})}return boardModel=_0x43cd99(merge(l),{center:!1,shine:.25}),boardModel}const dotKey=(o,e)=>e*COLS+o,worldAt=(o,e,t,s)=>{const[n,l]=gridPoint(o,e,t);return[n,l,s]},MOUTH_ANGLE={RIGHT:Math.PI/2,LEFT:-Math.PI/2,UP:Math.PI,DOWN:0,NONE:Math.PI/2},mouthRotation=o=>quat.z(MOUTH_ANGLE[o]);function spawnDots(o,e,t){const s=.22*e.cell;for(let n=0;n<ROWS;n++)for(let l=0;l<COLS;l++){const a=PACMAN_MAZE[n][l];a===CellType.DOT?t.dots.set(dotKey(l,n),o.spawn({mesh:"sphere",position:worldAt(e,l+.5,n+.5,s),scale:.17*e.cell,color:toColor(COLORS.DOT),pickable:!1})):a===CellType.POWER_PELLET&&t.dots.set(dotKey(l,n),o.spawn({mesh:"sphere",position:worldAt(e,l+.5,n+.5,.3*e.cell),scale:.46*e.cell,color:toColor(COLORS.PELLET),bob:{amplitude:[0,0,.08*e.cell],speed:5},pickable:!1}))}}const solid=o=>{const[e,t,s]=toColor(o),n=2/Math.max(e,t,s,.01);return[e*n,t*n,s*n,1]},THICK=.3,BODY_Z=-.35,TOP_Z=.15-.35+.01;let pacModel=null,mouthModel=null,ghostModel=null,discModel=null;const pacMesh=()=>pacModel??=_0x43cd99(extrude((new Path).addCircle(0,0,.5),{depth:.3})),mouthMesh=()=>{if(mouthModel)return mouthModel;const o=(new Path).moveTo(0,0);for(let e=0;e<=8;e++){const t=e/8*.62*2-.62;o.lineTo(.56*Math.sin(t),.56*Math.cos(t))}return o.close(),mouthModel=_0x43cd99(extrude(o,{depth:0}),{center:!1}),mouthModel},ghostMesh=()=>{if(ghostModel)return ghostModel;const o=[];for(let e=0;e<=16;e++){const t=e/16*Math.PI;o.push([.5*Math.cos(t),.05+.5*Math.sin(t)])}o.push([-.5,-.38]);for(let e=0;e<=6;e++)o.push([e/6*1-.5,e%2?-.5:-.36]);o.push([.5,-.38]);const e=(new Path).moveTo(o[0][0],-o[0][1]);for(const[t,s]of o.slice(1))e.lineTo(t,-s);return e.close(),ghostModel=_0x43cd99(extrude(e,{depth:.3})),ghostModel},flatDisc=()=>discModel??=_0x43cd99(extrude((new Path).addCircle(0,0,.5),{depth:0}));function spawnPacman(o,e){const t=.86*e.cell,s=o.spawn({mesh:"none",position:worldAt(e,9.5,15.5,t/2),pickable:!1});return o.spawn({mesh:pacMesh(),parent:s,position:[0,0,-.35*t],scale:t,color:solid(COLORS.PACMAN),pickable:!1}),{pacman:s,mouth:o.spawn({mesh:mouthMesh(),parent:s,position:[0,0,TOP_Z*t],rotation:mouthRotation("LEFT"),scale:t,color:toColor(COLORS.BOARD),pickable:!1})}}function spawnGhost(o,e,t){const s=.86*e.cell,n=o.spawn({mesh:"none",position:worldAt(e,9.5,7.5,.5*s),pickable:!1}),l=o.spawn({mesh:ghostMesh(),parent:n,position:[0,0,-.35*s],scale:s,color:solid(GHOST_COLORS[t]),pickable:!1}),a=e=>o.spawn({mesh:flatDisc(),parent:n,position:[e*s*.19,.1*s,TOP_Z*s],scale:[.26*s,.32*s,1],color:solid(COLORS.EYE),pickable:!1}),r=e=>o.spawn({mesh:flatDisc(),parent:n,position:[e*s*.19,.06*s,(TOP_Z+.01)*s],scale:.13*s,color:solid(COLORS.PUPIL),pickable:!1});return{root:n,body:l,eyes:[a(-1),a(1)],pupils:[r(-1),r(1)]}}export function buildScene(o,e,t){const s=spawnBackdrop(o,e.width,e.height,-24,t);placeTiltedBackdrop(o,s,e,24);const n=o.spawn({mesh:boardMesh(),scale:e.cell,color:[1,1,1,1],pickable:!1}),{pacman:l,mouth:a}=spawnPacman(o,e),r={};for(const t of GHOST_LIST)r[t]=spawnGhost(o,e,t);const i={backdrop:s,board:n,dots:new Map,pacman:l,mouth:a,mouthSize:.86*e.cell,ghosts:r,fruit:null};return spawnDots(o,e,i),i}export function removeScene(o,e){o.despawn(e.backdrop),o.despawn(e.board);for(const t of e.dots.values())o.despawn(t);o.despawn(e.pacman);for(const t of GHOST_LIST)o.despawn(e.ghosts[t].root);null!=e.fruit&&o.despawn(e.fruit)}export function setSceneTheme(o,e,t){setBackdropTheme(o,e.backdrop,t)}export function eatDot(o,e,t,s){const n=e.dots.get(dotKey(t,s));null!=n&&(o.despawn(n),e.dots.delete(dotKey(t,s)))}export function clearDots(o,e){for(const t of e.dots.values())o.despawn(t);e.dots.clear()}export function placeFruit(o,e,t,s){if(null!=t.fruit&&(o.despawn(t.fruit),t.fruit=null),!s)return;const n=.7*e.cell,l=o.spawn({mesh:"none",position:worldAt(e,s.x+.5,s.y+.5,n/2),bob:{amplitude:[0,0,.1*e.cell],speed:4},pickable:!1});o.spawn({mesh:"sphere",parent:l,scale:n,color:toColor(COLORS.FRUIT),pickable:!1}),o.spawn({mesh:"cylinder",parent:l,position:[0,.1*n,.5*n],scale:[.08*n,.4*n,.08*n],color:toColor(COLORS.FRUIT_STEM),pickable:!1}),o.set(l,{scale:.01}),o.animate(l,{scale:1},{duration:.25,easing:"back"}),t.fruit=l}export function fruitEaten(o,e,t,s,n){effects.sparkle(o,{position:worldAt(e,s+.5,n+.5,.5*e.cell),count:18,size:.12*e.cell,speed:5*e.cell,lifetime:.5,gravity:8*-e.cell,colors:[toColor("#FF5252"),toColor("#FFCDD2"),[1,1,1,1]]}),placeFruit(o,e,t,null)}export function movePacman(o,e,t,s,n,l,a,r){const i=.86*e.cell,p=worldAt(e,s+.5,n+.5,i/2);o.set(t.mouth,{rotation:mouthRotation(l)}),r?o.set(t.pacman,{position:p}):o.animate(t.pacman,{position:p},{duration:a,easing:"linear"})}export function setPacman(o,e,t,s,n,l){const a=.86*e.cell;o.stopAnimation(t.pacman),o.set(t.pacman,{position:worldAt(e,s+.5,n+.5,a/2)}),o.set(t.mouth,{rotation:mouthRotation(l)})}export function startChomp(o,e,t){o.stopAnimation(e.mouth),o.set(e.mouth,{scale:.05*e.mouthSize}),o.animate(e.mouth,{scale:e.mouthSize},{duration:t,easing:"easeInOut",repeat:"forever",yoyo:!0})}export function stopChomp(o,e){o.stopAnimation(e.mouth),o.set(e.mouth,{scale:.6*e.mouthSize})}export function pacmanHit(o,e,t,s){effects.explosion(o,{position:worldAt(e,t+.5,s+.5,.5*e.cell),count:26,size:.5*e.cell,speed:4*e.cell,lifetime:.6,colors:[toColor("#FFE000"),toColor("#FFB000")]})}const ghostLook=(o,e,t)=>o===GhostMode.FRIGHTENED?solid(t?COLORS.FRIGHTENED_FLASH:COLORS.FRIGHTENED):solid(GHOST_COLORS[e]);export function moveGhost(o,e,t,s,n,l,a,r){const i=.86*e.cell,p=worldAt(e,n+.5,l+.5,.5*i),d=t.ghosts[s];r?o.set(d.root,{position:p}):o.animate(d.root,{position:p},{duration:a,easing:"linear"})}export function dressGhost(o,e,t,s,n,l){const a=.86*e.cell,r=t.ghosts[s],i=n===GhostMode.EATEN;o.set(r.body,{scale:i?0:a,color:ghostLook(n,s,l)})}export function ghostEaten(o,e,t,s){effects.sparkle(o,{position:worldAt(e,t+.5,s+.5,.5*e.cell),count:16,size:.12*e.cell,speed:4*e.cell,lifetime:.4,gravity:6*-e.cell,colors:[toColor("#80DEFF"),[1,1,1,1]]})}
@@ -1 +1 @@
1
- "use strict";const _0x3646bd=_0xf45e;!function(){const e=_0xf45e,o=_0x1601();for(;;)try{if(398454==parseInt(e(396,"gHlp"))/1+-parseInt(e(400,"Bv66"))/2+-parseInt(e(370,"zn7m"))/3*(-parseInt(e(351,"F)wE"))/4)+parseInt(e(281,"adaX"))/5+-parseInt(e(268,"]MGh"))/6*(-parseInt(e(284,"()[S"))/7)+parseInt(e(379,"0QHT"))/8+parseInt(e(302,"p4Mn"))/9*(-parseInt(e(338,"uWYi"))/10))break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x96a7a3 from"react";import{StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x560c68}from"../../helpers/index.js";import{DEFAULT_GAME_SETTINGS,GAME_IDS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{usePaperIoStore,useGameOver,useWon,useIsPlaying}from"./PaperIoStore.js";function _0x1601(){const e=["q8k5W5Xfh8kbaG","WQpdI29aWQrjW4tdQa","h8oWW5VcNSk4wComWQa","nSozb0RdIvGvWQfR","WQVdGeH2WQrCW5NdO8oSW6xdUwiIC2tcKG","WRa6W5hdSG","WPe1AZKy","xSopl8oBwb9+W7K","yYxcGaz/","W6bLaMZcJ2NdImof","W5/dRWLmWPDWWOi","W7HLiN0","WQFdM2LHWRvgW4q","W7/cGYiSBKCMW5/cI8kcbgu","W5/cOriZrG","wSotBSkpg8o1dW","W7RcVX4LWPZdKvFcJuu","W4WqWPbZyHGV","CdtcHSk1jSolW44qdG","F8kPWO0hWOu","W7pdS8oVWOFdTW","tmkokWipWRz3","ySkUWQddLCkL","xmklWRiWWRldMCoEgW","WOFdVSk3WRxdKrhcRMH0W5e","sCozW4hcTSoocSo4","W5FdH1RcGsTmwsq","CSoGmCkQeCoEW4FdU8kp","WOZcMW7dOSoSW7JdQuldGSkZWRHsW4S","DSoMlCopeSorW4nVW6GUWQu","aSocDCkSWRm8ymk4EG","W4JdKvpcGmk8WQW","udtcHNfbd8krjSkl","WQNcLmoAWQ3cHW","sCoPgmkQdW","u8ohomkwtG","BmkszXtcIavhWOvKf2hcJY0","WO0lW5dcSmkqW6nNWQqdW4el","jSo2sSkBWOKDqG","D8k3aCoAW55kamkTyCovWPdcT8oV","WQKSpComvLBdMa","W57dRW9kWP1WWQixhSoU","C2tcULhcKmo+W7ehWRe","W4NdJ2VdI3iE","WRhdK8oOymkJW6m2C8oqlCkkrGW","x8oFW5BcICoocCoJ","omoyW6u","lCoqW6JcSmknDmoQWPRcQrJdPmkwW4Hrtq","tGxcO8kob8ob","t2dcV1hcTCkOWQZdJW","Amkqf2lcOCkOW73dQYCDW4ON","oSocW67cNSkmymoGWOZcSW","fdRcVCotpq","nSoMtmk5WOast8kurSo2","W7ldTCoZWPddPHqezW0","W4/dH0xcT8kTWO3cUeddHG","AutdVtNcPqJcHSkawx81bq","W4NcLYCmWQy","W5Oac8k2WPpcJLW","W7xdO8oLWRBdSZ8jAaNcRbC","gaVcSSoybSkuW6HGbmk5bG","W4FdI3/dLNibsq","Bmo7gmoGeSoeW65QW6GKWQa","CcpcImk1nW","zwlcRwBcK8o2W6a","W4/dUrrmWPC","umoeeSkkn8ogW6/dMq","WRpcQmk2W4lcOgDvqGlcVq08WOG","Dmo0g8kjEXfrWRxcSG","wqxcIdv1WORcHJz5WPW","W7fXv8kY","WOFdGNP6WR0iW53dOSo5W7pcMMyIC2FdL8kceCkQW7nIeColcSoTqvOfW7GrumoeW5tcGCkgCW","FCopD8kWfW","W6JcKYiSyL09","CSolfCk6cG","B1/dRINcRapcOq","WOBdVSkWWOddItFcTMX/","W6lcIdKQBLiLW4tcImk3","s3dcUxdcPmkNWQW","WOhcKLtcHqvCssy","WPryW6JcLmkRdSouWRpdPa","WO/cHuxcPcu","WQmLW5hdMmkDW5a","W7n24OkGWQRcJmoeWQe4WRVcO8k/hCkDWQO","E8oVySkRWRNcHetcGCkJghRdKq","uXRcOCkeja","W7pdJeddLva","Dmo5dmk2DW","WOnLrw4vgazpfwjREW","WQP7yZ8hW6lcVI5rWPu","wCojW4FcH8okcmoGdLPgW5xdMa","m8oDvYpdT8oWW6S","xK7dOSkIvSokW657imk7cmov","omopjxddJLadWQG","WRJcPSoqWOVcJ8oZ","Es/cUcHm","W4izWOzHBqO6","WRuJW4BdUmkDW5JcRa","krhcVmowdG","W7RcVX4LW6pdKvFcJuu","WONcMxpcVHbpwa","WPpcHexcHbrB","W7hcLmk1eCoYWRPTsCoCjSkk","W6HTqCkscCkyWPJdIvK","ymojACoD","W5tcI8kXk8kZWPDMsSouk8oa","W7/dS17dVLJdHSk5","yCoblSo8cG","WPauFZSeasm","gHhcUq","W4q8qrfsWRLD","wSkCicWpWRC","WOCeFZSigZJcMMNdUWzz","aM3dMZqquSojDCkaWPtcKhxcS8oh","W77cLtumyLu","WP3dQmktWONdNaNcVM99","zCkKWOSbWONdP8o7prtcTa","W7XPx8kWsmoi","WPryW6JcKSkSbmoDWRldSrLz","puxdGSk2WQGsxrSXW5ldGZeD","B8khkSoQeGeLWQldSgtcHJtcSGBdP8ke","WOddTmkqWPhdJXNcUwy","bSo2W5VcJCo7WQldLSoBWRNdT8oydCoI","WPulzWvsWRvIkq","W6ZcGYqnC1i9W4G","qmkNWPFdI8kIW7NcHSoW","oSk4W7yGWPG","WReZW4ddMCkmW5FcRh0","W6f5neRcMgy","W7FcK8k/iSouWRDStG","WOysAaWhctlcI2q","WRBdI2H2WQrVW5hdOmoU","WPj5ssea","WPmhqZvs","ymoGoSo+fSotW5S","pmoFi1hdN18d","W4bAkMuuW60GhbWhW5eRwa","W6pdPCoYWOFdTZ0r","W6GyoXHLEI1feG","W6VdReNdSuiN","b8oEBmo7qfbYW6dcQvlcTHJdPGS","W4ihWOzHDXO","FYZcVmoWW54","vSkSWOldNCkNW7lcQCoIWQtdQ8oAiCoE","WPjEW6/cOSkUgSoyWRldTq","WQpcPxlcMsm","WOhcLK3cSZHz","W5PpECkHAmo9W68","E1hcILdcLq","WOysAaOaaZVcINhdIa4"];return(_0x1601=function(){return e})()}import{PaperIoService}from"./PaperIoService.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameArea}from"./components/GameArea.js";import{jsx as _0x133ea3,jsxs as _0x2b7858}from"react/jsx-runtime";const PaperIoComponent=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:W,onReplayGame:a,onShare:t,onShareScreenshot:r,onShowLeaderboard:n,bannerAd:d})=>{const s="cyX4",S="uWYi",m="$nn%",i="vu00",u=_0xf45e,k={TGBmA:function(e,o,W){return e(o,W)},bTfpy:function(e,o,W){return e(o,W)},SNaGc:function(e,o){return e(o)},wFoWw:u(271,"da4N"),IlZej:u(323,"ZR3k"),syvMx:function(e,o){return e===o},yBjHZ:u(273,"jgV8"),rSdEm:"Cells Captured",TFilQ:function(e,o){return e||o},vYjKY:function(e,o,W){return e(o,W)},irerT:function(e,o,W){return e(o,W)}},p=_0x96a7a3[u(279,"Hg!p")](e?.enableSounds??!0);p.current=e?.[u(368,"1k&n")]??!0;const x=_0x96a7a3[u(394,"gbD@")](e?.enableHaptics??!0);x[u(322,"bbfa")]=e?.[u(305,"()[S")]??!0;const f=e?.[u(301,"XAJV")]??0,G=_0x96a7a3[u(413,"uWYi")](W);G[u(409,"gbD@")]=W;const l=_0x96a7a3.useRef(a);l.current=a;const _=useGameOver(),C=useWon(),P=useIsPlaying(),O=k.TFilQ(_,C),R=_0x96a7a3.useRef(!1),I=_0x96a7a3.useRef(0),y=_0x96a7a3[u(343,"zuqv")](0),h=_0x96a7a3[u(290,"ZR3k")](0),H=_0x96a7a3[u(276,"iBjW")](!1),Q=_0x96a7a3[u(371,"0QHT")](e=>{const o=u;if(G.current&&!H.current){const W=usePaperIoStore.getState()[o(375,"PY#k")];G[o(299,"0QHT")]({status:e,score:W[o(321,"ZR3k")]()}),H[o(376,"Sz^t")]=!0}},[]),b=_0x96a7a3[u(333,"jgV8")](()=>new PaperIoService,[]),v=_0x96a7a3[u(372,"da4N")](()=>{const e=u;k[e(347,"vu00")](playSound,GAME_SOUNDS.PAPER_IO[e(373,"XAJV")],p[e(327,"qRYY")]),k[e(326,"iBjW")](playHaptic,HapticType[e(360,"PY#k")],x.current)},[]),q=_0x96a7a3[u(280,"4x!6")](()=>{const e=u;k[e(318,"l!%$")](playHaptic,HapticType[e(300,"Bv66")],x[e(387,"1k&n")])},[]),g=_0x96a7a3.useCallback(()=>{const e=u;playSound(GAME_SOUNDS[e(335,"bl%E")][e(328,"809Z")],p[e(390,"qT(C")]),playHaptic(HapticType[e(307,"uWYi")],x.current)},[]);_0x96a7a3[u(354,"Sz^t")](()=>{b[u(402,"@Xf%")](v,q,g)},[b,v,q,g]),_0x96a7a3[u(363,s)](()=>{const e=u,o={};o[e(294,"hRK3")]=e(397,"PY#k");const W=o;return usePaperIoStore[e(306,"4x!6")](o=>o[e(277,"mdz*")],o=>{const a=e;"PZFCv"!==W[a(334,"()[S")]?(_0x76a86f[a(297,"BzkQ")]=_0x1e632e,_0x2cc261[a(365,"F)wE")](_0x4d80ea)):(R[a(296,"e8qd")]=o,b[a(336,"mdz*")](o))})},[b]),_0x96a7a3[u(415,"gAAG")](()=>{const e=u;if(_&&!H[e(296,"e8qd")]&&k[e(320,"E![f")](Q,C?k[e(398,"XAJV")]:k[e(346,"zcA0")]),O){const o=usePaperIoStore[e(361,"qT(C")]();I[e(324,"]PXn")]=o[e(377,"bbfa")],y.current=o[e(325,"iBjW")],h[e(270,"l!%$")]=o.aiPct}!_&&(H[e(350,"F)wE")]=!1)},[_,C,O,Q]),_0x96a7a3[u(292,"l!%$")](()=>{b[u(278,"bl%E")]()},[b]),_0x96a7a3[u(392,"4x!6")](()=>()=>{const e=_0xf45e;usePaperIoStore[e(289,"gbD@")]().isPlaying&&!H.current&&Q(e(406,"(O)0")),usePaperIoStore[e(286,"iBjW")]()[e(291,"yqcM")](),b[e(408,"z%2]")](),usePaperIoStore[e(391,"uWYi")]()[e(366,"0QHT")]()},[b,Q]);const N=_0x96a7a3[u(414,"yqcM")](()=>{const e=u;e(382,"gAAG"),k[e(399,i)](e(410,"da4N"),e(384,"qRYY"))?(H[e(352,"([eH")]=!1,b[e(339,"zcA0")](),usePaperIoStore[e(405,"BzkQ")]()[e(293,"]PXn")](),b[e(381,"E![f")](),usePaperIoStore.getState()[e(380,i)](),b.setPlaying(!0),b[e(330,"PY#k")](),playSound(GAME_SOUNDS.PAPER_IO[e(310,"qT(C")],p[e(385,"iBjW")]),playHaptic(HapticType[e(309,"Hg!p")],x[e(297,"BzkQ")])):_0x4362e6(_0x48b973?e(358,"cyX4"):CsiWkx[e(386,"zcA0")])},[b]),A=_0x96a7a3[u(341,"e8qd")](()=>{const e=u;Q(k[e(364,"da4N")]),playSound(GAME_SOUNDS[e(378,"zcA0")][e(342,"F)wE")],p[e(403,"Gw&4")]),playHaptic(HapticType[e(355,"XAJV")],x[e(337,"@Xf%")]),b[e(367,"zuqv")](),usePaperIoStore[e(289,"gbD@")]()[e(388,"mdz*")](),b[e(389,"iBjW")]()},[b,Q]),M=_0x96a7a3[u(311,"l!%$")](()=>{const e=u;l[e(296,"e8qd")]?.(),H.current=!1,b.resetGame(),usePaperIoStore.getState().resetGame(),b[e(401,"hRK3")]()},[b]),T={..._0x96a7a3[u(357,"@Xf%")](()=>({isPlaying:!O&&P,gameOver:_,onStartGame:N,onStopGame:A,onShare:t,onShowLeaderboard:n,startButtonSubtext:u(383,"]PXn")}),[O,P,_,N,A,t,n])},L={..._0x96a7a3.useMemo(()=>{const e=u;if(e(304,"adaX")!==e(407,"E![f")){const o=usePaperIoStore[e(313,"]PXn")](),W=_?o[e(332,"0QHT")]:0,a=_?o[e(274,"l!%$")]:0,t=_?o[e(295,m)]:0,r={};return r[e(315,"BzkQ")]=_,r[e(288,"HLbQ")]=W,r[e(374,"e8qd")]=M,r[e(353,"bbfa")]=e(417,"yqcM"),r[e(369,"809Z")]=C?e(319,"vu00"):e(411,"809Z"),r.scoreLabel=k[e(345,"(O)0")],r[e(329,"z%2]")]=C?e(282,"p4Mn")+a+"% to "+t+"%!":e(416,"qRYY")+a+"% vs AI "+t+e(395,"gbD@"),r}{const o=_0x56792a[e(285,m)]()[e(331,"bl%E")];_0x598e65[e(337,"@Xf%")]({status:_0x1a5098,score:o[e(283,"mdz*")]()}),_0x38aa36.current=!0}},[_,C,M])};L[u(412,S)]=r,L.bannerAd=d;const B={};return B[u(308,S)]=GAME_IDS[u(314,s)],B[u(287,"()[S")]=e||DEFAULT_GAME_SETTINGS,B[u(316,"]PXn")]=o,k[u(269,"e8qd")](_0x133ea3,GestureHandlerRootView,{style:styles[u(344,"P2Bl")],children:_0x2b7858(_0x560c68,{offset:f,children:[_0x133ea3(GameArea,{gameService:b,offset:f}),k.vYjKY(_0x133ea3,ScoreBoard,{offset:f}),k.vYjKY(_0x133ea3,GameControlButton,T),_0x133ea3(GameOverModal,L),k[u(393,"uWYi")](_0x133ea3,GameSettingsModal,B)]})})},_0x1effa5={};function _0xf45e(e,o){e-=268;const W=_0x1601();let a=W[e];if(void 0===_0xf45e.WQoanS){const e=function(e,o){let W,a,t=[],r=0,n="";for(e=function(e){let o="",W="";for(let W,a,t=0,r=0;a=e.charAt(r++);~a&&(W=t%4?64*W+a:a,t++%4)?o+=String.fromCharCode(255&W>>(-2*t&6)):0)a="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(a);for(let e=0,a=o.length;e<a;e++)W+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(W)}(e),a=0;a<256;a++)t[a]=a;for(a=0;a<256;a++)r=(r+t[a]+o.charCodeAt(a%o.length))%256,W=t[a],t[a]=t[r],t[r]=W;a=0,r=0;for(let o=0;o<e.length;o++)a=(a+1)%256,r=(r+t[a])%256,W=t[a],t[a]=t[r],t[r]=W,n+=String.fromCharCode(e.charCodeAt(o)^t[(t[a]+t[r])%256]);return n};_0xf45e.dMfZiw=e,_0xf45e.NFGnun={},_0xf45e.WQoanS=!0}const t=W[0];_0xf45e.jMrxWs!==t&&(_0xf45e.NFGnun={},_0xf45e.jMrxWs=t);const r=_0xf45e.NFGnun[e];return void 0===r?(void 0===_0xf45e.nXRSwJ&&(_0xf45e.nXRSwJ=!0),a=_0xf45e.dMfZiw(a,o),_0xf45e.NFGnun[e]=a):a=r,a}_0x1effa5[_0x3646bd(317,"gbD@")]=1,_0x1effa5[_0x3646bd(359,"cyX4")]=BACKGROUND_COLOR;const _0x626a35={};_0x626a35.container=_0x1effa5;const styles=StyleSheet[_0x3646bd(303,"z%2]")](_0x626a35);export const PaperIo=PaperIoComponent;PaperIo[_0x3646bd(349,"1HQ8")]=_0x3646bd(312,"Ig8E");
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{GAME_DURATION_MS,getLayout,gridFor,LIGHT,LOW_TIME,PLAYER_COLORS}from"./PaperIoConstants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,start,tick}from"./PaperIoGame.js";import{jsx as _0x88e1b6}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.PAPER_IO,FULL_TIME=Math.round(GAME_DURATION_MS/1e3),NO_STATS={score:0,territoryPct:0,aiPct:0,rank:1,alivePlayers:1};export const PaperIo=engineGame(GAME_IDS.PAPER_IO,e=>{const[t,r]=useLiveState(!1),[s,o]=useLiveState(NO_STATS),[a,i]=useLiveState(FULL_TIME),{game:n,theme:m,status:S,screen:u,gameOver:p}=useEngineGame(e,{gameId:GAME_IDS.PAPER_IO,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s)=>{const o=e.grid??gridFor(t,s,isTablet);setLayout(e,getLayout(t,s,o)),r(!0)},drag:drag,reportScore:e=>e.stats?.score??0,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.SUCCESS),onStop:e=>e(null,HapticType.MEDIUM),wire:(e,t)=>{e.onStats=o,e.onTime=i,e.onEvent=r=>{"turn"===r?t(SOUNDS.TURN,HapticType.SELECTION):"capture"===r?t(SOUNDS.CAPTURE,HapticType.MEDIUM):t(e.won?SOUNDS.WIN:SOUNDS.GAME_OVER,e.won?HapticType.SUCCESS:HapticType.ERROR)}}}),E=useMemo(()=>toRgb(m.BACKGROUND),[m.BACKGROUND]);return _0x88e1b6(EngineGameScreen,{...u,source:t&&n.world?n.world:null,light:LIGHT,background:E,columns:[textColumn("YOU",s.territoryPct+"%",PLAYER_COLORS[0].head),timerColumn(a,m,LOW_TIME),textColumn("AI",s.aiPct+"%",PLAYER_COLORS[1].head)],subtext:"Claim the most land!",gameOver:p({title:"win"===S?"YOU WIN!":"GAME OVER",message:"win"===S?"You beat the AI "+s.territoryPct+"% to "+s.aiPct+"%!":"You "+s.territoryPct+"% vs AI "+s.aiPct+"% \u2014 try again!",scoreLabel:"Cells Captured",score:s.score,buttonText:"Play Again!"})})});
@@ -1 +1 @@
1
- "use strict";const _0x282db5=_0xf27c;!function(){const W=_0xf27c,d=_0x2b52();for(;;)try{if(278904==parseInt(W(464,"]&eN"))/1*(parseInt(W(490,"A9m&"))/2)+-parseInt(W(477,"%*UX"))/3*(-parseInt(W(492,"bBGJ"))/4)+parseInt(W(508,"3HMu"))/5*(-parseInt(W(444,"*5yu"))/6)+-parseInt(W(496,"6m%3"))/7*(-parseInt(W(468,"!Ipu"))/8)+-parseInt(W(453,")FE4"))/9*(parseInt(W(443,"JeCM"))/10)+parseInt(W(497,"]Msk"))/11+-parseInt(W(465,")FE4"))/12)break;d.push(d.shift())}catch(W){d.push(d.shift())}}();import{PRIMARY_COLOR,BACKGROUND_COLOR}from"../../services/GamesConstants.js";import{getGameDimensions,isTablet}from"../../services/UtilsService.js";const{screenWidth:screenWidth}=getGameDimensions(),SCREEN_HEIGHT=getGameDimensions()[_0x282db5(445,"%*UX")],CELL=Math.round(screenWidth/(isTablet?44:32)),COLS=Math[_0x282db5(474,"bBGJ")](screenWidth/CELL),ROWS=Math[_0x282db5(486,"pM)6")](SCREEN_HEIGHT/CELL),GRID_W=COLS*CELL,GRID_H=ROWS*CELL,GRID_LEFT=0,STEP_MS=92,BOT_COUNT=1,START_TERRITORY=2,GAME_DURATION_MS=12e4,_0x535b3a={};_0x535b3a[_0x282db5(470,"LM3@")]=COLS,_0x535b3a.ROWS=ROWS,_0x535b3a.CELL=CELL,_0x535b3a[_0x282db5(494,"]&eN")]=GRID_W,_0x535b3a[_0x282db5(446,"EebQ")]=GRID_H,_0x535b3a[_0x282db5(455,"*l#D")]=0,_0x535b3a.STEP_MS=92,_0x535b3a.BOT_COUNT=1,_0x535b3a.START_TERRITORY=2,_0x535b3a[_0x282db5(454,"*5yu")]=12e4,_0x535b3a[_0x282db5(505,"*l#D")]=COLS*ROWS,_0x535b3a[_0x282db5(466,"IpUp")]=screenWidth,_0x535b3a[_0x282db5(460,"zKD#")]=SCREEN_HEIGHT;export const PAPER_CONFIG=_0x535b3a;const _0x393add={};_0x393add[_0x282db5(463,"]P1g")]=_0x282db5(479,"jt[m"),_0x393add[_0x282db5(472,"Bm&n")]=_0x282db5(456,"&vr!"),_0x393add[_0x282db5(451,"(0Rl")]="#6BCB77",_0x393add[_0x282db5(495,"LM3@")]=_0x282db5(462,"3RC0");const _0x192189={};_0x192189[_0x282db5(500,"PFqs")]=_0x282db5(509,"IpUp"),_0x192189[_0x282db5(450,"*5yu")]=_0x282db5(481,"]Msk"),_0x192189.head=_0x282db5(441,"eXkY"),_0x192189.headDark=_0x282db5(507,"tb75");const _0x164ac1={};_0x164ac1[_0x282db5(475,"pM)6")]="rgba(255, 217, 61, 0.85)",_0x164ac1[_0x282db5(450,"*5yu")]=_0x282db5(459,"%*UX"),_0x164ac1[_0x282db5(442,"hrw]")]=_0x282db5(458,"XJxd"),_0x164ac1.headDark=_0x282db5(488,"4AKq");const _0x3c3050={};_0x3c3050[_0x282db5(473,"@N7G")]=_0x282db5(461,"h73Q"),_0x3c3050[_0x282db5(504,"]P1g")]=_0x282db5(487,"JeCM"),_0x3c3050[_0x282db5(483,"enui")]=_0x282db5(448,"$vMz"),_0x3c3050[_0x282db5(506,"4AKq")]=_0x282db5(493,"EebQ");const _0x3edac0={};function _0x2b52(){const W=["rhhdQSkrqmkQWRxdG0XeW7yLzhrAeW","E20pWQKat3JcU8k7","W6xcSCovrHOrkCokWQldO8kzCmotWPldUZStWQWbWPBcU8kRsCkFoW","A8oOpSodkSozWOG","W57dKSoYW4z1bSkz","WPddJHNdGmkcWRNdIxfgghK3gCkYqmkgWPNdNhyTW6/cHWm3","v8k1W48uW4xcUHddScJcJ8kiWOv0","WRCiamkZx8oUh1v3WQldQJlcU8oyBfivWQnJxs3cLIZcRmoK","pHqUW4ddMbbh","A13cNGSSW4exWPiK","W7lcQ3vrWPtdPuRcIW","kSonvSoUWQaTWPncc1xcVSkLmW","WPhcI8kaxtSntSoHWQddNtBcIa","WOVcSCklW4DRW7xdImkbW5O","ohf/ocDYW7WXpW","lmocWRqUrYLorq","W5SVhCkY","WRjheSo/WRfWnmoY","W5XxdCk6WRC","W47dPSojW55HW7pdSCkdW5O","tZKkWPy","WPBdM8oQWQC/aHLbWQS","WRSHz8oxW5qffW","W5pcKu/cLmkAWRJcTrC6DqPv","sfO0WP82D1lcJ8kw","D8o3W6FdUSkehcbyl3z2WOmVE8oMkrm1WR4epSk7W4Lggq","rCkfvIyfAYyhW4jYjG","W6b2W6DriXvVW4/dP8kyia3cOshcKuntW7NcPCk0E8kqfSoYW6e","WRKSWQpcVSkZlCkFW4dcGmoZW6Xf","cSoNW4hdNW","WOifWQ/cUwBcIGZcNSoDW7NdK8oeWQWjvCoszcBcQmkpWPddSCoWc8oz","W5xcL8o0BhvYvSkOW4dcHW","WOhdM8oXWRK","n8kqvCoKW6/dPXVcKmkJWRvhWPxcIhpcVsCGWQFdICo1WQVcJCk3W6JdLW","W50undJcRmkfW6K","W4DtW77dRx/dKxVdQCk2WQNcSq","cCoTwmkWhcNcGCoXW7lcUSoL","rsPFdSkCy1bJ","hw4aWPjlBmkfAa","A8oKtCk2jCkOW7W","WOhdIMTtWQFdUq","W7afmmkfW5mIiYe","ghhdGSk6fM9lFYVdPuu","WQaHWRmcorfJWRBcKCoxw0RdUG","WQRcRCkZFa","W4uJWPxdQ34","aX5WpCkxlCouWOldTG","WRSTWQ7cS8kXkCoHW4NcISo5W4j6rW","ASkCa8k5WR0QWPesvJpdLSoLF8oBWPyaW5BcVhBdH3BcRrpcH30","vSk3WPlcGSobW6PGnmolmtG","A0RcJraP","AhasWQWtxh7cUmkJW6fW","WPy1yX7dNmovW512","W7m/sh9RBGa","vKVcOmkGWQJdMaWbWQvgxq","WRdcR8kWEvzXjmkdW4xcUvpdSgzuhGLcb8oiuSkVWQSPFmoZ","se0NWOqZ","nSogWQTJWRldGNBdTdFcQCkfWRPm","WO8MW6WwDrKK","WP/cLmk8W5u","DmohDSorWOJcPKhdHa","mGlcL8k/FmkCWRBdOxq","WORdJbldHSocW78","d8kcr8kZqSov","W6WyrSowW7Shd8k+W5i","mmo0FmkBdtTk","dq0LWOu2DLFcHa","D0ldHSk9CW","hmozdNq","W5q9aSoXWOK","k8ocwmoGWQCSWPb+iftcImk5bq"];return(_0x2b52=function(){return W})()}_0x3edac0[_0x282db5(478,"*l#D")]=_0x282db5(484,"(J[j"),_0x3edac0[_0x282db5(510,"*l#D")]=_0x282db5(502,")FE4"),_0x3edac0[_0x282db5(498,"IpUp")]=_0x282db5(476,"LM3@"),_0x3edac0[_0x282db5(491,"CMh9")]=_0x282db5(457,"EebQ");export const PLAYER_COLORS=[_0x393add,_0x192189,_0x164ac1,_0x3c3050,_0x3edac0];const _0x343fd9={};_0x343fd9[_0x282db5(485,"&vr!")]=BACKGROUND_COLOR,_0x343fd9.PRIMARY=PRIMARY_COLOR,_0x343fd9[_0x282db5(447,"Mb$U")]="rgba(255,255,255,0.05)",_0x343fd9[_0x282db5(499,"S!jx")]="rgba(0,0,0,0.18)";export const PAPER_COLORS=_0x343fd9;const _0x1f653c={};function _0xf27c(W,d){W-=441;const x=_0x2b52();let _=x[W];if(void 0===_0xf27c.ABdHNW){const W=function(W,d){let x,_,o=[],e=0,t="";for(W=function(W){let d="",x="";for(let x,_,o=0,e=0;_=W.charAt(e++);~_&&(x=o%4?64*x+_:_,o++%4)?d+=String.fromCharCode(255&x>>(-2*o&6)):0)_="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(_);for(let W=0,_=d.length;W<_;W++)x+="%"+("00"+d.charCodeAt(W).toString(16)).slice(-2);return decodeURIComponent(x)}(W),_=0;_<256;_++)o[_]=_;for(_=0;_<256;_++)e=(e+o[_]+d.charCodeAt(_%d.length))%256,x=o[_],o[_]=o[e],o[e]=x;_=0,e=0;for(let d=0;d<W.length;d++)_=(_+1)%256,e=(e+o[_])%256,x=o[_],o[_]=o[e],o[e]=x,t+=String.fromCharCode(W.charCodeAt(d)^o[(o[_]+o[e])%256]);return t};_0xf27c.XbxDKE=W,_0xf27c.PAKwKd={},_0xf27c.ABdHNW=!0}const o=x[0];_0xf27c.QwFRov!==o&&(_0xf27c.PAKwKd={},_0xf27c.QwFRov=o);const e=_0xf27c.PAKwKd[W];return void 0===e?(void 0===_0xf27c.obXgRz&&(_0xf27c.obXgRz=!0),_=_0xf27c.XbxDKE(_,d),_0xf27c.PAKwKd[W]=_):_=e,_}_0x1f653c.dx=0,_0x1f653c.dy=-1;const _0x5b670d={dx:0,dy:1},_0x3d59a5={dx:-1,dy:0},_0x27217f={dx:1,dy:0},_0x576f9e={};_0x576f9e.UP=_0x1f653c,_0x576f9e.DOWN=_0x5b670d,_0x576f9e.LEFT=_0x3d59a5,_0x576f9e[_0x282db5(452,"6ONK")]=_0x27217f;export const DIRECTIONS=_0x576f9e;
1
+ "use strict";import{frontLight}from"../shared/EngineUtils.js";export const STEP_MS=92;export const PLAYER_COUNT=2;export const START_TERRITORY=1;export const GAME_DURATION_MS=12e4;export const LOW_TIME=10;export const POINTS_PER_CELL=10;export const SWIPE=10;export const PLAYER_COLORS=[{territory:"#62B96E",trail:"#6BCB77",head:"#6BCB77",headDark:"#4CA85B"},{territory:"#E86262",trail:"#FF6B6B",head:"#FF6B6B",headDark:"#D64C4C"}];export const COLORS={CLASSIC_BOARD:"rgba(0, 0, 0, 0.18)",FLASH:"#FFFFFF",EYE:"#FFFFFF",PUPIL:"#2C2C44"};export const TILT=.48;export const WORLD_SCALE=.25;export const LIGHT=frontLight([-.4,.5,1],.5);export const LAND=.32;export const TRAIL=.22;export const PERSON={SCALE:3.2,STRIDE:.38,HEIGHT:3.06,CELEBRATION_SCALE:1.5};export const PERSON_COLORS={SKIN:["#DFAC87","#A57355"],HAIR:"#352A24",PANTS:"#2F3D50",SHOE:"#38414A",SOLE:"#EEE9DF",POLE:"#CCD4D8",BADGE:"#E8D4A3"};export function gridFor(t,o,r){const e=Math.round(t/(r?44:32));return{cols:Math.ceil(t/e),rows:Math.ceil(o/e),cell:e}}export function getLayout(t,o,r){const e=t/r.cols,E=o/r.rows/Math.cos(.48),n=r.rows*E,s=r.cell*(.54+PERSON.SCALE*PERSON.HEIGHT*PERSON.CELEBRATION_SCALE),L=n*Math.sin(.48)/2+s*Math.cos(.48)+80;return{...r,width:t,height:o,tilt:.48,columnWidth:e,rowDepth:E,eyeDistance:L,centerY:o/2,gridW:t,gridH:n}}export const cellCentre=(t,o,r)=>[(o+.5)*t.columnWidth-t.gridW/2,t.gridH/2-(r+.5)*t.rowDepth];
@@ -0,0 +1 @@
1
+ "use strict";import{World}from"@nayan-ui/engine";import{aimTilted}from"../shared/EngineTilt.js";import{GAME_DURATION_MS,STEP_MS,SWIPE,WORLD_SCALE}from"./PaperIoConstants.js";import{newBoard,stats,step,turn}from"./PaperIoRules.js";import{buildScene,finish,placeHeads,removeScene,setSceneTheme,syncBoard}from"./PaperIoScene.js";export function createGame(e){return{world:null,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,grid:null,layout:null,scene:null,phase:"ready",board:null,stats:null,won:!1,sinceStep:0,fresh:!0,swipe:null,onPhase:e=>{},onStats:e=>{},onTime:e=>{},onEvent:e=>{}}}export function setLayout(e,t){!e.world&&(e.world=new World(t.cols*t.rows*2+200),e.world.scoreboard.reset(0,GAME_DURATION_MS/1e3),e.world.scoreboard.handlers={onSecond:t=>e.onTime(t),onTimeUp:()=>"playing"===e.phase&&e.board&&end(e,(e.board.counts[0]??0)>(e.board.counts[1]??0))},e.grid={cols:t.cols,rows:t.rows,cell:t.cell},e.board=newBoard(e.grid),e.stats=stats(e.board),e.onStats(e.stats));const r=e.world;e.scene&&removeScene(r,e.scene),e.layout=t,aimTilted(e.camera,t),e.camera.eye=[0,(e.camera.target[1]-Math.sin(t.tilt)*t.eyeDistance)*WORLD_SCALE,(e.camera.target[2]+Math.cos(t.tilt)*t.eyeDistance)*WORLD_SCALE],e.camera.target=[e.camera.target[0]*WORLD_SCALE,e.camera.target[1]*WORLD_SCALE,e.camera.target[2]*WORLD_SCALE],e.camera.ortho=t.height*WORLD_SCALE/2,e.scene=buildScene(r,t,e.theme,e.board)}export function setTheme(e,t){e.theme=t,e.world&&e.layout&&e.scene&&setSceneTheme(e.world,e.layout,e.scene,t)}function fresh(e){const{world:t,grid:r,layout:o}=e;t&&r&&o&&(e.board=newBoard(r),e.stats=stats(e.board),e.scene&&removeScene(t,e.scene),e.scene=buildScene(t,o,e.theme,e.board),t.scoreboard.reset(0,GAME_DURATION_MS/1e3),e.sinceStep=0,e.won=!1,e.swipe=null,e.onStats(e.stats),e.onTime(Math.round(GAME_DURATION_MS/1e3)))}export function start(e){"ready"===e.phase&&e.world&&(fresh(e),e.world.scoreboard.startCountdown(GAME_DURATION_MS/1e3),e.fresh=!0,e.phase="playing",e.onPhase("playing"))}export function reset(e){fresh(e),e.phase="ready",e.onPhase("ready")}export function dispose(e){e.world?.dispose()}export function tick(e,t){const{world:r,board:o}=e;if(r&&!r.isDisposed){if("playing"===e.phase&&o){const r=e.fresh?0:1e3*Math.min(t,.25);e.fresh=!1,advance(e,o,r)}r.update(t)}}function advance(e,t,r){if(e.sinceStep+=r,e.sinceStep<STEP_MS)return;e.sinceStep=0;const o=step(t),{world:a,layout:s,scene:n}=e;a&&s&&n&&((o.territory||o.trails)&&syncBoard(a,s,n,t,o.territory&&!o.full,o.territory?void 0:o.trailCells),placeHeads(a,s,n,t,!0,o.captured)),o.territory&&(e.stats=stats(t),e.onStats(e.stats)),o.captured[0]&&e.onEvent("capture"),o.full&&end(e,o.won)}function end(e,t){e.world?.scoreboard.stop(),e.won=t,e.phase="over",e.swipe=null,e.board&&(e.stats=stats(e.board),e.onStats(e.stats)),e.world&&e.layout&&e.scene&&finish(e.world,e.layout,e.scene,t),e.onPhase("over"),e.onEvent("over")}export function drag(e,{phase:t,x:r,y:o}){if("start"===t)return void(e.swipe={x:r,y:o,last:null});const a=e.swipe;if(!a||"end"===t)return void(e.swipe=null);if("playing"!==e.phase||!e.board)return;const s=r-a.x,n=o-a.y,i=Math.abs(s),l=Math.abs(n);if(i<SWIPE&&l<SWIPE)return;const d=i>=l?s>0?"RIGHT":"LEFT":n>0?"DOWN":"UP";d!==a.last&&(a.last=d,turn(e.board,d)&&e.onEvent("turn"))}
@@ -0,0 +1 @@
1
+ "use strict";import{block,ellipsoid,loft,merge,tube}from"@nayan-ui/engine";import{cacheGameAsset,createGameMesh as _0x316f9d}from"../shared/EngineMeshes.js";import{toColor}from"../shared/EngineUtils.js";import{COLORS,PERSON_COLORS}from"./PaperIoConstants.js";const WHITE=[1,1,1,1],part=(o,e,t)=>({geometry:o,position:e,color:t}),orb=(o,e,t,r=12)=>part(ellipsoid(o,void 0,r),e,t),pipe=(o,e,t,r=10)=>({geometry:tube(o,{radius:e,sides:r,smoothness:3,caps:!0}),color:t}),model=(o,e=.12)=>_0x316f9d(merge(o),{center:!1,shine:e});function flagGeometry(o){const e=[],t=[];for(const r of[1,-1]){const s=e.length/11;for(let t=0;t<=6;t++)for(let s=0;s<=12;s++){const p=s/12,a=t/6,i=p*Math.PI*2.1-o+.7*a,n=Math.sin(i)*p*.085,h=.085*(Math.sin(i)+p*Math.PI*2.1*Math.cos(i)),l=.085*p*.7*Math.cos(i),m=.56*h+.045*l,d=.78*.56,O=-.78*l,f=Math.hypot(m,d,O),u=12===s||0===t||6===t?.78:1;e.push(.78*-p,n,.56*a-.045*p,r*m/f,r*d/f,r*O/f,u,u,u,p,a)}for(let o=0;o<6;o++)for(let e=0;e<12;e++){const p=s+13*o+e,a=p+1,i=p+12+1,n=i+1;r>0?t.push(p,a,i,a,n,i):t.push(p,i,a,a,i,n)}}return{vertices:Float32Array.from(e),indices:Uint32Array.from(t)}}let cached=null;export function personMeshes(){return cacheGameAsset("paper-io/PaperIoMeshes:personMeshes",()=>personMeshesUncached())}function personMeshesUncached(){if(cached)return cached;const o=toColor(PERSON_COLORS.PANTS),e=toColor(PERSON_COLORS.HAIR),t=toColor(PERSON_COLORS.POLE),r=toColor(PERSON_COLORS.SHOE),s=toColor(PERSON_COLORS.SOLE),p=toColor(COLORS.EYE),a=toColor(COLORS.PUPIL),i=model([{geometry:loft([{z:.9,bottom:-.145,top:.145,width:.115,square:2.8},{z:1.04,bottom:-.155,top:.155,width:.105,square:2.8},{z:1.3,bottom:-.225,top:.225,width:.13,square:2.6},{z:1.41,bottom:-.2,top:.2,width:.105,square:2.4},{z:1.47,bottom:-.07,top:.07,width:.065,square:2}],{around:16,smoothness:2})},pipe([[0,-.205,1.37],[.025,-.27,1.25],[.04,-.29,1.18]],.075),pipe(Array.from({length:17},(o,e)=>[.06*Math.cos(e*Math.PI/8),.07*Math.sin(e*Math.PI/8),1.465]),.015,[.74,.74,.74,1],6)]),n=model([orb([.108,.108,.133],[.005,0,1.65],WHITE,16),pipe([[0,0,1.45],[0,0,1.55]],.052),orb([.026,.023,.03],[.109,0,1.64]),...[-1,1].map(o=>orb([.022,.017,.036],[-.012,.109*o,1.65])),pipe([[.04,-.29,1.18],[.13,-.305,1.16],[.24,-.31,1.21]],.05),orb([.046,.045,.06],[.24,-.31,1.22])]),h=[orb([.11,.116,.073],[-.021,0,1.744],e,16),orb([.06,.104,.077],[-.065,0,1.69],e),orb([.115,.173,.12],[0,0,.855],o),part(block(.025,.055,.075),[.128,-.065,1.3],toColor(PERSON_COLORS.BADGE)),pipe([[.24,-.31,.05],[.24,-.31,1.22],[.24,-.31,3]],.013,t,8),orb([.025,.025,.025],[.24,-.31,3.02],t,8),pipe([[.107,-.025,1.603],[.115,0,1.598],[.107,.025,1.603]],.004,[.36,.2,.17,1],6)];for(const o of[-1,1])h.push(orb([.018,.024,.017],[.101,.047*o,1.678],p,8)),h.push(orb([.009,.01,.012],[.117,.047*o,1.678],a,8)),h.push(pipe([[.105,.027*o,1.706],[.098,.066*o,1.707]],.006,e,6));const l=model([pipe([[0,0,0],[.01,.04,-.12],[.025,.055,-.23]],.073)]),m=model([pipe([[.025,.055,-.22],[.045,.06,-.35],[.075,.055,-.46]],.045),orb([.038,.039,.06],[.08,.055,-.475])]),d=model([pipe([[0,0,0],[.035,0,-.34],[-.01,0,-.72]],.072,o),orb([.071,.071,.085],[.035,0,-.34],o),orb([.142,.066,.06],[.065,0,-.778],r),part(block(.275,.133,.025),[.065,0,-.832],s),pipe([[.11,-.04,-.73],[.11,.04,-.73]],.009,s,6),pipe([[.065,-.04,-.725],[.065,.04,-.725]],.009,s,6)]),O=[0,2*Math.PI/3,4*Math.PI/3].map(o=>_0x316f9d(flagGeometry(o),{center:!1,shine:.02}));return cached={shirt:i,skin:n,details:model(h),sleeve:l,hand:m,leg:d,flags:O},cached}export function*warmAssets(){yield personMeshes}
@@ -0,0 +1 @@
1
+ "use strict";import{PLAYER_COUNT,POINTS_PER_CELL,START_TERRITORY}from"./PaperIoConstants.js";export const DIRECTIONS={UP:{dx:0,dy:-1},DOWN:{dx:0,dy:1},LEFT:{dx:-1,dy:0},RIGHT:{dx:1,dy:0}};const shuffle=r=>{const t=r.slice();for(let r=t.length-1;r>0;r--){const o=Math.floor(Math.random()*(r+1)),n=t[r];t[r]=t[o],t[o]=n}return t};export const countTerritory=(r,t)=>{let o=0;for(let n=0;n<r.total;n++)r.owners[n]===t&&o++;return o};export function newBoard(r){const{cols:t,rows:o,cell:n}=r,e=t*o,i=new Array(e).fill(0),s=[],l=START_TERRITORY,d=l+1,a=Math.max(d,Math.round(250/n)),u=Math.floor(t/2);for(let r=0;r<PLAYER_COUNT;r++){const n=0===r?{col:u,row:o-1-a}:{col:u,row:a},e=r+1;for(let r=n.row-l;r<=n.row+l;r++)for(let s=n.col-l;s<=n.col+l;s++)s>=0&&s<t&&r>=0&&r<o&&(i[r*t+s]=e);s.push({id:e,index:r,isBot:0!==r,alive:!0,col:n.col,row:n.row,dir:DIRECTIONS.RIGHT,pendingDir:DIRECTIONS.RIGHT,trail:[],homeCol:n.col,homeRow:n.row,botState:"expand",botStepsOut:0,botTurned:!1})}const f={...r,total:e,owners:i,trails:new Array(e).fill(0),players:s,counts:[]};return f.counts=s.map(r=>countTerritory(f,r.id)),f}export function stats(r){const t=r.counts[0]??0,o=r.counts[1]??0;let n=1;for(const o of r.players)1!==o.id&&(r.counts[o.id-1]??0)>t&&n++;return{score:t*POINTS_PER_CELL,territoryPct:Math.round(t/r.total*1e3)/10,aiPct:Math.round(o/r.total*1e3)/10,rank:n,alivePlayers:r.players.filter(r=>r.alive).length}}export function turn(r,t){const o=r.players[0];if(!o||!o.alive)return!1;const n=DIRECTIONS[t];return!(n.dx===-o.dir.dx&&n.dy===-o.dir.dy||n.dx===o.pendingDir.dx&&n.dy===o.pendingDir.dy||(o.pendingDir=n,0))}const resolvedDir=r=>r.pendingDir.dx!==-r.dir.dx||r.pendingDir.dy!==-r.dir.dy?r.pendingDir:r.dir;function pickSafeDir(r,t,o){for(const n of o){if(n.dx===-t.dir.dx&&n.dy===-t.dir.dy)continue;const o=t.col+n.dx,e=t.row+n.dy;if(!(o<0||o>=r.cols||e<0||e>=r.rows)&&r.trails[e*r.cols+o]!==t.id)return n}return null}function roomInDir(r,t,o){let n=0,e=t.col,i=t.row;for(;n<r.cols+r.rows&&(e+=o.dx,i+=o.dy,!(e<0||e>=r.cols||i<0||i>=r.rows));)n++;return n}function pickOutwardDir(r,t){const o=shuffle([DIRECTIONS.UP,DIRECTIONS.DOWN,DIRECTIONS.LEFT,DIRECTIONS.RIGHT]);return o.sort((o,n)=>roomInDir(r,t,n)-roomInDir(r,t,o)),pickSafeDir(r,t,o)}function decideBot(r,t){if(0===t.trail.length)t.botState="expand",t.botTurned=!1,t.botStepsOut=12+Math.floor(10*Math.random()),t.pendingDir=pickOutwardDir(r,t)??t.dir;else if("expand"===t.botState)if(t.botStepsOut--,t.trail.length>90)t.botState="return";else if(t.botStepsOut<=0)if(t.botTurned)t.botState="return";else{const o=0!==t.dir.dx?[DIRECTIONS.UP,DIRECTIONS.DOWN]:[DIRECTIONS.LEFT,DIRECTIONS.RIGHT];o.sort((o,n)=>roomInDir(r,t,n)-roomInDir(r,t,o));const n=pickSafeDir(r,t,o);n?(t.pendingDir=n,t.botTurned=!0,t.botStepsOut=10+Math.floor(10*Math.random())):t.botState="return"}if("return"===t.botState){const o=t.homeCol-t.col,n=t.homeRow-t.row,e=[];Math.abs(o)>=Math.abs(n)?(0!==o&&e.push(o>0?DIRECTIONS.RIGHT:DIRECTIONS.LEFT),0!==n&&e.push(n>0?DIRECTIONS.DOWN:DIRECTIONS.UP)):(0!==n&&e.push(n>0?DIRECTIONS.DOWN:DIRECTIONS.UP),0!==o&&e.push(o>0?DIRECTIONS.RIGHT:DIRECTIONS.LEFT)),e.push(t.dir);const i=pickSafeDir(r,t,e);i&&(t.pendingDir=i)}const o=t.col+t.pendingDir.dx,n=t.row+t.pendingDir.dy;if(o<0||o>=r.cols||n<0||n>=r.rows||r.trails[n*r.cols+o]===t.id){const o=pickSafeDir(r,t,shuffle([DIRECTIONS.UP,DIRECTIONS.DOWN,DIRECTIONS.LEFT,DIRECTIONS.RIGHT]));o&&(t.pendingDir=o)}}function capture(r,t){const{cols:o,rows:n,total:e,owners:i,trails:s}=r,l=t.id;for(const r of t.trail)i[r]=l,s[r]=0;t.trail=[];const d=new Uint8Array(e),a=[],u=(r,t)=>{if(r<0||r>=o||t<0||t>=n)return;const e=t*o+r;d[e]||i[e]===l||(d[e]=1,a.push(e))};for(let r=0;r<o;r++)u(r,0),u(r,n-1);for(let r=0;r<n;r++)u(0,r),u(o-1,r);for(;a.length>0;){const r=a.pop(),t=r%o,n=(r-t)/o;u(t-1,n),u(t+1,n),u(t,n-1),u(t,n+1)}for(let r=0;r<e;r++)d[r]||i[r]===l||(i[r]=l)}const NONE=0,TRAIL=1,CAPTURE=2;function move(r,t){t.pendingDir.dx===-t.dir.dx&&t.pendingDir.dy===-t.dir.dy||(t.dir=t.pendingDir);const o=t.col+t.dir.dx,n=t.row+t.dir.dy;if(o<0||o>=r.cols||n<0||n>=r.rows)return 0;const e=n*r.cols+o;t.col=o,t.row=n;const i=r.trails[e]===t.id;if(r.owners[e]===t.id||i){if(t.trail.length>0)return capture(r,t),2}else if(0===r.trails[e])return r.trails[e]=t.id,t.trail.push(e),1;return 0}export function step(r){const{players:t}=r;for(const o of t)o.alive&&o.isBot&&decideBot(r,o);const o=t.map(t=>{if(!t.alive)return-1;const o=resolvedDir(t),n=t.col+o.dx,e=t.row+o.dy;return n>=0&&n<r.cols&&e>=0&&e<r.rows?e*r.cols+n:-1}),n={trailCells:[],territory:!1,trails:!1,captured:t.map(()=>!1),full:!1,won:!1};for(let e=0;e<t.length;e++){const i=t[e];if(!i.alive)continue;const s=o[e];if(s>=0&&o.some((r,t)=>t!==e&&r===s)){i.dir=resolvedDir(i);continue}const l=move(r,i);1===l?(n.trails=!0,n.trailCells.push(i.row*r.cols+i.col)):2===l&&(n.territory=!0,n.trails=!0,n.captured[e]=!0)}if(n.territory){r.counts=t.map(t=>countTerritory(r,t.id));const o=r.counts[0]??0,e=r.counts[1]??0;o+e>=r.total&&(n.full=!0,n.won=o>e)}return n}
@@ -0,0 +1 @@
1
+ "use strict";import{effects,extrude,Path,quat}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{cacheGameAsset,createGameMesh as _0x1fb685}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{cellCentre,COLORS,LAND,PERSON,PERSON_COLORS,PLAYER_COLORS,STEP_MS,TRAIL,WORLD_SCALE}from"./PaperIoConstants.js";import{personMeshes}from"./PaperIoMeshes.js";const meshes=new Map,cached=(e,o)=>{let a=meshes.get(e);return!a&&(a=cacheGameAsset("paper-io/PaperIoScene:"+e,o),meshes.set(e,a)),a},BOARD_DEPTH=8,BACKDROP_DEPTH=30,GLIDE=Math.ceil(STEP_MS/(1e3/60))*(1e3/60)/1e3,FLASH=.48,panelMesh=(e,o,a)=>cached("pio-panel:"+e+"x"+o+":"+a,()=>_0x1fb685(extrude((new Path).addRoundedRect(-e/2,-o/2,e,o,a),{depth:8}),{shine:.15}));function landCorners(e,o,a,t){const n=(o,a)=>o<0||o>=e.cols||a<0||a>=e.rows||e.owners[a*e.cols+o]===t,r=n(o,a-1),s=n(o+1,a),l=n(o,a+1),i=n(o-1,a);return(r||i?0:1)|(r||s?0:2)|(l||s?0:4)|(l||i?0:8)}function landMesh(e){return e?cached("pio-land:"+e,()=>{const o=e&e-1?.48:.95,[a,t,n,r]=[1,2,4,8].map(a=>e&a?o:0),s=(new Path).moveTo(-.5+a,-.5).lineTo(.5-t,-.5);return t&&s.arcTo(t,t,0,!1,!0,.5,-.5+t),s.lineTo(.5,.5-n),n&&s.arcTo(n,n,0,!1,!0,.5-n,.5),s.lineTo(-.5+r,.5),r&&s.arcTo(r,r,0,!1,!0,-.5,.5-r),s.lineTo(-.5,-.5+a),a&&s.arcTo(a,a,0,!1,!0,-.5+a,-.5),_0x1fb685(extrude(s.close(),{depth:1}),{center:!1})}):"cube"}const boardColor=e=>toColor("classic"===e.mode?COLORS.CLASSIC_BOARD:e.BOARD.SURFACE),landColor=e=>toColor(PLAYER_COLORS[e-1]?.territory??"#888888"),trailColor=e=>toColor(PLAYER_COLORS[e-1]?.trail??"#AAAAAA",.6),landH=e=>e.cell*LAND,facing=e=>quat.z(Math.atan2(-e.dy,e.dx));function spawnHead(e,o,a,t){const n=PLAYER_COLORS[a],r=personMeshes(),s=e.spawn({mesh:"none",parent:t,pickable:!1}),l=e.spawn({mesh:"none",parent:s,scale:o.cell*PERSON.SCALE,pickable:!1}),i=toColor(PERSON_COLORS.SKIN[a%PERSON_COLORS.SKIN.length]);e.spawn({mesh:r.shirt,parent:l,color:toColor(n.head),pickable:!1}),e.spawn({mesh:r.skin,parent:l,color:i,pickable:!1}),e.spawn({mesh:r.details,parent:l,pickable:!1});const p=[-1,1].map(o=>{const a=e.spawn({mesh:"none",parent:l,position:[0,.11*o,.86],pickable:!1});return e.spawn({mesh:r.leg,parent:a,pickable:!1}),a}),d=e.spawn({mesh:"none",parent:l,position:[0,.205,1.37],pickable:!1});e.spawn({mesh:r.sleeve,parent:d,color:toColor(n.head),pickable:!1}),e.spawn({mesh:r.hand,parent:d,color:i,pickable:!1});const h=e.spawn({mesh:"none",parent:l,position:[.24,-.31,2.4],pickable:!1}),m=e.spawn({mesh:r.flags[a%r.flags.length],parent:h,rotation:quat.z(-.055),color:toColor(n.head),pickable:!1});return e.animate(m,{rotation:quat.z(.055)},{duration:.5+.08*a,repeat:"forever",yoyo:!0,easing:"easeInOut"}),{root:s,visual:l,legs:p,arm:d,flag:m,stride:a,col:-1,row:-1,walking:!1}}function rest(e,o){for(const a of[...o.legs,o.arm])e.stopAnimation(a),e.animate(a,{rotation:[0,0,0,1]},{duration:.15});e.stopAnimation(o.visual),e.set(o.visual,{position:[0,0,0]}),o.walking=!1}export function buildScene(e,o,a,t){const n=e.spawn({mesh:"none",scale:WORLD_SCALE,pickable:!1}),r=spawnBackdrop(e,o.width,o.height,-30,a);e.set(r,{parent:n}),placeTiltedBackdrop(e,r,o,30);const s=e.spawn({mesh:panelMesh(o.gridW,o.gridH,"classic"===a.mode?0:8),parent:n,position:[0,0,-4],color:boardColor(a),pickable:!1}),l={root:n,backdrop:r,board:s,land:new Array(t.total).fill(null),landOwner:new Int8Array(t.total),landCorners:new Uint8Array(t.total),trail:new Array(t.total).fill(null),trailOwner:new Int8Array(t.total),heads:t.players.map((a,t)=>spawnHead(e,o,t,n))};return syncBoard(e,o,l,t,!1),placeHeads(e,o,l,t,!1),l}export function removeScene(e,o){e.despawn(o.root)}export function setSceneTheme(e,o,a,t){setBackdropTheme(e,a.backdrop,t),e.set(a.board,{mesh:panelMesh(o.gridW,o.gridH,"classic"===t.mode?0:8),color:boardColor(t)})}export function syncBoard(e,o,a,t,n,r){const s=landH(o),l=o.cell*TRAIL;for(let i=0,p=r?.length??t.total;i<p;i++){const p=r?r[i]:i,d=t.owners[p],h=p%t.cols,m=(p-h)/t.cols,u=d?landCorners(t,h,m,d):0;if(d!==a.landOwner[p]||u!==a.landCorners[p]){const[t,r]=cellCentre(o,h,m);let l=a.land[p];if(0===d)null!=l&&e.despawn(l),a.land[p]=null;else{const i=landColor(d),h=landMesh(u);null==l?(l=e.spawn({mesh:h,parent:a.root,position:[t,r,s/2],scale:[o.columnWidth,o.rowDepth,s],color:i,pickable:!1}),a.land[p]=l):e.set(l,{mesh:h}),n&&d!==a.landOwner[p]?(e.stopAnimation(l),e.set(l,{color:toColor(COLORS.FLASH),position:[t,r,.75*s],scale:[o.columnWidth,o.rowDepth,1.5*s]}),e.animate(l,{color:i,position:[t,r,s/2],scale:[o.columnWidth,o.rowDepth,s]},{duration:.48,easing:"easeOut"})):e.set(l,{color:i})}a.landOwner[p]=d,a.landCorners[p]=u}const C=t.trails[p];if(C!==a.trailOwner[p]){const n=a.trail[p];if(null!=n&&e.despawn(n),a.trail[p]=null,0!==C){const n=p%t.cols,r=(p-n)/t.cols,[i,d]=cellCentre(o,n,r),h=e.spawn({mesh:"cube",parent:a.root,position:[i,d,s+l/2],scale:[.86*o.columnWidth,.86*o.rowDepth,l],color:trailColor(C),pickable:!1});e.set(h,{scale:[.4*o.columnWidth,.4*o.rowDepth,l]}),e.animate(h,{scale:[.86*o.columnWidth,.86*o.rowDepth,l]},{duration:.12,easing:"back"}),a.trail[p]=h}a.trailOwner[p]=C}}}export function placeHeads(e,o,a,t,n,r=[]){t.players.forEach((s,l)=>{const i=a.heads[l];if(!i)return;const[p,d]=cellCentre(o,s.col,s.row),h=landH(o)+(t.trails[s.row*t.cols+s.col]?o.cell*TRAIL:0)+.02*o.cell,m=facing(s.dir),u=i.col!==s.col||i.row!==s.row;if(n)if(e.animate(i.root,{position:[p,d,h]},{duration:GLIDE,easing:"linear"}),e.animate(i.root,{rotation:m},{duration:.14}),u&&s.alive){const a=++i.stride%2==0?1:-1;i.legs.forEach((o,t)=>e.animate(o,{rotation:quat.y(PERSON.STRIDE*a*(0===t?1:-1))},{duration:GLIDE,easing:"easeInOut"})),e.animate(i.arm,{rotation:quat.y(-PERSON.STRIDE*a*.7)},{duration:GLIDE,easing:"easeInOut"}),e.animate(i.visual,[{position:[0,0,.055*o.cell],at:.5},{position:[0,0,0]}],{duration:GLIDE,easing:"easeInOut"});const t=personMeshes().flags;e.set(i.flag,{mesh:t[i.stride%t.length]}),i.walking=!0}else i.walking&&rest(e,i);else e.stopAnimation(i.root),e.set(i.root,{position:[p,d,h],rotation:m,scale:s.alive?1:0});if(i.col=s.col,i.row=s.row,r[l]){e.animate(i.root,[{scale:1.22,at:.3},{scale:1}],{duration:.35,easing:"easeOut"});const[a,t]=cellCentre(o,s.col,s.row);effects.shatter(e,{position:[a*WORLD_SCALE,t*WORLD_SCALE,(h+o.cell)*WORLD_SCALE],count:14,size:.3*o.cell*WORLD_SCALE,speed:8*o.cell*WORLD_SCALE,lifetime:.5,gravity:20*-o.cell*WORLD_SCALE,colors:[toColor(PLAYER_COLORS[l].head),toColor("#FFFFFF")]})}})}export function finish(e,o,a,t){a.heads.forEach((o,a)=>{rest(e,o);const n=0===a===t;e.stopAnimation(o.root),n?e.animate(o.root,[{scale:PERSON.CELEBRATION_SCALE,at:.4},{scale:1.3}],{duration:.5,easing:"easeOut"}):e.animate(o.root,{scale:.75},{duration:.4})}),t&&effects.confetti(e,{position:[0,0,3*o.cell*WORLD_SCALE],count:70,size:.5*o.cell*WORLD_SCALE,speed:1.2*o.gridW*WORLD_SCALE,lifetime:1.4,gravity:2*-o.gridW*WORLD_SCALE,colors:["#6BCB77","#FFD93D","#FFFFFF","#4CA85B"].map(e=>toColor(e))})}export function*warmAssets(){for(let e=1;e<16;e++)yield()=>landMesh(e)}
@@ -0,0 +1 @@
1
+ "use strict";import{lathe,merge,shapeGeometry,tube}from"@nayan-ui/engine";import{cacheGameAsset,createGameMesh as _0x503239}from"../shared/EngineMeshes.js";const NAVY=[.06,.08,.14],NAVY_SHEEN=[.16,.2,.32],CREAM=[1,.98,.93],CREAM_SHADE=[.88,.9,.95],ORANGE=[1,.62,.12],ORANGE_DARK=[.92,.42,.08],IRIS=[.18,.5,.95],IRIS_DARK=[.06,.2,.55],rgba=(e,o=1)=>[e[0],e[1],e[2],o],mix=(e,o,t)=>{const s=Math.min(1,Math.max(0,t));return[e[0]+(o[0]-e[0])*s,e[1]+(o[1]-e[1])*s,e[2]+(o[2]-e[2])*s]},inside=(e,o,t)=>Math.min(1,Math.max(0,(o-e)/t+.5)),ellipse=(e,o,t,s=28)=>Array.from({length:s+1},(a,r)=>{const n=Math.PI/2-r/s*Math.PI;return[Math.max(.001,Math.cos(n)*e),t+Math.sin(n)*o]}),HEAD_Y=.49,HEAD_RX=.25,HEAD_RY=.225,headZ=(e,o)=>.25*Math.sqrt(Math.max(0,1-(e/.25)**2-((o-.49)/.225)**2));function bodyColor({position:[e,o,t]}){const s=mix(NAVY,NAVY_SHEEN,.6*(o+.3)*Math.max(0,-t/.3+.3)),a=Math.sqrt((e/.235)**2+((o+.04)/.255)**2),r=inside(a,1,.06)*inside(-t,-.04,.04);return rgba(mix(s,mix(CREAM_SHADE,CREAM,2*(o+.25)),r))}function headColor({position:[e,o,t]}){const s=mix(NAVY,NAVY_SHEEN,.5*Math.max(0,(o-.49)/.225)),a=Math.min(Math.hypot(e-.072,o-.53)/.1,Math.hypot(e+.072,o-.53)/.1),r=Math.hypot(e/1.15,o-.44)/.115,n=inside(Math.min(a,r),1,.08)*inside(-t,-.06,.04);return rgba(mix(s,CREAM,n))}const onFace=(e,o,t,s,a)=>({geometry:shapeGeometry("sphere"),position:[e,o,headZ(e,o)+s],scale:t,color:a});function eye(e){const o=.074*e;return[onFace(o,.525,[.1,.122,.05],-.012,rgba([1,1,1])),onFace(o+.004*e,.519,[.07,.08,.03],.004,rgba(IRIS_DARK)),onFace(o+.004*e,.513,[.058,.06,.03],.008,rgba(IRIS)),onFace(o+.004*e,.519,[.036,.042,.03],.013,rgba([.02,.02,.04])),onFace(o-.014,.539,.024,.024,[1.8,1.8,1.8,1]),onFace(o+.016,.503,.011,.022,[1.6,1.6,1.6,1]),{geometry:tube([[o+.05*e,.593,headZ(o+.05*e,.593)+.004],[o,.61,headZ(o,.61)+.006],[o-.045*e,.6,headZ(o-.045*e,.6)+.004]],{radius:e=>.009+.005*Math.sin(e*Math.PI),sides:6,color:rgba(NAVY)})}]}function beak(){const e=headZ(0,.46),o=e=>1+.45*Math.abs(Math.cos(e*Math.PI*2));return[{geometry:tube([[0,.468,e-.03],[0,.464,e+.03],[0,.452,e+.075],[0,.44,e+.09]],{radius:e=>.048*(1-.85*e),shape:o,sides:16,color:({v:e})=>rgba(mix(ORANGE,ORANGE_DARK,.6*e))})},{geometry:tube([[0,.436,e-.03],[0,.434,e+.02],[0,.432,e+.05]],{radius:e=>.03*(1-.8*e),shape:o,sides:14,color:rgba(ORANGE_DARK)})}]}const tufts=()=>[-1,0,1].map(e=>({geometry:tube([[.035*e,.715-.03,-.02],[.05*e,.755,0-.01*Math.abs(e)],[.065*e,.715+.07,.05]],{radius:o=>.022*(1-.85*o)*(0===e?1.15:.9),sides:8,color:rgba(NAVY)})})),tail=()=>({geometry:tube([[0,-.2,-.26],[0,-.27,-.33],[0,-.3,-.38]],{radius:e=>.07*(1-.8*e),shape:e=>.4+.6*Math.abs(Math.cos(e*Math.PI*2)),sides:12,color:rgba(NAVY)})});let bodyModel=null;export function bodyMesh(){return cacheGameAsset("penguin-run/PenguinMeshes:bodyMesh",()=>bodyMeshUncached())}function bodyMeshUncached(){if(bodyModel)return bodyModel;const e=lathe([[.001,.42],[.14,.4],[.18,.34],[.2,.29],[.225,.24],[.258,.17],[.284,.09],[.302,0],[.306,-.08],[.296,-.16],[.268,-.24],[.215,-.3],[.13,-.33],[.001,-.338]],{segments:64,color:bodyColor}),o=lathe(ellipse(.25,.225,.49,32),{segments:64,color:headColor});return bodyModel=_0x503239(merge([{geometry:e},{geometry:o},...eye(-1),...eye(1),...beak(),...tufts(),tail()]),{center:!1,shine:.55}),bodyModel}const flipperModels={};export function flipperMesh(e){return cacheGameAsset("penguin-run/PenguinMeshes:flipperMesh"+JSON.stringify([e]),()=>flipperMeshUncached(e))}function flipperMeshUncached(e){const o=flipperModels[e];if(o)return o;const t=tube([[.07*-e,.05,0],[.01*-e,.02,0],[.02*e,-.08,.01],[.022*e,-.17,.005],[.01*e,-.24,-.01],[.006*-e,-.27,-.015]],{radius:e=>.06*Math.sin(.6+2.2*e)+.012,shape:e=>.32+.68*Math.abs(Math.cos(e*Math.PI*2)),sides:18,smoothness:10,color:({normal:o})=>rgba(o[0]*e<-.25?CREAM_SHADE:NAVY)}),s=_0x503239(t,{center:!1,shine:.5});return flipperModels[e]=s,s}let footModel=null;export function footMesh(){return cacheGameAsset("penguin-run/PenguinMeshes:footMesh",()=>footMeshUncached())}function footMeshUncached(){if(footModel)return footModel;const e=shapeGeometry("sphere"),o=[-.42,0,.42].map(e=>({geometry:tube([[0,.03,.04],[.05*Math.sin(e),.026,.09],[.08*Math.sin(e),.022,.135]],{radius:e=>.032-.008*e,sides:10,color:rgba(ORANGE)})})),t=[-.42,0,.42].map(o=>({geometry:e,position:[.08*Math.sin(o),.022,.135],scale:.048,color:rgba(ORANGE)})),s={geometry:tube([[0,.04,.02],[0,.12,0],[0,.22,-.01]],{radius:e=>.045+.04*e,sides:12,color:({v:e})=>rgba(e<.35?mix(ORANGE_DARK,ORANGE,2*e):NAVY)})};return footModel=_0x503239(merge([s,{geometry:e,position:[0,.03,.05],scale:[.15,.06,.16],color:rgba(mix(ORANGE,ORANGE_DARK,.3))},...o,...t]),{center:!1,shine:.35}),footModel}export function*warmAssets(){yield bodyMesh,yield footMesh,yield()=>flipperMesh(-1),yield()=>flipperMesh(1)}
@@ -0,0 +1 @@
1
+ "use strict";import{quat}from"@nayan-ui/engine";import{bodyMesh,flipperMesh,footMesh}from"./PenguinMeshes.js";export const LOOPING=new Set(["idle","walk","run","dance"]);export const CLIP_TIME={idle:5,walk:.9,run:.44,punch:.52,jab:.4,jump:.95,slide:1.35,hit:.75,dance:1.1,dead:1.7};const PELVIS_Y=.39,BODY_SCALE=[.94,1.15,.94],SHOULDER=[.246,.18,0],FOOT=[.12,0,.06],IDENTITY=[0,0,0,1],flipL=(o,t,i=0)=>quat.fromEuler(o,i,-t),flipR=(o,t,i=0)=>quat.fromEuler(o,-i,t),REST_L=flipL(0,.14),REST_R=flipR(0,.14),pelvisAt=(o=0,t=0)=>[0,.39+o,t],footLAt=(o=0,t=0)=>[-FOOT[0],FOOT[1]+o,FOOT[2]+t],footRAt=(o=0,t=0)=>[FOOT[0],FOOT[1]+o,FOOT[2]+t],FOOT_L_REST=quat.y(-.18),FOOT_R_REST=quat.y(.18);export function preparePenguin(){bodyMesh(),flipperMesh(-1),flipperMesh(1),footMesh()}export function spawnPenguin(o,t,i=1,n=[1,1,1,1]){const a=o.spawn({mesh:"none",position:t,scale:i,pickable:!1}),p=o.spawn({mesh:"none",parent:a,position:pelvisAt(),pickable:!1});return{root:a,pelvis:p,body:o.spawn({mesh:bodyMesh(),parent:p,position:[0,0,0],scale:BODY_SCALE,color:n,pickable:!1}),flipperL:o.spawn({mesh:flipperMesh(-1),parent:p,position:[-SHOULDER[0],SHOULDER[1],SHOULDER[2]],rotation:REST_L,color:n,pickable:!1}),flipperR:o.spawn({mesh:flipperMesh(1),parent:p,position:[SHOULDER[0],SHOULDER[1],SHOULDER[2]],rotation:REST_R,color:n,pickable:!1}),footL:o.spawn({mesh:footMesh(),parent:a,position:footLAt(),rotation:FOOT_L_REST,color:n,pickable:!1}),footR:o.spawn({mesh:footMesh(),parent:a,position:footRAt(),rotation:FOOT_R_REST,color:n,pickable:!1}),x:t[0],yaw:0,anim:null}}const parts=o=>[o.pelvis,o.flipperL,o.flipperR,o.footL,o.footR];function toRest(o,t,i){for(const i of parts(t))o.stopAnimation(i);const n=[[t.pelvis,pelvisAt(),IDENTITY],[t.flipperL,[-SHOULDER[0],SHOULDER[1],SHOULDER[2]],REST_L],[t.flipperR,[SHOULDER[0],SHOULDER[1],SHOULDER[2]],REST_R],[t.footL,footLAt(),FOOT_L_REST],[t.footR,footRAt(),FOOT_R_REST]];for(const[a,p,r]of n)i<=0?o.set(a,{position:p,rotation:r,...a===t.pelvis&&{scale:1}}):o.animate(a,{position:p,rotation:r,...a===t.pelvis&&{scale:1}},{duration:i,easing:"easeOut"})}export function facePenguin(o,t,i,n=.12){t.yaw=i,n<=0?o.set(t.root,{rotation:quat.y(i)}):o.animate(t.root,{rotation:quat.y(i)},{duration:n})}export function movePenguin(o,t,i,n,a="linear"){return t.x=i,o.animate(t.root,{position:[i,0,0]},{duration:n,easing:a})}export function placePenguin(o,t,i,n=0){o.stopAnimation(t.root),t.x=i,o.set(t.root,{position:[i,0,0]}),facePenguin(o,t,n,0),toRest(o,t,0),t.anim=null}const BLEND=.12,hip=(o,t,i)=>[o,.39+t,i],lean=(o,t,i)=>quat.fromEuler(o,t,i),footRot=(o,t,i=0)=>quat.fromEuler(t,.18*o+i,0),k=(o,t)=>({...t,at:o}),AIR=[[0,0],[.26,0],[.4,.72],[.52,.95],[.64,.72],[.78,0],[1,0]],airAt=o=>{for(let t=1;t<AIR.length;t++){const[i,n]=AIR[t],[a,p]=AIR[t-1];if(o<=i)return p+(n-p)*(o-a)/Math.max(1e-6,i-a)}return 0};export function playPenguin(o,t,i,n=1){if(t.anim===i&&LOOPING.has(i))return Promise.resolve();t.anim=i,toRest(o,t,.12);const a=CLIP_TIME[i]/n,p={duration:a,repeat:"forever",delay:.12,easing:"linear",path:"smooth"},r={duration:a,delay:.12,easing:"linear",path:"smooth"},s=(t,i,n)=>o.animate(t,i,n),{pelvis:e,flipperL:l,flipperR:f,footL:R,footR:h}=t;switch(i){case"idle":return s(e,[k(0,{position:hip(0,0,0),rotation:IDENTITY,scale:1}),k(.12,{position:hip(0,.012,0),rotation:lean(-.02,0,0),scale:[1.01,1.03,1.01]}),k(.26,{position:hip(0,0,0),rotation:IDENTITY,scale:1}),k(.36,{position:hip(.006,0,0),rotation:lean(.04,.42,-.04),scale:1}),k(.5,{position:hip(.006,.01,0),rotation:lean(.02,.38,-.04),scale:[1.01,1.025,1.01]}),k(.58,{position:hip(-.006,0,0),rotation:lean(.04,-.36,.04),scale:1}),k(.72,{position:hip(-.006,.01,0),rotation:lean(.02,-.33,.04),scale:[1.01,1.025,1.01]}),k(.8,{position:hip(-.012,0,0),rotation:lean(0,0,.05),scale:1}),k(.9,{position:hip(0,.012,0),rotation:lean(-.02,0,0),scale:[1.01,1.03,1.01]}),k(1,{position:hip(0,0,0),rotation:IDENTITY,scale:1})],p),s(l,[k(0,{rotation:REST_L}),k(.12,{rotation:flipL(.02,.2)}),k(.26,{rotation:REST_L}),k(.4,{rotation:REST_L}),k(.44,{rotation:flipL(-.1,.55)}),k(.48,{rotation:flipL(0,.25)}),k(.51,{rotation:flipL(-.05,.45)}),k(.58,{rotation:REST_L}),k(.9,{rotation:flipL(.02,.2)}),k(1,{rotation:REST_L})],p),s(f,[k(0,{rotation:REST_R}),k(.12,{rotation:flipR(.02,.2)}),k(.26,{rotation:REST_R}),k(.64,{rotation:REST_R}),k(.68,{rotation:flipR(.15,.5)}),k(.74,{rotation:REST_R}),k(.9,{rotation:flipR(.02,.2)}),k(1,{rotation:REST_R})],p),s(h,[k(0,{position:footRAt()}),k(.78,{position:footRAt()}),k(.82,{position:footRAt(.025,.02)}),k(.86,{position:footRAt()}),k(1,{position:footRAt()})],p),Promise.resolve();case"walk":case"run":{const o="run"===i,t=o?.025:.04,n=o?.09:.15,a=o?.04:.08,r=o?.4:.05,L=o?-.025:-.005,T=o?.06:.025;s(e,[k(0,{position:hip(-t,L,0),rotation:lean(r,a,n)}),k(.25,{position:hip(0,T,0),rotation:lean(r+.02,0,0)}),k(.5,{position:hip(t,L,0),rotation:lean(r,-a,-n)}),k(.75,{position:hip(0,T,0),rotation:lean(r+.02,0,0)}),k(1,{position:hip(-t,L,0),rotation:lean(r,a,n)})],p);const E=o?.09:.045,u=o?.11:.06,A=(o,t,i)=>{const n=[[0,t(0,-u),footRot(o,0)],[.12,t(.6*E,.4*-u),footRot(o,.35)],[.25,t(E,.4*u),footRot(o,-.1)],[.4,t(0,u),footRot(o,-.15)],[.46,t(0,.9*u),footRot(o,0)],[1,t(0,-u),footRot(o,0)]].map(([o,t,n])=>[(o+i)%1,t,n]).sort((o,t)=>o[0]-t[0]),a=n[0],p=n.map(([o,t,i])=>k(o,{position:t,rotation:i}));if(a[0]>0){const o=n[n.length-1];p.unshift(k(0,{position:o[1],rotation:o[2]}))}return p[p.length-1].at<1&&p.push(k(1,{position:p[0].position,rotation:p[0].rotation})),p};s(h,A(1,footRAt,0),p),s(R,A(-1,footLAt,.5),p);const[S,_,O]=o?[.95,.55,.85]:[.15,.3,.55];return s(l,[k(0,{rotation:flipL(S,_)}),k(.25,{rotation:flipL(S-.08,(_+O)/2)}),k(.5,{rotation:flipL(S,O)}),k(.75,{rotation:flipL(S-.08,(_+O)/2)}),k(1,{rotation:flipL(S,_)})],p),s(f,[k(0,{rotation:flipR(S,O)}),k(.25,{rotation:flipR(S-.08,(_+O)/2)}),k(.5,{rotation:flipR(S,_)}),k(.75,{rotation:flipR(S-.08,(_+O)/2)}),k(1,{rotation:flipR(S,O)})],p),Promise.resolve()}case"punch":case"jab":{const o="punch"===i,t=o?1:-1,n=o?1:.7,a=o?f:l,p=o?l:f,L=o?flipR:flipL,T=o?flipL:flipR,E=o?R:h,u=o?h:R,A=o?footLAt:footRAt,S=o?1:-1;return s(e,[k(0,{position:hip(0,0,0),rotation:IDENTITY}),k(.3,{position:hip(0,-.035*n,-.03),rotation:lean(-.12,.45*t*n,0)}),k(.4,{position:hip(0,-.04*n,.1*n),rotation:lean(.32*n,-.38*t*n,0)}),k(.48,{position:hip(0,-.04*n,.12*n),rotation:lean(.38*n,-.46*t*n,0)}),k(.64,{position:hip(0,-.03*n,.09*n),rotation:lean(.26*n,-.32*t*n,0)}),k(1,{position:hip(0,0,0),rotation:IDENTITY})],r),s(a,[k(0,{rotation:o?REST_R:REST_L}),k(.3,{rotation:L(.95,.55)}),k(.4,{rotation:L(-1.6,.2,.15)}),k(.48,{rotation:L(-1.85,.12,.2)}),k(.64,{rotation:L(-1.55,.2,.1)}),k(1,{rotation:o?REST_R:REST_L})],r),s(p,[k(0,{rotation:o?REST_L:REST_R}),k(.3,{rotation:T(-.5,.35)}),k(.42,{rotation:T(.7,.55)}),k(.64,{rotation:T(.5,.45)}),k(1,{rotation:o?REST_L:REST_R})],r),s(E,[k(0,{position:A()}),k(.3,{position:A()}),k(.36,{position:A(.035,.07)}),k(.42,{position:A(0,.13*n)}),k(.7,{position:A(0,.12*n)}),k(.85,{position:A(.02,.05)}),k(1,{position:A()})],r),s(u,[k(0,{rotation:footRot(S,0)}),k(.4,{rotation:footRot(S,-.15,-.45*t)}),k(.7,{rotation:footRot(S,-.1,-.35*t)}),k(1,{rotation:footRot(S,0)})],r)}case"jump":{const o=o=>o.map(o=>o.position?{...o,position:[o.position[0],o.position[1]+airAt(o.at??0),o.position[2]]}:o),t=s(e,o([k(0,{position:hip(0,0,0),rotation:IDENTITY,scale:1}),k(.22,{position:hip(0,-.09,.02),rotation:lean(.22,0,0),scale:[1.14,.84,1.14]}),k(.3,{position:hip(0,.02,0),rotation:lean(-.06,0,0),scale:[.9,1.16,.9]}),k(.4,{position:hip(0,.02,0),rotation:lean(.02,0,0),scale:1}),k(.52,{position:hip(0,.02,0),rotation:lean(.05,0,0),scale:1}),k(.64,{position:hip(0,.01,0),rotation:lean(0,0,0),scale:1}),k(.72,{position:hip(0,.01,0),rotation:lean(-.04,0,0),scale:[.95,1.07,.95]}),k(.8,{position:hip(0,-.09,.01),rotation:lean(.18,0,0),scale:[1.16,.82,1.16]}),k(.9,{position:hip(0,.015,0),rotation:lean(-.03,0,0),scale:[.96,1.05,.96]}),k(1,{position:hip(0,0,0),rotation:IDENTITY,scale:1})]),r),i=(o,t)=>[k(0,{rotation:t}),k(.22,{rotation:o(1.1,.5)}),k(.32,{rotation:o(-.2,2.3)}),k(.42,{rotation:o(.1,1)}),k(.52,{rotation:o(-.1,2.1)}),k(.66,{rotation:o(.1,1.1)}),k(.8,{rotation:o(-.2,1.7)}),k(.9,{rotation:o(0,.5)}),k(1,{rotation:t})];s(l,i(flipL,REST_L),r),s(f,i(flipR,REST_R),r);for(const[t,i,n]of[[R,footLAt,-1],[h,footRAt,1]])s(t,o([k(0,{position:i(),rotation:footRot(n,0)}),k(.28,{position:i(),rotation:footRot(n,-.3)}),k(.42,{position:i(.07,-.05),rotation:footRot(n,.6)}),k(.52,{position:i(.07,-.04),rotation:footRot(n,.5)}),k(.62,{position:i(.06,-.03),rotation:footRot(n,.4)}),k(.76,{position:i(.01,.02),rotation:footRot(n,-.25)}),k(.8,{position:i(),rotation:footRot(n,0)}),k(1,{position:i(),rotation:footRot(n,0)})]),r);return t}case"slide":{s(e,[k(0,{position:hip(0,0,0),rotation:IDENTITY,scale:1}),k(.12,{position:hip(0,-.06,-.03),rotation:lean(-.35,0,0),scale:[1.04,.92,1.04]}),k(.24,{position:hip(0,-.13,-.08),rotation:lean(-1.05,0,0),scale:[1.06,.88,1.06]}),k(.45,{position:hip(0,-.13,-.08),rotation:lean(-1.02,.04,.04),scale:[1.06,.88,1.06]}),k(.6,{position:hip(0,-.13,-.08),rotation:lean(-1.05,-.04,-.04),scale:[1.06,.88,1.06]}),k(.74,{position:hip(0,-.13,-.08),rotation:lean(-1.02,.03,.02),scale:[1.06,.88,1.06]}),k(.86,{position:hip(0,-.05,-.03),rotation:lean(-.3,0,0),scale:[1.03,.95,1.03]}),k(.93,{position:hip(0,.01,0),rotation:lean(.06,0,0),scale:[.98,1.02,.98]}),k(1,{position:hip(0,0,0),rotation:IDENTITY,scale:1})],r);const o=(o,t,i)=>[k(0,{rotation:t}),k(.12,{rotation:o(-.3,.6)}),k(.24,{rotation:o(-.5,.9)}),k(.4+i,{rotation:o(-.45,1)}),k(.55+i,{rotation:o(-.55,.9)}),k(.74,{rotation:o(-.5,.95)}),k(.86,{rotation:o(-.15,.5)}),k(1,{rotation:t})];s(l,o(flipL,REST_L,0),r),s(f,o(flipR,REST_R,.04),r);for(const[o,t,i,n]of[[R,footLAt,-1,0],[h,footRAt,1,.05]])s(o,[k(0,{position:t(),rotation:footRot(i,0)}),k(.12,{position:t(.01,.08),rotation:footRot(i,-.3)}),k(.24,{position:t(.03,.18),rotation:footRot(i,-.55)}),k(.5+n,{position:t(.03,.18),rotation:footRot(i,-.5)}),k(.76,{position:t(.03,.18),rotation:footRot(i,-.55)}),k(.88,{position:t(.01,.05),rotation:footRot(i,-.1)}),k(1,{position:t(),rotation:footRot(i,0)})],r);return s(t.body,[k(0,{scale:1}),k(1,{scale:1})],r)}case"hit":return o.animate(t.root,{shake:.045},{duration:.4*a}),s(e,[k(0,{position:hip(0,0,0),rotation:IDENTITY,scale:1}),k(.1,{position:hip(0,-.02,-.08),rotation:lean(-.55,0,.15),scale:[1.06,.93,1.06]}),k(.26,{position:hip(0,0,-.05),rotation:lean(.22,0,-.08),scale:1}),k(.42,{position:hip(0,0,-.03),rotation:lean(-.12,0,.05),scale:1}),k(.58,{position:hip(0,0,-.01),rotation:lean(.06,0,-.02),scale:1}),k(.75,{position:hip(0,0,0),rotation:lean(-.02,0,0),scale:1}),k(1,{position:hip(0,0,0),rotation:IDENTITY,scale:1})],r),s(l,[k(0,{rotation:REST_L}),k(.1,{rotation:flipL(-.4,1.9)}),k(.28,{rotation:flipL(.2,.6)}),k(.44,{rotation:flipL(-.1,1)}),k(.62,{rotation:flipL(0,.4)}),k(1,{rotation:REST_L})],r),s(f,[k(0,{rotation:REST_R}),k(.12,{rotation:flipR(-.4,1.8)}),k(.3,{rotation:flipR(.2,.55)}),k(.46,{rotation:flipR(-.1,.95)}),k(.64,{rotation:flipR(0,.4)}),k(1,{rotation:REST_R})],r),s(R,[k(0,{position:footLAt()}),k(.14,{position:footLAt(.04,-.06)}),k(.24,{position:footLAt(0,-.1)}),k(.7,{position:footLAt(0,-.06)}),k(1,{position:footLAt()})],r),s(h,[k(0,{position:footRAt()}),k(.3,{position:footRAt()}),k(.4,{position:footRAt(.03,-.04)}),k(.5,{position:footRAt(0,-.07)}),k(1,{position:footRAt()})],r);case"dance":return s(e,[k(0,{position:hip(-.03,0,0),rotation:lean(0,.35,.18),scale:[1.04,.95,1.04]}),k(.12,{position:hip(-.01,.07,0),rotation:lean(0,.2,.08),scale:[.97,1.05,.97]}),k(.25,{position:hip(0,.09,0),rotation:lean(-.05,0,0),scale:1}),k(.38,{position:hip(.01,.07,0),rotation:lean(0,-.2,-.08),scale:[.97,1.05,.97]}),k(.5,{position:hip(.03,0,0),rotation:lean(0,-.35,-.18),scale:[1.04,.95,1.04]}),k(.62,{position:hip(.01,.07,0),rotation:lean(0,-.2,-.08),scale:[.97,1.05,.97]}),k(.75,{position:hip(0,.09,0),rotation:lean(-.05,0,0),scale:1}),k(.88,{position:hip(-.01,.07,0),rotation:lean(0,.2,.08),scale:[.97,1.05,.97]}),k(1,{position:hip(-.03,0,0),rotation:lean(0,.35,.18),scale:[1.04,.95,1.04]})],p),s(l,[k(0,{rotation:flipL(0,2.6)}),k(.25,{rotation:flipL(-.35,1.9)}),k(.5,{rotation:flipL(0,2.6)}),k(.75,{rotation:flipL(-.35,1.9)}),k(1,{rotation:flipL(0,2.6)})],p),s(f,[k(0,{rotation:flipR(-.35,1.9)}),k(.25,{rotation:flipR(0,2.6)}),k(.5,{rotation:flipR(-.35,1.9)}),k(.75,{rotation:flipR(0,2.6)}),k(1,{rotation:flipR(-.35,1.9)})],p),s(R,[k(0,{position:footLAt()}),k(.6,{position:footLAt()}),k(.75,{position:footLAt(.07,.03)}),k(.9,{position:footLAt()}),k(1,{position:footLAt()})],p),s(h,[k(0,{position:footRAt()}),k(.1,{position:footRAt()}),k(.25,{position:footRAt(.07,.03)}),k(.4,{position:footRAt()}),k(1,{position:footRAt()})],p),Promise.resolve();case"dead":return s(e,[k(0,{position:hip(0,0,0),rotation:IDENTITY}),k(.08,{position:hip(0,-.02,-.05),rotation:lean(-.35,0,.08)}),k(.2,{position:hip(.02,0,0),rotation:lean(.18,.15,.14)}),k(.34,{position:hip(-.02,0,0),rotation:lean(-.05,-.2,-.16)}),k(.48,{position:hip(.015,0,0),rotation:lean(.08,.15,.12)}),k(.6,{position:hip(0,-.02,-.03),rotation:lean(-.3,0,.05)}),k(.76,{position:[0,.3,-.26],rotation:lean(-1.55,0,.1)}),k(.84,{position:[0,.36,-.24],rotation:lean(-1.38,0,.12)}),k(.92,{position:[0,.3,-.26],rotation:lean(-1.55,0,.1)}),k(1,{position:[0,.3,-.26],rotation:lean(-1.55,0,.1)})],r),s(l,[k(0,{rotation:REST_L}),k(.08,{rotation:flipL(-.3,1.2)}),k(.3,{rotation:flipL(.2,.8)}),k(.6,{rotation:flipL(-.4,1.6)}),k(.8,{rotation:flipL(-.2,1.45)}),k(.88,{rotation:flipL(-.3,1.7)}),k(1,{rotation:flipL(-.2,1.4)})],r),s(f,[k(0,{rotation:REST_R}),k(.1,{rotation:flipR(-.3,1.1)}),k(.36,{rotation:flipR(.2,.9)}),k(.62,{rotation:flipR(-.4,1.5)}),k(.8,{rotation:flipR(-.2,1.4)}),k(.88,{rotation:flipR(-.3,1.65)}),k(1,{rotation:flipR(-.2,1.35)})],r),s(R,[k(0,{position:footLAt(),rotation:footRot(-1,0)}),k(.2,{position:footLAt(.03,.03),rotation:footRot(-1,0)}),k(.26,{position:footLAt(0,.04),rotation:footRot(-1,0)}),k(.6,{position:footLAt(),rotation:footRot(-1,0)}),k(.78,{position:footLAt(.2,.05),rotation:footRot(-1,-1.2)}),k(1,{position:footLAt(.18,.04),rotation:footRot(-1,-1.3)})],r),s(h,[k(0,{position:footRAt(),rotation:footRot(1,0)}),k(.34,{position:footRAt(.03,-.03),rotation:footRot(1,0)}),k(.4,{position:footRAt(0,-.04),rotation:footRot(1,0)}),k(.6,{position:footRAt(),rotation:footRot(1,0)}),k(.8,{position:footRAt(.22,.03),rotation:footRot(1,-1.1)}),k(1,{position:footRAt(.2,.02),rotation:footRot(1,-1.25)})],r)}}export function strikePoint(o,t){return[o.x+.45*Math.sin(o.yaw)*t,.55*t,.45*Math.cos(o.yaw)*t]}
@@ -0,0 +1 @@
1
+ "use strict";import{useMemo}from"react";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{livesColumn,scoreColumn,textColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{MAX_LIVES,RESULTS_DELAY_LOSE,RESULTS_DELAY_WIN,TRACK_LENGTH}from"./PenguinRunConstants.js";import{createGame,dispose,reset,setLayout,setTheme,start,steer,tick}from"./PenguinRunGame.js";import{backgroundFor,FOG,lightFor}from"./PenguinRunScene.js";import{jsx as _0x593b87}from"react/jsx-runtime";const SFX=GAME_SOUNDS.PENGUIN_RUN;export const PenguinRun=engineGame(GAME_IDS.PENGUIN_RUN,e=>{const[t,s]=useLiveState(0),[n,r]=useLiveState(0),[i,o]=useLiveState(MAX_LIVES),[a,S]=useLiveState(0),{theme:m,status:u,screen:E,gameOver:p}=useEngineGame(e,{gameId:GAME_IDS.PENGUIN_RUN,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s)=>setLayout(e,t,s),drag:(e,{phase:t,x:s,y:n})=>steer(e,t,s,n),sounds:SFX,resultsDelay:e=>"win"===e?RESULTS_DELAY_WIN:RESULTS_DELAY_LOSE,onStart:e=>e(SFX.START),wire:(e,t)=>{e.onScore=s,e.onCoins=r,e.onLives=o,e.onDistance=S,e.onCoin=e=>t(e?SFX.GEM:SFX.COIN,e?HapticType.LIGHT:null),e.onJump=()=>t(SFX.JUMP),e.onSlide=()=>t(SFX.SLIDE),e.onLane=()=>t(SFX.LANE_SWITCH,HapticType.LIGHT),e.onHurt=()=>t(SFX.CRASH,HapticType.HEAVY),e.onCrash=()=>{t(SFX.CRASH,HapticType.HEAVY),e.world.after(.5,()=>t(SFX.GAME_OVER))},e.onWin=()=>t(GAME_SOUNDS.WELL_DONE,HapticType.SUCCESS)}}),L=useMemo(()=>lightFor(m),[m]),G=useMemo(()=>backgroundFor(m),[m]);return _0x593b87(EngineGameScreen,{...E,light:L,background:G,fog:FOG,columns:[scoreColumn(t),livesColumn(i,MAX_LIVES),textColumn("TRACK",TRACK_LENGTH-a+" m")],subtext:"Swipe, jump and slide!",gameOver:p({title:"win"===u?"YOU MADE IT!":"OUCH!",message:"win"===u?"Made it to the finish with "+n+" coins!":"Out of lives after "+a+" of "+TRACK_LENGTH+" m. Try a new track!",scoreLabel:"Score",score:t,buttonText:"win"===u?"Run Again!":"Try Again!"})})});
@@ -0,0 +1 @@
1
+ "use strict";export const PENGUIN_SIZE=1.2;export const LANE_X=[-1.7,0,1.7];export const LANE_STIFFNESS=14;export const LEAN_ROLL=.045;export const LEAN_YAW=.035;export const MAX_LEAN=.32;export const CAMERA_FOLLOW=6;export const SPEED_START=7;export const TRACK_LENGTH=1e3;export const START_CLEAR=14;export const FINISH_CLEAR=6;export const SLAB=2;export const RESULTS_DELAY_LOSE=1700;export const RESULTS_DELAY_WIN=2600;export const TILE_LENGTH=12;export const TILES_AHEAD=9;export const TILES_BEHIND=2;export const TILES_BEFORE_START=3;export const TILES_PAST_FINISH=3;export const JUMP_AIR_METRES=5.5;export const SLIDE_LOW_METRES=7;export const JUMP_TIME=[.7,1.15];export const SLIDE_TIME=[.8,1.25];export const GAP_WINDOW=[.15,.9];export const LOW_WINDOW=[.08,.94];export const GAP_HALF=.45;export const MAX_LIVES=3;export const HURT_INVULNERABLE=2.2;export const HIT_DEPTH=.3;export const LANE_TOLERANCE=.7;export const COIN_RADIUS=1.1;export const POINTS_PER_METRE=2;export const POINTS_COIN=20;export const POINTS_GEM=200;
@@ -0,0 +1 @@
1
+ "use strict";import{quat,World}from"@nayan-ui/engine";import{CLIP_TIME,placePenguin,playPenguin,preparePenguin,spawnPenguin}from"./PenguinModel.js";import{CAMERA_FOLLOW,COIN_RADIUS,GAP_HALF,GAP_WINDOW,HIT_DEPTH,HURT_INVULNERABLE,JUMP_AIR_METRES,JUMP_TIME,LANE_STIFFNESS,LANE_TOLERANCE,LANE_X,LEAN_ROLL,LEAN_YAW,LOW_WINDOW,MAX_LEAN,MAX_LIVES,PENGUIN_SIZE,POINTS_COIN,POINTS_GEM,POINTS_PER_METRE,SLIDE_LOW_METRES,SLIDE_TIME,SPEED_START,TILE_LENGTH,TILES_AHEAD,TILES_BEFORE_START,TILES_BEHIND,TRACK_LENGTH}from"./PenguinRunConstants.js";import{coinSparkle,crashDust,despawnTile,generateTrack,LAST_TILE,prepareRunMeshes,spawnTile}from"./PenguinRunScene.js";const noop=()=>{},newSeed=()=>Math.floor(1e9*Math.random());export function createGame(e){preparePenguin(),prepareRunMeshes();const n=new World(1800),a={world:n,theme:e,penguin:spawnPenguin(n,[0,0,0],PENGUIN_SIZE),camera:{eye:[0,3.1,5.4],target:[0,1.1,-6],fov:.9},phase:"ready",won:!1,plan:generateTrack(newSeed()),tiles:[],nextTile:0,lane:1,x:0,vx:0,camX:0,z:0,speed:SPEED_START,distance:0,lastDistance:0,coins:0,gems:0,score:0,lives:MAX_LIVES,invulnerable:0,action:null,queued:null,queuedT:0,actionT:0,actionDur:0,orbit:0,onPhase:noop,onScore:noop,onCoins:noop,onLives:noop,onHurt:noop,onDistance:noop,onCoin:noop,onJump:noop,onSlide:noop,onLane:noop,onCrash:noop,onWin:noop};return reset(a),a}const runPace=e=>Math.min(1.7,Math.max(1,e.speed/SPEED_START));function keepTiles(e){for(;e.nextTile<=LAST_TILE&&e.nextTile*TILE_LENGTH<-e.z+TILES_AHEAD*TILE_LENGTH;)e.tiles.push(spawnTile(e.world,e.nextTile,e.theme,e.plan)),e.nextTile++;for(;e.tiles.length&&e.tiles[0].z-TILE_LENGTH>e.z+TILES_BEHIND*TILE_LENGTH;)despawnTile(e.world,e.tiles.shift())}const LEAN_Q=[0,0,0,1],TURN_Q=[0,0,0,1],ROOT_Q=[0,0,0,1];function place(e){const n=Math.max(-MAX_LEAN,Math.min(MAX_LEAN,e.vx*LEAN_ROLL)),a=Math.max(-MAX_LEAN,Math.min(MAX_LEAN,e.vx*LEAN_YAW));e.world.set(e.penguin.root,{position:[e.x,0,e.z],rotation:quat.multiply(quat.z(-n,LEAN_Q),quat.y(Math.PI-a,TURN_Q),ROOT_Q)}),e.penguin.x=e.x,e.penguin.yaw=Math.PI-a,aimCamera(e)}function aimCamera(e){e.camera.eye=[e.camX,3.1,e.z+5.4],e.camera.target=[e.camX,1.1,e.z-6]}function orbitCamera(e,n){e.orbit+=.35*n;const a=e.orbit+.9;e.camera.eye=[e.x+4.2*Math.sin(a),1.9,e.z+4.2*Math.cos(a)],e.camera.target=[e.x,.8,e.z]}export function reset(e){e.world.cancelTimers();for(const n of e.tiles)despawnTile(e.world,n);e.tiles=[],e.nextTile=-TILES_BEFORE_START,e.plan=generateTrack(newSeed()),e.won=!1,e.lane=1,e.x=LANE_X[1],e.vx=0,e.camX=0,e.z=0,e.speed=SPEED_START,e.distance=e.coins=e.gems=e.score=0,e.lives=MAX_LIVES,e.invulnerable=0,e.action=null,e.queued=null,e.orbit=0,e.world.stopAnimation(e.penguin.root),placePenguin(e.world,e.penguin,0,Math.PI),keepTiles(e),place(e),playPenguin(e.world,e.penguin,"idle"),setPhase(e,"ready"),e.onScore(0),e.onCoins(0),e.onLives(MAX_LIVES),e.lastDistance=0,e.onDistance(0)}function setPhase(e,n){e.phase=n,e.onPhase(n)}export function start(e){"over"===e.phase&&reset(e),playPenguin(e.world,e.penguin,"run"),aimCamera(e),setPhase(e,"playing")}export function swipe(e,n){if("playing"!==e.phase)return;if("left"===n||"right"===n){const a=Math.max(0,Math.min(2,e.lane+("left"===n?-1:1)));if(a===e.lane)return;return e.lane=a,void e.onLane()}const a="up"===n?"jump":"slide";if(e.action===a)return e.queued=a,void(e.queuedT=QUEUE_TIME);e.queued=null,e.action=a,e.actionT=0;const[o,i,[t,r]]="jump"===a?[JUMP_AIR_METRES,GAP_WINDOW,JUMP_TIME]:[SLIDE_LOW_METRES,LOW_WINDOW,SLIDE_TIME];e.actionDur=Math.min(r,Math.max(t,o/((i[1]-i[0])*e.speed))),playPenguin(e.world,e.penguin,a,CLIP_TIME[a]/e.actionDur),"jump"===a?e.onJump():e.onSlide()}const DRAG_THRESHOLD=18,QUEUE_TIME=.35,drag={x:0,y:0,fired:!1};export function steer(e,n,a,o){if("start"===n)return drag.x=a,drag.y=o,void(drag.fired=!1);if("end"===n||drag.fired)return;const i=a-drag.x,t=o-drag.y;Math.max(Math.abs(i),Math.abs(t))<18||(drag.fired=!0,Math.abs(i)>Math.abs(t)?swipe(e,i<0?"left":"right"):swipe(e,t<0?"up":"down"))}const actionFrac=e=>Math.max(0,e.actionT-.06)/e.actionDur,airborne=e=>"jump"===e.action&&actionFrac(e)>=GAP_WINDOW[0]&&actionFrac(e)<=GAP_WINDOW[1],ducking=e=>"slide"===e.action&&actionFrac(e)>=LOW_WINDOW[0]&&actionFrac(e)<=LOW_WINDOW[1];function hurt(e){e.lives--,e.onLives(e.lives),e.invulnerable=HURT_INVULNERABLE,e.action="hit",e.actionT=0,e.actionDur=CLIP_TIME.hit/1.3,playPenguin(e.world,e.penguin,"hit",1.3),crashDust(e.world,[e.x,.5,e.z-.4]),e.camera.shake=.22,e.onHurt()}function crash(e){e.lives=0,e.onLives(0),e.action=null,playPenguin(e.world,e.penguin,"dead"),crashDust(e.world,[e.x,.6,e.z-.4]),e.camera.shake=.35,e.onCrash(),setPhase(e,"over")}function fall(e){e.lives=0,e.onLives(0),e.action=null,playPenguin(e.world,e.penguin,"dead",1.4),e.world.animate(e.penguin.root,{position:[e.x,-7,e.z-1.2]},{duration:1.3,easing:"easeIn"}),crashDust(e.world,[e.x,0,e.z-.6]),e.camera.shake=.15,e.onCrash(),setPhase(e,"over")}function win(e){e.won=!0,e.action=null,e.world.animate(e.penguin.root,{rotation:quat.y(0)},{duration:.5,delay:.5,easing:"easeInOut"}),playPenguin(e.world,e.penguin,"dance"),e.onWin(),setPhase(e,"over")}export function tick(e,n){if(!e.world.isDisposed){if("playing"===e.phase){e.speed=SPEED_START;const a=e.speed*n;e.z-=a,e.distance+=a;const o=LANE_STIFFNESS,i=Math.max(1,Math.ceil(n/.008)),t=n/i;for(let n=0;n<i;n++)e.vx+=(o*o*(LANE_X[e.lane]-e.x)-2*o*e.vx)*t,e.x+=e.vx*t;if(e.camX+=(.4*e.x-e.camX)*(1-Math.exp(-n*CAMERA_FOLLOW)),e.invulnerable=Math.max(0,e.invulnerable-n),e.queuedT=Math.max(0,e.queuedT-n),e.action&&(e.actionT+=n,e.actionT>=e.actionDur+.06)){e.action=null;const n=e.queuedT>0?e.queued:null;e.queued=null,n?swipe(e,"jump"===n?"up":"down"):playPenguin(e.world,e.penguin,"run",runPace(e))}keepTiles(e),place(e);for(const a of e.tiles)if(!(a.z<e.z-TILE_LENGTH||a.z-TILE_LENGTH>e.z+TILE_LENGTH)){for(const o of a.obstacles)if(!(e.invulnerable>0||Math.abs(LANE_X[o.lane]-e.x)>LANE_TOLERANCE)&&("gap"===o.kind?Math.abs(o.z-e.z)<GAP_HALF&&!airborne(e):Math.abs(o.z-e.z)<HIT_DEPTH&&("beam"!==o.kind||!ducking(e)))){if(e.lives>1){hurt(e);break}return finish(e,n,"gap"===o.kind?fall:crash)}for(const n of a.pickups)n.taken||Math.abs(n.z-e.z)>COIN_RADIUS||Math.abs(LANE_X[n.lane]-e.x)>LANE_TOLERANCE||(n.taken=!0,e.world.despawn(n.e),coinSparkle(e.world,[LANE_X[n.lane],n.y,n.z],n.gem),n.gem?e.gems++:e.coins++,e.onCoins(e.coins+10*e.gems),e.onCoin(n.gem))}const r=Math.min(TRACK_LENGTH,Math.floor(e.distance)),s=r*POINTS_PER_METRE+e.coins*POINTS_COIN+e.gems*POINTS_GEM;if(s!==e.score&&(e.score=s,e.onScore(s)),r!==e.lastDistance&&(e.lastDistance=r,e.onDistance(r)),e.distance>=TRACK_LENGTH)return finish(e,n,win)}else"over"===e.phase&&e.won&&e.speed>0?(e.speed=Math.max(0,e.speed-22*n),e.z-=e.speed*n,e.world.set(e.penguin.root,{position:[e.x,0,e.z]}),aimCamera(e)):"ready"===e.phase&&orbitCamera(e,n);e.world.update(n)}}function finish(e,n,a){a(e),e.world.update(n)}export function setLayout(e,n,a){e.camera.fov=n/Math.max(1,a)<.7?1:.85}export function setTheme(e,n){if(n===e.theme||e.world.isDisposed)return;e.theme=n;const a=e.tiles.map(e=>e.index);for(const n of e.tiles)despawnTile(e.world,n);e.tiles=a.map(a=>spawnTile(e.world,a,n,e.plan))}export function dispose(e){e.world.dispose()}