@nayan-ui/games 1.18.0 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1808) hide show
  1. package/README.md +53 -191
  2. package/lib/module/assets/fonts/Inter-SemiBold.ttf +0 -0
  3. package/lib/module/assets/models/explorer/explorer.glb +0 -0
  4. package/lib/module/assets/models/explorer/params.json +51 -0
  5. package/lib/module/assets/models/explorer/source.json +222 -0
  6. package/lib/module/assets/models/play-with-tua/play-with-tua.glb +0 -0
  7. package/lib/module/assets/models/play-with-tua/sources.json +141 -0
  8. package/lib/module/assets/sfx/balloon_pop.wav +0 -0
  9. package/lib/module/assets/sfx/blocked.wav +0 -0
  10. package/lib/module/assets/sfx/boing.wav +0 -0
  11. package/lib/module/assets/sfx/bonus.wav +0 -0
  12. package/lib/module/assets/sfx/boom.wav +0 -0
  13. package/lib/module/assets/sfx/bump.wav +0 -0
  14. package/lib/module/assets/sfx/cannon.wav +0 -0
  15. package/lib/module/assets/sfx/capture.wav +0 -0
  16. package/lib/module/assets/sfx/card_flip.wav +0 -0
  17. package/lib/module/assets/sfx/card_place.wav +0 -0
  18. package/lib/module/assets/sfx/catch.wav +0 -0
  19. package/lib/module/assets/sfx/chime.wav +0 -0
  20. package/lib/module/assets/sfx/chomp.wav +0 -0
  21. package/lib/module/assets/sfx/chomp_alt.wav +0 -0
  22. package/lib/module/assets/sfx/clack.wav +0 -0
  23. package/lib/module/assets/sfx/clang.wav +0 -0
  24. package/lib/module/assets/sfx/clash.wav +0 -0
  25. package/lib/module/assets/sfx/click.wav +0 -0
  26. package/lib/module/assets/sfx/coin.wav +0 -0
  27. package/lib/module/assets/sfx/combo.wav +0 -0
  28. package/lib/module/assets/sfx/crash.wav +0 -0
  29. package/lib/module/assets/sfx/crunch.wav +0 -0
  30. package/lib/module/assets/sfx/dance.wav +0 -0
  31. package/lib/module/assets/sfx/deselect.wav +0 -0
  32. package/lib/module/assets/sfx/dice_roll.wav +0 -0
  33. package/lib/module/assets/sfx/die.wav +0 -0
  34. package/lib/module/assets/sfx/draw.wav +0 -0
  35. package/lib/module/assets/sfx/drop.wav +0 -0
  36. package/lib/module/assets/sfx/eat.wav +0 -0
  37. package/lib/module/assets/sfx/engine.wav +0 -0
  38. package/lib/module/assets/sfx/error.wav +0 -0
  39. package/lib/module/assets/sfx/flag.wav +0 -0
  40. package/lib/module/assets/sfx/flap.wav +0 -0
  41. package/lib/module/assets/sfx/flip_disc.wav +0 -0
  42. package/lib/module/assets/sfx/footstep_run.wav +0 -0
  43. package/lib/module/assets/sfx/footstep_walk.wav +0 -0
  44. package/lib/module/assets/sfx/game_over.wav +0 -0
  45. package/lib/module/assets/sfx/gate.wav +0 -0
  46. package/lib/module/assets/sfx/hit.wav +0 -0
  47. package/lib/module/assets/sfx/hop.wav +0 -0
  48. package/lib/module/assets/sfx/hurt.wav +0 -0
  49. package/lib/module/assets/sfx/invalid.wav +0 -0
  50. package/lib/module/assets/sfx/jump.wav +0 -0
  51. package/lib/module/assets/sfx/ladder.wav +0 -0
  52. package/lib/module/assets/sfx/land.wav +0 -0
  53. package/lib/module/assets/sfx/laugh.wav +0 -0
  54. package/lib/module/assets/sfx/lose.wav +0 -0
  55. package/lib/module/assets/sfx/merge.wav +0 -0
  56. package/lib/module/assets/sfx/miss.wav +0 -0
  57. package/lib/module/assets/sfx/nitro.wav +0 -0
  58. package/lib/module/assets/sfx/pew.wav +0 -0
  59. package/lib/module/assets/sfx/place.wav +0 -0
  60. package/lib/module/assets/sfx/pling.wav +0 -0
  61. package/lib/module/assets/sfx/point.wav +0 -0
  62. package/lib/module/assets/sfx/pop.wav +0 -0
  63. package/lib/module/assets/sfx/pop_soft.wav +0 -0
  64. package/lib/module/assets/sfx/power_up.wav +0 -0
  65. package/lib/module/assets/sfx/reveal.wav +0 -0
  66. package/lib/module/assets/sfx/robot.wav +0 -0
  67. package/lib/module/assets/sfx/rotate.wav +0 -0
  68. package/lib/module/assets/sfx/run_steps.wav +0 -0
  69. package/lib/module/assets/sfx/select.wav +0 -0
  70. package/lib/module/assets/sfx/shuffle.wav +0 -0
  71. package/lib/module/assets/sfx/six.wav +0 -0
  72. package/lib/module/assets/sfx/slice.wav +0 -0
  73. package/lib/module/assets/sfx/slide.wav +0 -0
  74. package/lib/module/assets/sfx/snake.wav +0 -0
  75. package/lib/module/assets/sfx/snap.wav +0 -0
  76. package/lib/module/assets/sfx/splash.wav +0 -0
  77. package/lib/module/assets/sfx/star.wav +0 -0
  78. package/lib/module/assets/sfx/start.wav +0 -0
  79. package/lib/module/assets/sfx/swoosh.wav +0 -0
  80. package/lib/module/assets/sfx/tap.wav +0 -0
  81. package/lib/module/assets/sfx/thud.wav +0 -0
  82. package/lib/module/assets/sfx/thunk.wav +0 -0
  83. package/lib/module/assets/sfx/tick.wav +0 -0
  84. package/lib/module/assets/sfx/time_up.wav +0 -0
  85. package/lib/module/assets/sfx/tock.wav +0 -0
  86. package/lib/module/assets/sfx/walk_steps.wav +0 -0
  87. package/lib/module/assets/sfx/warning.wav +0 -0
  88. package/lib/module/assets/sfx/whack.wav +0 -0
  89. package/lib/module/assets/sfx/whoosh.wav +0 -0
  90. package/lib/module/assets/sfx/win.wav +0 -0
  91. package/lib/module/assets/sfx/zap.wav +0 -0
  92. package/lib/module/assets/textures/ad_bolt.png +0 -0
  93. package/lib/module/assets/textures/ad_bubbles.png +0 -0
  94. package/lib/module/assets/textures/ad_chevrons.png +0 -0
  95. package/lib/module/assets/textures/asphalt.png +0 -0
  96. package/lib/module/assets/textures/bark.jpg +0 -0
  97. package/lib/module/assets/textures/explorer-atlas.png +0 -0
  98. package/lib/module/assets/textures/facade.png +0 -0
  99. package/lib/module/assets/textures/grass.png +0 -0
  100. package/lib/module/assets/textures/leaves.png +0 -0
  101. package/lib/module/assets/textures/limestone.jpg +0 -0
  102. package/lib/module/assets/textures/meadow.jpg +0 -0
  103. package/lib/module/assets/textures/nature-sources.json +87 -0
  104. package/lib/module/assets/textures/pine.png +0 -0
  105. package/lib/module/assets/textures/river.jpg +0 -0
  106. package/lib/module/assets/textures/soft_glow.png +0 -0
  107. package/lib/module/games/arrows/Arrows.js +1 -1
  108. package/lib/module/games/arrows/ArrowsConstants.js +1 -1
  109. package/lib/module/games/arrows/ArrowsGame.js +1 -0
  110. package/lib/module/games/arrows/ArrowsScene.js +1 -0
  111. package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -1
  112. package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -1
  113. package/lib/module/games/balloon-blaster/BalloonBlasterGame.js +1 -0
  114. package/lib/module/games/balloon-blaster/BalloonBlasterPhysics.js +1 -0
  115. package/lib/module/games/balloon-blaster/BalloonBlasterScene.js +1 -0
  116. package/lib/module/games/bike-racing/BikeMeshes.js +1 -0
  117. package/lib/module/games/bike-racing/BikeRacing.js +1 -1
  118. package/lib/module/games/bike-racing/BikeRacingConstants.js +1 -1
  119. package/lib/module/games/bike-racing/BikeRacingGame.js +1 -0
  120. package/lib/module/games/bike-racing/BikeRacingScene.js +1 -0
  121. package/lib/module/games/block-blast/BlockBlast.js +1 -1
  122. package/lib/module/games/block-blast/BlockBlastConstants.js +1 -1
  123. package/lib/module/games/block-blast/BlockBlastGame.js +1 -0
  124. package/lib/module/games/block-blast/BlockBlastScene.js +1 -0
  125. package/lib/module/games/block-breaker/BlockBreaker.js +1 -1
  126. package/lib/module/games/block-breaker/BlockBreakerConstants.js +1 -1
  127. package/lib/module/games/block-breaker/BlockBreakerGame.js +1 -0
  128. package/lib/module/games/block-breaker/BlockBreakerScene.js +1 -0
  129. package/lib/module/games/bluk/Bluk.js +1 -1
  130. package/lib/module/games/bluk/BlukConstants.js +1 -1
  131. package/lib/module/games/bluk/BlukGame.js +1 -0
  132. package/lib/module/games/bluk/BlukRules.js +1 -0
  133. package/lib/module/games/bluk/BlukScene.js +1 -0
  134. package/lib/module/games/bubble-shooter/BubbleShooter.js +1 -1
  135. package/lib/module/games/bubble-shooter/BubbleShooterConstants.js +1 -1
  136. package/lib/module/games/bubble-shooter/BubbleShooterGame.js +1 -0
  137. package/lib/module/games/bubble-shooter/BubbleShooterScene.js +1 -0
  138. package/lib/module/games/candy-crush/CandyCrush.js +1 -1
  139. package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -1
  140. package/lib/module/games/candy-crush/CandyCrushGame.js +1 -0
  141. package/lib/module/games/candy-crush/CandyCrushScene.js +1 -0
  142. package/lib/module/games/car-racing/CarMeshes.js +1 -0
  143. package/lib/module/games/car-racing/CarRacing.js +1 -1
  144. package/lib/module/games/car-racing/CarRacingConstants.js +1 -1
  145. package/lib/module/games/car-racing/CarRacingFacade.js +1 -0
  146. package/lib/module/games/car-racing/CarRacingGame.js +1 -0
  147. package/lib/module/games/car-racing/CarRacingScene.js +1 -0
  148. package/lib/module/games/car-racing/CarRacingScenery.js +1 -0
  149. package/lib/module/games/chameleon-run/ChameleonRun.js +1 -1
  150. package/lib/module/games/chameleon-run/ChameleonRunBackdrop.js +1 -0
  151. package/lib/module/games/chameleon-run/ChameleonRunConstants.js +1 -1
  152. package/lib/module/games/chameleon-run/ChameleonRunGame.js +1 -0
  153. package/lib/module/games/chameleon-run/ChameleonRunMeshes.js +1 -0
  154. package/lib/module/games/chameleon-run/ChameleonRunRules.js +1 -0
  155. package/lib/module/games/chameleon-run/ChameleonRunScene.js +1 -0
  156. package/lib/module/games/checkers/Checkers.js +1 -1
  157. package/lib/module/games/checkers/CheckersAI.js +1 -0
  158. package/lib/module/games/checkers/CheckersConstants.js +1 -1
  159. package/lib/module/games/checkers/CheckersGame.js +1 -0
  160. package/lib/module/games/checkers/CheckersRules.js +1 -0
  161. package/lib/module/games/checkers/CheckersScene.js +1 -0
  162. package/lib/module/games/color-switch/ColorSwitch.js +1 -1
  163. package/lib/module/games/color-switch/ColorSwitchConstants.js +1 -1
  164. package/lib/module/games/color-switch/ColorSwitchGame.js +1 -0
  165. package/lib/module/games/color-switch/ColorSwitchScene.js +1 -0
  166. package/lib/module/games/colors-sort/ColorsSort.js +1 -1
  167. package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -1
  168. package/lib/module/games/colors-sort/ColorsSortGame.js +1 -0
  169. package/lib/module/games/colors-sort/ColorsSortScene.js +1 -0
  170. package/lib/module/games/connect-em-all/ConnectEmAll.js +1 -1
  171. package/lib/module/games/connect-em-all/ConnectEmAllConstants.js +1 -1
  172. package/lib/module/games/connect-em-all/ConnectEmAllGame.js +1 -0
  173. package/lib/module/games/connect-em-all/ConnectEmAllScene.js +1 -0
  174. package/lib/module/games/crossy-road/CrossyRoad.js +1 -1
  175. package/lib/module/games/crossy-road/CrossyRoadCamera.js +1 -0
  176. package/lib/module/games/crossy-road/CrossyRoadConstants.js +1 -1
  177. package/lib/module/games/crossy-road/CrossyRoadGame.js +1 -0
  178. package/lib/module/games/crossy-road/CrossyRoadMeshes.js +1 -0
  179. package/lib/module/games/crossy-road/CrossyRoadPerson.js +1 -0
  180. package/lib/module/games/crossy-road/CrossyRoadRules.js +1 -0
  181. package/lib/module/games/crossy-road/CrossyRoadScene.js +1 -0
  182. package/lib/module/games/dino-jump/DinoJump.js +1 -1
  183. package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -1
  184. package/lib/module/games/dino-jump/DinoJumpGame.js +1 -0
  185. package/lib/module/games/dino-jump/DinoJumpScene.js +1 -0
  186. package/lib/module/games/dots-and-boxes/DotsAndBoxes.js +1 -1
  187. package/lib/module/games/dots-and-boxes/DotsAndBoxesConstants.js +1 -1
  188. package/lib/module/games/dots-and-boxes/DotsAndBoxesGame.js +1 -0
  189. package/lib/module/games/dots-and-boxes/DotsAndBoxesScene.js +1 -0
  190. package/lib/module/games/falling-sticks/FallingSticks.js +1 -1
  191. package/lib/module/games/falling-sticks/FallingSticksConstants.js +1 -1
  192. package/lib/module/games/falling-sticks/FallingSticksGame.js +1 -0
  193. package/lib/module/games/falling-sticks/FallingSticksRules.js +1 -0
  194. package/lib/module/games/falling-sticks/FallingSticksScene.js +1 -0
  195. package/lib/module/games/find-different-number/FindDifferentNumber.js +1 -1
  196. package/lib/module/games/find-different-number/FindDifferentNumberConstants.js +1 -1
  197. package/lib/module/games/find-different-number/FindDifferentNumberGame.js +1 -0
  198. package/lib/module/games/find-different-number/FindDifferentNumberRules.js +1 -0
  199. package/lib/module/games/find-different-number/FindDifferentNumberScene.js +1 -0
  200. package/lib/module/games/flappy-bird/FlappyBird.js +1 -1
  201. package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -1
  202. package/lib/module/games/flappy-bird/FlappyBirdGame.js +1 -0
  203. package/lib/module/games/flappy-bird/FlappyBirdScene.js +1 -0
  204. package/lib/module/games/fruit-merger/FruitMerger.js +1 -1
  205. package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -1
  206. package/lib/module/games/fruit-merger/FruitMergerGame.js +1 -0
  207. package/lib/module/games/fruit-merger/FruitMergerRules.js +1 -0
  208. package/lib/module/games/fruit-merger/FruitMergerScene.js +1 -0
  209. package/lib/module/games/fruit-ninja/FruitNinja.js +1 -1
  210. package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -1
  211. package/lib/module/games/fruit-ninja/FruitNinjaGame.js +1 -0
  212. package/lib/module/games/fruit-ninja/FruitNinjaScene.js +1 -0
  213. package/lib/module/games/fruit-ninja/FruitNinjaWorld.js +1 -0
  214. package/lib/module/games/game-2048/Game2048.js +1 -1
  215. package/lib/module/games/game-2048/Game2048Constants.js +1 -1
  216. package/lib/module/games/game-2048/Game2048Game.js +1 -0
  217. package/lib/module/games/game-2048/Game2048Rules.js +1 -0
  218. package/lib/module/games/game-2048/Game2048Scene.js +1 -0
  219. package/lib/module/games/knife-hit/KnifeHit.js +1 -1
  220. package/lib/module/games/knife-hit/KnifeHitConstants.js +1 -1
  221. package/lib/module/games/knife-hit/KnifeHitGame.js +1 -0
  222. package/lib/module/games/knife-hit/KnifeHitScene.js +1 -0
  223. package/lib/module/games/ludo-king/LudoKing.js +1 -1
  224. package/lib/module/games/ludo-king/LudoKingConstants.js +1 -1
  225. package/lib/module/games/ludo-king/LudoKingGame.js +1 -0
  226. package/lib/module/games/ludo-king/LudoKingRules.js +1 -0
  227. package/lib/module/games/ludo-king/LudoKingScene.js +1 -0
  228. package/lib/module/games/maze-runner/MazeRunner.js +1 -1
  229. package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -1
  230. package/lib/module/games/maze-runner/MazeRunnerGame.js +1 -0
  231. package/lib/module/games/maze-runner/MazeRunnerRules.js +1 -0
  232. package/lib/module/games/maze-runner/MazeRunnerScene.js +1 -0
  233. package/lib/module/games/memory-match/MemoryMatch.js +1 -1
  234. package/lib/module/games/memory-match/MemoryMatchConstants.js +1 -1
  235. package/lib/module/games/memory-match/MemoryMatchGame.js +1 -0
  236. package/lib/module/games/memory-match/MemoryMatchRules.js +1 -0
  237. package/lib/module/games/memory-match/MemoryMatchScene.js +1 -0
  238. package/lib/module/games/mine-sweeper/MineSweeper.js +1 -1
  239. package/lib/module/games/mine-sweeper/MineSweeperConstants.js +1 -1
  240. package/lib/module/games/mine-sweeper/MineSweeperGame.js +1 -0
  241. package/lib/module/games/mine-sweeper/MineSweeperRules.js +1 -0
  242. package/lib/module/games/mine-sweeper/MineSweeperScene.js +1 -0
  243. package/lib/module/games/mob-control/MobControl.js +1 -1
  244. package/lib/module/games/mob-control/MobControlConstants.js +1 -1
  245. package/lib/module/games/mob-control/MobControlGame.js +1 -0
  246. package/lib/module/games/mob-control/MobControlMeshes.js +1 -0
  247. package/lib/module/games/mob-control/MobControlRenderer.js +1 -0
  248. package/lib/module/games/mob-control/MobControlRules.js +1 -0
  249. package/lib/module/games/mob-control/MobControlScene.js +1 -0
  250. package/lib/module/games/number-search/NumberSearch.js +1 -1
  251. package/lib/module/games/number-search/NumberSearchNumbers.js +1 -0
  252. package/lib/module/games/nuts-and-bolts/NutsAndBolts.js +1 -1
  253. package/lib/module/games/nuts-and-bolts/NutsAndBoltsConstants.js +1 -1
  254. package/lib/module/games/nuts-and-bolts/NutsAndBoltsGame.js +1 -0
  255. package/lib/module/games/nuts-and-bolts/NutsAndBoltsRules.js +1 -0
  256. package/lib/module/games/nuts-and-bolts/NutsAndBoltsScene.js +1 -0
  257. package/lib/module/games/pac-man/PacMan.js +1 -1
  258. package/lib/module/games/pac-man/PacManConstants.js +1 -1
  259. package/lib/module/games/pac-man/PacManGame.js +1 -0
  260. package/lib/module/games/pac-man/PacManRules.js +1 -0
  261. package/lib/module/games/pac-man/PacManScene.js +1 -0
  262. package/lib/module/games/paper-io/PaperIo.js +1 -1
  263. package/lib/module/games/paper-io/PaperIoConstants.js +1 -1
  264. package/lib/module/games/paper-io/PaperIoGame.js +1 -0
  265. package/lib/module/games/paper-io/PaperIoMeshes.js +1 -0
  266. package/lib/module/games/paper-io/PaperIoRules.js +1 -0
  267. package/lib/module/games/paper-io/PaperIoScene.js +1 -0
  268. package/lib/module/games/penguin-run/PenguinMeshes.js +1 -0
  269. package/lib/module/games/penguin-run/PenguinModel.js +1 -0
  270. package/lib/module/games/penguin-run/PenguinRun.js +1 -0
  271. package/lib/module/games/penguin-run/PenguinRunConstants.js +1 -0
  272. package/lib/module/games/penguin-run/PenguinRunGame.js +1 -0
  273. package/lib/module/games/penguin-run/PenguinRunScene.js +1 -0
  274. package/lib/module/games/perfect-circle/PerfectCircle.js +1 -1
  275. package/lib/module/games/perfect-circle/PerfectCircleConstants.js +1 -1
  276. package/lib/module/games/perfect-circle/PerfectCircleGame.js +1 -0
  277. package/lib/module/games/perfect-circle/PerfectCircleRules.js +1 -0
  278. package/lib/module/games/perfect-circle/PerfectCircleScene.js +1 -0
  279. package/lib/module/games/pipe-connect/PipeConnect.js +1 -1
  280. package/lib/module/games/pipe-connect/PipeConnectConstants.js +1 -1
  281. package/lib/module/games/pipe-connect/PipeConnectGame.js +1 -0
  282. package/lib/module/games/pipe-connect/PipeConnectRules.js +1 -0
  283. package/lib/module/games/pipe-connect/PipeConnectScene.js +1 -0
  284. package/lib/module/games/play-with-tua/PlayWithTua.js +1 -0
  285. package/lib/module/games/play-with-tua/PlayWithTuaConstants.js +1 -0
  286. package/lib/module/games/play-with-tua/PlayWithTuaGame.js +1 -0
  287. package/lib/module/games/play-with-tua/PlayWithTuaModel.js +1 -0
  288. package/lib/module/games/play-with-tua/PlayWithTuaScene.js +1 -0
  289. package/lib/module/games/popit-fidget/PopitFidget.js +1 -1
  290. package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -1
  291. package/lib/module/games/popit-fidget/PopitFidgetGame.js +1 -0
  292. package/lib/module/games/popit-fidget/PopitFidgetScene.js +1 -0
  293. package/lib/module/games/reversi/Reversi.js +1 -1
  294. package/lib/module/games/reversi/ReversiConstants.js +1 -1
  295. package/lib/module/games/reversi/ReversiGame.js +1 -0
  296. package/lib/module/games/reversi/ReversiRules.js +1 -0
  297. package/lib/module/games/reversi/ReversiScene.js +1 -0
  298. package/lib/module/games/search-grid/SearchGrid.js +1 -0
  299. package/lib/module/games/search-grid/SearchGridConstants.js +1 -0
  300. package/lib/module/games/search-grid/SearchGridGame.js +1 -0
  301. package/lib/module/games/search-grid/SearchGridScene.js +1 -0
  302. package/lib/module/games/shared/BackdropCard.js +1 -0
  303. package/lib/module/games/shared/EngineBackdrop.js +1 -0
  304. package/lib/module/games/shared/EngineBlasts.js +1 -0
  305. package/lib/module/games/shared/EngineBlocks.js +1 -0
  306. package/lib/module/games/shared/EngineControlText.js +1 -0
  307. package/lib/module/games/shared/EngineDice.js +1 -0
  308. package/lib/module/games/shared/EngineFootprint.js +1 -0
  309. package/lib/module/games/shared/EngineFruits.js +1 -0
  310. package/lib/module/games/shared/EngineGameLoader.js +1 -0
  311. package/lib/module/games/shared/EngineGameScreen.js +1 -0
  312. package/lib/module/games/shared/EngineGameWidth.js +1 -0
  313. package/lib/module/games/shared/EngineGameWidth.web.js +1 -0
  314. package/lib/module/games/shared/EngineGlyphs.js +1 -0
  315. package/lib/module/games/shared/EngineHud.js +1 -0
  316. package/lib/module/games/shared/EngineLoading.js +1 -0
  317. package/lib/module/games/shared/EngineMeadow.js +1 -0
  318. package/lib/module/games/shared/EngineMeshCache.js +1 -0
  319. package/lib/module/games/shared/EngineMeshes.js +1 -0
  320. package/lib/module/games/shared/EngineRacingChase.js +1 -0
  321. package/lib/module/games/shared/EngineRacingHandling.js +1 -0
  322. package/lib/module/games/shared/EngineReadyContext.js +1 -0
  323. package/lib/module/games/shared/EngineTilt.js +1 -0
  324. package/lib/module/games/shared/EngineTouchSurface.js +1 -0
  325. package/lib/module/games/shared/EngineUtils.js +1 -0
  326. package/lib/module/games/shared/GameActivity.js +1 -0
  327. package/lib/module/games/shared/GameLoading.js +1 -0
  328. package/lib/module/games/shared/GameLoadingTransition.js +1 -0
  329. package/lib/module/games/shared/ProceduralCacheVersion.js +1 -0
  330. package/lib/module/games/shared/useEngineGame.js +1 -0
  331. package/lib/module/games/shared/useGameResource.js +1 -0
  332. package/lib/module/games/shared/useLiveState.js +1 -0
  333. package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -1
  334. package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -1
  335. package/lib/module/games/sliding-numbers/SlidingNumbersGame.js +1 -0
  336. package/lib/module/games/sliding-numbers/SlidingNumbersRules.js +1 -0
  337. package/lib/module/games/sliding-numbers/SlidingNumbersScene.js +1 -0
  338. package/lib/module/games/snake-3d/Snake3D.js +1 -1
  339. package/lib/module/games/snake-3d/Snake3DConstants.js +1 -1
  340. package/lib/module/games/snake-3d/Snake3DGame.js +1 -0
  341. package/lib/module/games/snake-3d/Snake3DMotion.js +1 -0
  342. package/lib/module/games/snake-3d/Snake3DRules.js +1 -0
  343. package/lib/module/games/snake-3d/Snake3DScene.js +1 -0
  344. package/lib/module/games/snakes-and-ladders/SnakesAndLadders.js +1 -1
  345. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersConstants.js +1 -1
  346. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersGame.js +1 -0
  347. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersScene.js +1 -0
  348. package/lib/module/games/space-fighter/SpaceFighter.js +1 -1
  349. package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -1
  350. package/lib/module/games/space-fighter/SpaceFighterGame.js +1 -0
  351. package/lib/module/games/space-fighter/SpaceFighterScene.js +1 -0
  352. package/lib/module/games/spider-solitaire/SpiderSolitaire.js +1 -1
  353. package/lib/module/games/spider-solitaire/SpiderSolitaireConstants.js +1 -1
  354. package/lib/module/games/spider-solitaire/SpiderSolitaireGame.js +1 -0
  355. package/lib/module/games/spider-solitaire/SpiderSolitaireRules.js +1 -0
  356. package/lib/module/games/spider-solitaire/SpiderSolitaireScene.js +1 -0
  357. package/lib/module/games/stack-tower/StackTower.js +1 -1
  358. package/lib/module/games/stack-tower/StackTowerConstants.js +1 -1
  359. package/lib/module/games/stack-tower/StackTowerGame.js +1 -0
  360. package/lib/module/games/stack-tower/StackTowerScene.js +1 -0
  361. package/lib/module/games/sudoku/Sudoku.js +1 -1
  362. package/lib/module/games/sudoku/SudokuConstants.js +1 -1
  363. package/lib/module/games/sudoku/SudokuGame.js +1 -0
  364. package/lib/module/games/sudoku/SudokuRules.js +1 -0
  365. package/lib/module/games/sudoku/SudokuScene.js +1 -0
  366. package/lib/module/games/tangram/Tangram.js +1 -1
  367. package/lib/module/games/tangram/TangramConstants.js +1 -1
  368. package/lib/module/games/tangram/TangramGame.js +1 -0
  369. package/lib/module/games/tangram/TangramRules.js +1 -0
  370. package/lib/module/games/tangram/TangramScene.js +1 -0
  371. package/lib/module/games/tank-1990/Tank1990.js +1 -1
  372. package/lib/module/games/tank-1990/Tank1990Constants.js +1 -1
  373. package/lib/module/games/tank-1990/Tank1990Game.js +1 -0
  374. package/lib/module/games/tank-1990/Tank1990Rules.js +1 -0
  375. package/lib/module/games/tank-1990/Tank1990Scene.js +1 -0
  376. package/lib/module/games/tic-tac-toe/TicTacToe.js +1 -1
  377. package/lib/module/games/tic-tac-toe/TicTacToeConstants.js +1 -1
  378. package/lib/module/games/tic-tac-toe/TicTacToeGame.js +1 -0
  379. package/lib/module/games/tic-tac-toe/TicTacToeRules.js +1 -0
  380. package/lib/module/games/tic-tac-toe/TicTacToeScene.js +1 -0
  381. package/lib/module/games/tile-home/TileHome.js +1 -1
  382. package/lib/module/games/tile-home/TileHomeConstants.js +1 -1
  383. package/lib/module/games/tile-home/TileHomeGame.js +1 -0
  384. package/lib/module/games/tile-home/TileHomeScene.js +1 -0
  385. package/lib/module/games/treasure-hunt/TreasureHunt.js +1 -0
  386. package/lib/module/games/treasure-hunt/TreasureHuntConstants.js +1 -0
  387. package/lib/module/games/treasure-hunt/TreasureHuntControls.js +1 -0
  388. package/lib/module/games/treasure-hunt/TreasureHuntGame.js +1 -0
  389. package/lib/module/games/treasure-hunt/TreasureHuntMeshes.js +1 -0
  390. package/lib/module/games/treasure-hunt/TreasureHuntModel.js +1 -0
  391. package/lib/module/games/treasure-hunt/TreasureHuntRules.js +1 -0
  392. package/lib/module/games/treasure-hunt/TreasureHuntScene.js +1 -0
  393. package/lib/module/games/whack-a-mole/WhackAMole.js +1 -1
  394. package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -1
  395. package/lib/module/games/whack-a-mole/WhackAMoleGame.js +1 -0
  396. package/lib/module/games/whack-a-mole/WhackAMoleScene.js +1 -0
  397. package/lib/module/games/word-search/WordSearch.js +1 -1
  398. package/lib/module/games/word-search/WordSearchWords.js +1 -0
  399. package/lib/module/helpers/GamePatternData.js +1 -0
  400. package/lib/module/helpers/GameSettingsModal.js +1 -1
  401. package/lib/module/helpers/GameTheme.js +1 -0
  402. package/lib/module/helpers/IconPaths.js +1 -0
  403. package/lib/module/helpers/index.js +1 -1
  404. package/lib/module/index.js +1 -1
  405. package/lib/module/services/GameAssetLoader.js +1 -0
  406. package/lib/module/services/GameAssets.js +1 -0
  407. package/lib/module/services/GameLoaders.js +1 -0
  408. package/lib/module/services/GamesConstants.js +1 -1
  409. package/lib/module/services/GamesMetadata.js +1 -1
  410. package/lib/module/services/GamesService.js +1 -1
  411. package/lib/module/services/HapticsService.js +1 -1
  412. package/lib/module/services/ScoringService.js +1 -1
  413. package/lib/module/services/SfxSources.js +1 -0
  414. package/lib/module/services/SoundsService.js +1 -1
  415. package/lib/module/services/ThemeService.js +1 -0
  416. package/lib/module/services/UtilsService.js +1 -1
  417. package/lib/module/services/index.js +1 -1
  418. package/lib/typescript/src/games/arrows/Arrows.d.ts +1 -3
  419. package/lib/typescript/src/games/arrows/ArrowsConstants.d.ts +48 -32
  420. package/lib/typescript/src/games/arrows/ArrowsGame.d.ts +60 -0
  421. package/lib/typescript/src/games/arrows/ArrowsScene.d.ts +67 -0
  422. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +1 -3
  423. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +39 -131
  424. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterGame.d.ts +57 -0
  425. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterPhysics.d.ts +16 -0
  426. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterScene.d.ts +31 -0
  427. package/lib/typescript/src/games/bike-racing/BikeMeshes.d.ts +14 -0
  428. package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts +2 -1
  429. package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts +38 -29
  430. package/lib/typescript/src/games/bike-racing/BikeRacingGame.d.ts +104 -0
  431. package/lib/typescript/src/games/bike-racing/BikeRacingScene.d.ts +25 -0
  432. package/lib/typescript/src/games/block-blast/BlockBlast.d.ts +1 -3
  433. package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts +48 -30
  434. package/lib/typescript/src/games/block-blast/BlockBlastGame.d.ts +77 -0
  435. package/lib/typescript/src/games/block-blast/BlockBlastScene.d.ts +36 -0
  436. package/lib/typescript/src/games/block-breaker/BlockBreaker.d.ts +1 -3
  437. package/lib/typescript/src/games/block-breaker/BlockBreakerConstants.d.ts +88 -35
  438. package/lib/typescript/src/games/block-breaker/BlockBreakerGame.d.ts +82 -0
  439. package/lib/typescript/src/games/block-breaker/BlockBreakerScene.d.ts +48 -0
  440. package/lib/typescript/src/games/bluk/Bluk.d.ts +1 -3
  441. package/lib/typescript/src/games/bluk/BlukConstants.d.ts +65 -54
  442. package/lib/typescript/src/games/bluk/BlukGame.d.ts +65 -0
  443. package/lib/typescript/src/games/bluk/BlukRules.d.ts +51 -0
  444. package/lib/typescript/src/games/bluk/BlukScene.d.ts +54 -0
  445. package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts +1 -3
  446. package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts +56 -24
  447. package/lib/typescript/src/games/bubble-shooter/BubbleShooterGame.d.ts +70 -0
  448. package/lib/typescript/src/games/bubble-shooter/BubbleShooterScene.d.ts +26 -0
  449. package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts +1 -3
  450. package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +63 -32
  451. package/lib/typescript/src/games/candy-crush/CandyCrushGame.d.ts +65 -0
  452. package/lib/typescript/src/games/candy-crush/CandyCrushScene.d.ts +28 -0
  453. package/lib/typescript/src/games/car-racing/CarMeshes.d.ts +44 -0
  454. package/lib/typescript/src/games/car-racing/CarRacing.d.ts +2 -1
  455. package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts +60 -29
  456. package/lib/typescript/src/games/car-racing/CarRacingFacade.d.ts +5 -0
  457. package/lib/typescript/src/games/car-racing/CarRacingGame.d.ts +96 -0
  458. package/lib/typescript/src/games/car-racing/CarRacingScene.d.ts +97 -0
  459. package/lib/typescript/src/games/car-racing/CarRacingScenery.d.ts +22 -0
  460. package/lib/typescript/src/games/chameleon-run/ChameleonRun.d.ts +1 -3
  461. package/lib/typescript/src/games/chameleon-run/ChameleonRunBackdrop.d.ts +14 -0
  462. package/lib/typescript/src/games/chameleon-run/ChameleonRunConstants.d.ts +44 -42
  463. package/lib/typescript/src/games/chameleon-run/ChameleonRunGame.d.ts +60 -0
  464. package/lib/typescript/src/games/chameleon-run/ChameleonRunMeshes.d.ts +20 -0
  465. package/lib/typescript/src/games/chameleon-run/ChameleonRunRules.d.ts +52 -0
  466. package/lib/typescript/src/games/chameleon-run/ChameleonRunScene.d.ts +44 -0
  467. package/lib/typescript/src/games/checkers/Checkers.d.ts +1 -3
  468. package/lib/typescript/src/games/checkers/CheckersAI.d.ts +11 -0
  469. package/lib/typescript/src/games/checkers/CheckersConstants.d.ts +32 -72
  470. package/lib/typescript/src/games/checkers/CheckersGame.d.ts +56 -0
  471. package/lib/typescript/src/games/checkers/CheckersRules.d.ts +48 -0
  472. package/lib/typescript/src/games/checkers/CheckersScene.d.ts +41 -0
  473. package/lib/typescript/src/games/color-switch/ColorSwitch.d.ts +1 -3
  474. package/lib/typescript/src/games/color-switch/ColorSwitchConstants.d.ts +27 -31
  475. package/lib/typescript/src/games/color-switch/ColorSwitchGame.d.ts +61 -0
  476. package/lib/typescript/src/games/color-switch/ColorSwitchScene.d.ts +43 -0
  477. package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts +1 -3
  478. package/lib/typescript/src/games/colors-sort/ColorsSortConstants.d.ts +37 -44
  479. package/lib/typescript/src/games/colors-sort/ColorsSortGame.d.ts +41 -0
  480. package/lib/typescript/src/games/colors-sort/ColorsSortScene.d.ts +33 -0
  481. package/lib/typescript/src/games/connect-em-all/ConnectEmAll.d.ts +1 -3
  482. package/lib/typescript/src/games/connect-em-all/ConnectEmAllConstants.d.ts +43 -17
  483. package/lib/typescript/src/games/connect-em-all/ConnectEmAllGame.d.ts +54 -0
  484. package/lib/typescript/src/games/connect-em-all/ConnectEmAllScene.d.ts +49 -0
  485. package/lib/typescript/src/games/crossy-road/CrossyRoad.d.ts +1 -3
  486. package/lib/typescript/src/games/crossy-road/CrossyRoadCamera.d.ts +14 -0
  487. package/lib/typescript/src/games/crossy-road/CrossyRoadConstants.d.ts +82 -50
  488. package/lib/typescript/src/games/crossy-road/CrossyRoadGame.d.ts +64 -0
  489. package/lib/typescript/src/games/crossy-road/CrossyRoadMeshes.d.ts +16 -0
  490. package/lib/typescript/src/games/crossy-road/CrossyRoadPerson.d.ts +10 -0
  491. package/lib/typescript/src/games/crossy-road/CrossyRoadRules.d.ts +36 -0
  492. package/lib/typescript/src/games/crossy-road/CrossyRoadScene.d.ts +38 -0
  493. package/lib/typescript/src/games/dino-jump/DinoJump.d.ts +1 -3
  494. package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts +48 -72
  495. package/lib/typescript/src/games/dino-jump/DinoJumpGame.d.ts +60 -0
  496. package/lib/typescript/src/games/dino-jump/DinoJumpScene.d.ts +35 -0
  497. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxes.d.ts +1 -3
  498. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesConstants.d.ts +31 -36
  499. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesGame.d.ts +44 -0
  500. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesScene.d.ts +31 -0
  501. package/lib/typescript/src/games/falling-sticks/FallingSticks.d.ts +1 -3
  502. package/lib/typescript/src/games/falling-sticks/FallingSticksConstants.d.ts +31 -43
  503. package/lib/typescript/src/games/falling-sticks/FallingSticksGame.d.ts +42 -0
  504. package/lib/typescript/src/games/falling-sticks/FallingSticksRules.d.ts +36 -0
  505. package/lib/typescript/src/games/falling-sticks/FallingSticksScene.d.ts +26 -0
  506. package/lib/typescript/src/games/find-different-number/FindDifferentNumber.d.ts +1 -3
  507. package/lib/typescript/src/games/find-different-number/FindDifferentNumberConstants.d.ts +33 -29
  508. package/lib/typescript/src/games/find-different-number/FindDifferentNumberGame.d.ts +43 -0
  509. package/lib/typescript/src/games/find-different-number/FindDifferentNumberRules.d.ts +8 -0
  510. package/lib/typescript/src/games/find-different-number/FindDifferentNumberScene.d.ts +31 -0
  511. package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts +1 -3
  512. package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts +39 -35
  513. package/lib/typescript/src/games/flappy-bird/FlappyBirdGame.d.ts +66 -0
  514. package/lib/typescript/src/games/flappy-bird/FlappyBirdScene.d.ts +41 -0
  515. package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts +1 -3
  516. package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts +71 -44
  517. package/lib/typescript/src/games/fruit-merger/FruitMergerGame.d.ts +63 -0
  518. package/lib/typescript/src/games/fruit-merger/FruitMergerRules.d.ts +39 -0
  519. package/lib/typescript/src/games/fruit-merger/FruitMergerScene.d.ts +49 -0
  520. package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts +1 -3
  521. package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts +51 -76
  522. package/lib/typescript/src/games/fruit-ninja/FruitNinjaGame.d.ts +76 -0
  523. package/lib/typescript/src/games/fruit-ninja/FruitNinjaScene.d.ts +52 -0
  524. package/lib/typescript/src/games/fruit-ninja/FruitNinjaWorld.d.ts +8 -0
  525. package/lib/typescript/src/games/game-2048/Game2048.d.ts +1 -3
  526. package/lib/typescript/src/games/game-2048/Game2048Constants.d.ts +25 -120
  527. package/lib/typescript/src/games/game-2048/Game2048Game.d.ts +45 -0
  528. package/lib/typescript/src/games/game-2048/Game2048Rules.d.ts +32 -0
  529. package/lib/typescript/src/games/game-2048/Game2048Scene.d.ts +34 -0
  530. package/lib/typescript/src/games/knife-hit/KnifeHit.d.ts +1 -3
  531. package/lib/typescript/src/games/knife-hit/KnifeHitConstants.d.ts +41 -49
  532. package/lib/typescript/src/games/knife-hit/KnifeHitGame.d.ts +49 -0
  533. package/lib/typescript/src/games/knife-hit/KnifeHitScene.d.ts +37 -0
  534. package/lib/typescript/src/games/ludo-king/LudoKing.d.ts +1 -3
  535. package/lib/typescript/src/games/ludo-king/LudoKingConstants.d.ts +50 -28
  536. package/lib/typescript/src/games/ludo-king/LudoKingGame.d.ts +40 -0
  537. package/lib/typescript/src/games/ludo-king/LudoKingRules.d.ts +42 -0
  538. package/lib/typescript/src/games/ludo-king/LudoKingScene.d.ts +53 -0
  539. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +1 -3
  540. package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.d.ts +34 -10
  541. package/lib/typescript/src/games/maze-runner/MazeRunnerGame.d.ts +44 -0
  542. package/lib/typescript/src/games/maze-runner/MazeRunnerRules.d.ts +34 -0
  543. package/lib/typescript/src/games/maze-runner/MazeRunnerScene.d.ts +29 -0
  544. package/lib/typescript/src/games/memory-match/MemoryMatch.d.ts +1 -3
  545. package/lib/typescript/src/games/memory-match/MemoryMatchConstants.d.ts +42 -42
  546. package/lib/typescript/src/games/memory-match/MemoryMatchGame.d.ts +53 -0
  547. package/lib/typescript/src/games/memory-match/MemoryMatchRules.d.ts +14 -0
  548. package/lib/typescript/src/games/memory-match/MemoryMatchScene.d.ts +35 -0
  549. package/lib/typescript/src/games/mine-sweeper/MineSweeper.d.ts +1 -3
  550. package/lib/typescript/src/games/mine-sweeper/MineSweeperConstants.d.ts +43 -82
  551. package/lib/typescript/src/games/mine-sweeper/MineSweeperGame.d.ts +59 -0
  552. package/lib/typescript/src/games/mine-sweeper/MineSweeperRules.d.ts +18 -0
  553. package/lib/typescript/src/games/mine-sweeper/MineSweeperScene.d.ts +23 -0
  554. package/lib/typescript/src/games/mob-control/MobControl.d.ts +1 -3
  555. package/lib/typescript/src/games/mob-control/MobControlConstants.d.ts +99 -85
  556. package/lib/typescript/src/games/mob-control/MobControlGame.d.ts +45 -0
  557. package/lib/typescript/src/games/mob-control/MobControlMeshes.d.ts +2 -0
  558. package/lib/typescript/src/games/mob-control/MobControlRenderer.d.ts +20 -0
  559. package/lib/typescript/src/games/mob-control/MobControlRules.d.ts +68 -0
  560. package/lib/typescript/src/games/mob-control/MobControlScene.d.ts +58 -0
  561. package/lib/typescript/src/games/number-search/NumberSearch.d.ts +1 -3
  562. package/lib/typescript/src/games/number-search/NumberSearchNumbers.d.ts +1 -0
  563. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBolts.d.ts +1 -3
  564. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsConstants.d.ts +27 -79
  565. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsGame.d.ts +56 -0
  566. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsRules.d.ts +65 -0
  567. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsScene.d.ts +48 -0
  568. package/lib/typescript/src/games/pac-man/PacMan.d.ts +1 -3
  569. package/lib/typescript/src/games/pac-man/PacManConstants.d.ts +66 -106
  570. package/lib/typescript/src/games/pac-man/PacManGame.d.ts +48 -0
  571. package/lib/typescript/src/games/pac-man/PacManRules.d.ts +52 -0
  572. package/lib/typescript/src/games/pac-man/PacManScene.d.ts +44 -0
  573. package/lib/typescript/src/games/paper-io/PaperIo.d.ts +1 -3
  574. package/lib/typescript/src/games/paper-io/PaperIoConstants.d.ts +60 -40
  575. package/lib/typescript/src/games/paper-io/PaperIoGame.d.ts +49 -0
  576. package/lib/typescript/src/games/paper-io/PaperIoMeshes.d.ts +13 -0
  577. package/lib/typescript/src/games/paper-io/PaperIoRules.d.ts +71 -0
  578. package/lib/typescript/src/games/paper-io/PaperIoScene.d.ts +39 -0
  579. package/lib/typescript/src/games/penguin-run/PenguinMeshes.d.ts +9 -0
  580. package/lib/typescript/src/games/penguin-run/PenguinModel.d.ts +42 -0
  581. package/lib/typescript/src/games/penguin-run/PenguinRun.d.ts +1 -0
  582. package/lib/typescript/src/games/penguin-run/PenguinRunConstants.d.ts +58 -0
  583. package/lib/typescript/src/games/penguin-run/PenguinRunGame.d.ts +64 -0
  584. package/lib/typescript/src/games/penguin-run/PenguinRunScene.d.ts +65 -0
  585. package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts +1 -3
  586. package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts +23 -45
  587. package/lib/typescript/src/games/perfect-circle/PerfectCircleGame.d.ts +40 -0
  588. package/lib/typescript/src/games/perfect-circle/PerfectCircleRules.d.ts +55 -0
  589. package/lib/typescript/src/games/perfect-circle/PerfectCircleScene.d.ts +32 -0
  590. package/lib/typescript/src/games/pipe-connect/PipeConnect.d.ts +1 -3
  591. package/lib/typescript/src/games/pipe-connect/PipeConnectConstants.d.ts +36 -32
  592. package/lib/typescript/src/games/pipe-connect/PipeConnectGame.d.ts +40 -0
  593. package/lib/typescript/src/games/pipe-connect/PipeConnectRules.d.ts +16 -0
  594. package/lib/typescript/src/games/pipe-connect/PipeConnectScene.d.ts +28 -0
  595. package/lib/typescript/src/games/play-with-tua/PlayWithTua.d.ts +2 -0
  596. package/lib/typescript/src/games/play-with-tua/PlayWithTuaConstants.d.ts +64 -0
  597. package/lib/typescript/src/games/play-with-tua/PlayWithTuaGame.d.ts +34 -0
  598. package/lib/typescript/src/games/play-with-tua/PlayWithTuaModel.d.ts +9 -0
  599. package/lib/typescript/src/games/play-with-tua/PlayWithTuaScene.d.ts +13 -0
  600. package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts +1 -4
  601. package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts +25 -36
  602. package/lib/typescript/src/games/popit-fidget/PopitFidgetGame.d.ts +37 -0
  603. package/lib/typescript/src/games/popit-fidget/PopitFidgetScene.d.ts +19 -0
  604. package/lib/typescript/src/games/reversi/Reversi.d.ts +1 -3
  605. package/lib/typescript/src/games/reversi/ReversiConstants.d.ts +31 -62
  606. package/lib/typescript/src/games/reversi/ReversiGame.d.ts +54 -0
  607. package/lib/typescript/src/games/reversi/ReversiRules.d.ts +22 -0
  608. package/lib/typescript/src/games/reversi/ReversiScene.d.ts +27 -0
  609. package/lib/typescript/src/games/search-grid/SearchGrid.d.ts +20 -0
  610. package/lib/typescript/src/games/search-grid/SearchGridConstants.d.ts +60 -0
  611. package/lib/typescript/src/games/search-grid/SearchGridGame.d.ts +52 -0
  612. package/lib/typescript/src/games/search-grid/SearchGridScene.d.ts +43 -0
  613. package/lib/typescript/src/games/shared/BackdropCard.d.ts +2 -0
  614. package/lib/typescript/src/games/shared/EngineBackdrop.d.ts +19 -0
  615. package/lib/typescript/src/games/shared/EngineBlasts.d.ts +26 -0
  616. package/lib/typescript/src/games/shared/EngineBlocks.d.ts +19 -0
  617. package/lib/typescript/src/games/shared/EngineControlText.d.ts +2 -0
  618. package/lib/typescript/src/games/shared/EngineDice.d.ts +24 -0
  619. package/lib/typescript/src/games/shared/EngineFootprint.d.ts +17 -0
  620. package/lib/typescript/src/games/shared/EngineFruits.d.ts +27 -0
  621. package/lib/typescript/src/games/shared/EngineGameLoader.d.ts +4 -0
  622. package/lib/typescript/src/games/shared/EngineGameScreen.d.ts +48 -0
  623. package/lib/typescript/src/games/shared/EngineGameWidth.d.ts +3 -0
  624. package/lib/typescript/src/games/shared/EngineGameWidth.web.d.ts +3 -0
  625. package/lib/typescript/src/games/shared/EngineGlyphs.d.ts +15 -0
  626. package/lib/typescript/src/games/shared/EngineHud.d.ts +138 -0
  627. package/lib/typescript/src/games/shared/EngineLoading.d.ts +77 -0
  628. package/lib/typescript/src/games/shared/EngineMeadow.d.ts +90 -0
  629. package/lib/typescript/src/games/shared/EngineMeshCache.d.ts +3 -0
  630. package/lib/typescript/src/games/shared/EngineMeshes.d.ts +3 -0
  631. package/lib/typescript/src/games/shared/EngineRacingChase.d.ts +11 -0
  632. package/lib/typescript/src/games/shared/EngineRacingHandling.d.ts +15 -0
  633. package/lib/typescript/src/games/shared/EngineReadyContext.d.ts +2 -0
  634. package/lib/typescript/src/games/shared/EngineTilt.d.ts +19 -0
  635. package/lib/typescript/src/games/shared/EngineTouchSurface.d.ts +20 -0
  636. package/lib/typescript/src/games/shared/EngineUtils.d.ts +18 -0
  637. package/lib/typescript/src/games/shared/GameActivity.d.ts +3 -0
  638. package/lib/typescript/src/games/shared/GameLoading.d.ts +14 -0
  639. package/lib/typescript/src/games/shared/GameLoadingTransition.d.ts +9 -0
  640. package/lib/typescript/src/games/shared/ProceduralCacheVersion.d.ts +1 -0
  641. package/lib/typescript/src/games/shared/useEngineGame.d.ts +69 -0
  642. package/lib/typescript/src/games/shared/useGameResource.d.ts +2 -0
  643. package/lib/typescript/src/games/shared/useLiveState.d.ts +4 -0
  644. package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts +1 -3
  645. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersConstants.d.ts +32 -40
  646. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersGame.d.ts +48 -0
  647. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersRules.d.ts +22 -0
  648. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersScene.d.ts +30 -0
  649. package/lib/typescript/src/games/snake-3d/Snake3D.d.ts +1 -3
  650. package/lib/typescript/src/games/snake-3d/Snake3DConstants.d.ts +31 -68
  651. package/lib/typescript/src/games/snake-3d/Snake3DGame.d.ts +42 -0
  652. package/lib/typescript/src/games/snake-3d/Snake3DMotion.d.ts +3 -0
  653. package/lib/typescript/src/games/snake-3d/Snake3DRules.d.ts +42 -0
  654. package/lib/typescript/src/games/snake-3d/Snake3DScene.d.ts +35 -0
  655. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLadders.d.ts +1 -3
  656. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersConstants.d.ts +58 -50
  657. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersGame.d.ts +45 -0
  658. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersScene.d.ts +50 -0
  659. package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts +1 -3
  660. package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts +33 -23
  661. package/lib/typescript/src/games/space-fighter/SpaceFighterGame.d.ts +58 -0
  662. package/lib/typescript/src/games/space-fighter/SpaceFighterScene.d.ts +51 -0
  663. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaire.d.ts +1 -3
  664. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireConstants.d.ts +52 -35
  665. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireGame.d.ts +67 -0
  666. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireRules.d.ts +39 -0
  667. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireScene.d.ts +60 -0
  668. package/lib/typescript/src/games/stack-tower/StackTower.d.ts +1 -3
  669. package/lib/typescript/src/games/stack-tower/StackTowerConstants.d.ts +31 -23
  670. package/lib/typescript/src/games/stack-tower/StackTowerGame.d.ts +58 -0
  671. package/lib/typescript/src/games/stack-tower/StackTowerScene.d.ts +27 -0
  672. package/lib/typescript/src/games/sudoku/Sudoku.d.ts +1 -3
  673. package/lib/typescript/src/games/sudoku/SudokuConstants.d.ts +50 -55
  674. package/lib/typescript/src/games/sudoku/SudokuGame.d.ts +56 -0
  675. package/lib/typescript/src/games/sudoku/SudokuRules.d.ts +23 -0
  676. package/lib/typescript/src/games/sudoku/SudokuScene.d.ts +44 -0
  677. package/lib/typescript/src/games/tangram/Tangram.d.ts +1 -3
  678. package/lib/typescript/src/games/tangram/TangramConstants.d.ts +33 -52
  679. package/lib/typescript/src/games/tangram/TangramGame.d.ts +68 -0
  680. package/lib/typescript/src/games/tangram/TangramRules.d.ts +61 -0
  681. package/lib/typescript/src/games/tangram/TangramScene.d.ts +42 -0
  682. package/lib/typescript/src/games/tank-1990/Tank1990.d.ts +1 -3
  683. package/lib/typescript/src/games/tank-1990/Tank1990Constants.d.ts +44 -127
  684. package/lib/typescript/src/games/tank-1990/Tank1990Game.d.ts +50 -0
  685. package/lib/typescript/src/games/tank-1990/Tank1990Rules.d.ts +67 -0
  686. package/lib/typescript/src/games/tank-1990/Tank1990Scene.d.ts +38 -0
  687. package/lib/typescript/src/games/tic-tac-toe/TicTacToe.d.ts +1 -3
  688. package/lib/typescript/src/games/tic-tac-toe/TicTacToeConstants.d.ts +35 -72
  689. package/lib/typescript/src/games/tic-tac-toe/TicTacToeGame.d.ts +54 -0
  690. package/lib/typescript/src/games/tic-tac-toe/TicTacToeRules.d.ts +10 -0
  691. package/lib/typescript/src/games/tic-tac-toe/TicTacToeScene.d.ts +26 -0
  692. package/lib/typescript/src/games/tile-home/TileHome.d.ts +1 -3
  693. package/lib/typescript/src/games/tile-home/TileHomeConstants.d.ts +72 -70
  694. package/lib/typescript/src/games/tile-home/TileHomeGame.d.ts +72 -0
  695. package/lib/typescript/src/games/tile-home/TileHomeScene.d.ts +28 -0
  696. package/lib/typescript/src/games/treasure-hunt/TreasureHunt.d.ts +3 -0
  697. package/lib/typescript/src/games/treasure-hunt/TreasureHuntConstants.d.ts +144 -0
  698. package/lib/typescript/src/games/treasure-hunt/TreasureHuntControls.d.ts +75 -0
  699. package/lib/typescript/src/games/treasure-hunt/TreasureHuntGame.d.ts +41 -0
  700. package/lib/typescript/src/games/treasure-hunt/TreasureHuntMeshes.d.ts +26 -0
  701. package/lib/typescript/src/games/treasure-hunt/TreasureHuntModel.d.ts +57 -0
  702. package/lib/typescript/src/games/treasure-hunt/TreasureHuntRules.d.ts +198 -0
  703. package/lib/typescript/src/games/treasure-hunt/TreasureHuntScene.d.ts +40 -0
  704. package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts +1 -3
  705. package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +35 -45
  706. package/lib/typescript/src/games/whack-a-mole/WhackAMoleGame.d.ts +51 -0
  707. package/lib/typescript/src/games/whack-a-mole/WhackAMoleScene.d.ts +31 -0
  708. package/lib/typescript/src/games/word-search/WordSearch.d.ts +1 -3
  709. package/lib/typescript/src/games/word-search/WordSearchWords.d.ts +1 -0
  710. package/lib/typescript/src/helpers/GamePatternData.d.ts +46 -0
  711. package/lib/typescript/src/helpers/GameSettingsModal.d.ts +1 -1
  712. package/lib/typescript/src/helpers/GameTheme.d.ts +18 -0
  713. package/lib/typescript/src/helpers/IconPaths.d.ts +4 -0
  714. package/lib/typescript/src/helpers/index.d.ts +1 -19
  715. package/lib/typescript/src/index.d.ts +3 -0
  716. package/lib/typescript/src/services/GameAssetLoader.d.ts +32 -0
  717. package/lib/typescript/src/services/GameAssets.d.ts +11 -0
  718. package/lib/typescript/src/services/GameLoaders.d.ts +18 -0
  719. package/lib/typescript/src/services/GamesConstants.d.ts +11 -0
  720. package/lib/typescript/src/services/GamesMetadata.d.ts +2 -0
  721. package/lib/typescript/src/services/HapticsService.d.ts +1 -1
  722. package/lib/typescript/src/services/SfxSources.d.ts +79 -0
  723. package/lib/typescript/src/services/SoundsService.d.ts +487 -1566
  724. package/lib/typescript/src/services/ThemeService.d.ts +117 -0
  725. package/lib/typescript/src/services/UtilsService.d.ts +20 -2
  726. package/lib/typescript/src/services/index.d.ts +3 -0
  727. package/lib/web/assets/005ea2045b17-explorer.glb +0 -0
  728. package/lib/web/assets/01e2f0a0bbf6-hurt.wav +0 -0
  729. package/lib/web/assets/01fc0ecf658c-explorer-atlas.png +0 -0
  730. package/lib/web/assets/029329b2c7c0-asphalt.png +0 -0
  731. package/lib/web/assets/0376bda32be3-robot.wav +0 -0
  732. package/lib/web/assets/0719fb0bb38e-soft_glow.png +0 -0
  733. package/lib/web/assets/0b21278bffba-boing.wav +0 -0
  734. package/lib/web/assets/1333c9d1273c-flip_disc.wav +0 -0
  735. package/lib/web/assets/15785f62ee5f-time_up.wav +0 -0
  736. package/lib/web/assets/177f00502e08-bonus.wav +0 -0
  737. package/lib/web/assets/19e47dcfda1f-pling.wav +0 -0
  738. package/lib/web/assets/1a677e0f7f6c-laugh.wav +0 -0
  739. package/lib/web/assets/1ad2914478b1-eat.wav +0 -0
  740. package/lib/web/assets/1b0d703ddd1a-dance.wav +0 -0
  741. package/lib/web/assets/1e4330fddd74-chime.wav +0 -0
  742. package/lib/web/assets/2432a97b0af1-cannon.wav +0 -0
  743. package/lib/web/assets/2574370d6aa0-blocked.wav +0 -0
  744. package/lib/web/assets/2699065037ad-select.wav +0 -0
  745. package/lib/web/assets/28d30f53ad73-ladder.wav +0 -0
  746. package/lib/web/assets/2c1ec05270b2-point.wav +0 -0
  747. package/lib/web/assets/2e1dd99a0213-tick.wav +0 -0
  748. package/lib/web/assets/3084575cecdb-card_flip.wav +0 -0
  749. package/lib/web/assets/308bc31b6af5-engine.wav +0 -0
  750. package/lib/web/assets/336d63b739b5-combo.wav +0 -0
  751. package/lib/web/assets/3a369e2596e4-clash.wav +0 -0
  752. package/lib/web/assets/3a816e20212f-capture.wav +0 -0
  753. package/lib/web/assets/40240217810a-nitro.wav +0 -0
  754. package/lib/web/assets/46edaa54d1ea-crunch.wav +0 -0
  755. package/lib/web/assets/501994226995-coin.wav +0 -0
  756. package/lib/web/assets/5525d7f6a4b8-rotate.wav +0 -0
  757. package/lib/web/assets/5e816e1f0929-dice_roll.wav +0 -0
  758. package/lib/web/assets/60e2dec3cf41-deselect.wav +0 -0
  759. package/lib/web/assets/6ab86ea29e5c-six.wav +0 -0
  760. package/lib/web/assets/6da3b101926d-merge.wav +0 -0
  761. package/lib/web/assets/6e686dea513c-bark.jpg +0 -0
  762. package/lib/web/assets/6ff9a6a13714-limestone.jpg +0 -0
  763. package/lib/web/assets/735c4a1cd22e-invalid.wav +0 -0
  764. package/lib/web/assets/73f75c35ff5d-snake.wav +0 -0
  765. package/lib/web/assets/7506e3efe264-catch.wav +0 -0
  766. package/lib/web/assets/76493a2ada2d-ad_bolt.png +0 -0
  767. package/lib/web/assets/793abe620201-card_place.wav +0 -0
  768. package/lib/web/assets/7da09c57f52d-facade.png +0 -0
  769. package/lib/web/assets/7e1a902176f6-pine.png +0 -0
  770. package/lib/web/assets/7eb943b85c21-play-with-tua.glb +0 -0
  771. package/lib/web/assets/837d43c06dba-ad_bubbles.png +0 -0
  772. package/lib/web/assets/84f1a7dfa368-game_over.wav +0 -0
  773. package/lib/web/assets/850e26ce3b0a-flap.wav +0 -0
  774. package/lib/web/assets/854b31683cb2-draw.wav +0 -0
  775. package/lib/web/assets/8616150393b7-error.wav +0 -0
  776. package/lib/web/assets/87cc6d503ec6-river.jpg +0 -0
  777. package/lib/web/assets/88755845922c-hop.wav +0 -0
  778. package/lib/web/assets/8ec8f469492d-chomp_alt.wav +0 -0
  779. package/lib/web/assets/8f17f89b138c-pew.wav +0 -0
  780. package/lib/web/assets/9210a24472d1-place.wav +0 -0
  781. package/lib/web/assets/930d833ebf89-splash.wav +0 -0
  782. package/lib/web/assets/970f7c59265d-swoosh.wav +0 -0
  783. package/lib/web/assets/9900b8d1b6ad-flag.wav +0 -0
  784. package/lib/web/assets/9ab04403898b-clang.wav +0 -0
  785. package/lib/web/assets/9d8b97a10d45-drop.wav +0 -0
  786. package/lib/web/assets/9d9c02ddc7ed-boom.wav +0 -0
  787. package/lib/web/assets/9e1b5114d56d-pop_soft.wav +0 -0
  788. package/lib/web/assets/a01f22d6dbb3-thud.wav +0 -0
  789. package/lib/web/assets/a44a1cf1a1a8-bump.wav +0 -0
  790. package/lib/web/assets/a76940a48c68-hit.wav +0 -0
  791. package/lib/web/assets/a98ddb724460-leaves.png +0 -0
  792. package/lib/web/assets/aa0960e8bee6-footstep_run.wav +0 -0
  793. package/lib/web/assets/aa570c9d3e15-star.wav +0 -0
  794. package/lib/web/assets/aacb999f3c49-tock.wav +0 -0
  795. package/lib/web/assets/aae0c16c5e89-reveal.wav +0 -0
  796. package/lib/web/assets/ab37cd128509-click.wav +0 -0
  797. package/lib/web/assets/b0bc66f49005-warning.wav +0 -0
  798. package/lib/web/assets/b1edd756ac43-zap.wav +0 -0
  799. package/lib/web/assets/b3894545cf71-slice.wav +0 -0
  800. package/lib/web/assets/b3c6225d055a-meadow.jpg +0 -0
  801. package/lib/web/assets/b60ca65cdfcb-gate.wav +0 -0
  802. package/lib/web/assets/b8900bb2c5c7-win.wav +0 -0
  803. package/lib/web/assets/baff6feda846-lose.wav +0 -0
  804. package/lib/web/assets/bed31305d60d-ad_chevrons.png +0 -0
  805. package/lib/web/assets/c26f4a624e7d-shuffle.wav +0 -0
  806. package/lib/web/assets/c3a9edfad195-die.wav +0 -0
  807. package/lib/web/assets/c4aa9d773f2a-footstep_walk.wav +0 -0
  808. package/lib/web/assets/c5ab3ff0003f-crash.wav +0 -0
  809. package/lib/web/assets/c5eb07deddd4-start.wav +0 -0
  810. package/lib/web/assets/c6c58d9ae452-pop.wav +0 -0
  811. package/lib/web/assets/cea48c3cd9c7-balloon_pop.wav +0 -0
  812. package/lib/web/assets/d15591767778-tap.wav +0 -0
  813. package/lib/web/assets/d1781a52234f-slide.wav +0 -0
  814. package/lib/web/assets/d3bf2d9f793b-snap.wav +0 -0
  815. package/lib/web/assets/d8f59ebd3537-jump.wav +0 -0
  816. package/lib/web/assets/dafea2f28854-power_up.wav +0 -0
  817. package/lib/web/assets/e2e7f5ae2d1b-whoosh.wav +0 -0
  818. package/lib/web/assets/e2f90a23e1bd-chomp.wav +0 -0
  819. package/lib/web/assets/e454e56df89a-clack.wav +0 -0
  820. package/lib/web/assets/e8cbc2b88bc4-Inter-SemiBold.ttf +0 -0
  821. package/lib/web/assets/ed6496b891fc-land.wav +0 -0
  822. package/lib/web/assets/f21920200a81-thunk.wav +0 -0
  823. package/lib/web/assets/f753b43be89d-whack.wav +0 -0
  824. package/lib/web/assets/f798c4b5cf4d-miss.wav +0 -0
  825. package/lib/web/assets/fbe299716916-grass.png +0 -0
  826. package/lib/web/chunk-52ez2s9z.js +15 -0
  827. package/lib/web/chunk-8675t224.js +1 -0
  828. package/lib/web/index.js +2 -0
  829. package/lib/web/package.json +1 -0
  830. package/lib/web/services.js +2 -0
  831. package/package.json +94 -73
  832. package/src/assets/fonts/Inter-SemiBold.ttf +0 -0
  833. package/src/assets/models/explorer/explorer.glb +0 -0
  834. package/src/assets/models/explorer/params.json +51 -0
  835. package/src/assets/models/explorer/source.json +222 -0
  836. package/src/assets/models/play-with-tua/play-with-tua.glb +0 -0
  837. package/src/assets/models/play-with-tua/sources.json +141 -0
  838. package/src/assets/sfx/balloon_pop.wav +0 -0
  839. package/src/assets/sfx/blocked.wav +0 -0
  840. package/src/assets/sfx/boing.wav +0 -0
  841. package/src/assets/sfx/bonus.wav +0 -0
  842. package/src/assets/sfx/boom.wav +0 -0
  843. package/src/assets/sfx/bump.wav +0 -0
  844. package/src/assets/sfx/cannon.wav +0 -0
  845. package/src/assets/sfx/capture.wav +0 -0
  846. package/src/assets/sfx/card_flip.wav +0 -0
  847. package/src/assets/sfx/card_place.wav +0 -0
  848. package/src/assets/sfx/catch.wav +0 -0
  849. package/src/assets/sfx/chime.wav +0 -0
  850. package/src/assets/sfx/chomp.wav +0 -0
  851. package/src/assets/sfx/chomp_alt.wav +0 -0
  852. package/src/assets/sfx/clack.wav +0 -0
  853. package/src/assets/sfx/clang.wav +0 -0
  854. package/src/assets/sfx/clash.wav +0 -0
  855. package/src/assets/sfx/click.wav +0 -0
  856. package/src/assets/sfx/coin.wav +0 -0
  857. package/src/assets/sfx/combo.wav +0 -0
  858. package/src/assets/sfx/crash.wav +0 -0
  859. package/src/assets/sfx/crunch.wav +0 -0
  860. package/src/assets/sfx/dance.wav +0 -0
  861. package/src/assets/sfx/deselect.wav +0 -0
  862. package/src/assets/sfx/dice_roll.wav +0 -0
  863. package/src/assets/sfx/die.wav +0 -0
  864. package/src/assets/sfx/draw.wav +0 -0
  865. package/src/assets/sfx/drop.wav +0 -0
  866. package/src/assets/sfx/eat.wav +0 -0
  867. package/src/assets/sfx/engine.wav +0 -0
  868. package/src/assets/sfx/error.wav +0 -0
  869. package/src/assets/sfx/flag.wav +0 -0
  870. package/src/assets/sfx/flap.wav +0 -0
  871. package/src/assets/sfx/flip_disc.wav +0 -0
  872. package/src/assets/sfx/footstep_run.wav +0 -0
  873. package/src/assets/sfx/footstep_walk.wav +0 -0
  874. package/src/assets/sfx/game_over.wav +0 -0
  875. package/src/assets/sfx/gate.wav +0 -0
  876. package/src/assets/sfx/hit.wav +0 -0
  877. package/src/assets/sfx/hop.wav +0 -0
  878. package/src/assets/sfx/hurt.wav +0 -0
  879. package/src/assets/sfx/invalid.wav +0 -0
  880. package/src/assets/sfx/jump.wav +0 -0
  881. package/src/assets/sfx/ladder.wav +0 -0
  882. package/src/assets/sfx/land.wav +0 -0
  883. package/src/assets/sfx/laugh.wav +0 -0
  884. package/src/assets/sfx/lose.wav +0 -0
  885. package/src/assets/sfx/merge.wav +0 -0
  886. package/src/assets/sfx/miss.wav +0 -0
  887. package/src/assets/sfx/nitro.wav +0 -0
  888. package/src/assets/sfx/pew.wav +0 -0
  889. package/src/assets/sfx/place.wav +0 -0
  890. package/src/assets/sfx/pling.wav +0 -0
  891. package/src/assets/sfx/point.wav +0 -0
  892. package/src/assets/sfx/pop.wav +0 -0
  893. package/src/assets/sfx/pop_soft.wav +0 -0
  894. package/src/assets/sfx/power_up.wav +0 -0
  895. package/src/assets/sfx/reveal.wav +0 -0
  896. package/src/assets/sfx/robot.wav +0 -0
  897. package/src/assets/sfx/rotate.wav +0 -0
  898. package/src/assets/sfx/run_steps.wav +0 -0
  899. package/src/assets/sfx/select.wav +0 -0
  900. package/src/assets/sfx/shuffle.wav +0 -0
  901. package/src/assets/sfx/six.wav +0 -0
  902. package/src/assets/sfx/slice.wav +0 -0
  903. package/src/assets/sfx/slide.wav +0 -0
  904. package/src/assets/sfx/snake.wav +0 -0
  905. package/src/assets/sfx/snap.wav +0 -0
  906. package/src/assets/sfx/splash.wav +0 -0
  907. package/src/assets/sfx/star.wav +0 -0
  908. package/src/assets/sfx/start.wav +0 -0
  909. package/src/assets/sfx/swoosh.wav +0 -0
  910. package/src/assets/sfx/tap.wav +0 -0
  911. package/src/assets/sfx/thud.wav +0 -0
  912. package/src/assets/sfx/thunk.wav +0 -0
  913. package/src/assets/sfx/tick.wav +0 -0
  914. package/src/assets/sfx/time_up.wav +0 -0
  915. package/src/assets/sfx/tock.wav +0 -0
  916. package/src/assets/sfx/walk_steps.wav +0 -0
  917. package/src/assets/sfx/warning.wav +0 -0
  918. package/src/assets/sfx/whack.wav +0 -0
  919. package/src/assets/sfx/whoosh.wav +0 -0
  920. package/src/assets/sfx/win.wav +0 -0
  921. package/src/assets/sfx/zap.wav +0 -0
  922. package/src/assets/textures/ad_bolt.png +0 -0
  923. package/src/assets/textures/ad_bubbles.png +0 -0
  924. package/src/assets/textures/ad_chevrons.png +0 -0
  925. package/src/assets/textures/asphalt.png +0 -0
  926. package/src/assets/textures/bark.jpg +0 -0
  927. package/src/assets/textures/explorer-atlas.png +0 -0
  928. package/src/assets/textures/facade.png +0 -0
  929. package/src/assets/textures/grass.png +0 -0
  930. package/src/assets/textures/leaves.png +0 -0
  931. package/src/assets/textures/limestone.jpg +0 -0
  932. package/src/assets/textures/meadow.jpg +0 -0
  933. package/src/assets/textures/nature-sources.json +87 -0
  934. package/src/assets/textures/pine.png +0 -0
  935. package/src/assets/textures/river.jpg +0 -0
  936. package/src/assets/textures/soft_glow.png +0 -0
  937. package/src/games/arrows/Arrows.tsx +69 -0
  938. package/src/games/arrows/ArrowsConstants.ts +107 -0
  939. package/src/games/arrows/ArrowsGame.ts +735 -0
  940. package/src/games/arrows/ArrowsScene.ts +395 -0
  941. package/src/games/balloon-blaster/BalloonBlaster.tsx +75 -0
  942. package/src/games/balloon-blaster/BalloonBlasterConstants.ts +79 -0
  943. package/src/games/balloon-blaster/BalloonBlasterGame.ts +287 -0
  944. package/src/games/balloon-blaster/BalloonBlasterPhysics.ts +95 -0
  945. package/src/games/balloon-blaster/BalloonBlasterScene.ts +225 -0
  946. package/src/games/bike-racing/BikeMeshes.ts +273 -0
  947. package/src/games/bike-racing/BikeRacing.tsx +211 -0
  948. package/src/games/bike-racing/BikeRacingConstants.ts +103 -0
  949. package/src/games/bike-racing/BikeRacingGame.ts +557 -0
  950. package/src/games/bike-racing/BikeRacingScene.ts +119 -0
  951. package/src/games/block-blast/BlockBlast.tsx +73 -0
  952. package/src/games/block-blast/BlockBlastConstants.ts +179 -0
  953. package/src/games/block-blast/BlockBlastGame.ts +471 -0
  954. package/src/games/block-blast/BlockBlastScene.ts +156 -0
  955. package/src/games/block-breaker/BlockBreaker.tsx +79 -0
  956. package/src/games/block-breaker/BlockBreakerConstants.ts +139 -0
  957. package/src/games/block-breaker/BlockBreakerGame.ts +459 -0
  958. package/src/games/block-breaker/BlockBreakerScene.ts +257 -0
  959. package/src/games/bluk/Bluk.tsx +82 -0
  960. package/src/games/bluk/BlukConstants.ts +121 -0
  961. package/src/games/bluk/BlukGame.ts +323 -0
  962. package/src/games/bluk/BlukRules.ts +154 -0
  963. package/src/games/bluk/BlukScene.ts +514 -0
  964. package/src/games/bubble-shooter/BubbleShooter.tsx +76 -0
  965. package/src/games/bubble-shooter/BubbleShooterConstants.ts +103 -0
  966. package/src/games/bubble-shooter/BubbleShooterGame.ts +459 -0
  967. package/src/games/bubble-shooter/BubbleShooterScene.ts +158 -0
  968. package/src/games/candy-crush/CandyCrush.tsx +77 -0
  969. package/src/games/candy-crush/CandyCrushConstants.ts +94 -0
  970. package/src/games/candy-crush/CandyCrushGame.ts +477 -0
  971. package/src/games/candy-crush/CandyCrushScene.ts +209 -0
  972. package/src/games/car-racing/CarMeshes.ts +440 -0
  973. package/src/games/car-racing/CarRacing.tsx +211 -0
  974. package/src/games/car-racing/CarRacingConstants.ts +167 -0
  975. package/src/games/car-racing/CarRacingFacade.ts +40 -0
  976. package/src/games/car-racing/CarRacingGame.ts +539 -0
  977. package/src/games/car-racing/CarRacingScene.ts +1026 -0
  978. package/src/games/car-racing/CarRacingScenery.ts +265 -0
  979. package/src/games/chameleon-run/ChameleonRun.tsx +96 -0
  980. package/src/games/chameleon-run/ChameleonRunBackdrop.ts +186 -0
  981. package/src/games/chameleon-run/ChameleonRunConstants.ts +47 -0
  982. package/src/games/chameleon-run/ChameleonRunGame.ts +309 -0
  983. package/src/games/chameleon-run/ChameleonRunMeshes.ts +305 -0
  984. package/src/games/chameleon-run/ChameleonRunRules.ts +252 -0
  985. package/src/games/chameleon-run/ChameleonRunScene.ts +310 -0
  986. package/src/games/checkers/Checkers.tsx +83 -0
  987. package/src/games/checkers/CheckersAI.ts +255 -0
  988. package/src/games/checkers/CheckersConstants.ts +68 -0
  989. package/src/games/checkers/CheckersGame.ts +322 -0
  990. package/src/games/checkers/CheckersRules.ts +167 -0
  991. package/src/games/checkers/CheckersScene.ts +308 -0
  992. package/src/games/color-switch/ColorSwitch.tsx +75 -0
  993. package/src/games/color-switch/ColorSwitchConstants.ts +61 -0
  994. package/src/games/color-switch/ColorSwitchGame.ts +329 -0
  995. package/src/games/color-switch/ColorSwitchScene.ts +220 -0
  996. package/src/games/colors-sort/ColorsSort.tsx +82 -0
  997. package/src/games/colors-sort/ColorsSortConstants.ts +119 -0
  998. package/src/games/colors-sort/ColorsSortGame.ts +246 -0
  999. package/src/games/colors-sort/ColorsSortScene.ts +315 -0
  1000. package/src/games/connect-em-all/ConnectEmAll.tsx +70 -0
  1001. package/src/games/connect-em-all/ConnectEmAllConstants.ts +77 -0
  1002. package/src/games/connect-em-all/ConnectEmAllGame.ts +401 -0
  1003. package/src/games/connect-em-all/ConnectEmAllScene.ts +235 -0
  1004. package/src/games/crossy-road/CrossyRoad.tsx +74 -0
  1005. package/src/games/crossy-road/CrossyRoadCamera.ts +59 -0
  1006. package/src/games/crossy-road/CrossyRoadConstants.ts +132 -0
  1007. package/src/games/crossy-road/CrossyRoadGame.ts +293 -0
  1008. package/src/games/crossy-road/CrossyRoadMeshes.ts +195 -0
  1009. package/src/games/crossy-road/CrossyRoadPerson.ts +198 -0
  1010. package/src/games/crossy-road/CrossyRoadRules.ts +99 -0
  1011. package/src/games/crossy-road/CrossyRoadScene.ts +355 -0
  1012. package/src/games/dino-jump/DinoJump.tsx +77 -0
  1013. package/src/games/dino-jump/DinoJumpConstants.ts +80 -0
  1014. package/src/games/dino-jump/DinoJumpGame.ts +344 -0
  1015. package/src/games/dino-jump/DinoJumpScene.ts +686 -0
  1016. package/src/games/dots-and-boxes/DotsAndBoxes.tsx +83 -0
  1017. package/src/games/dots-and-boxes/DotsAndBoxesConstants.ts +77 -0
  1018. package/src/games/dots-and-boxes/DotsAndBoxesGame.ts +271 -0
  1019. package/src/games/dots-and-boxes/DotsAndBoxesScene.ts +249 -0
  1020. package/src/games/falling-sticks/FallingSticks.tsx +72 -0
  1021. package/src/games/falling-sticks/FallingSticksConstants.ts +62 -0
  1022. package/src/games/falling-sticks/FallingSticksGame.ts +220 -0
  1023. package/src/games/falling-sticks/FallingSticksRules.ts +145 -0
  1024. package/src/games/falling-sticks/FallingSticksScene.ts +245 -0
  1025. package/src/games/find-different-number/FindDifferentNumber.tsx +74 -0
  1026. package/src/games/find-different-number/FindDifferentNumberConstants.ts +74 -0
  1027. package/src/games/find-different-number/FindDifferentNumberGame.ts +174 -0
  1028. package/src/games/find-different-number/FindDifferentNumberRules.ts +43 -0
  1029. package/src/games/find-different-number/FindDifferentNumberScene.ts +193 -0
  1030. package/src/games/flappy-bird/FlappyBird.tsx +73 -0
  1031. package/src/games/flappy-bird/FlappyBirdConstants.ts +95 -0
  1032. package/src/games/flappy-bird/FlappyBirdGame.ts +375 -0
  1033. package/src/games/flappy-bird/FlappyBirdScene.ts +630 -0
  1034. package/src/games/fruit-merger/FruitMerger.tsx +73 -0
  1035. package/src/games/fruit-merger/FruitMergerConstants.ts +102 -0
  1036. package/src/games/fruit-merger/FruitMergerGame.ts +285 -0
  1037. package/src/games/fruit-merger/FruitMergerRules.ts +286 -0
  1038. package/src/games/fruit-merger/FruitMergerScene.ts +498 -0
  1039. package/src/games/fruit-ninja/FruitNinja.tsx +129 -0
  1040. package/src/games/fruit-ninja/FruitNinjaConstants.ts +107 -0
  1041. package/src/games/fruit-ninja/FruitNinjaGame.ts +391 -0
  1042. package/src/games/fruit-ninja/FruitNinjaScene.ts +319 -0
  1043. package/src/games/fruit-ninja/FruitNinjaWorld.ts +17 -0
  1044. package/src/games/game-2048/Game2048.tsx +84 -0
  1045. package/src/games/game-2048/Game2048Constants.ts +68 -0
  1046. package/src/games/game-2048/Game2048Game.ts +181 -0
  1047. package/src/games/game-2048/Game2048Rules.ts +101 -0
  1048. package/src/games/game-2048/Game2048Scene.ts +206 -0
  1049. package/src/games/knife-hit/KnifeHit.tsx +78 -0
  1050. package/src/games/knife-hit/KnifeHitConstants.ts +89 -0
  1051. package/src/games/knife-hit/KnifeHitGame.ts +264 -0
  1052. package/src/games/knife-hit/KnifeHitScene.ts +360 -0
  1053. package/src/games/ludo-king/LudoKing.tsx +86 -0
  1054. package/src/games/ludo-king/LudoKingConstants.ts +212 -0
  1055. package/src/games/ludo-king/LudoKingGame.ts +326 -0
  1056. package/src/games/ludo-king/LudoKingRules.ts +143 -0
  1057. package/src/games/ludo-king/LudoKingScene.ts +397 -0
  1058. package/src/games/maze-runner/MazeRunner.tsx +88 -0
  1059. package/src/games/maze-runner/MazeRunnerConstants.ts +65 -0
  1060. package/src/games/maze-runner/MazeRunnerGame.ts +176 -0
  1061. package/src/games/maze-runner/MazeRunnerRules.ts +161 -0
  1062. package/src/games/maze-runner/MazeRunnerScene.ts +245 -0
  1063. package/src/games/memory-match/MemoryMatch.tsx +77 -0
  1064. package/src/games/memory-match/MemoryMatchConstants.ts +105 -0
  1065. package/src/games/memory-match/MemoryMatchGame.ts +222 -0
  1066. package/src/games/memory-match/MemoryMatchRules.ts +38 -0
  1067. package/src/games/memory-match/MemoryMatchScene.ts +268 -0
  1068. package/src/games/mine-sweeper/MineSweeper.tsx +77 -0
  1069. package/src/games/mine-sweeper/MineSweeperConstants.ts +94 -0
  1070. package/src/games/mine-sweeper/MineSweeperGame.ts +234 -0
  1071. package/src/games/mine-sweeper/MineSweeperRules.ts +67 -0
  1072. package/src/games/mine-sweeper/MineSweeperScene.ts +262 -0
  1073. package/src/games/mob-control/MobControl.tsx +73 -0
  1074. package/src/games/mob-control/MobControlConstants.ts +106 -0
  1075. package/src/games/mob-control/MobControlGame.ts +176 -0
  1076. package/src/games/mob-control/MobControlMeshes.ts +85 -0
  1077. package/src/games/mob-control/MobControlRenderer.ts +108 -0
  1078. package/src/games/mob-control/MobControlRules.ts +522 -0
  1079. package/src/games/mob-control/MobControlScene.ts +399 -0
  1080. package/src/games/number-search/NumberSearch.tsx +18 -0
  1081. package/src/games/number-search/NumberSearchNumbers.ts +623 -0
  1082. package/src/games/nuts-and-bolts/NutsAndBolts.tsx +85 -0
  1083. package/src/games/nuts-and-bolts/NutsAndBoltsConstants.ts +75 -0
  1084. package/src/games/nuts-and-bolts/NutsAndBoltsGame.ts +298 -0
  1085. package/src/games/nuts-and-bolts/NutsAndBoltsRules.ts +474 -0
  1086. package/src/games/nuts-and-bolts/NutsAndBoltsScene.ts +498 -0
  1087. package/src/games/pac-man/PacMan.tsx +86 -0
  1088. package/src/games/pac-man/PacManConstants.ts +169 -0
  1089. package/src/games/pac-man/PacManGame.ts +406 -0
  1090. package/src/games/pac-man/PacManRules.ts +255 -0
  1091. package/src/games/pac-man/PacManScene.ts +387 -0
  1092. package/src/games/paper-io/PaperIo.tsx +91 -0
  1093. package/src/games/paper-io/PaperIoConstants.ts +86 -0
  1094. package/src/games/paper-io/PaperIoGame.ts +193 -0
  1095. package/src/games/paper-io/PaperIoMeshes.ts +233 -0
  1096. package/src/games/paper-io/PaperIoRules.ts +315 -0
  1097. package/src/games/paper-io/PaperIoScene.ts +310 -0
  1098. package/src/games/penguin-run/PenguinMeshes.ts +269 -0
  1099. package/src/games/penguin-run/PenguinModel.ts +712 -0
  1100. package/src/games/penguin-run/PenguinRun.tsx +77 -0
  1101. package/src/games/penguin-run/PenguinRunConstants.ts +69 -0
  1102. package/src/games/penguin-run/PenguinRunGame.ts +406 -0
  1103. package/src/games/penguin-run/PenguinRunScene.ts +949 -0
  1104. package/src/games/perfect-circle/PerfectCircle.tsx +74 -0
  1105. package/src/games/perfect-circle/PerfectCircleConstants.ts +52 -0
  1106. package/src/games/perfect-circle/PerfectCircleGame.ts +153 -0
  1107. package/src/games/perfect-circle/PerfectCircleRules.ts +111 -0
  1108. package/src/games/perfect-circle/PerfectCircleScene.ts +176 -0
  1109. package/src/games/pipe-connect/PipeConnect.tsx +69 -0
  1110. package/src/games/pipe-connect/PipeConnectConstants.ts +101 -0
  1111. package/src/games/pipe-connect/PipeConnectGame.ts +179 -0
  1112. package/src/games/pipe-connect/PipeConnectRules.ts +326 -0
  1113. package/src/games/pipe-connect/PipeConnectScene.ts +271 -0
  1114. package/src/games/play-with-tua/PlayWithTua.tsx +123 -0
  1115. package/src/games/play-with-tua/PlayWithTuaConstants.ts +70 -0
  1116. package/src/games/play-with-tua/PlayWithTuaGame.ts +167 -0
  1117. package/src/games/play-with-tua/PlayWithTuaModel.ts +42 -0
  1118. package/src/games/play-with-tua/PlayWithTuaScene.ts +36 -0
  1119. package/src/games/popit-fidget/PopitFidget.tsx +72 -0
  1120. package/src/games/popit-fidget/PopitFidgetConstants.ts +71 -0
  1121. package/src/games/popit-fidget/PopitFidgetGame.ts +148 -0
  1122. package/src/games/popit-fidget/PopitFidgetScene.ts +242 -0
  1123. package/src/games/reversi/Reversi.tsx +94 -0
  1124. package/src/games/reversi/ReversiConstants.ts +67 -0
  1125. package/src/games/reversi/ReversiGame.ts +266 -0
  1126. package/src/games/reversi/ReversiRules.ts +176 -0
  1127. package/src/games/reversi/ReversiScene.ts +240 -0
  1128. package/src/games/search-grid/SearchGrid.tsx +92 -0
  1129. package/src/games/search-grid/SearchGridConstants.ts +178 -0
  1130. package/src/games/search-grid/SearchGridGame.ts +209 -0
  1131. package/src/games/search-grid/SearchGridScene.ts +301 -0
  1132. package/src/games/shared/BackdropCard.tsx +54 -0
  1133. package/src/games/shared/EngineBackdrop.ts +300 -0
  1134. package/src/games/shared/EngineBlasts.ts +136 -0
  1135. package/src/games/shared/EngineBlocks.ts +91 -0
  1136. package/src/games/shared/EngineControlText.ts +17 -0
  1137. package/src/games/shared/EngineDice.ts +250 -0
  1138. package/src/games/shared/EngineFootprint.ts +35 -0
  1139. package/src/games/shared/EngineFruits.ts +1435 -0
  1140. package/src/games/shared/EngineGameLoader.tsx +88 -0
  1141. package/src/games/shared/EngineGameScreen.tsx +325 -0
  1142. package/src/games/shared/EngineGameWidth.ts +3 -0
  1143. package/src/games/shared/EngineGameWidth.web.ts +3 -0
  1144. package/src/games/shared/EngineGlyphs.ts +178 -0
  1145. package/src/games/shared/EngineHud.ts +815 -0
  1146. package/src/games/shared/EngineLoading.ts +477 -0
  1147. package/src/games/shared/EngineMeadow.ts +725 -0
  1148. package/src/games/shared/EngineMeshCache.ts +15 -0
  1149. package/src/games/shared/EngineMeshes.ts +10 -0
  1150. package/src/games/shared/EngineRacingChase.ts +21 -0
  1151. package/src/games/shared/EngineRacingHandling.ts +48 -0
  1152. package/src/games/shared/EngineReadyContext.ts +4 -0
  1153. package/src/games/shared/EngineTilt.ts +44 -0
  1154. package/src/games/shared/EngineTouchSurface.tsx +103 -0
  1155. package/src/games/shared/EngineUtils.ts +52 -0
  1156. package/src/games/shared/GameActivity.ts +13 -0
  1157. package/src/games/shared/GameLoading.tsx +202 -0
  1158. package/src/games/shared/GameLoadingTransition.tsx +61 -0
  1159. package/src/games/shared/ProceduralCacheVersion.ts +2 -0
  1160. package/src/games/shared/useEngineGame.ts +240 -0
  1161. package/src/games/shared/useGameResource.ts +21 -0
  1162. package/src/games/shared/useLiveState.ts +58 -0
  1163. package/src/games/sliding-numbers/SlidingNumbers.tsx +71 -0
  1164. package/src/games/sliding-numbers/SlidingNumbersConstants.ts +65 -0
  1165. package/src/games/sliding-numbers/SlidingNumbersGame.ts +192 -0
  1166. package/src/games/sliding-numbers/SlidingNumbersRules.ts +79 -0
  1167. package/src/games/sliding-numbers/SlidingNumbersScene.ts +193 -0
  1168. package/src/games/snake-3d/Snake3D.tsx +76 -0
  1169. package/src/games/snake-3d/Snake3DConstants.ts +61 -0
  1170. package/src/games/snake-3d/Snake3DGame.ts +192 -0
  1171. package/src/games/snake-3d/Snake3DMotion.ts +22 -0
  1172. package/src/games/snake-3d/Snake3DRules.ts +116 -0
  1173. package/src/games/snake-3d/Snake3DScene.ts +322 -0
  1174. package/src/games/snakes-and-ladders/SnakesAndLadders.tsx +87 -0
  1175. package/src/games/snakes-and-ladders/SnakesAndLaddersConstants.ts +136 -0
  1176. package/src/games/snakes-and-ladders/SnakesAndLaddersGame.ts +310 -0
  1177. package/src/games/snakes-and-ladders/SnakesAndLaddersScene.ts +515 -0
  1178. package/src/games/space-fighter/SpaceFighter.tsx +74 -0
  1179. package/src/games/space-fighter/SpaceFighterConstants.ts +86 -0
  1180. package/src/games/space-fighter/SpaceFighterGame.ts +292 -0
  1181. package/src/games/space-fighter/SpaceFighterScene.ts +550 -0
  1182. package/src/games/spider-solitaire/SpiderSolitaire.tsx +80 -0
  1183. package/src/games/spider-solitaire/SpiderSolitaireConstants.ts +107 -0
  1184. package/src/games/spider-solitaire/SpiderSolitaireGame.ts +387 -0
  1185. package/src/games/spider-solitaire/SpiderSolitaireRules.ts +123 -0
  1186. package/src/games/spider-solitaire/SpiderSolitaireScene.ts +352 -0
  1187. package/src/games/stack-tower/StackTower.tsx +76 -0
  1188. package/src/games/stack-tower/StackTowerConstants.ts +74 -0
  1189. package/src/games/stack-tower/StackTowerGame.ts +236 -0
  1190. package/src/games/stack-tower/StackTowerScene.ts +186 -0
  1191. package/src/games/sudoku/Sudoku.tsx +73 -0
  1192. package/src/games/sudoku/SudokuConstants.ts +127 -0
  1193. package/src/games/sudoku/SudokuGame.ts +250 -0
  1194. package/src/games/sudoku/SudokuRules.ts +125 -0
  1195. package/src/games/sudoku/SudokuScene.ts +304 -0
  1196. package/src/games/tangram/Tangram.tsx +79 -0
  1197. package/src/games/tangram/TangramConstants.ts +64 -0
  1198. package/src/games/tangram/TangramGame.ts +356 -0
  1199. package/src/games/tangram/TangramRules.ts +409 -0
  1200. package/src/games/tangram/TangramScene.ts +203 -0
  1201. package/src/games/tank-1990/Tank1990.tsx +78 -0
  1202. package/src/games/tank-1990/Tank1990Constants.ts +81 -0
  1203. package/src/games/tank-1990/Tank1990Game.ts +331 -0
  1204. package/src/games/tank-1990/Tank1990Rules.ts +390 -0
  1205. package/src/games/tank-1990/Tank1990Scene.ts +434 -0
  1206. package/src/games/tic-tac-toe/TicTacToe.tsx +98 -0
  1207. package/src/games/tic-tac-toe/TicTacToeConstants.ts +69 -0
  1208. package/src/games/tic-tac-toe/TicTacToeGame.ts +200 -0
  1209. package/src/games/tic-tac-toe/TicTacToeRules.ts +103 -0
  1210. package/src/games/tic-tac-toe/TicTacToeScene.ts +245 -0
  1211. package/src/games/tile-home/TileHome.tsx +92 -0
  1212. package/src/games/tile-home/TileHomeConstants.ts +139 -0
  1213. package/src/games/tile-home/TileHomeGame.ts +435 -0
  1214. package/src/games/tile-home/TileHomeScene.ts +154 -0
  1215. package/src/games/treasure-hunt/TreasureHunt.tsx +206 -0
  1216. package/src/games/treasure-hunt/TreasureHuntConstants.ts +266 -0
  1217. package/src/games/treasure-hunt/TreasureHuntControls.ts +280 -0
  1218. package/src/games/treasure-hunt/TreasureHuntGame.ts +402 -0
  1219. package/src/games/treasure-hunt/TreasureHuntMeshes.ts +422 -0
  1220. package/src/games/treasure-hunt/TreasureHuntModel.ts +506 -0
  1221. package/src/games/treasure-hunt/TreasureHuntRules.ts +1210 -0
  1222. package/src/games/treasure-hunt/TreasureHuntScene.ts +586 -0
  1223. package/src/games/whack-a-mole/WhackAMole.tsx +79 -0
  1224. package/src/games/whack-a-mole/WhackAMoleConstants.ts +94 -0
  1225. package/src/games/whack-a-mole/WhackAMoleGame.ts +233 -0
  1226. package/src/games/whack-a-mole/WhackAMoleScene.ts +349 -0
  1227. package/src/games/word-search/WordSearch.tsx +18 -0
  1228. package/src/games/word-search/WordSearchWords.ts +1642 -0
  1229. package/src/helpers/GamePatternData.ts +120 -0
  1230. package/src/helpers/GameSettingsModal.tsx +384 -0
  1231. package/src/helpers/GameTheme.tsx +37 -0
  1232. package/src/helpers/IconPaths.ts +6 -0
  1233. package/src/helpers/index.ts +2 -0
  1234. package/src/index.tsx +60 -0
  1235. package/src/services/GameAssetLoader.ts +111 -0
  1236. package/src/services/GameAssets.ts +149 -0
  1237. package/src/services/GameLoaders.ts +93 -0
  1238. package/src/services/GamesConstants.ts +193 -0
  1239. package/src/services/GamesMetadata.ts +711 -0
  1240. package/src/services/GamesService.ts +116 -0
  1241. package/src/services/HapticsService.ts +48 -0
  1242. package/src/services/ScoringService.ts +19 -0
  1243. package/src/services/SfxSources.ts +81 -0
  1244. package/src/services/SoundsService.ts +582 -0
  1245. package/src/services/ThemeService.ts +281 -0
  1246. package/src/services/UtilsService.ts +134 -0
  1247. package/src/services/index.ts +6 -0
  1248. package/lib/module/games/arrows/ArrowsService.js +0 -1
  1249. package/lib/module/games/arrows/ArrowsStore.js +0 -1
  1250. package/lib/module/games/arrows/components/ArrowsGrid.js +0 -1
  1251. package/lib/module/games/arrows/components/ScoreBoard.js +0 -1
  1252. package/lib/module/games/balloon-blaster/BalloonBlasterService.js +0 -1
  1253. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +0 -1
  1254. package/lib/module/games/balloon-blaster/components/BalloonComponent.js +0 -1
  1255. package/lib/module/games/balloon-blaster/components/GameArea.js +0 -1
  1256. package/lib/module/games/balloon-blaster/components/GameBackground.js +0 -1
  1257. package/lib/module/games/balloon-blaster/components/ScoreBoard.js +0 -1
  1258. package/lib/module/games/bike-racing/BikeRacingService.js +0 -1
  1259. package/lib/module/games/bike-racing/BikeRacingStore.js +0 -1
  1260. package/lib/module/games/bike-racing/components/BikeComponent.js +0 -1
  1261. package/lib/module/games/bike-racing/components/GameBackground.js +0 -1
  1262. package/lib/module/games/bike-racing/components/ScoreBoard.js +0 -1
  1263. package/lib/module/games/block-blast/BlockBlastService.js +0 -1
  1264. package/lib/module/games/block-blast/BlockBlastStore.js +0 -1
  1265. package/lib/module/games/block-blast/components/BlockPieceComponent.js +0 -1
  1266. package/lib/module/games/block-blast/components/GameArea.js +0 -1
  1267. package/lib/module/games/block-blast/components/GridComponent.js +0 -1
  1268. package/lib/module/games/block-blast/components/ScoreBoard.js +0 -1
  1269. package/lib/module/games/block-breaker/BlockBreakerService.js +0 -1
  1270. package/lib/module/games/block-breaker/BlockBreakerStore.js +0 -1
  1271. package/lib/module/games/block-breaker/components/BlastAnimation.js +0 -1
  1272. package/lib/module/games/block-breaker/components/GameArea.js +0 -1
  1273. package/lib/module/games/block-breaker/components/ScoreBoard.js +0 -1
  1274. package/lib/module/games/bluk/BlukService.js +0 -1
  1275. package/lib/module/games/bluk/BlukStore.js +0 -1
  1276. package/lib/module/games/bluk/components/GameArea.js +0 -1
  1277. package/lib/module/games/bluk/components/GameBackground.js +0 -1
  1278. package/lib/module/games/bluk/components/ScoreBoard.js +0 -1
  1279. package/lib/module/games/bubble-shooter/BubbleShooterService.js +0 -1
  1280. package/lib/module/games/bubble-shooter/BubbleShooterStore.js +0 -1
  1281. package/lib/module/games/bubble-shooter/components/GameArea.js +0 -1
  1282. package/lib/module/games/bubble-shooter/components/ScoreBoard.js +0 -1
  1283. package/lib/module/games/candy-crush/CandyCrushService.js +0 -1
  1284. package/lib/module/games/candy-crush/CandyCrushStore.js +0 -1
  1285. package/lib/module/games/candy-crush/components/CandyItem.js +0 -1
  1286. package/lib/module/games/candy-crush/components/GameGrid.js +0 -1
  1287. package/lib/module/games/candy-crush/components/ScoreBoard.js +0 -1
  1288. package/lib/module/games/car-racing/CarRacingService.js +0 -1
  1289. package/lib/module/games/car-racing/CarRacingStore.js +0 -1
  1290. package/lib/module/games/car-racing/components/CarComponent.js +0 -1
  1291. package/lib/module/games/car-racing/components/GameBackground.js +0 -1
  1292. package/lib/module/games/car-racing/components/ScoreBoard.js +0 -1
  1293. package/lib/module/games/chameleon-run/ChameleonRunService.js +0 -1
  1294. package/lib/module/games/chameleon-run/ChameleonRunStore.js +0 -1
  1295. package/lib/module/games/chameleon-run/components/GameArea.js +0 -1
  1296. package/lib/module/games/chameleon-run/components/GameBackground.js +0 -1
  1297. package/lib/module/games/chameleon-run/components/ScoreBoard.js +0 -1
  1298. package/lib/module/games/checkers/CheckersService.js +0 -1
  1299. package/lib/module/games/checkers/CheckersStore.js +0 -1
  1300. package/lib/module/games/checkers/components/GameBoard.js +0 -1
  1301. package/lib/module/games/checkers/components/ScoreBoard.js +0 -1
  1302. package/lib/module/games/color-switch/ColorSwitchService.js +0 -1
  1303. package/lib/module/games/color-switch/ColorSwitchStore.js +0 -1
  1304. package/lib/module/games/color-switch/components/GameArea.js +0 -1
  1305. package/lib/module/games/color-switch/components/ScoreBoard.js +0 -1
  1306. package/lib/module/games/colors-sort/ColorsSortService.js +0 -1
  1307. package/lib/module/games/colors-sort/ColorsSortStore.js +0 -1
  1308. package/lib/module/games/colors-sort/components/ColorContainer.js +0 -1
  1309. package/lib/module/games/colors-sort/components/ScoreBoard.js +0 -1
  1310. package/lib/module/games/connect-em-all/ConnectEmAllService.js +0 -1
  1311. package/lib/module/games/connect-em-all/ConnectEmAllStore.js +0 -1
  1312. package/lib/module/games/connect-em-all/components/GameBoard.js +0 -1
  1313. package/lib/module/games/connect-em-all/components/ScoreBoard.js +0 -1
  1314. package/lib/module/games/crossy-road/CrossyRoadService.js +0 -1
  1315. package/lib/module/games/crossy-road/CrossyRoadStore.js +0 -1
  1316. package/lib/module/games/crossy-road/components/GameArea.js +0 -1
  1317. package/lib/module/games/crossy-road/components/ScoreBoard.js +0 -1
  1318. package/lib/module/games/dino-jump/DinoJumpService.js +0 -1
  1319. package/lib/module/games/dino-jump/DinoJumpStore.js +0 -1
  1320. package/lib/module/games/dino-jump/components/DinoSprite.js +0 -1
  1321. package/lib/module/games/dino-jump/components/GameArea.js +0 -1
  1322. package/lib/module/games/dino-jump/components/GameBackground.js +0 -1
  1323. package/lib/module/games/dino-jump/components/ObstacleSprite.js +0 -1
  1324. package/lib/module/games/dino-jump/components/ScoreBoard.js +0 -1
  1325. package/lib/module/games/dino-jump/components/StarSprite.js +0 -1
  1326. package/lib/module/games/dots-and-boxes/DotsAndBoxesService.js +0 -1
  1327. package/lib/module/games/dots-and-boxes/DotsAndBoxesStore.js +0 -1
  1328. package/lib/module/games/dots-and-boxes/components/GameBoard.js +0 -1
  1329. package/lib/module/games/dots-and-boxes/components/ScoreBoard.js +0 -1
  1330. package/lib/module/games/falling-sticks/FallingSticksService.js +0 -1
  1331. package/lib/module/games/falling-sticks/FallingSticksStore.js +0 -1
  1332. package/lib/module/games/falling-sticks/components/GameArea.js +0 -1
  1333. package/lib/module/games/falling-sticks/components/GameBackground.js +0 -1
  1334. package/lib/module/games/falling-sticks/components/ScoreBoard.js +0 -1
  1335. package/lib/module/games/find-different-number/FindDifferentNumberService.js +0 -1
  1336. package/lib/module/games/find-different-number/FindDifferentNumberStore.js +0 -1
  1337. package/lib/module/games/find-different-number/components/GameGrid.js +0 -1
  1338. package/lib/module/games/find-different-number/components/ScoreBoard.js +0 -1
  1339. package/lib/module/games/flappy-bird/FlappyBirdStore.js +0 -1
  1340. package/lib/module/games/flappy-bird/components/Bird.js +0 -1
  1341. package/lib/module/games/flappy-bird/components/GameArea.js +0 -1
  1342. package/lib/module/games/flappy-bird/components/GameBackground.js +0 -1
  1343. package/lib/module/games/flappy-bird/components/Pipes.js +0 -1
  1344. package/lib/module/games/flappy-bird/components/ScoreBoard.js +0 -1
  1345. package/lib/module/games/fruit-merger/FruitMergerService.js +0 -1
  1346. package/lib/module/games/fruit-merger/FruitMergerStore.js +0 -1
  1347. package/lib/module/games/fruit-merger/components/FruitItem.js +0 -1
  1348. package/lib/module/games/fruit-merger/components/GameArea.js +0 -1
  1349. package/lib/module/games/fruit-merger/components/ScoreBoard.js +0 -1
  1350. package/lib/module/games/fruit-ninja/FruitNinjaService.js +0 -1
  1351. package/lib/module/games/fruit-ninja/FruitNinjaStore.js +0 -1
  1352. package/lib/module/games/fruit-ninja/components/FruitComponent.js +0 -1
  1353. package/lib/module/games/fruit-ninja/components/GameArea.js +0 -1
  1354. package/lib/module/games/fruit-ninja/components/GameBackground.js +0 -1
  1355. package/lib/module/games/fruit-ninja/components/ScoreBoard.js +0 -1
  1356. package/lib/module/games/game-2048/Game2048Service.js +0 -1
  1357. package/lib/module/games/game-2048/Game2048Store.js +0 -1
  1358. package/lib/module/games/game-2048/components/GameGrid.js +0 -1
  1359. package/lib/module/games/game-2048/components/ScoreBoard.js +0 -1
  1360. package/lib/module/games/knife-hit/KnifeHitService.js +0 -1
  1361. package/lib/module/games/knife-hit/KnifeHitStore.js +0 -1
  1362. package/lib/module/games/knife-hit/components/GameArea.js +0 -1
  1363. package/lib/module/games/knife-hit/components/ScoreBoard.js +0 -1
  1364. package/lib/module/games/ludo-king/LudoKingService.js +0 -1
  1365. package/lib/module/games/ludo-king/LudoKingStore.js +0 -1
  1366. package/lib/module/games/ludo-king/components/Dice.js +0 -1
  1367. package/lib/module/games/ludo-king/components/GameBoard.js +0 -1
  1368. package/lib/module/games/ludo-king/components/ScoreBoard.js +0 -1
  1369. package/lib/module/games/maze-runner/MazeRunnerStore.js +0 -1
  1370. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +0 -1
  1371. package/lib/module/games/maze-runner/components/EnhancedGameArea.js +0 -1
  1372. package/lib/module/games/maze-runner/components/ScoreBoard.js +0 -1
  1373. package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +0 -1
  1374. package/lib/module/games/maze-runner/components/WallComponent.js +0 -1
  1375. package/lib/module/games/memory-match/MemoryMatchService.js +0 -1
  1376. package/lib/module/games/memory-match/MemoryMatchStore.js +0 -1
  1377. package/lib/module/games/memory-match/components/Card.js +0 -1
  1378. package/lib/module/games/memory-match/components/GameBoard.js +0 -1
  1379. package/lib/module/games/memory-match/components/ScoreBoard.js +0 -1
  1380. package/lib/module/games/mine-sweeper/MineSweeperService.js +0 -1
  1381. package/lib/module/games/mine-sweeper/MineSweeperStore.js +0 -1
  1382. package/lib/module/games/mine-sweeper/components/GameArea.js +0 -1
  1383. package/lib/module/games/mine-sweeper/components/ScoreBoard.js +0 -1
  1384. package/lib/module/games/mob-control/MobControlService.js +0 -1
  1385. package/lib/module/games/mob-control/MobControlStore.js +0 -1
  1386. package/lib/module/games/mob-control/components/GameArea.js +0 -1
  1387. package/lib/module/games/mob-control/components/ScoreBoard.js +0 -1
  1388. package/lib/module/games/number-search/NumberSearchConstants.js +0 -1
  1389. package/lib/module/games/number-search/NumberSearchService.js +0 -1
  1390. package/lib/module/games/number-search/NumberSearchStore.js +0 -1
  1391. package/lib/module/games/number-search/components/GameBoard.js +0 -1
  1392. package/lib/module/games/number-search/components/NumberList.js +0 -1
  1393. package/lib/module/games/number-search/components/ScoreBoard.js +0 -1
  1394. package/lib/module/games/nuts-and-bolts/NutsAndBoltsService.js +0 -1
  1395. package/lib/module/games/nuts-and-bolts/NutsAndBoltsStore.js +0 -1
  1396. package/lib/module/games/nuts-and-bolts/components/GameBoard.js +0 -1
  1397. package/lib/module/games/nuts-and-bolts/components/ScoreBoard.js +0 -1
  1398. package/lib/module/games/pac-man/PacManService.js +0 -1
  1399. package/lib/module/games/pac-man/PacManStore.js +0 -1
  1400. package/lib/module/games/pac-man/components/GameCanvas.js +0 -1
  1401. package/lib/module/games/pac-man/components/ScoreBoard.js +0 -1
  1402. package/lib/module/games/paper-io/PaperIoService.js +0 -1
  1403. package/lib/module/games/paper-io/PaperIoStore.js +0 -1
  1404. package/lib/module/games/paper-io/components/GameArea.js +0 -1
  1405. package/lib/module/games/paper-io/components/ScoreBoard.js +0 -1
  1406. package/lib/module/games/perfect-circle/PerfectCircleService.js +0 -1
  1407. package/lib/module/games/perfect-circle/PerfectCircleStore.js +0 -1
  1408. package/lib/module/games/perfect-circle/components/DrawingCanvas.js +0 -1
  1409. package/lib/module/games/perfect-circle/components/ScoreBoard.js +0 -1
  1410. package/lib/module/games/pipe-connect/PipeConnectService.js +0 -1
  1411. package/lib/module/games/pipe-connect/PipeConnectStore.js +0 -1
  1412. package/lib/module/games/pipe-connect/components/GameArea.js +0 -1
  1413. package/lib/module/games/pipe-connect/components/ScoreBoard.js +0 -1
  1414. package/lib/module/games/popit-fidget/PopitFidgetService.js +0 -1
  1415. package/lib/module/games/popit-fidget/PopitFidgetStore.js +0 -1
  1416. package/lib/module/games/popit-fidget/components/BubbleComponent.js +0 -1
  1417. package/lib/module/games/popit-fidget/components/FidgetGrid.js +0 -1
  1418. package/lib/module/games/popit-fidget/components/ScoreBoard.js +0 -1
  1419. package/lib/module/games/reversi/ReversiStore.js +0 -1
  1420. package/lib/module/games/reversi/components/GameBoard.js +0 -1
  1421. package/lib/module/games/reversi/components/ScoreBoard.js +0 -1
  1422. package/lib/module/games/sliding-numbers/SlidingNumbersService.js +0 -1
  1423. package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +0 -1
  1424. package/lib/module/games/sliding-numbers/components/NumbersGrid.js +0 -1
  1425. package/lib/module/games/sliding-numbers/components/ScoreBoard.js +0 -1
  1426. package/lib/module/games/snake-3d/Snake3DService.js +0 -1
  1427. package/lib/module/games/snake-3d/Snake3DStore.js +0 -1
  1428. package/lib/module/games/snake-3d/components/GameGrid.js +0 -1
  1429. package/lib/module/games/snake-3d/components/ScoreBoard.js +0 -1
  1430. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersService.js +0 -1
  1431. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersStore.js +0 -1
  1432. package/lib/module/games/snakes-and-ladders/components/Dice.js +0 -1
  1433. package/lib/module/games/snakes-and-ladders/components/GameBoard.js +0 -1
  1434. package/lib/module/games/snakes-and-ladders/components/ScoreBoard.js +0 -1
  1435. package/lib/module/games/space-fighter/SpaceFighterService.js +0 -1
  1436. package/lib/module/games/space-fighter/SpaceFighterStore.js +0 -1
  1437. package/lib/module/games/space-fighter/components/AsteroidComponent.js +0 -1
  1438. package/lib/module/games/space-fighter/components/GameArea.js +0 -1
  1439. package/lib/module/games/space-fighter/components/GameBackground.js +0 -1
  1440. package/lib/module/games/space-fighter/components/ScoreBoard.js +0 -1
  1441. package/lib/module/games/space-fighter/components/Spacecraft3D.js +0 -1
  1442. package/lib/module/games/space-fighter/components/SpacecraftPath.js +0 -1
  1443. package/lib/module/games/spider-solitaire/SpiderSolitaireService.js +0 -1
  1444. package/lib/module/games/spider-solitaire/SpiderSolitaireStore.js +0 -1
  1445. package/lib/module/games/spider-solitaire/components/Card.js +0 -1
  1446. package/lib/module/games/spider-solitaire/components/CardPile.js +0 -1
  1447. package/lib/module/games/spider-solitaire/components/ScoreBoard.js +0 -1
  1448. package/lib/module/games/stack-tower/StackTowerService.js +0 -1
  1449. package/lib/module/games/stack-tower/StackTowerStore.js +0 -1
  1450. package/lib/module/games/stack-tower/components/GameArea.js +0 -1
  1451. package/lib/module/games/stack-tower/components/ScoreBoard.js +0 -1
  1452. package/lib/module/games/sudoku/SudokuService.js +0 -1
  1453. package/lib/module/games/sudoku/SudokuStore.js +0 -1
  1454. package/lib/module/games/sudoku/components/GameArea.js +0 -1
  1455. package/lib/module/games/sudoku/components/ScoreBoard.js +0 -1
  1456. package/lib/module/games/tangram/TangramService.js +0 -1
  1457. package/lib/module/games/tangram/TangramStore.js +0 -1
  1458. package/lib/module/games/tangram/components/GameBoard.js +0 -1
  1459. package/lib/module/games/tangram/components/ScoreBoard.js +0 -1
  1460. package/lib/module/games/tank-1990/Tank1990Service.js +0 -1
  1461. package/lib/module/games/tank-1990/Tank1990Store.js +0 -1
  1462. package/lib/module/games/tank-1990/components/Controls.js +0 -1
  1463. package/lib/module/games/tank-1990/components/GameBoard.js +0 -1
  1464. package/lib/module/games/tank-1990/components/ScoreBoard.js +0 -1
  1465. package/lib/module/games/tic-tac-toe/TicTacToeService.js +0 -1
  1466. package/lib/module/games/tic-tac-toe/TicTacToeStore.js +0 -1
  1467. package/lib/module/games/tic-tac-toe/components/GameBoard.js +0 -1
  1468. package/lib/module/games/tic-tac-toe/components/ScoreBoard.js +0 -1
  1469. package/lib/module/games/tile-home/TileHomeService.js +0 -1
  1470. package/lib/module/games/tile-home/TileHomeStore.js +0 -1
  1471. package/lib/module/games/tile-home/components/AnimatingTile.js +0 -1
  1472. package/lib/module/games/tile-home/components/FlyingTile.js +0 -1
  1473. package/lib/module/games/tile-home/components/GameBoard.js +0 -1
  1474. package/lib/module/games/tile-home/components/ScoreBoard.js +0 -1
  1475. package/lib/module/games/tile-home/components/TileItem.js +0 -1
  1476. package/lib/module/games/tile-home/components/TileSlot.js +0 -1
  1477. package/lib/module/games/whack-a-mole/WhackAMoleService.js +0 -1
  1478. package/lib/module/games/whack-a-mole/WhackAMoleStore.js +0 -1
  1479. package/lib/module/games/whack-a-mole/components/GameBackground.js +0 -1
  1480. package/lib/module/games/whack-a-mole/components/GameGrid.js +0 -1
  1481. package/lib/module/games/whack-a-mole/components/GameHole.js +0 -1
  1482. package/lib/module/games/whack-a-mole/components/MoleCharacter.js +0 -1
  1483. package/lib/module/games/whack-a-mole/components/ScoreBoard.js +0 -1
  1484. package/lib/module/games/word-search/WordSearchConstants.js +0 -1
  1485. package/lib/module/games/word-search/WordSearchService.js +0 -1
  1486. package/lib/module/games/word-search/WordSearchStore.js +0 -1
  1487. package/lib/module/games/word-search/components/GameBoard.js +0 -1
  1488. package/lib/module/games/word-search/components/ScoreBoard.js +0 -1
  1489. package/lib/module/games/word-search/components/WordList.js +0 -1
  1490. package/lib/module/helpers/AnimatedScore.js +0 -1
  1491. package/lib/module/helpers/AnimationFrame.js +0 -1
  1492. package/lib/module/helpers/AnimationTracker.js +0 -1
  1493. package/lib/module/helpers/BlastAnimation.js +0 -1
  1494. package/lib/module/helpers/ErrorHandler.js +0 -1
  1495. package/lib/module/helpers/GameBackgroundPattern.js +0 -1
  1496. package/lib/module/helpers/GameControlButton.js +0 -1
  1497. package/lib/module/helpers/GameOverModal.js +0 -1
  1498. package/lib/module/helpers/GameTimer.js +0 -1
  1499. package/lib/module/helpers/Icons.js +0 -1
  1500. package/lib/module/helpers/ParticleBlast.js +0 -1
  1501. package/lib/module/helpers/ScoreBoardContainer.js +0 -1
  1502. package/lib/module/helpers/assets/apple-fruit.js +0 -1
  1503. package/lib/module/helpers/assets/avocado-item.js +0 -1
  1504. package/lib/module/helpers/assets/banana-fruit.js +0 -1
  1505. package/lib/module/helpers/assets/bomb-item.js +0 -1
  1506. package/lib/module/helpers/assets/broccoli-item.js +0 -1
  1507. package/lib/module/helpers/assets/cherries-fruit.js +0 -1
  1508. package/lib/module/helpers/assets/donut-item.js +0 -1
  1509. package/lib/module/helpers/assets/dragonfruit-item.js +0 -1
  1510. package/lib/module/helpers/assets/fries-item.js +0 -1
  1511. package/lib/module/helpers/assets/fruit-helpers.js +0 -1
  1512. package/lib/module/helpers/assets/grapes-fruit.js +0 -1
  1513. package/lib/module/helpers/assets/icecream-item.js +0 -1
  1514. package/lib/module/helpers/assets/index.js +0 -1
  1515. package/lib/module/helpers/assets/kiwi-fruit.js +0 -1
  1516. package/lib/module/helpers/assets/mango-fruit.js +0 -1
  1517. package/lib/module/helpers/assets/orange-fruit.js +0 -1
  1518. package/lib/module/helpers/assets/papaya-fruit.js +0 -1
  1519. package/lib/module/helpers/assets/papaya-full-fruit.js +0 -1
  1520. package/lib/module/helpers/assets/peach-fruit.js +0 -1
  1521. package/lib/module/helpers/assets/pineapple-fruit.js +0 -1
  1522. package/lib/module/helpers/assets/pomegranate-fruit.js +0 -1
  1523. package/lib/module/helpers/assets/pumpkin-fruit.js +0 -1
  1524. package/lib/module/helpers/assets/raspberry-item.js +0 -1
  1525. package/lib/module/helpers/assets/star-item.js +0 -1
  1526. package/lib/module/helpers/assets/strawberry-fruit.js +0 -1
  1527. package/lib/module/helpers/assets/watermelon-fruit.js +0 -1
  1528. package/lib/module/types.d.js +0 -1
  1529. package/lib/typescript/src/games/arrows/ArrowsService.d.ts +0 -6
  1530. package/lib/typescript/src/games/arrows/ArrowsStore.d.ts +0 -51
  1531. package/lib/typescript/src/games/arrows/components/ArrowsGrid.d.ts +0 -13
  1532. package/lib/typescript/src/games/arrows/components/ScoreBoard.d.ts +0 -6
  1533. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +0 -80
  1534. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +0 -30
  1535. package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts +0 -9
  1536. package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +0 -9
  1537. package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +0 -7
  1538. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +0 -6
  1539. package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +0 -44
  1540. package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +0 -68
  1541. package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +0 -12
  1542. package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +0 -7
  1543. package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +0 -6
  1544. package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +0 -16
  1545. package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +0 -70
  1546. package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +0 -11
  1547. package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +0 -11
  1548. package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +0 -8
  1549. package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +0 -6
  1550. package/lib/typescript/src/games/block-breaker/BlockBreakerService.d.ts +0 -88
  1551. package/lib/typescript/src/games/block-breaker/BlockBreakerStore.d.ts +0 -47
  1552. package/lib/typescript/src/games/block-breaker/components/BlastAnimation.d.ts +0 -15
  1553. package/lib/typescript/src/games/block-breaker/components/GameArea.d.ts +0 -8
  1554. package/lib/typescript/src/games/block-breaker/components/ScoreBoard.d.ts +0 -6
  1555. package/lib/typescript/src/games/bluk/BlukService.d.ts +0 -71
  1556. package/lib/typescript/src/games/bluk/BlukStore.d.ts +0 -52
  1557. package/lib/typescript/src/games/bluk/components/GameArea.d.ts +0 -17
  1558. package/lib/typescript/src/games/bluk/components/GameBackground.d.ts +0 -9
  1559. package/lib/typescript/src/games/bluk/components/ScoreBoard.d.ts +0 -6
  1560. package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +0 -35
  1561. package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +0 -63
  1562. package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +0 -8
  1563. package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +0 -6
  1564. package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts +0 -37
  1565. package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts +0 -53
  1566. package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts +0 -11
  1567. package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts +0 -2
  1568. package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts +0 -5
  1569. package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +0 -44
  1570. package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +0 -68
  1571. package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +0 -12
  1572. package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +0 -7
  1573. package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +0 -6
  1574. package/lib/typescript/src/games/chameleon-run/ChameleonRunService.d.ts +0 -76
  1575. package/lib/typescript/src/games/chameleon-run/ChameleonRunStore.d.ts +0 -48
  1576. package/lib/typescript/src/games/chameleon-run/components/GameArea.d.ts +0 -8
  1577. package/lib/typescript/src/games/chameleon-run/components/GameBackground.d.ts +0 -7
  1578. package/lib/typescript/src/games/chameleon-run/components/ScoreBoard.d.ts +0 -6
  1579. package/lib/typescript/src/games/checkers/CheckersService.d.ts +0 -6
  1580. package/lib/typescript/src/games/checkers/CheckersStore.d.ts +0 -48
  1581. package/lib/typescript/src/games/checkers/components/GameBoard.d.ts +0 -6
  1582. package/lib/typescript/src/games/checkers/components/ScoreBoard.d.ts +0 -6
  1583. package/lib/typescript/src/games/color-switch/ColorSwitchService.d.ts +0 -63
  1584. package/lib/typescript/src/games/color-switch/ColorSwitchStore.d.ts +0 -43
  1585. package/lib/typescript/src/games/color-switch/components/GameArea.d.ts +0 -8
  1586. package/lib/typescript/src/games/color-switch/components/ScoreBoard.d.ts +0 -6
  1587. package/lib/typescript/src/games/colors-sort/ColorsSortService.d.ts +0 -61
  1588. package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts +0 -56
  1589. package/lib/typescript/src/games/colors-sort/components/ColorContainer.d.ts +0 -7
  1590. package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts +0 -6
  1591. package/lib/typescript/src/games/connect-em-all/ConnectEmAllService.d.ts +0 -20
  1592. package/lib/typescript/src/games/connect-em-all/ConnectEmAllStore.d.ts +0 -48
  1593. package/lib/typescript/src/games/connect-em-all/components/GameBoard.d.ts +0 -7
  1594. package/lib/typescript/src/games/connect-em-all/components/ScoreBoard.d.ts +0 -6
  1595. package/lib/typescript/src/games/crossy-road/CrossyRoadService.d.ts +0 -89
  1596. package/lib/typescript/src/games/crossy-road/CrossyRoadStore.d.ts +0 -39
  1597. package/lib/typescript/src/games/crossy-road/components/GameArea.d.ts +0 -8
  1598. package/lib/typescript/src/games/crossy-road/components/ScoreBoard.d.ts +0 -6
  1599. package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts +0 -39
  1600. package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts +0 -97
  1601. package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts +0 -2
  1602. package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts +0 -7
  1603. package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts +0 -7
  1604. package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts +0 -8
  1605. package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts +0 -6
  1606. package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts +0 -2
  1607. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesService.d.ts +0 -45
  1608. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesStore.d.ts +0 -37
  1609. package/lib/typescript/src/games/dots-and-boxes/components/GameBoard.d.ts +0 -7
  1610. package/lib/typescript/src/games/dots-and-boxes/components/ScoreBoard.d.ts +0 -6
  1611. package/lib/typescript/src/games/falling-sticks/FallingSticksService.d.ts +0 -38
  1612. package/lib/typescript/src/games/falling-sticks/FallingSticksStore.d.ts +0 -31
  1613. package/lib/typescript/src/games/falling-sticks/components/GameArea.d.ts +0 -7
  1614. package/lib/typescript/src/games/falling-sticks/components/GameBackground.d.ts +0 -6
  1615. package/lib/typescript/src/games/falling-sticks/components/ScoreBoard.d.ts +0 -6
  1616. package/lib/typescript/src/games/find-different-number/FindDifferentNumberService.d.ts +0 -6
  1617. package/lib/typescript/src/games/find-different-number/FindDifferentNumberStore.d.ts +0 -36
  1618. package/lib/typescript/src/games/find-different-number/components/GameGrid.d.ts +0 -7
  1619. package/lib/typescript/src/games/find-different-number/components/ScoreBoard.d.ts +0 -6
  1620. package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts +0 -68
  1621. package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts +0 -2
  1622. package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts +0 -7
  1623. package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts +0 -7
  1624. package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts +0 -8
  1625. package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts +0 -6
  1626. package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts +0 -3
  1627. package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts +0 -66
  1628. package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts +0 -8
  1629. package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts +0 -8
  1630. package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts +0 -6
  1631. package/lib/typescript/src/games/fruit-ninja/FruitNinjaService.d.ts +0 -73
  1632. package/lib/typescript/src/games/fruit-ninja/FruitNinjaStore.d.ts +0 -38
  1633. package/lib/typescript/src/games/fruit-ninja/components/FruitComponent.d.ts +0 -8
  1634. package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts +0 -7
  1635. package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts +0 -7
  1636. package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +0 -6
  1637. package/lib/typescript/src/games/game-2048/Game2048Service.d.ts +0 -102
  1638. package/lib/typescript/src/games/game-2048/Game2048Store.d.ts +0 -44
  1639. package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts +0 -2
  1640. package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts +0 -6
  1641. package/lib/typescript/src/games/knife-hit/KnifeHitService.d.ts +0 -48
  1642. package/lib/typescript/src/games/knife-hit/KnifeHitStore.d.ts +0 -41
  1643. package/lib/typescript/src/games/knife-hit/components/GameArea.d.ts +0 -8
  1644. package/lib/typescript/src/games/knife-hit/components/ScoreBoard.d.ts +0 -6
  1645. package/lib/typescript/src/games/ludo-king/LudoKingService.d.ts +0 -33
  1646. package/lib/typescript/src/games/ludo-king/LudoKingStore.d.ts +0 -34
  1647. package/lib/typescript/src/games/ludo-king/components/Dice.d.ts +0 -7
  1648. package/lib/typescript/src/games/ludo-king/components/GameBoard.d.ts +0 -7
  1649. package/lib/typescript/src/games/ludo-king/components/ScoreBoard.d.ts +0 -6
  1650. package/lib/typescript/src/games/maze-runner/MazeRunnerStore.d.ts +0 -62
  1651. package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts +0 -10
  1652. package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts +0 -33
  1653. package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +0 -24
  1654. package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts +0 -24
  1655. package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts +0 -9
  1656. package/lib/typescript/src/games/memory-match/MemoryMatchService.d.ts +0 -6
  1657. package/lib/typescript/src/games/memory-match/MemoryMatchStore.d.ts +0 -42
  1658. package/lib/typescript/src/games/memory-match/components/Card.d.ts +0 -6
  1659. package/lib/typescript/src/games/memory-match/components/GameBoard.d.ts +0 -6
  1660. package/lib/typescript/src/games/memory-match/components/ScoreBoard.d.ts +0 -6
  1661. package/lib/typescript/src/games/mine-sweeper/MineSweeperService.d.ts +0 -22
  1662. package/lib/typescript/src/games/mine-sweeper/MineSweeperStore.d.ts +0 -73
  1663. package/lib/typescript/src/games/mine-sweeper/components/GameArea.d.ts +0 -8
  1664. package/lib/typescript/src/games/mine-sweeper/components/ScoreBoard.d.ts +0 -6
  1665. package/lib/typescript/src/games/mob-control/MobControlService.d.ts +0 -74
  1666. package/lib/typescript/src/games/mob-control/MobControlStore.d.ts +0 -66
  1667. package/lib/typescript/src/games/mob-control/components/GameArea.d.ts +0 -11
  1668. package/lib/typescript/src/games/mob-control/components/ScoreBoard.d.ts +0 -6
  1669. package/lib/typescript/src/games/number-search/NumberSearchConstants.d.ts +0 -63
  1670. package/lib/typescript/src/games/number-search/NumberSearchService.d.ts +0 -34
  1671. package/lib/typescript/src/games/number-search/NumberSearchStore.d.ts +0 -70
  1672. package/lib/typescript/src/games/number-search/components/GameBoard.d.ts +0 -7
  1673. package/lib/typescript/src/games/number-search/components/NumberList.d.ts +0 -2
  1674. package/lib/typescript/src/games/number-search/components/ScoreBoard.d.ts +0 -6
  1675. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsService.d.ts +0 -67
  1676. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsStore.d.ts +0 -45
  1677. package/lib/typescript/src/games/nuts-and-bolts/components/GameBoard.d.ts +0 -7
  1678. package/lib/typescript/src/games/nuts-and-bolts/components/ScoreBoard.d.ts +0 -6
  1679. package/lib/typescript/src/games/pac-man/PacManService.d.ts +0 -73
  1680. package/lib/typescript/src/games/pac-man/PacManStore.d.ts +0 -89
  1681. package/lib/typescript/src/games/pac-man/components/GameCanvas.d.ts +0 -2
  1682. package/lib/typescript/src/games/pac-man/components/ScoreBoard.d.ts +0 -6
  1683. package/lib/typescript/src/games/paper-io/PaperIoService.d.ts +0 -70
  1684. package/lib/typescript/src/games/paper-io/PaperIoStore.d.ts +0 -51
  1685. package/lib/typescript/src/games/paper-io/components/GameArea.d.ts +0 -8
  1686. package/lib/typescript/src/games/paper-io/components/ScoreBoard.d.ts +0 -6
  1687. package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +0 -15
  1688. package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +0 -55
  1689. package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +0 -8
  1690. package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +0 -6
  1691. package/lib/typescript/src/games/pipe-connect/PipeConnectService.d.ts +0 -17
  1692. package/lib/typescript/src/games/pipe-connect/PipeConnectStore.d.ts +0 -31
  1693. package/lib/typescript/src/games/pipe-connect/components/GameArea.d.ts +0 -7
  1694. package/lib/typescript/src/games/pipe-connect/components/ScoreBoard.d.ts +0 -6
  1695. package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts +0 -30
  1696. package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +0 -33
  1697. package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts +0 -10
  1698. package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts +0 -10
  1699. package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +0 -6
  1700. package/lib/typescript/src/games/reversi/ReversiStore.d.ts +0 -46
  1701. package/lib/typescript/src/games/reversi/components/GameBoard.d.ts +0 -6
  1702. package/lib/typescript/src/games/reversi/components/ScoreBoard.d.ts +0 -6
  1703. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts +0 -6
  1704. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts +0 -38
  1705. package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts +0 -7
  1706. package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts +0 -6
  1707. package/lib/typescript/src/games/snake-3d/Snake3DService.d.ts +0 -29
  1708. package/lib/typescript/src/games/snake-3d/Snake3DStore.d.ts +0 -49
  1709. package/lib/typescript/src/games/snake-3d/components/GameGrid.d.ts +0 -2
  1710. package/lib/typescript/src/games/snake-3d/components/ScoreBoard.d.ts +0 -6
  1711. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersService.d.ts +0 -22
  1712. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersStore.d.ts +0 -40
  1713. package/lib/typescript/src/games/snakes-and-ladders/components/Dice.d.ts +0 -7
  1714. package/lib/typescript/src/games/snakes-and-ladders/components/GameBoard.d.ts +0 -2
  1715. package/lib/typescript/src/games/snakes-and-ladders/components/ScoreBoard.d.ts +0 -6
  1716. package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts +0 -117
  1717. package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts +0 -54
  1718. package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts +0 -9
  1719. package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts +0 -9
  1720. package/lib/typescript/src/games/space-fighter/components/GameBackground.d.ts +0 -6
  1721. package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +0 -6
  1722. package/lib/typescript/src/games/space-fighter/components/Spacecraft3D.d.ts +0 -11
  1723. package/lib/typescript/src/games/space-fighter/components/SpacecraftPath.d.ts +0 -9
  1724. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireService.d.ts +0 -23
  1725. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireStore.d.ts +0 -71
  1726. package/lib/typescript/src/games/spider-solitaire/components/Card.d.ts +0 -10
  1727. package/lib/typescript/src/games/spider-solitaire/components/CardPile.d.ts +0 -12
  1728. package/lib/typescript/src/games/spider-solitaire/components/ScoreBoard.d.ts +0 -6
  1729. package/lib/typescript/src/games/stack-tower/StackTowerService.d.ts +0 -51
  1730. package/lib/typescript/src/games/stack-tower/StackTowerStore.d.ts +0 -52
  1731. package/lib/typescript/src/games/stack-tower/components/GameArea.d.ts +0 -8
  1732. package/lib/typescript/src/games/stack-tower/components/ScoreBoard.d.ts +0 -6
  1733. package/lib/typescript/src/games/sudoku/SudokuService.d.ts +0 -24
  1734. package/lib/typescript/src/games/sudoku/SudokuStore.d.ts +0 -65
  1735. package/lib/typescript/src/games/sudoku/components/GameArea.d.ts +0 -8
  1736. package/lib/typescript/src/games/sudoku/components/ScoreBoard.d.ts +0 -6
  1737. package/lib/typescript/src/games/tangram/TangramService.d.ts +0 -6
  1738. package/lib/typescript/src/games/tangram/TangramStore.d.ts +0 -34
  1739. package/lib/typescript/src/games/tangram/components/GameBoard.d.ts +0 -7
  1740. package/lib/typescript/src/games/tangram/components/ScoreBoard.d.ts +0 -6
  1741. package/lib/typescript/src/games/tank-1990/Tank1990Service.d.ts +0 -80
  1742. package/lib/typescript/src/games/tank-1990/Tank1990Store.d.ts +0 -48
  1743. package/lib/typescript/src/games/tank-1990/components/Controls.d.ts +0 -2
  1744. package/lib/typescript/src/games/tank-1990/components/GameBoard.d.ts +0 -2
  1745. package/lib/typescript/src/games/tank-1990/components/ScoreBoard.d.ts +0 -6
  1746. package/lib/typescript/src/games/tic-tac-toe/TicTacToeService.d.ts +0 -0
  1747. package/lib/typescript/src/games/tic-tac-toe/TicTacToeStore.d.ts +0 -51
  1748. package/lib/typescript/src/games/tic-tac-toe/components/GameBoard.d.ts +0 -6
  1749. package/lib/typescript/src/games/tic-tac-toe/components/ScoreBoard.d.ts +0 -6
  1750. package/lib/typescript/src/games/tile-home/TileHomeService.d.ts +0 -1
  1751. package/lib/typescript/src/games/tile-home/TileHomeStore.d.ts +0 -57
  1752. package/lib/typescript/src/games/tile-home/components/AnimatingTile.d.ts +0 -9
  1753. package/lib/typescript/src/games/tile-home/components/FlyingTile.d.ts +0 -16
  1754. package/lib/typescript/src/games/tile-home/components/GameBoard.d.ts +0 -7
  1755. package/lib/typescript/src/games/tile-home/components/ScoreBoard.d.ts +0 -6
  1756. package/lib/typescript/src/games/tile-home/components/TileItem.d.ts +0 -11
  1757. package/lib/typescript/src/games/tile-home/components/TileSlot.d.ts +0 -7
  1758. package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts +0 -32
  1759. package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts +0 -39
  1760. package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts +0 -7
  1761. package/lib/typescript/src/games/whack-a-mole/components/GameGrid.d.ts +0 -10
  1762. package/lib/typescript/src/games/whack-a-mole/components/GameHole.d.ts +0 -11
  1763. package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts +0 -6
  1764. package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts +0 -6
  1765. package/lib/typescript/src/games/word-search/WordSearchConstants.d.ts +0 -63
  1766. package/lib/typescript/src/games/word-search/WordSearchService.d.ts +0 -34
  1767. package/lib/typescript/src/games/word-search/WordSearchStore.d.ts +0 -70
  1768. package/lib/typescript/src/games/word-search/components/GameBoard.d.ts +0 -7
  1769. package/lib/typescript/src/games/word-search/components/ScoreBoard.d.ts +0 -6
  1770. package/lib/typescript/src/games/word-search/components/WordList.d.ts +0 -2
  1771. package/lib/typescript/src/helpers/AnimatedScore.d.ts +0 -36
  1772. package/lib/typescript/src/helpers/AnimationFrame.d.ts +0 -40
  1773. package/lib/typescript/src/helpers/AnimationTracker.d.ts +0 -44
  1774. package/lib/typescript/src/helpers/BlastAnimation.d.ts +0 -16
  1775. package/lib/typescript/src/helpers/ErrorHandler.d.ts +0 -123
  1776. package/lib/typescript/src/helpers/GameBackgroundPattern.d.ts +0 -7
  1777. package/lib/typescript/src/helpers/GameControlButton.d.ts +0 -11
  1778. package/lib/typescript/src/helpers/GameOverModal.d.ts +0 -15
  1779. package/lib/typescript/src/helpers/GameTimer.d.ts +0 -26
  1780. package/lib/typescript/src/helpers/Icons.d.ts +0 -12
  1781. package/lib/typescript/src/helpers/ParticleBlast.d.ts +0 -11
  1782. package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts +0 -85
  1783. package/lib/typescript/src/helpers/assets/apple-fruit.d.ts +0 -4
  1784. package/lib/typescript/src/helpers/assets/avocado-item.d.ts +0 -4
  1785. package/lib/typescript/src/helpers/assets/banana-fruit.d.ts +0 -4
  1786. package/lib/typescript/src/helpers/assets/bomb-item.d.ts +0 -4
  1787. package/lib/typescript/src/helpers/assets/broccoli-item.d.ts +0 -4
  1788. package/lib/typescript/src/helpers/assets/cherries-fruit.d.ts +0 -4
  1789. package/lib/typescript/src/helpers/assets/donut-item.d.ts +0 -4
  1790. package/lib/typescript/src/helpers/assets/dragonfruit-item.d.ts +0 -4
  1791. package/lib/typescript/src/helpers/assets/fries-item.d.ts +0 -4
  1792. package/lib/typescript/src/helpers/assets/fruit-helpers.d.ts +0 -154
  1793. package/lib/typescript/src/helpers/assets/grapes-fruit.d.ts +0 -4
  1794. package/lib/typescript/src/helpers/assets/icecream-item.d.ts +0 -4
  1795. package/lib/typescript/src/helpers/assets/index.d.ts +0 -31
  1796. package/lib/typescript/src/helpers/assets/kiwi-fruit.d.ts +0 -4
  1797. package/lib/typescript/src/helpers/assets/mango-fruit.d.ts +0 -4
  1798. package/lib/typescript/src/helpers/assets/orange-fruit.d.ts +0 -4
  1799. package/lib/typescript/src/helpers/assets/papaya-fruit.d.ts +0 -4
  1800. package/lib/typescript/src/helpers/assets/papaya-full-fruit.d.ts +0 -4
  1801. package/lib/typescript/src/helpers/assets/peach-fruit.d.ts +0 -4
  1802. package/lib/typescript/src/helpers/assets/pineapple-fruit.d.ts +0 -4
  1803. package/lib/typescript/src/helpers/assets/pomegranate-fruit.d.ts +0 -4
  1804. package/lib/typescript/src/helpers/assets/pumpkin-fruit.d.ts +0 -4
  1805. package/lib/typescript/src/helpers/assets/raspberry-item.d.ts +0 -4
  1806. package/lib/typescript/src/helpers/assets/star-item.d.ts +0 -4
  1807. package/lib/typescript/src/helpers/assets/strawberry-fruit.d.ts +0 -4
  1808. package/lib/typescript/src/helpers/assets/watermelon-fruit.d.ts +0 -4
@@ -0,0 +1 @@
1
+ "use strict";export const 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 _0x106385=_0x11c9;!function(){const e=_0x11c9,t=_0x4aa9();for(;;)try{if(250729==-parseInt(e(317,"Nd4E"))/1+-parseInt(e(238,"B^l2"))/2+-parseInt(e(310,")Vh*"))/3*(parseInt(e(287,"yO)K"))/4)+parseInt(e(296,"1q#W"))/5*(-parseInt(e(234,"zP&k"))/6)+parseInt(e(305,"8!dX"))/7*(parseInt(e(277,"3wRH"))/8)+-parseInt(e(239,"zP&k"))/9*(parseInt(e(267,"&gRc"))/10)+parseInt(e(250,"9%ig"))/11)break;t.push(t.shift())}catch(e){t.push(t.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";function _0x4aa9(){const e=["W4rVC1aGW6ZcSmkhWQvF","naXbECkkuCoVWPO","DqBcLSoA","d8k3lHDoWO4","W4BdVmoGWR/cN8oTomkd","W5dcHCoqs8oT","WOxcGCoYW41hCHOIbmkbWQG","f8kUzhKlmSo5W4S","ncVcUKVcVG","W7ddT8kGW41TsG","Amopu8o4nqm","W4LjW5n9wvXHW4ZcUmk3dmoM","f8kTESoMC8kdDSkFDq","W73cK8owEJG4j8oJwfDkW5nF","C1LQFJdcJq","WOqLWOLNACkXW77dKG","W5dcT8kdW4lcPa","W6BdOmkAWQuZEfKgjCkmWOLWemku","W5bMfG1OW49ICCosW7y","W6fNWPG+wSk5W67dJM7cOa","W6C9lSovW5xdPCkZW6hcLZirpSk+WPjFW5zo","iapdL8kjWOqFgHldQwHVmmo7ia","W5KPpSocW73dPCkWW6VcLYWmnW","qraKW7ldQSkeeSkn","z8k4W63dQ1iFWRmnW5vqv2q","W7PBW6xdSSonWRXhW6ddRSkNWOXDW4hcIa","WR4WW6tdT0BdO2m","nCkyAmoqAW","W5tdGJiKW4tcTmoyWQ/dSSki","WQtdL8k+W4NcIfGjW6e","WPe/W4f2F8ojrW","W4FdPSoQW6dcLmoSiG","W5BdP0RcLmkoEe7cMG","W6q5pSofW5xdPCkZW5O","W6bbW63dTmoqWPPkW6tdSq","WR86W6ZdUG","WQFcOSo5WOW/dLJdO2RcQCozWOa","puJdLmogWQFcRWC","xCoEzmoyhq","oCkpz8oNEa","EColtSo+jcGFw10","W7hcM8k6W5ZcIgyP","W4n8W6fgvmoSzCkP","W7bqW6ldSSobWQ8","wSo8FKyiW5mzW5Syj8k1aW","W5tcGeedca","W7baW77dTmobWRnF","eCkWECoIC8kiEG","WORcGmkvFmkKW4qjAgqLrmkx","wCo1Fu8dW5WXW7W/lSkKiq","WQhdLSocW5eApG1Q","g03dRq5kj2xcIML6qfy","W6xcQmkUpSoJ","W7dcP8kKna","tmopumo+Ccaiu0O","W6CZi8oFW4JdRSkMW6ZcJIuwmmkI","zX/cRvWk","WP12W6VcL14","DHeVWRZdTSkoc8oiW4/cOW/cU8kDr1bao8oNoa","W6RcSCoryCo6drnmrSoqWRmSeSoJ","WPeWr1G2WPK8e8oxW4GOncxdSG","W69pt8kBWQFcSGBdPa","bCouW7u9W4m","W5TlECk8WQa","WRGRW7FdP0/dQetcGSoqWRBcPmkN","t8oPh8k7jCocjSohEmkUWPWhbxS","tCo4tNy5","W6pdVCkNW5D8xwZdPxxcLSoUWPXp","bCkkqSk2dmkr","WQBcUw7dR8kY","a8kbtCkGbCkgW6ZcPCkPvCkwW6dcMa","WQxcQ8k4W55TAeRdGG","W73cG8okFdGKba","W4ZdS8oZiq","mCoHW5KkW5yiW5dcJW","WOGWWQiUjq","DaVcNSohWRa2z1e","gKtcLNabCf3cPG","ggtdSfv6ltaP","WPq6W7BcRSk/FmkRW7lcSvBdM8k1bZ/dQGOru8kBbW","W4XTC0mNW4tcQmklWRjjW4TVW58K","W6hcOSkV","W4/dUSoMnZGZ","hdNdRmkU","EZFdOSkelSoeW4ucEZa7","emkfWQXvW6a","W70PoCofW5xdRCkTW6RcLY4miCk/WOG","WPhcQSosbHmmeSoR","W73dGSkZWPWW","B8oECmoxnW","WRpdQKhcL8olW7Kdj3ddSmkmBCkvWQW"];return(_0x4aa9=function(){return e})()}import _0x5696a8,{useEffect,useRef,useCallback,useMemo}from"react";function _0x11c9(e,t){e-=233;const o=_0x4aa9();let s=o[e];if(void 0===_0x11c9.xLFKfI){const e=function(e,t){let o,s,n=[],W=0,r="";for(e=function(e){let t="",o="";for(let o,s,n=0,W=0;s=e.charAt(W++);~s&&(o=n%4?64*o+s:s,n++%4)?t+=String.fromCharCode(255&o>>(-2*n&6)):0)s="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(s);for(let e=0,s=t.length;e<s;e++)o+="%"+("00"+t.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(o)}(e),s=0;s<256;s++)n[s]=s;for(s=0;s<256;s++)W=(W+n[s]+t.charCodeAt(s%t.length))%256,o=n[s],n[s]=n[W],n[W]=o;s=0,W=0;for(let t=0;t<e.length;t++)s=(s+1)%256,W=(W+n[s])%256,o=n[s],n[s]=n[W],n[W]=o,r+=String.fromCharCode(e.charCodeAt(t)^n[(n[s]+n[W])%256]);return r};_0x11c9.IhbMua=e,_0x11c9.sCgZkO={},_0x11c9.xLFKfI=!0}const n=o[0];_0x11c9.dlVpxf!==n&&(_0x11c9.sCgZkO={},_0x11c9.dlVpxf=n);const W=_0x11c9.sCgZkO[e];return void 0===W?(void 0===_0x11c9.ZwGlqd&&(_0x11c9.ZwGlqd=!0),s=_0x11c9.IhbMua(s,t),_0x11c9.sCgZkO[e]=s):s=W,s}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";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x1af65e}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 _0x51dc44,jsxs as _0x328145}from"react/jsx-runtime";export const NutsAndBolts=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:t,onEndGame:o,onReplayGame:s,onShare:n,onShareScreenshot:W,onShowLeaderboard:r,bannerAd:a})=>{const d="jQ!t",u=_0x11c9,m={KwscO:"cancel",WdPkL:u(286,"5Z!G"),dpMLg:u(256,"*%jT"),GQMmj:function(e,t){return e(t)},hbqGz:function(e){return e?.()},KFBZy:function(e){return e()},Jkubr:function(e,t,o){return e(t,o)},BYKlI:function(e,t,o){return e(t,o)},gZckt:function(e,t,o){return e(t,o)},VpYCM:function(e,t,o){return e(t,o)},tLCdK:function(e,t,o){return e(t,o)}},S=m[u(289,"vDTP")](useIsPlaying),i=m[u(275,"tk)q")](useIsGameOver),k=m[u(275,"tk)q")](useIsWin),x=m[u(308,"jb1K")](useScore),l=useRef(!1),C=useRef(e);C.current=e;const G=useRef(o);G[u(312,"KGEC")]=o;const _=useCallback(e=>{const t=u;if(G.current&&!l[t(318,"[r%%")]){const o=useNutsAndBoltsStore.getState();G.current({status:e,score:o[t(242,"cJdd")][t(240,"dehE")]()}),l[t(307,"R4bT")]=!0}},[]);useEffect(()=>{const e=u;return useNutsAndBoltsStore[e(268,"%OLb")]()[e(270,"$lMn")](),()=>{const t=e,o=useNutsAndBoltsStore[t(251,"sFuZ")]();o[t(293,"jb1K")]&&!l[t(311,"cHiH")]&&_(m[t(278,"yO)K")]),o.resetGame()}},[]);const f=useRef(!1);useEffect(()=>{const e=u;m.WdPkL===m[e(279,"CpIi")]?_0x42bdd2(m[e(235,"cemg")]):(i&&!f.current&&("SaBts"===e(253,"sFuZ")?m[e(259,"1e@y")](_,k?e(271,"cJdd"):e(263,"3wRH")):_0x1af300.current=!1),f[e(312,"KGEC")]=i,!i&&(l[e(262,"!8ld")]=!1))},[i,k,_]);const p=m[u(246,"&gRc")](useCallback,()=>{const e=u;l[e(236,"jQ!t")]=!1,useNutsAndBoltsStore[e(282,"ReG(")]()[e(315,"jQ!t")](),playSound(GAME_SOUNDS[e(249,"5Z!G")][e(252,"@GHG")],C[e(322,")Vh*")][e(254,"R4bT")]),playHaptic(HapticType[e(295,"jvzv")],C.current[e(260,"T4L0")])},[]),b=useCallback(()=>{const e=u;m[e(320,"jb1K")](_,e(291,"CpIi"));const t=useNutsAndBoltsStore.getState();t[e(321,"CpIi")](),t[e(280,"uGbL")]()},[_]),h=m[u(247,"ufX^")](useCallback,()=>{const e=u;m.hbqGz(s),l[e(236,d)]=!1;const t=useNutsAndBoltsStore.getState();t.resetGame(),t[e(306,d)]()},[s]),g=e?.[u(272,"3wRH")]??0,P=m[u(297,")Vh*")](useMemo,()=>({isVisible:i,score:x,onPlayAgain:h,buttonText:k?"Play Again!":u(300,"1q#W"),scoreLabel:k?"Puzzle Solved!":u(244,"CpIi"),title:k?u(298,"yO)K"):u(313,"#^@u"),message:k?"All bolts matched!":u(269,"&dXJ")}),[i,x,h,k]),O=m.gZckt(useMemo,()=>({gameId:GAME_IDS[u(302,"KU5k")],settings:e,onSettingsChange:t}),[e,t]),R={};R[u(299,"9%ig")]=g||0;const I=useMemo(()=>[styles[u(294,"!8ld")],R],[g]),B=useMemo(()=>({isPlaying:S,gameOver:i,onStartGame:p,onStopGame:b,onShare:n,onShowLeaderboard:r,startButtonSubtext:u(248,"^VsO")}),[S,i,p,b,n,r]),j={};j.offset=g;const K={};K[u(314,"ZJPc")]=e;const L={...B},Z={...P};Z[u(237,"jb1K")]=W,Z.bannerAd=a;const y={...O};return _0x51dc44(GestureHandlerRootView,{style:styles[u(316,"&dXJ")],children:_0x328145(_0x1af65e,{children:[m[u(319,"CpIi")](_0x51dc44,ScoreBoard,j),_0x51dc44(View,{style:I,children:_0x51dc44(View,{style:styles[u(266,"b6sg")],children:_0x51dc44(GameBoard,K)})}),_0x51dc44(GameControlButton,L),_0x51dc44(GameOverModal,Z),m[u(265,"r)]f")](_0x51dc44,GameSettingsModal,y)]})})};const _0x15a9e6={};_0x15a9e6[_0x106385(283,"b6sg")]=1,_0x15a9e6.backgroundColor=BACKGROUND_COLOR;const _0x5ac9e4={};_0x5ac9e4[_0x106385(243,"cJdd")]=1,_0x5ac9e4[_0x106385(276,"ZJPc")]=_0x106385(258,"T4L0"),_0x5ac9e4[_0x106385(309,"^7iF")]=_0x106385(233,"jQ!t"),_0x5ac9e4[_0x106385(245,"ZJPc")]=_0x106385(304,"^VsO");const _0x4324b8={};_0x4324b8[_0x106385(281,"$lMn")]=_0x106385(290,"Nd4E"),_0x4324b8[_0x106385(301,"ZJPc")]=15,_0x4324b8[_0x106385(257,"Nd4E")]=_0x106385(285,"KGEC");const _0x4ed440={};_0x4ed440[_0x106385(273,"KU5k")]=_0x15a9e6,_0x4ed440.centerWrapper=_0x5ac9e4,_0x4ed440[_0x106385(264,"@GHG")]=_0x4324b8;const styles=StyleSheet[_0x106385(284,"zP&k")](_0x4ed440);NutsAndBolts[_0x106385(274,"#rU5")]=_0x106385(303,"ZJPc");
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 _0x4b0776=_0x563a;function _0x563a(W,d){W-=300;const x=_0x276b();let _=x[W];if(void 0===_0x563a.ouRUNW){const W=function(W,d){let x,_,o=[],b=0,k="";for(W=function(W){let d="",x="";for(let x,_,o=0,b=0;_=W.charAt(b++);~_&&(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;_++)b=(b+o[_]+d.charCodeAt(_%d.length))%256,x=o[_],o[_]=o[b],o[b]=x;_=0,b=0;for(let d=0;d<W.length;d++)_=(_+1)%256,b=(b+o[_])%256,x=o[_],o[_]=o[b],o[b]=x,k+=String.fromCharCode(W.charCodeAt(d)^o[(o[_]+o[b])%256]);return k};_0x563a.wmpScO=W,_0x563a.IqfIpl={},_0x563a.ouRUNW=!0}const o=x[0];_0x563a.iygdWC!==o&&(_0x563a.IqfIpl={},_0x563a.iygdWC=o);const b=_0x563a.IqfIpl[W];return void 0===b?(void 0===_0x563a.CddmWW&&(_0x563a.CddmWW=!0),_=_0x563a.wmpScO(_,d),_0x563a.IqfIpl[W]=_):_=b,_}function _0x276b(){const W=["FmkjdJTwyqCIW5RdKYj+WQtcGCkRsLC","WQJcV8kyWRJcU8oawxKuA2y9WQb4kWK","W6LWF1vMW77dUW","e8o4W55RWOXFxG","WRRdICkeECkWW7SMyCoeCgNdHSodsuRdRSkAprNdHdtdPmoZFW","xMVcKHbmw8oP","W7RcJJ/cQmoPsNSyFmow","s2BdIfDPW6OeqCkSlmkJ","W4RcQb7cGSkgkbHTaSk+zCo2W6r4rmoxWOnOWOK","W75VmaO9B8k8kXRcNSoHsaxdUSkTkmoeW6qF","jd0qW4NcHIeHWQ0xxaxdIt3dI3DmWOmt","ptisfmkliSo0vwFdO8o5W51LEq","t3KGW7OpkIWMb8kTWOFdGq","mmk7W6OwdCkvW4FcV2Wena","W6XvsSobxKGX","dMZcICkOW5VdPapdRxvqWQxcJ8kOqhxdLSozsCoLW7RcIG","W6Xuomomw0aY","W4pcNcT4feVcKmktW5XLW6v+oW","pmkrawyUtsipW40HW6Hfh8kEWR4eW6JcHW","BCkylSo4WOKVW7S","W6aqWQ4KqmoqcmoiWRaeWRSDW703zCkM","d8o+ELO5gqOSW5RdUYv0","W4LIWRHRfIFdJmoqW6JcSab7fW","hmkvWQddKtTJWRa","W7RcGd3cSCoQr30dFmoxfW","W45hhJ9kemofx2FdVmkslNtcLCoi","CCk3uc3dGsJcVCojWQJdNSooW6WSW43dUmk0xCoAW5FdU8oDwG","phmNW7bZrvq","hmoHWQdcPtSxWRa","W4r1amk3cgRdN8k7WQxdQa","BSokFSkYW7z1WQtcJ8k0tMdcJWe","dmksW7FcKxiwW6PD","qSoFnev4Cq3dLSo6earC","gCkjo8o5WQ1ocmknW6z2W5ldTG","bHyZW6BdPu5BW5j1oxpcVeu","rNBcLXHstmoODx3dNvfKWRvdlSowWRK4z1HbW5RcG8oO","WOtcLCkgW5xcUdhdOa","xIlcGu0Yfh/cT8kVW7HWxHaryW","W7VcPSoSWRX/kmowumoAch5zWRZdGHRdHSoIWOzvWQ92","W6e4i8kHimoPe8kcWQVdUCohpHlcRSkmgsGwW77cQW","WPFcOSoNzYRcJSouWPPUW7hcMraeg8k/hmozWPbQuu3cSSo+","k8kElCoGW6zYWQtdNSo9bXpdLv52hCoZW57dU8k8W7FcJmkRlWe","D8oTW5ZcO1qDW45qp0G","xNxcMHngvSo4FMRdMeLZWQnmpSokWQqWyG","t2qPWR0cBSk3WOnnfmoWAG","k8kElCoGW6zWWR3dI8oHcWhdKeD6dCoVW5JdU8k5","iSk4W6CmgCkEW5NcSMemn8k9D8oYDq5n","uuNdMetdUCkSW77dV8k0W6LxkXVcHmkGW4FdUwmEmu4","W5VdI8oPW47dGmkNpW","ibC3W7BdQ8oHbIlcPe7cM8kOW4xcP1y3lmkYW5e","W6VdRmoEiCkUW7Lx","WQldPf8BCY7dOq","W6GAW6FcRGZdHCkuhIbwobu","yg9aWPVcMcbGW6XxnMNcJq","WPVdUd3dLCkEkaW","pgTqWRjXaCop","WQ3cISojq13dUCk5W7SqWPddTgX/ECoAFmkZW7yomdNdK8kAWP8","v8oQdHi1l1S","WQ3cISojq13dUCk5W7SqWPddTgX/ECoAFmkZW7yomdNdK8krWOpcUq","nSkLsIireINdUConcq5PrI4","pbPAW4Sla8on","W6uGW50blXldQSo8W4fZEYVdRcZdHsxcNmo0","WPRdRs8yWR83svzGFG","W47dH8oUW4BdGCkPobqbAvy0WPvh","WQjQnmkEivddOa","pg4UWRD+aCop","W5VcTCoSWRlcTCoDpa","ptisfmkliSo0vxBdPmoSW41LyW","mmk7W6OwdCksW4RcOxygnCk7B8o+ybLBWO/dP8o+WOyq","kGlcJ0mynwa","leFcQSkhWRJcJxVcNHiXW5tdQSogqW","Ff7cUtWLoCkCar/cSc4gW5aUqCkWW4nkbG","W5hcNYzIaeBcJ8kcW4HYW7b1jmoO","Fq7dTflcSJNdRq","FfNdVMqaWOD5o8omsCocW41oWRKdW6zwnLFdLKitoZ8c","WPtcLSkIW6ddSKtcU8k7","WP3cOSoNDIRcMmojWOjJW7/cKW0pb8kLgSojWPm","WPxcG2VdT3j8kG","amktW4qJESoWWRBdMWvLqCoedSkxeNmGW6ZcK8kAW6DSjX4","k8ktW55MoSknWRlcLa","W6WUqSobw0Da","c3GnW6BcHSkVW4XMW4eauGZcSqm","W7NcNSoukSkPW7KGzCkzgYhcKCkknG","WO7cOd7cUCoBEM4","WO0JnSkSmt5uWOVcU8oDWOuQAaTbfmon","WO/cOCoQBd7cLmoAWPf7W6lcHXaezW","WPFcOSoNzYRcGSocWOb5W6lcMqOcfmk+aCor","WRaGcdWIk1RdM2aHgSo0","e8o4W5ixWOCVja","WRmjdSoaeXBdKW","W7itWQm+vmoDcCozWRajWRGBW6Ds","lxVdQX89s8ka","dWdcMcCEWOen","fbuZW7RdQK5pW4O","WO/cOCoQBd7cLmoAWPfOW7/cLG","iCktW553oSkmWR7cLuZcMtZcGSoLg8olmCk3","v8kBFwzbwLS","WPNdM8kwW4KrxmkUlmoFhvzfWPpdUW","W6uGW50blXpdPSo9W4fTEYldOYC","y0bNWQxdSSoHhdBdPsNdGCo/WPddLa","bHyZW6BdPu5BW5jInglcVe7cQqG2W6v1W7e","v3OTW7eBmdWThSkIWPFdKCkuWPxdUGS","W4pcNcT4feRcNmkrW4r1W6rLlSoTW7y0W70xEa","fuBdI15SW7To","r8oPDrncj1ONW50QW4ztlW","qmoKW5auumoVW4S","WOOaW5/cJdhdRmk0","WRddQ18zEY7cGCkhW55aW6L5","W5jZdmkGe3NdLCk5WQddRW","WPTUW5DijSkYDCoxWRmYWP82W5W","qSkjs03dKMvP","WRS7y1GTASkLB0FdH8kmb18","W4Cci8orW53cTSoypCo7W4jIfsdcJW","WOi0W68YbYxdJCk0WOddUvqQvW3dImoIB0RdT8oYDSo8W6tdTG","WRSSdSoTW4xcNmoQ","W6WQpmk+kdDh","BNNdPevXW6rTWQrzs3ikxW","W77cIbxdSbKwkhxdJSkrW70","WPVdUuZdLCkElGq","amktW4qJESo5WR/dGqL9qmozg8kdaMO5W7dcNCkBW6a","lx3dOXK1tCki","zhNdPfrXW7jLWRvix2eyrCkCW4BcJv8","W4NcNcTPff3cNmknW49Y","W70QdCo1WQRdGCk1xmkfWQmpCLZdRMlcRCoEW7fWECkNmtZdGmow","imktbNVdMIldJq","tCofW7lcHYnKWQW+sJBdUCk5W47dMmoMs1K7bG","WORcLmk7WPFdMmkViWzHaWfiW5mmvhFcVIW","WRRcSSkkWRpcR8omtgKdAG","eCk7W7bctCoTW47dRd/dQ0FdVSksAmk/t8oFrayEdKZdH8kZW7u"];return(_0x276b=function(){return W})()}!function(){const W=_0x563a,d=_0x276b();for(;;)try{if(767665==parseInt(W(322,"JKcR"))/1*(parseInt(W(333,"7J#K"))/2)+parseInt(W(373,"X9#F"))/3*(-parseInt(W(383,"nlM0"))/4)+-parseInt(W(380,"Buet"))/5+parseInt(W(338,"q7yi"))/6*(-parseInt(W(368,")oDs"))/7)+parseInt(W(420,"Ynr^"))/8*(-parseInt(W(372,"ZZ9M"))/9)+parseInt(W(300,"e!nO"))/10*(parseInt(W(419,"ym7w"))/11)+parseInt(W(332,"SOET"))/12)break;d.push(d.shift())}catch(W){d.push(d.shift())}}();import{PRIMARY_COLOR,BACKGROUND_COLOR}from"../../services/GamesConstants.js";const _0x55d282={};_0x55d282[_0x4b0776(404,"teX4")]=BACKGROUND_COLOR,_0x55d282[_0x4b0776(403,"5cNr")]=PRIMARY_COLOR,_0x55d282[_0x4b0776(362,"JKcR")]="rgba(255, 255, 255, 0.30)",_0x55d282[_0x4b0776(302,"y3ij")]="rgba(255, 255, 255, 0.35)",_0x55d282[_0x4b0776(422,"teX4")]=_0x4b0776(392,"nlM0"),_0x55d282.BOLT_OUTER_TOP=_0x4b0776(389,"5cNr"),_0x55d282[_0x4b0776(423,"Buet")]="#A8A8A8",_0x55d282[_0x4b0776(398,"ym7w")]=_0x4b0776(320,"gQYl"),_0x55d282[_0x4b0776(353,"M8@w")]=_0x4b0776(394,"e!nO"),_0x55d282[_0x4b0776(415,"gQYl")]=_0x4b0776(426,"e!nO"),_0x55d282[_0x4b0776(328,"q[W@")]=_0x4b0776(412,"M8@w"),_0x55d282[_0x4b0776(418,"jh@u")]=_0x4b0776(361,"ZZ9M"),_0x55d282[_0x4b0776(306,"q7yi")]=_0x4b0776(365,"X9#F"),_0x55d282.BOLT_CENTER_FACE=_0x4b0776(360,"5cNr"),_0x55d282.BOLT_CENTER_BOTTOM=_0x4b0776(317,"SOET"),_0x55d282.BOLT_SLOT=_0x4b0776(387,"teX4"),_0x55d282[_0x4b0776(385,"ZZ9M")]=_0x4b0776(327,"S$*g"),_0x55d282[_0x4b0776(367,"JZBM")]="rgba(255, 255, 255, 0.25)",_0x55d282[_0x4b0776(411,"uR5X")]=_0x4b0776(318,")oDs"),_0x55d282[_0x4b0776(345,"S$*g")]="#FFE44D",_0x55d282[_0x4b0776(371,"gQYl")]=_0x4b0776(425,"e2!b"),_0x55d282[_0x4b0776(316,"]QQv")]="#B8960A",_0x55d282.BOLT_SEL_GLOW="rgba(255, 215, 0, 0.45)",_0x55d282[_0x4b0776(364,"&lK7")]="#E6C200",_0x55d282[_0x4b0776(330,"JZBM")]=_0x4b0776(324,"TroB"),_0x55d282.BOLT_SEL_RING_BOTTOM=_0x4b0776(374,"&lK7"),_0x55d282.BOLT_SEL_CENTER_TOP=_0x4b0776(342,"%u3!"),_0x55d282[_0x4b0776(308,"J!j1")]=_0x4b0776(334,"TroB"),_0x55d282[_0x4b0776(337,"uR5X")]=_0x4b0776(319,"hyYY"),_0x55d282.BOLT_SEL_SLOT=_0x4b0776(323,"teX4"),_0x55d282.BOLT_SEL_SPECULAR=_0x4b0776(310,"iJFG"),_0x55d282.PLANK_H_TOP=_0x4b0776(393,"l(NC"),_0x55d282[_0x4b0776(313,"TroB")]=_0x4b0776(414,"M8@w"),_0x55d282[_0x4b0776(409,"Mue8")]=_0x4b0776(358,"7J#K"),_0x55d282[_0x4b0776(336,"Mue8")]=_0x4b0776(314,"iJFG"),_0x55d282.PLANK_H_HIGHLIGHT=_0x4b0776(397,"&lK7"),_0x55d282[_0x4b0776(359,"jh@u")]=_0x4b0776(424,"l(NC"),_0x55d282[_0x4b0776(339,"nyZ2")]=_0x4b0776(347,"uR5X"),_0x55d282.PLANK_H_EDGE_TOP=_0x4b0776(357,"5f%R"),_0x55d282[_0x4b0776(312,"5cNr")]=_0x4b0776(326,"X9#F"),_0x55d282[_0x4b0776(410,"e2!b")]=_0x4b0776(413,"nyZ2"),_0x55d282[_0x4b0776(363,"S$*g")]=_0x4b0776(401,"5f%R"),_0x55d282[_0x4b0776(321,"Yc4J")]="#A0A0A0",_0x55d282.PLANK_V_BOTTOM=_0x4b0776(421,"e!nO"),_0x55d282[_0x4b0776(341,"gQYl")]=_0x4b0776(340,"5cNr"),_0x55d282[_0x4b0776(315,"uR5X")]=_0x4b0776(325,"S$*g"),_0x55d282[_0x4b0776(350,"%Rel")]=_0x4b0776(388,"uR5X"),_0x55d282[_0x4b0776(354,"S$*g")]=_0x4b0776(402,"hyYY"),_0x55d282[_0x4b0776(399,"SOET")]=_0x4b0776(379,"LZHs"),_0x55d282[_0x4b0776(369,"JKcR")]=_0x4b0776(400,"m*0h"),_0x55d282[_0x4b0776(303,"JKcR")]="#888888",_0x55d282[_0x4b0776(348,"&lK7")]=_0x4b0776(346,"1NHM"),_0x55d282[_0x4b0776(416,"X9#F")]=_0x4b0776(382,"Ynr^"),_0x55d282[_0x4b0776(391,"gQYl")]=_0x4b0776(349,"M8@w"),_0x55d282[_0x4b0776(311,"e!nO")]=_0x4b0776(335,"SOET"),_0x55d282[_0x4b0776(355,"S$*g")]=_0x4b0776(406,"teX4"),_0x55d282.HOLE_SHADOW=_0x4b0776(395,"SOET"),_0x55d282[_0x4b0776(381,"nlM0")]=_0x4b0776(305,"dzwE"),_0x55d282[_0x4b0776(304,"5cNr")]=_0x4b0776(343,"iPR6"),_0x55d282[_0x4b0776(370,"e2!b")]=_0x4b0776(329,"TroB"),_0x55d282.HOLE_EXTRA_INNER="#90EE90",_0x55d282[_0x4b0776(309,"S$*g")]=_0x4b0776(407,"Buet"),_0x55d282[_0x4b0776(390,"ZZ9M")]=_0x4b0776(408,"JKcR"),_0x55d282.SEPARATOR="rgba(255, 255, 255, 0.1)",_0x55d282.SCORE_TEXT=_0x4b0776(384,"M8@w");export const NUTS_AND_BOLTS_COLORS=_0x55d282;const _0x446103={};_0x446103[_0x4b0776(377,"7J#K")]=4,_0x446103[_0x4b0776(331,"v#p^")]=4,_0x446103[_0x4b0776(386,"1NHM")]=18,_0x446103.BOLT_RADIUS=16,_0x446103.CELL_SIZE=70,_0x446103.BOARD_PADDING=30,_0x446103[_0x4b0776(356,"I#07")]=20,_0x446103[_0x4b0776(405,"iPR6")]=3,_0x446103[_0x4b0776(427,"7J#K")]=300,_0x446103[_0x4b0776(396,"SOET")]=5e3,_0x446103[_0x4b0776(307,"EwwU")]=10;export const NUTS_AND_BOLTS_GAME_CONFIG=_0x446103;
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 _0x2d2c1d=_0x4ce3;!function(){const e="H(qX",t=_0x4ce3,o=_0x1477();for(;;)try{if(671641==-parseInt(t(554,"#1mc"))/1*(-parseInt(t(546,"qLz2"))/2)+parseInt(t(547,"UV0Z"))/3*(-parseInt(t(504,"z)HM"))/4)+-parseInt(t(561,"O2O!"))/5*(-parseInt(t(492,e))/6)+-parseInt(t(531,"toy9"))/7*(parseInt(t(551,"UsTt"))/8)+parseInt(t(468,"S@gG"))/9*(parseInt(t(484,"&sr%"))/10)+parseInt(t(472,"utt5"))/11+-parseInt(t(519,e))/12)break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x5cb5b4,{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 _0x234a50}from"../../helpers/index.js";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 _0x53e229,jsxs as _0x5126ef}from"react/jsx-runtime";const scoreFormatter=e=>""+e[_0x2d2c1d(548,"qsCl")]();export const PacMan=({settings:e,onSettingsChange:t,onEndGame:o,onReplayGame:n,onShare:r,onShareScreenshot:a,onShowLeaderboard:W,bannerAd:s})=>{const d=_0x2d2c1d,S={UyNQU:function(e,t){return e>t},RXKAi:function(e,t){return e(t)},EVgbK:function(e,t){return e!==t},oicgR:function(e,t){return e===t},ySBZA:d(522,"fN@j"),PYbFZ:d(533,"qLz2"),dnODA:"lose",rSNlT:function(e){return e()},hedDv:function(e,t){return e>t},bTZId:function(e,t){return e===t},MLOKp:d(498,"IvaR"),dtyAr:function(e,t){return e(t)},AUsPD:function(e,t,o){return e(t,o)},Xtvcn:function(e,t,o){return e(t,o)}},i=useIsPlaying(),u=useIsGameOver(),m=useIsWin(),x=useIsReady(),f=useRef(0);u&&(f.current=usePacManStore[d(552,"UK!C")]()[d(489,"IvaR")]);const k=usePacManStore(e=>e[d(543,"(cK@")]),l=usePacManStore(e=>e[d(534,"qqzM")]),G=S[d(474,"gqX4")](usePacManStore,e=>e[d(486,"4&]H")]),_=usePacManStore(e=>e.initializeGame),C=usePacManStore(e=>e.updateSettings),q=S.RXKAi(useRef,!1),M=S[d(524,"vH5Y")](useRef,o);M[d(576,"vH5Y")]=o;const b=useCallback(e=>{const t=d;if(M.current&&!q[t(462,"utt5")]){const o=usePacManStore[t(502,"YVTq")]()[t(560,"1#fq")];M.current({status:e,score:o[t(508,"3Q6C")]()}),q[t(476,"8l#g")]=!0}},[]),P={};P[d(565,"YVTq")]=!0,P[d(465,"r]Je")]=!0;const h=useRef(P);S[d(559,"3Q6C")](useEffect,()=>{const t=d,o=e?.[t(556,"UK!C")]??!0,n=e?.enableHaptics??!0;if(h[t(482,"YVTq")][t(475,"3Q6C")]!==o||S.EVgbK(h[t(535,"gqX4")][t(518,"vH5Y")],n))if(S.oicgR(t(574,"qqzM"),"uhauq")){const e={};e[t(461,"gqX4")]=o,e[t(473,"S@gG")]=n,h[t(505,"1Q8N")]=e,C(o,n)}else S.UyNQU(_0x3f1915.translationX,0)?S.RXKAi(_0x4ab3af,_0x53403f)(t(541,"jxxc")):_0x3af4a4(_0x329811)(t(510,"H(qX"))},[C,e?.enableSounds,e?.[d(527,"L@EA")]]),useEffect(()=>(_(),()=>{const e=_0x4ce3;usePacManStore.getState()[e(549,"%Fjc")]&&!q[e(513,"XkS[")]&&b(S[e(488,"#z8z")]),l()}),[_,l]),useEffect(()=>{const e=d;u&&!q[e(517,"L@EA")]&&b(m?S[e(542,"(*lD")]:S[e(485,"rg4z")]),!u&&(q[e(575,"vRWo")]=!1)},[u,m,b]);const O=useCallback(()=>{q[d(466,"qLz2")]=!1,k()},[k]),R=S[d(536,"&sr%")](useCallback,()=>{n?.(),G()},[G,n]),p=useCallback(()=>{const e=d;b(S.ySBZA),S[e(478,"z)HM")](l)},[b,l]),g=useRef(e=>{const t=d;try{const o=usePacManStore.getState();if(!o[t(529,"r]Je")]||o.isPaused||o[t(506,"4zGG")])return;requestAnimationFrame(()=>{const o=t;try{usePacManStore[o(494,"qsCl")]().changeDirection(e)}catch(e){o(558,"GrrY")!==o(483,"r]Je")||_0x272274(_0x510db5)(o(537,"toy9"))}})}catch(e){}})[d(572,"VfAa")],y=S[d(557,"bjdo")](useMemo,()=>Gesture[d(570,"IvaR")]().onEnd(e=>{const t=d,o={};o[t(540,"Tny4")]=t(500,"XkS[");const n=o,r=Math[t(553,"(*lD")](e.translationX),a=Math[t(530,"#z8z")](e.translationY);if(r>30||a>30)if(S[t(493,"%Fjc")](r,a))if(e[t(464,"B*BB")]>0){if(!S[t(477,"%Fjc")](S.MLOKp,S[t(512,"qqzM")])){const e={};e.jTzFA=t(497,"IvaR");const o=e;return _0x5ad551(),()=>{const e=t;_0x18a59b[e(520,"4zGG")]()[e(487,"8l#g")]&&!_0x1a3c11[e(507,"u%o@")]&&_0x871f90(o[e(514,"3Q6C")]),_0x7f896a()}}runOnJS(g)(t(499,"gqX4"))}else runOnJS(g)(t(526,"1Q8N"));else e[t(555,"8l#g")]>0?"EIrhJ"===t(491,"aVW2")?runOnJS(g)(t(573,"aVW2")):_0xbaa12b(_0x24017e)(n[t(523,"Qs5X")]):runOnJS(g)("UP")}),[g]),I=e?.[d(562,"r]Je")]??0,Q=S[d(479,"XkS[")](useMemo,()=>({isPlaying:i||x,gameOver:u,onStartGame:O,onStopGame:p,onShare:r,onShowLeaderboard:W,startButtonSubtext:"Swipe to move Pac-Man!"}),[i,x,u,O,p,r,W]),v=useMemo(()=>({isVisible:u,score:f[d(572,"VfAa")],onPlayAgain:R,buttonText:d(470,"B*BB"),title:m?"YOU WON!":d(501,"B*BB"),message:m?d(550,"toy9"):d(495,"UK!C"),scoreFormatter:scoreFormatter}),[u,R,m]),A=S.Xtvcn(useMemo,()=>({gameId:GAME_IDS.PAC_MAN,settings:e||DEFAULT_GAME_SETTINGS,onSettingsChange:t}),[e,t]),J={};J[d(515,"3Q6C")]=I;const K=useMemo(()=>[styles.canvasContainer,J],[I]),B={};B.offset=I;const E={...Q},L={...v};L[d(503,"UsTt")]=a,L.bannerAd=s;const V={...A};return _0x53e229(GestureHandlerRootView,{style:styles[d(564,"EAdF")],children:_0x5126ef(_0x234a50,{children:[_0x53e229(GestureDetector,{gesture:y,children:S.Xtvcn(_0x53e229,View,{style:styles[d(567,"jxxc")],children:_0x53e229(View,{style:K,children:_0x53e229(GameCanvas,{})})})}),_0x53e229(ScoreBoard,B),_0x53e229(GameControlButton,E),_0x53e229(GameOverModal,L),_0x53e229(GameSettingsModal,V)]})})};PacMan.displayName=_0x2d2c1d(563,"fN@j");const _0x341c6b={};_0x341c6b[_0x2d2c1d(569,"4&]H")]=1,_0x341c6b[_0x2d2c1d(463,"toy9")]=BACKGROUND_COLOR;const _0x28e7ef={};function _0x4ce3(e,t){e-=461;const o=_0x1477();let n=o[e];if(void 0===_0x4ce3.zUiCez){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};_0x4ce3.PvWXuA=e,_0x4ce3.IEnrpp={},_0x4ce3.zUiCez=!0}const r=o[0];_0x4ce3.tJrZyP!==r&&(_0x4ce3.IEnrpp={},_0x4ce3.tJrZyP=r);const a=_0x4ce3.IEnrpp[e];return void 0===a?(void 0===_0x4ce3.dMtVIH&&(_0x4ce3.dMtVIH=!0),n=_0x4ce3.PvWXuA(n,t),_0x4ce3.IEnrpp[e]=n):n=a,n}_0x28e7ef[_0x2d2c1d(566,"1#fq")]=1;const _0x27bde7={};function _0x1477(){const e=["WQ9jySoNW5G","hSk0oaNcKmoknGq","cZ7cNmkIcSorcb0I","WQhdMsb2Ev/dRq","ibFcKmkRW5u","dhCJW4tcQCkAsJe","jLG9eJ8","W6xcMSkdBSowmLv2wG","gmo7j1NcQc/dTcFcLq","p39yFSkV","aqJcLavf","W6zslKKWW6TPDbBcPxHfq8k9BSoFnSowyhNcICkItG","f8k9WOBdJSon","W5ZcVmoZWOJdIvZcSSohhwLhiJS","W6VdRCoKWO8q","cJSEW5lcIqxcMLK","WRJcVCknBmkEWOS/ySoKvXm3WRRcQtGXWRVcOmkt","W7tcMSkEF8ohbW","eqRcLrrfaa","pJ/cMHzH","B3VdOd/dVG","WQjzv8oJ","FmkWreDKW79Iofi","WQxdIszxAfddRCoo","f1pcHCk3iSkFCa","W6noWPHyWQ0BD1Geaa","d8oQfCklW4JcTGK","W5VdJSkzm8kDW6W5","tmoXpdBcPSoYnW","qCkjWQb7gSouWQldSq","yCocW4ZcKSouWRBcLIysda","WQhdISkmW6W","cSoapZmhW5ralMOB","FCkWWPddRqS","WO1Py8ofW7LvW6S","x8kYWOLjkq","rCkhWPDRaCotWQVdGSoUWRm","W70ba8oDtepcOSo9W7yKW6q","WOaZWPPWCmogW7G","WPHIzCkeAv3cRGddJX/dQt0p","W5ZcUCo9WO3dJ1FcTmkWawb6aW7dMq","W5xdMmk/bCkiW6K0ma","udBcQSkPW7FcVmoql8kTjWxdI2yEmSotW5/dTmkHiq","fCkWmfjOEa","WOTBW68yWQe","WQ9ut8kNBa","ygFdGCowWPKDWONcPmoQg3K1DWO","imoAiCkT","WOyOWOLGEConW4rEWQFcHZRcMJ0","WPH+DSkjDW","oclcPSkpW4XCW5ddSSoM","j05P","wwddGSoGjmoGiX0iAG","WR9yrSoJW5OfEWJcS8ofW6XJdG","WO7dKSkc","q8kiWRddLJZcNYqb","xKFdLqxdJ2fr","FbisW4lcVW","oHJcTCkEpW","cty5W7dcGCkSDG","W7tcNgy2kqtdISoDW6bnWQhcPq","WR1ho8kciW","W7bYg2qh","W6zpj8klW6G","WQDLWRecuCkoW4FdO8kk","wmk3W6BdKCoMWQ8","idGmjtq","W43dISk0W7GQW5mg","WRX6c8kQW6JdL8oWWPfaWQS","gteMW67cNGxcGLLlWQWWW5vvW60","W6RdU8oqWQChgmkGkCor","kt3cNSo2g8oDcHq1BSkCWQ3dItFcJ8k4WPSg","tqNdO8oND8kHq8outmo6Ba","WP7dUmkEv8kfWPK/jW","W5D0nG","dCoIWRZcL8k2W6JcMMHggmouDG","bCo6fLVcUJRdVd3cM8ojpSoh","WPZdS8klzSkDWP0ylCoYwaiJ","WRbcWQuvWOK","W5SfWQHTAq","DmkZWObFla","WPpcSmojBH4","fmkGW5NcOLVdUSkNEa","pJFcKmkqW4Hr","jSkWpxXSEG","WQTAwmkrgwBcMSoSW5u","WQFdGJnMCftdISoeW7LjWO7cSq","WOBcV8odza","W4vEl1GMW61LwbFdQ29itmkN","tmoLidlcOSoVad7dVGNcOePgqSos","W7hcK8kvCW","iGRcLq","WRv9WRKxs8kaW5ldQ8kcoW","EmkYhSoXgcTd","fSk7WQpdQa","rCkuWR7dKWO","W4bsW7RcMmoKsZe","WP55DSkuyfBcKG","W7dcMSkdF8oxb1fyumkxWQZdVmoNWQG","wfZdHHxdHMP2iMldHSoFW7G","W60EdCkHWO1yoq","cJdcKCk9dmokcq0+FSkSW6ldGdNcIq","t8kdAgW3W5XvcwKtWOVcGG","nd/cL8kbW4faW7hdVCoXhhqcyW","WPRdJSkEW6G1W5Oy","W5GRjmkeWQGdWQZcOb/cNCoNW78P","AbqwW4tcSSkEWOXwW6ZcGmowAtZdMq","xCkVxSonWPxdQuLfkKNcJJm3qq","A8kDAhTKW7fthgKsW4q","W6uHWPiMD8kyW7ddNq","WRHCsSoGW5WoFGhcLSo7W4zYcG","pePoWPldPSokW7aoW5RcRSoRtXC","wuBdNJBdMa","umkiWPjTbmoyWP/dUCo0WQ1VWOG","eSo9buFcRdJdQq","W6hdNmoAWOic","WQiRW64aWQO"];return(_0x1477=function(){return e})()}_0x27bde7.flex=1,_0x27bde7.justifyContent=_0x2d2c1d(544,"#1mc"),_0x27bde7[_0x2d2c1d(571,"(cK@")]=_0x2d2c1d(496,"4&]H");const _0x17dbdd={};_0x17dbdd[_0x2d2c1d(481,"toy9")]=_0x341c6b,_0x17dbdd[_0x2d2c1d(577,"4&]H")]=_0x28e7ef,_0x17dbdd[_0x2d2c1d(568,"u%o@")]=_0x27bde7;const styles=StyleSheet.create(_0x17dbdd);
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 _0x349aae=_0x3257;!function(){const W=_0x3257,x=_0x488a();for(;;)try{if(578519==parseInt(W(224,"FwBB"))/1*(parseInt(W(243,"&lkg"))/2)+-parseInt(W(156,"#1cu"))/3+-parseInt(W(170,"yjPE"))/4*(parseInt(W(220,"ocCV"))/5)+-parseInt(W(192,"yjPE"))/6+parseInt(W(136,"@kuC"))/7*(parseInt(W(187,"1g!B"))/8)+-parseInt(W(169,"Iq8U"))/9*(-parseInt(W(174,"1g!B"))/10)+parseInt(W(167,"Sr)c"))/11)break;x.push(x.shift())}catch(W){x.push(x.shift())}}();import{getGameDimensions}from"../../services/UtilsService.js";const{width:width}=getGameDimensions(),_0x27d749={};_0x27d749[_0x349aae(176,"nZd9")]=19,_0x27d749[_0x349aae(244,"7ci2")]=21,_0x27d749[_0x349aae(141,"2R*5")]=width/19,_0x27d749.GAME_SPEED=31,_0x27d749.SUB_STEPS=8,_0x27d749[_0x349aae(181,"VL^U")]=.125,_0x27d749.GHOST_SPEED_RATIO=.45,_0x27d749[_0x349aae(231,"#1cu")]=100,_0x27d749[_0x349aae(150,"@kuC")]=500,_0x27d749[_0x349aae(186,"OfB)")]=500,_0x27d749.POINTS_PER_FRUIT=300,_0x27d749[_0x349aae(171,"uQ9$")]=7e3,_0x27d749[_0x349aae(238,"8FMq")]=7e3,_0x27d749[_0x349aae(182,"bJ8i")]=2e4,_0x27d749.INITIAL_LIVES=3,_0x27d749[_0x349aae(145,"j[WL")]=[70,170],_0x27d749.FRUIT_DURATION=1e4;export const PACMAN_GAME_CONFIG=_0x27d749;export let CellType=function(W){const x="XkKq",a=_0x349aae,_={};_[a(229,"M5L#")]=a(208,"@kuC"),_.DQuCq=a(138,"PcYP"),_[a(172,x)]=a(240,"QL%!"),_[a(205,"JknU")]=a(241,"*(9V");const e=_;return W[W[e[a(245,"xP5#")]]=0]=a(198,"xP5#"),W[W[e[a(222,"yjPE")]]=1]="WALL",W[W.DOT=2]=e[a(223,"ocCV")],W[W[a(211,"n(H8")]=3]=a(189,x),W[W.GHOST_HOUSE=4]=e[a(201,"*(9V")],W[W[a(221,"Sr)c")]=5]=a(153,"2R*5"),W[W.TUNNEL=6]=a(232,"cny0"),W}({});export let GhostMode=function(W){const x="A[]B",a="J$]N",_=_0x349aae,e={};e[_(131,"yjPE")]="scatter",e[_(155,"7Pdb")]=_(179,"5)rn"),e[_(214,x)]=_(143,"qHw9"),e[_(246,"R]^y")]=_(202,"#1cu"),e[_(197,"yjPE")]="IN_HOUSE",e[_(203,"7Pdb")]="LEAVING_HOUSE",e[_(184,"guc*")]=_(140,"nZd9");const o=e;return W.SCATTER=o.tDkwh,W[o[_(162,x)]]=_(157,"6kj#"),W[o.wRogE]="frightened",W[o.YZHkQ]="eaten",W[o[_(204,a)]]=_(234,a),W[o[_(185,"9pi0")]]=o[_(199,"8FMq")],W}({});function _0x3257(W,x){W-=131;const a=_0x488a();let _=a[W];if(void 0===_0x3257.cxOPpZ){const W=function(W,x){let a,_,e=[],o=0,d="";for(W=function(W){let x="",a="";for(let a,_,e=0,o=0;_=W.charAt(o++);~_&&(a=e%4?64*a+_:_,e++%4)?x+=String.fromCharCode(255&a>>(-2*e&6)):0)_="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(_);for(let W=0,_=x.length;W<_;W++)a+="%"+("00"+x.charCodeAt(W).toString(16)).slice(-2);return decodeURIComponent(a)}(W),_=0;_<256;_++)e[_]=_;for(_=0;_<256;_++)o=(o+e[_]+x.charCodeAt(_%x.length))%256,a=e[_],e[_]=e[o],e[o]=a;_=0,o=0;for(let x=0;x<W.length;x++)_=(_+1)%256,o=(o+e[_])%256,a=e[_],e[_]=e[o],e[o]=a,d+=String.fromCharCode(W.charCodeAt(x)^e[(e[_]+e[o])%256]);return d};_0x3257.WLrMBA=W,_0x3257.HDgags={},_0x3257.cxOPpZ=!0}const e=a[0];_0x3257.xGZemz!==e&&(_0x3257.HDgags={},_0x3257.xGZemz=e);const o=_0x3257.HDgags[W];return void 0===o?(void 0===_0x3257.KfAwbu&&(_0x3257.KfAwbu=!0),_=_0x3257.WLrMBA(_,x),_0x3257.HDgags[W]=_):_=o,_}export let GhostName=function(W){const x=_0x349aae,a={};a[x(164,"bJ8i")]="pinky",a[x(161,"j[WL")]=x(206,"8FMq"),a[x(230,"qHw9")]=x(133,"7ci2");const _=a;return W[x(148,"MA*7")]=x(188,"A[]B"),W[x(200,"OBLF")]=_[x(144,"#1cu")],W[_[x(196,"LEal")]]=x(209,"OfB)"),W[x(225,"JknU")]=_[x(175,"8FMq")],W}({});const _0x4c1082={};_0x4c1082[_0x349aae(173,"OfB)")]=_0x349aae(132,"guc*"),_0x4c1082.GRID_BACKGROUND=_0x349aae(151,"QL%!"),_0x4c1082[_0x349aae(239,"Eu6p")]=_0x349aae(177,"uQ9$"),_0x4c1082[_0x349aae(154,"PMP2")]=_0x349aae(135,"lc*3"),_0x4c1082[_0x349aae(147,"880G")]=_0x349aae(139,"xP5#"),_0x4c1082.PACMAN_MOUTH=_0x349aae(217,"6kj#"),_0x4c1082[_0x349aae(137,"ocCV")]=_0x349aae(227,"n(H8"),_0x4c1082[_0x349aae(190,"JknU")]="#FFFFFF",_0x4c1082.GHOST_BLINKY=_0x349aae(235,"Sr)c"),_0x4c1082[_0x349aae(207,"MA*7")]=_0x349aae(158,"yjPE"),_0x4c1082[_0x349aae(165,"R]^y")]="#00FFFF",_0x4c1082[_0x349aae(168,"VL^U")]=_0x349aae(180,"8FMq"),_0x4c1082.GHOST_FRIGHTENED=_0x349aae(166,"cny0"),_0x4c1082[_0x349aae(194,"8FMq")]=_0x349aae(228,"#1cu"),_0x4c1082[_0x349aae(191,"guc*")]="#FFFFFF",_0x4c1082[_0x349aae(178,"OBLF")]=_0x349aae(242,"Iq8U"),_0x4c1082[_0x349aae(193,"PMP2")]="#2121DE",_0x4c1082[_0x349aae(183,"@kuC")]=_0x349aae(210,"MA*7"),_0x4c1082[_0x349aae(212,"7ci2")]="#FF0000",_0x4c1082[_0x349aae(218,"nZd9")]="#FFFF00";export const PACMAN_COLORS=_0x4c1082;const _0x2f7c49={x:0,y:-1},_0x44b541={};function _0x488a(){const W=["eSonWO7dNv7cSmkKyCkoveBdVa","W4BcSmk2tmk/W69fWP4dEKZcNSoNWORcLvO1Ed7dOmk6bG","W4H3W6yOWRddRq","W5hcNc0/WR0","WPfAWPlcL8kO","xINdRmowhW","W4JcVCkUvCkB","jadcNSoCW4u","W6/cTbZdNsO","W496W7SJWRu","mCkGWORcVYa","WR8OW6NdNLG","W4LACGbF","W4JcTSkYrG","FGeQWQ5HWR/dHSoRW5zlW4e","WOioW5FcLIO","cMJcQmog","gG8JW40fW5dcPG","W4ygW6hdLCoYC0ywx0tcKmku","WOXgWODtnaBcLCkTfNGwWPyTsmoh","CmkoWRjSB8kbyeSUW7vZlSkI","W6ecWOhcVqO","vsVdSSoh","WQJcICkcWP/dVepdHtddQSk5FmoHwa","ymkiWRTVASkjza","icGwEmk7cSoGW67dLtK","WRSblqTBx8oUaaFdV8kCwqG","WOD5fNpcHvFdMmol","fmo4rZRdOcLbdSo/xa","WODYWRdcVmkS","W7Kbi2xcLa","dctcS8oBW5j3oG","W4npqIPS","W6RdVr1+W7S","WRupW7ddLSoMALa","WQL9W6KGWR3dSJe","cmo1WPBcK1y","u8o9lrJcJq","W5P0W6yOWQ/dPYGBFmkMdCkjW5e2","W4NdRSo8W6FcItO","W5hcSCk3vmkY","WOq/W6hdNKijnmoY","Cmo2tLNcHey1","WOjjWOfp","W7ufhexcIa","W5lcU8k4s8k/W7vrWPmoAfBcI8o2WO3cN1a","W5LZbMZcISofWQdcLdi","Dmkbfa","W6hcPtRdOaHFdmkmWRDuWRm","WQxcJdSQWOmsW5W","W4ldOItdPdn3ccJdKcGnWQhcSG","WOXvWOnsnbVcJmk/fW","BtxdHCodeq","W5nPvfG6","W58hW73dIq","WPmKmsu","WRDNWQ7cImk1","W7TwW7fsWQRcTdm","WQHRWRnYdG","W7z3WRFdSeVcV8opWQuknLBdO8ot","oLVcLqKflCoK","W7a0W5/cHWNdO8ku","W7igeq","nSo3WRzk","ocldUSoeaeNdGW","hGG2sSklo8otW7tdPqiIWOnG","WRpdUCkAp25tlfxdUG","WO/dGWjZW5xdLde","zmoCmZJcRItcHSkLW4Gf","W6flW5yVWOO","jmo5xGmtaxfwW6L4scxdKCkTlmok","chK2WO99WO7dOmo4","W409FCoPBgnyW5DAWRddIq","EWuSWRn+WRK","W4RcJZS4","WPCmW47cJcFdNmkIWQqvk2FdQ8o/WRH6imk7Bmk8WOVcQCodaa","qSkPiSoxWPlcQCkpmmkRoSoFW6tdPmkrmMavlhVdS8kdnmoMzWy","WPCkW4NcIsO","WRFdTmkzigvFiuddSmky","gmoeWPVdI1xcUmk1EmksqKpdOqJcUmok","bSkEWRxcRt0","WRGmWPHqW4/cHu4UESkrf8kyW5C","imoqW6OSpW","W6bLWOpcVCoLWONcNq","z8kYW7BcUd7dNSonuCkDEe/dUG8","uJBcPmoDamo2W5hcNa","cSoazcGF","W5KPWRNcKsS","gCkUWQZcRqa","W502WORcTHG","W417u2a/mCkvfJtdSW","WR7cICkdWPVdVtdcUG","zmkgpv/cHe49m8oFySkMcsu","Bg7cGCk6WR3dHe1AW77cGSkr","WRpdUe1AW7vHWQniW7TvsSk1wq","W7ixW7pdJSoSW73dO8oDWPGFW4qkW4i","WRNcOgNdTmoBW7BcPh0hW4flymodW6RcNxNdNtv/W6ZdRa","hautWQS+","iuFcGmo0jSorW6JcQ8oqBq","afNdRSkmgZpcIN4","W7dcI8kUEmka","nt8EEmk9fSo7W6FdNG","W4RdNq/cG8k4W63cSq","mWhcN8oeW4JdLmo3WQJcML0","uxvCWP5b","WQlcVSk/xCotWOuX","zMNcMmkSWRBdIf5tW6lcGG","W7uoWRlcRcXpC1JdGCkOW4quAmoy","WOerW5lcIYFdKmk+WRWvk2RdOG","WPeJWPyOW6O","WQiTeIul","m0NcISoXnCoqW7JcRSoBE8oLWOxdIg3dT14","aL/cSmoDt37dIfRdHSooWP9yWOm","W7q8WOFcTctdMW","aWiIWOO1WRNcOCk8a8oPr8oF","W5bmtcT7zWOenYSawq","WP8UWO4XW47dM0BcQ8okWQ7dHa","W7irW7tdH8oTW77dQCosWPmtW4aXW5i"];return(_0x488a=function(){return W})()}_0x44b541.x=0,_0x44b541.y=1;const _0x49f40e={x:-1,y:0},_0x1c6b2f={x:1,y:0},_0x133c6d={x:0,y:0},_0xd64425={};_0xd64425.UP=_0x2f7c49,_0xd64425.DOWN=_0x44b541,_0xd64425[_0x349aae(149,"Iq8U")]=_0x49f40e,_0xd64425[_0x349aae(226,"(nyk")]=_0x1c6b2f,_0xd64425[_0x349aae(215,"xP5#")]=_0x133c6d;export const DIRECTIONS=_0xd64425;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 _0x5a2152={x:9,y:15};export const PACMAN_START=_0x5a2152;const _0x31348d={x:9,y:7},_0x1a8926={x:9,y:9},_0x32c117={x:8,y:9},_0x99374d={x:10,y:9},_0x16bd91={[GhostName.BLINKY]:_0x31348d,[GhostName[_0x349aae(163,"7Pdb")]]:_0x1a8926,[GhostName[_0x349aae(236,"7ci2")]]:_0x32c117,[GhostName.CLYDE]:_0x99374d};export const GHOST_START_POSITIONS=_0x16bd91;const _0x45af81={x:17,y:0},_0x2138f3={x:1,y:0},_0x424834={x:17,y:20},_0x54c133={x:1,y:20},_0x1d36c2={[GhostName[_0x349aae(195,"#1cu")]]:_0x45af81,[GhostName[_0x349aae(233,"8FMq")]]:_0x2138f3,[GhostName[_0x349aae(248,"9pi0")]]:_0x424834,[GhostName.CLYDE]:_0x54c133};export const GHOST_SCATTER_TARGETS=_0x1d36c2;const _0x2e8a00={[GhostName.BLINKY]:0,[GhostName[_0x349aae(152,"@kuC")]]:2e3,[GhostName[_0x349aae(247,"n(H8")]]:5e3,[GhostName[_0x349aae(237,"ocCV")]]:8e3};export const GHOST_RELEASE_TIMING=_0x2e8a00;
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 _0x215bc8=_0x35fa;!function(){const e=_0x35fa,o=_0x42ab();for(;;)try{if(821012==-parseInt(e(537,"pA@U"))/1+-parseInt(e(589,"d8qO"))/2+-parseInt(e(536,"ouVQ"))/3+parseInt(e(481,"]!BB"))/4*(-parseInt(e(491,"CIQC"))/5)+-parseInt(e(518,"Dy9I"))/6*(parseInt(e(575,"soHl"))/7)+-parseInt(e(450,"vPa!"))/8*(-parseInt(e(498,"gjfS"))/9)+-parseInt(e(494,"d8qO"))/10*(-parseInt(e(461,"(uc&"))/11))break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x1c6982 from"react";import{StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";function _0x42ab(){const e=["zXNcISkOscJcKCo1","W7LjWQlcGJRdGuyK","iSk9oSovsW","oZvFW77dNxJcOc81","W6nxbmkTiCk2WPNdOCkjWP8E","W6uwW41mAmolFIdcTq","WPKlz0L0shv4WQG","W63dPhxdRa0PW6VcMa","bgxdHmk3","gCkFp8ogBru","W5GNDYlcKSkjCG","W7VcKmkDACkMusnd","W4mQzGNcLa","i8khnZxdOSk/W5n/W6ZdSCkhzW","kMpdNW","cmo6gqxcKa","W4tdHfjXtc8","muFcSwe3","WPNcHCkIWQJdNa7dRXql","icWwWP/cK8kwBJmV","jIWxWOJcJSkLycWZeSoEW6S","WR5jWPzRECoKAddcVq","oSk6B03dHCkR","EG/dPqPGW6v/ACkslCoe","W6RcT8kem2mebq","W4ldKKnxqcFdQeC","WPJcHCkLWP3dHcJdTXaaBG","W6dcH8oMW47cVvxcTa","WPJcLmk+WR3dRYJdOXW","W6/cR1XlW7W","W4JcPmk/xSkryb4","W4NcK1rHW4tdUW","W5PziXG1nYbdWOz/w8o5W4m","W5pdKmoKWP7dMa/dTGWu","WOdcVvSvzmkpyIpcUsrcCCoZ","DmkvimkXW7O","lSoofaZdLSo7WOpdUc3cMW52bq","Fmkjv03cHCkKW4C","WQdcLmoroKtdSf/cPmkCn8kuW7Ob","W4NcH0HWW4tdUCkM","qSk1msNcHc7cMmoV","W4tdHfjMtY/dQLFcRa","tCkojWTEasneafdcGCoDW6Ogg8ogW4O","WO7dSEkdMqZcGhWtlmkEWPtcUSkJWPZcJq","WR1kACkMWPdcUmkyvfRcTCoCWO8","g8oMfmoSW4z4fSoF","xvhcUSoXvW","WOJcLCkJWR/dJsFdUG","W4xdImoLWOXrz8oM","W7hcL8oNW5NcRhZcOCkNWPC","aqWPWR/cPmkfrHee","ySowCsBdHSkCW5vKW4O","iSofoSkRWQ5XiCo5","WONdVCkXW5RdQmo6","WOGBzL5Lywa","nxmyW4P0zsZcPSo5W4u","imodkHNcOrBcQmoT","W5xcTgzCW6hcTmoFW45fWRi","kMJcPg0J","W7RcOCkzm2m","WR7cVCo6WRDqwSoQW4W","lmoZqZddISofCxBdKMlcIhy","b8kxybiyoNDvvq","AmoFW5y6W4TofW","WO7dQ8kNW63dUCoBx0uI","W6hdRmobWOTWvmoxW7m","bCoXhX/cKIxcJCoaWRfkya","W44HybxcKCkbyYRdUW","WOtcLXyZqmkkFvtcJW","AmowdbNdL8k8W7zh","W7njge7cJCkWW5q","pCoMlbhcNq","zNyydM/cI8oE","nZqHcx3cGSotWQe","W7fcWOxcTdRdLfSVW4/cJZ7dO0NcMhxdVW","W7tdImkwuapcOXpcMa","W6OOvcRcKG","A2aoW4xdV0xcPsmCWR3dRJZcULe3","WOPLmMtdGSoFmH/dHmk6ExBcLq","WOxcHaqxgh7dT1/cUKrCWPO","gHJdV8k0W58tW77cHgK","vLCRlL4","isWrWQRcI8kWDJCKjq","dg3cGhCg","WQDSv8kTDKpdGNhdM8o3W5nRcG","W6BcPmkqmMmE","W7xdO8k0tM0jWPtdIa","eCkMWPZdVmoyy8oH","WPTny8oVtw/dHde","ifhcU0W9W6bGBmkgaG","WOZcHCkLWP7dNcJdUHW","W6tdQmoBWRzHr8oIW7i","W61yWRFcOZRdP1mSW40","WPVdQ8kGW5VdUCo9sK0","rmkFo8kDW6q","i34CW4Tm","W4pdQHLdjSo5mXZcUa","kKRcOeOXW694","W7FcM8oGW5dcVq","e8kdrIVdGbeTW7K","oSk6B1ldHCkGcq","W6eZAmokvCkSgG","pN/dG8oLhGRcHW","WQ9dWOT6BmokzZJcQG","CxKoW7FdUW","W7DFWOBcVs/dMvSVW48","W5n/nh/cRq","FW7dICouwSk5WRGAe8oN","amoNfmoWW5vJhq","Dq/cM8k+wI/cGmoZtq","pmk9A23dLmkkb8oXW74","W4JdLKddRdKqW4FcTmo0","W6BdNSkhurlcPa","bSkhCqqpd39Avq","WOHxk8oZeW","W7ddGCkhyHNcTXC","W5ZcHmotWQVdHmoSW5Cl","W6KwW4KTiCk7yaBcOcFdP8ku","ANqFW5ZdVvNcVG","bCoXhW7cLI8","W6FcT35lW7tdMG","W4NcQwP6W63cSW","FhiiW7ZdVve","BSoeW4uQW4jfmaW2cKtdIG","W4GMzclcG8kGzYtdQG","WOCbz0K","mdWrWO7cImk/wZSYnG","jSktASofW5S","BmopW5aBW5PbfWy","W5ldLLLatcu","W6uJBSoRrmkJgSke","kSooeq/dKmo6W5hdJbJcUYf4","W7hcUSkvggu","W7ZcSCktdgmhhG","iSk/WO/dT8kDtmoYvmoPWO1H","jCkrjJxdOSk/W5n/W6ZdSCkh","fSkhyquje2i","WQ5Wc8oojez5","WRZdSmocCtzAeYvHo8kgua","ncRdPmkyW7m1W4RcRv4","oSk6B1ZdGCkHcSo+W7O2sW","ySoeW408W4DbdWO5aq","ChaplM/cGW","WQvuWR1EDG","WO7cNbBcKgXeWPRcJSoOW48Rkq0","W61pWRNcOYS","W7WjpCorW4/dQmkBzee","W5/cR31AW63cU8oh","W7dcL8oGW6ZcTfRcUCkJWPXn","o2BdLmoV","W4zfeCklmSktWPO","W5VcU2jnW4hcSq"];return(_0x42ab=function(){return e})()}import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x4b11a7}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";import{PaperIoService}from"./PaperIoService.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameArea}from"./components/GameArea.js";import{jsx as _0x1cae2d,jsxs as _0x1ed65e}from"react/jsx-runtime";function _0x35fa(e,o){e-=448;const t=_0x42ab();let W=t[e];if(void 0===_0x35fa.wKJyOM){const e=function(e,o){let t,W,a=[],r=0,n="";for(e=function(e){let o="",t="";for(let t,W,a=0,r=0;W=e.charAt(r++);~W&&(t=a%4?64*t+W:W,a++%4)?o+=String.fromCharCode(255&t>>(-2*a&6)):0)W="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(W);for(let e=0,W=o.length;e<W;e++)t+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(t)}(e),W=0;W<256;W++)a[W]=W;for(W=0;W<256;W++)r=(r+a[W]+o.charCodeAt(W%o.length))%256,t=a[W],a[W]=a[r],a[r]=t;W=0,r=0;for(let o=0;o<e.length;o++)W=(W+1)%256,r=(r+a[W])%256,t=a[W],a[W]=a[r],a[r]=t,n+=String.fromCharCode(e.charCodeAt(o)^a[(a[W]+a[r])%256]);return n};_0x35fa.KpyPoj=e,_0x35fa.hitgTS={},_0x35fa.wKJyOM=!0}const a=t[0];_0x35fa.CzKstD!==a&&(_0x35fa.hitgTS={},_0x35fa.CzKstD=a);const r=_0x35fa.hitgTS[e];return void 0===r?(void 0===_0x35fa.WfyWOX&&(_0x35fa.WfyWOX=!0),W=_0x35fa.KpyPoj(W,o),_0x35fa.hitgTS[e]=W):W=r,W}const PaperIoComponent=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:W,onShare:a,onShareScreenshot:r,onShowLeaderboard:n,bannerAd:s})=>{const d="x8Zv",i="zw$Y",S=_0x35fa,x={xxcYc:function(e,o,t){return e(o,t)},CzwEj:function(e,o){return e!==o},QzQze:S(587,"pA@U"),MdVMn:S(592,"%]M8"),cWvUw:function(e){return e()},eXTOI:function(e,o){return e||o}},m=_0x1c6982[S(580,"(uc&")](e?.[S(581,"Utgb")]??!0);m.current=e?.[S(519,"GllY")]??!0;const u=_0x1c6982[S(579,"DKsW")](e?.enableHaptics??!0);u.current=e?.[S(542,"%#Ob")]??!0;const p=e?.[S(543,"JI0*")]??0,C=_0x1c6982[S(480,"Yvd^")](t);C[S(482,"JI0*")]=t;const k=_0x1c6982[S(577,"gjfS")](W);k[S(595,"5H2K")]=W;const f=useGameOver(),_=useWon(),l=x[S(516,"]!BB")](useIsPlaying),G=x.eXTOI(f,_),O=_0x1c6982.useRef(!1),I=_0x1c6982[S(474,"pA@U")](0),P=_0x1c6982[S(511,"bHbQ")](0),h=_0x1c6982[S(570,"h[bx")](0),b=_0x1c6982[S(448,"9#$]")](!1),y=_0x1c6982[S(524,"gjfS")](e=>{const o=S;if(C.current&&!b[o(512,"NOui")]){const t=usePaperIoStore[o(548,"CIQC")]()[o(451,"Xt4C")];C[o(545,"%]M8")]({status:e,score:t[o(503,"xMtF")]()}),b[o(559,"fG*7")]=!0}},[]),H=_0x1c6982[S(558,"Yvd^")](()=>new PaperIoService,[]),R=_0x1c6982.useCallback(()=>{const e=S;x[e(504,"]p2Z")](playSound,GAME_SOUNDS[e(514,"gjfS")][e(506,"Dy9I")],m[e(485,"zw$Y")]),x[e(590,"JI0*")](playHaptic,HapticType[e(467,"pLiC")],u[e(521,"Utgb")])},[]),v=_0x1c6982[S(593,"0zei")](()=>{playHaptic(HapticType[S(508,"x8Zv")],u.current)},[]),g=_0x1c6982[S(462,"M]qr")](()=>{const e=S;playSound(GAME_SOUNDS[e(557,"9Xt)")].GAME_OVER,m[e(560,"6#i&")]),playHaptic(HapticType[e(541,"]!BB")],u[e(512,"NOui")])},[]);_0x1c6982[S(499,"pA@U")](()=>{H[S(471,"0zei")](R,v,g)},[H,R,v,g]),_0x1c6982[S(525,"ouVQ")](()=>{const e=S;return usePaperIoStore[e(571,"3Lzu")](o=>o[e(563,"Xt4C")],o=>{const t=e;var W,a;W=t(585,"L07n"),a=t(553,"Hrpm"),x[_0x35fa(552,"xqM!")](W,a)?(_0x4e4893[t(594,"3Lzu")]=_0x3c9f4f,_0x5a2592[t(484,"CIQC")](_0x34805a)):(O.current=o,H[t(540,"x8Zv")](o))})},[H]),_0x1c6982[S(569,"vPa!")](()=>{const e=S;if("vgAZs"!==e(460,"pLiC"))x[e(470,"ouVQ")](_0x31996f,_0x3b778f[e(469,"2Z7p")][e(526,"zK(l")],_0x58a5e9[e(594,"3Lzu")]),x[e(562,"(uc&")](_0x440d89,_0x3eeef9[e(572,"5H2K")],_0x363a3a[e(576,"(uc&")]);else{if(f&&!b.current&&y(_?e(472,"6#i&"):e(583,"NOui")),G){const o=usePaperIoStore[e(588,"fG*7")]();I[e(505,"CIQC")]=o.score,P[e(495,"d8qO")]=o.territoryPct,h[e(530,"9#$]")]=o.aiPct}!f&&(b.current=!1)}},[f,_,G,y]),_0x1c6982[S(452,"am4Q")](()=>{H[S(547,"]!BB")]()},[H]),_0x1c6982[S(567,"f#KA")](()=>()=>{const e=_0x35fa;usePaperIoStore.getState().isPlaying&&!b.current&&y(e(489,"4]W!")),usePaperIoStore.getState()[e(486,"CIQC")](),H[e(573,"h[bx")](),usePaperIoStore[e(586,"Utgb")]()[e(520,"3Lzu")]()},[H,y]);const M=_0x1c6982.useCallback(()=>{const e=S;if(e(487,"DKsW")!==e(449,"soHl")){const o=e(500,"3Lzu").split("|");let t=0;for(;;){switch(o[t++]){case"0":usePaperIoStore[e(548,"CIQC")]()[e(582,"ouVQ")]();continue;case"1":playHaptic(HapticType.SUCCESS,u[e(497,"4]W!")]);continue;case"2":usePaperIoStore[e(533,"h[bx")]()[e(477,"x8Zv")]();continue;case"3":H[e(550,"Xt4C")]();continue;case"4":H[e(476,"CIQC")]();continue;case"5":H.initialize();continue;case"6":H[e(513,"Hrpm")](!0);continue;case"7":x[e(504,"]p2Z")](playSound,GAME_SOUNDS[e(465,"vPa!")][e(539,"9#$]")],m.current);continue;case"8":b[e(555,"]!BB")]=!1;continue}break}}else _0xe7a468[e(488,"2Z7p")]=!1,_0x14c0f7[e(507,i)](),_0x48f0ab.getState().resetGame(),_0x41a4ec[e(515,"DKsW")](),_0x2a3b36[e(551,"bHbQ")]().startGame(),_0x3ef5b1[e(454,i)](!0),_0xbe2786[e(568,"Yvd^")](),_0x1f8525(_0x35e331[e(574,"GIz*")].START,_0x20815c[e(468,"ouVQ")]),_0x338692(_0x221a32[e(528,"0ccR")],_0x5703a2[e(453,"DKsW")])},[H]),A=_0x1c6982[S(593,"0zei")](()=>{const e=S,o="1|3|4|5|0|2"[e(493,"xqM!")]("|");let t=0;for(;;){switch(o[t++]){case"0":usePaperIoStore[e(523,"Dy9I")]()[e(554,"GQy4")]();continue;case"1":y(x[e(534,"ouVQ")]);continue;case"2":H[e(599,"Utgb")]();continue;case"3":playSound(GAME_SOUNDS.PAPER_IO[e(538,"XHot")],m[e(594,"3Lzu")]);continue;case"4":playHaptic(HapticType[e(578,"4]W!")],u.current);continue;case"5":H[e(464,"NOui")]();continue}break}},[H,y]),K=_0x1c6982[S(598,"Yvd^")](()=>{const e=S;k.current?.(),b.current=!1,H[e(561,"soHl")](),usePaperIoStore[e(458,"f#KA")]()[e(522,"bHbQ")](),H[e(565,"5a&R")]()},[H]),L={..._0x1c6982[S(591,"JI0*")](()=>({isPlaying:!G&&l,gameOver:f,onStartGame:M,onStopGame:A,onShare:a,onShowLeaderboard:n,startButtonSubtext:"Claim more land than the AI in 2:00!"}),[G,l,f,M,A,a,n])},N={..._0x1c6982.useMemo(()=>{const e=S,o=usePaperIoStore[e(459,"Xt4C")](),t=f?o[e(564,"0ccR")]:0,W=f?o[e(478,d)]:0,a=f?o.aiPct:0,r={};return r[e(597,"XHot")]=f,r[e(517,"JI0*")]=t,r.onPlayAgain=K,r[e(584,d)]=x[e(529,"gjfS")],r[e(556,"zw$Y")]=_?e(546,"%#Ob"):"GAME OVER",r.scoreLabel="Cells Captured",r.message=_?"You beat the AI "+W+"% to "+a+"%!":e(466,"6#i&")+W+e(510,"xqM!")+a+e(501,"2Z7p"),r},[f,_,K])};N[S(566,"xMtF")]=r,N[S(549,"Dy9I")]=s;const T={};return T[S(457,"DKsW")]=GAME_IDS[S(544,"Au&9")],T[S(483,"pA@U")]=e||DEFAULT_GAME_SETTINGS,T[S(532,"Xt4C")]=o,_0x1cae2d(GestureHandlerRootView,{style:styles[S(479,"soHl")],children:_0x1ed65e(_0x4b11a7,{offset:p,children:[x[S(475,"]!BB")](_0x1cae2d,GameArea,{gameService:H,offset:p}),_0x1cae2d(ScoreBoard,{offset:p}),x[S(473,"gjfS")](_0x1cae2d,GameControlButton,L),_0x1cae2d(GameOverModal,N),_0x1cae2d(GameSettingsModal,T)]})})},_0x155337={};_0x155337[_0x215bc8(455,"6#i&")]=1,_0x155337[_0x215bc8(535,"(uc&")]=BACKGROUND_COLOR;const _0x1b18e3={};_0x1b18e3[_0x215bc8(479,"soHl")]=_0x155337;const styles=StyleSheet.create(_0x1b18e3);export const PaperIo=PaperIoComponent;PaperIo.displayName=_0x215bc8(456,"M]qr");
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 _0x2178fe=_0x3507;!function(){const x=_0x3507,W=_0x4fd8();for(;;)try{if(612130==-parseInt(x(262,"h1OZ"))/1*(-parseInt(x(231,"E0QV"))/2)+-parseInt(x(255,"$%N%"))/3+-parseInt(x(244,"fN%Y"))/4+parseInt(x(246,"[fOn"))/5+-parseInt(x(233,"dh2X"))/6+parseInt(x(224,"3azZ"))/7*(-parseInt(x(239,"Aq(t"))/8)+-parseInt(x(247,"dh2X"))/9*(-parseInt(x(265,"TLnO"))/10))break;W.push(W.shift())}catch(x){W.push(W.shift())}}();import{PRIMARY_COLOR,BACKGROUND_COLOR}from"../../services/GamesConstants.js";import{getGameDimensions,isTablet}from"../../services/UtilsService.js";const{screenWidth:screenWidth}=getGameDimensions(),SCREEN_HEIGHT=getGameDimensions()[_0x2178fe(219,"dBgr")],CELL=Math[_0x2178fe(279,"0(y^")](screenWidth/(isTablet?44:32)),COLS=Math[_0x2178fe(264,")@RR")](screenWidth/CELL),ROWS=Math[_0x2178fe(225,"0(y^")](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,_0x3af140={};_0x3af140[_0x2178fe(263,"E0QV")]=COLS,_0x3af140[_0x2178fe(261,"X27g")]=ROWS,_0x3af140[_0x2178fe(232,"R@yn")]=CELL,_0x3af140[_0x2178fe(242,"[fOn")]=GRID_W,_0x3af140[_0x2178fe(269,"GLwO")]=GRID_H,_0x3af140[_0x2178fe(235,"tm72")]=0,_0x3af140[_0x2178fe(266,"UZH8")]=92,_0x3af140[_0x2178fe(257,"))m9")]=1,_0x3af140.START_TERRITORY=2,_0x3af140[_0x2178fe(223,"(iiH")]=12e4,_0x3af140[_0x2178fe(273,"fN%Y")]=COLS*ROWS,_0x3af140[_0x2178fe(267,"T$7!")]=screenWidth,_0x3af140[_0x2178fe(234,"T%W8")]=SCREEN_HEIGHT;export const PAPER_CONFIG=_0x3af140;const _0x139322={};_0x139322[_0x2178fe(275,"jtSx")]="rgba(107, 203, 119, 0.85)",_0x139322[_0x2178fe(254,"UZH8")]=_0x2178fe(220,"$%N%"),_0x139322.head=_0x2178fe(238,"W&cI"),_0x139322[_0x2178fe(258,"$%N%")]="#4CA85B";const _0x2063b8={};_0x2063b8[_0x2178fe(218,")WX$")]=_0x2178fe(243,")WX$"),_0x2063b8[_0x2178fe(272,"W&cI")]=_0x2178fe(240,"G]pU"),_0x2063b8[_0x2178fe(270,"[fOn")]=_0x2178fe(249,"&eN#"),_0x2063b8[_0x2178fe(217,")@RR")]=_0x2178fe(280,"DxAL");const _0x244981={};function _0x4fd8(){const x=["hcZcJ8oZWQRcSXi","W4xcPNJcUbBdOCovWOWRECoRW7u","ECk0W7bJWRVdQwa","W41VW4Owh8kS","dSo4WQjN","WPjrWRBdGmkqWOGobCktWOJcQ8kUWQLLbCob","zSopiCoIW5a","gCkguJJdKarTnmk+hgS","mSkvWQDf","i8kqDcNdQmo6aCkqda","WR/dHCo9W51OW6Kcy8kQW5lcJ3dcM8o7WO5Pe8kDl24jiYtdV0K","BeddUSkxW4lcUNC","hthcJCoRWQe","WRHaWQ7dO8oC","aCo0zmkDWOpdIcO","DSkJW7JdNSkloJBdLbaOWRldOuSGW5/cL8oCW4uxB8o4W5Oek8kC","qmkleIr+uSkRW7/cHMFcVG","ySo5W4/dILDlnSk8","oYBdUmoaWR/cVCkcn8oL","DsHCWPRcKxtcHCoA","tCorW47dNSosW71gW7hcHa","WQqlnmo6WO3dGG","BSoOfSkfmCkRwYxdPHPhW7POw8o+F8oDW5f0ua7cPmk/wra","g30OW4nNWRmYyL/dIv7cNYiKjCkBW7a2W7u1jdlcJam","kSkkD8k9WO5whmkIhbtcJ1C","hWhcNSkAmIRdQmoQW6f8x2BcJ3urbG","rSkifcb5l8ofW7/cT2hcJCkZW4m","WQLkWRldOq","xwNdQZyd","WPBdPgtcQCkMWRbnWRVdRa","oCk7zXddSa","WRmiW7CSWRe","WQ/dJSoeWRFcRW","WRKfW5SAWR0oWQnDoqi6","kL8gW64","xCouswzOWPSZEgDUvmkV","WRn1WOBdPmo9W7z9FCo6W7hdGmowW5m","WQz8BHddGCoCq8ojWPu","W4n3W6lcL8o7W75K","W4SrbCki","mCklaSoiW75ryW","mCkfiIqPtvWJ","W59phmk5W6i+W4VdJCkuW4SaWOaqfWOqW63cT0vgW7udr097","W7JdUSoJWPRdUSoqWQ4","iCopWOPhW4ddKa","s8otW57dJCktWRSCWRBdKw3dJ8oVzGZcNXniW7bTWOddQmocWPOxhW","DCo+mu/cRMTMi8kwbKf1","W69PpCktWO1EWRhcRCo2WQ8","vCkPW7C7WQ3cT2mzWR7cI0pdJ8kk","xCoqsZq+W5mrA1K","dCotW7FdNmoRW4nc","W55mW7JdRdFdSmkj","g8kWqa8","WPddPNtcUSoNW7yxW7ZcUCo4rtSPzYCRf0xcTmo6A8klWQxcUW","lN8jW4ZdPYBdGSoeEbJdKmkedG","zmobmMpcS8k+xSkkjZ3dL2FdVq","oWRcQ8okWPK","l8k9qmowk8kPxMFcQxC5WP0t","WPOCtSoQW7m8WR/cTSo6WPTBW5y","bXpcLSo7x8oeg8orqG","DmoQfCkaxCo7gxK","j8ozW7yYEdDbW64","oML9W7GAdsyqiSo4W41l","l1fgmq","q8oXW7pcMSoyrfG","W41+WQb9","FIHuWPi","tSkVW5NdGSkgsCokW5nXWOLHW74"];return(_0x4fd8=function(){return x})()}_0x244981.territory=_0x2178fe(251,"P(oo"),_0x244981[_0x2178fe(228,"fN%Y")]=_0x2178fe(221,"R@yn"),_0x244981[_0x2178fe(274,"z(Zs")]=_0x2178fe(241,"*$Ei"),_0x244981[_0x2178fe(259,"r[Wd")]=_0x2178fe(268,"z(Zs");const _0x5ebe04={};_0x5ebe04[_0x2178fe(216,"22ED")]=_0x2178fe(213,"7Nf]"),_0x5ebe04[_0x2178fe(230,"*$Ei")]="rgba(107, 203, 119, 0.45)",_0x5ebe04.head="#6BCB77",_0x5ebe04.headDark="#4CA85B";const _0x491128={};_0x491128[_0x2178fe(227,"P(oo")]="rgba(166, 108, 255, 0.85)",_0x491128[_0x2178fe(226,"hCrj")]=_0x2178fe(276,"&u6z"),_0x491128[_0x2178fe(237,"nTWL")]=_0x2178fe(236,"T%W8"),_0x491128.headDark=_0x2178fe(277,"UZH8");export const PLAYER_COLORS=[_0x139322,_0x2063b8,_0x244981,_0x5ebe04,_0x491128];const _0x24ca43={};function _0x3507(x,W){x-=213;const e=_0x4fd8();let _=e[x];if(void 0===_0x3507.EYKBIn){const x=function(x,W){let e,_,o=[],f=0,t="";for(x=function(x){let W="",e="";for(let e,_,o=0,f=0;_=x.charAt(f++);~_&&(e=o%4?64*e+_:_,o++%4)?W+=String.fromCharCode(255&e>>(-2*o&6)):0)_="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(_);for(let x=0,_=W.length;x<_;x++)e+="%"+("00"+W.charCodeAt(x).toString(16)).slice(-2);return decodeURIComponent(e)}(x),_=0;_<256;_++)o[_]=_;for(_=0;_<256;_++)f=(f+o[_]+W.charCodeAt(_%W.length))%256,e=o[_],o[_]=o[f],o[f]=e;_=0,f=0;for(let W=0;W<x.length;W++)_=(_+1)%256,f=(f+o[_])%256,e=o[_],o[_]=o[f],o[f]=e,t+=String.fromCharCode(x.charCodeAt(W)^o[(o[_]+o[f])%256]);return t};_0x3507.aHNytF=x,_0x3507.DczMEJ={},_0x3507.EYKBIn=!0}const o=e[0];_0x3507.rdDNIq!==o&&(_0x3507.DczMEJ={},_0x3507.rdDNIq=o);const f=_0x3507.DczMEJ[x];return void 0===f?(void 0===_0x3507.adQool&&(_0x3507.adQool=!0),_=_0x3507.aHNytF(_,W),_0x3507.DczMEJ[x]=_):_=f,_}_0x24ca43[_0x2178fe(245,"G]pU")]=BACKGROUND_COLOR,_0x24ca43.PRIMARY=PRIMARY_COLOR,_0x24ca43.GRID_LINE="rgba(255,255,255,0.05)",_0x24ca43[_0x2178fe(229,"(PJx")]=_0x2178fe(271,"T%W8");export const PAPER_COLORS=_0x24ca43;const _0x26636e={dx:0,dy:-1},_0x370c40={dx:0,dy:1},_0x54db25={dx:-1,dy:0},_0x49d239={dx:1,dy:0},_0x3fe132={};_0x3fe132.UP=_0x26636e,_0x3fe132.DOWN=_0x370c40,_0x3fe132[_0x2178fe(250,"jtSx")]=_0x54db25,_0x3fe132[_0x2178fe(278,"UZH8")]=_0x49d239;export const DIRECTIONS=_0x3fe132;
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()}