diff --git a/Games/Gem_Cruncher/README.md b/Games/Gem_Cruncher/README.md new file mode 100644 index 0000000000..851f76946d --- /dev/null +++ b/Games/Gem_Cruncher/README.md @@ -0,0 +1,69 @@ +# **Game_Name** +Gem Cruncher +--- +
+ +## **Description 📃** + Tile-matching puzzle game where players swap adjacent candies on a grid to form vertical or horizontal lines of three or more candies of the same color, which are then cleared from the grid, causing new candies to cascade down to fill the empty space. + +## **functionalities 🎮** +The player aims to swap adjacent Gems to create matches of three or more Gems of the same type. +When three or more Gems of the same type are aligned, they disappear from the board. +New Gem fall from the top to fill the empty spaces, potentially creating new matches (a chain reaction). +- +
+ +## **How to play? 🕹ī¸** +find and eliminate matches of three or more candies of the same color in a row or column. + +
+ +## **Screenshots 📸** +C:\Users\a\GameZone\Games\Gem_Cruncher\public\pic.png + +
+ +## Getting started + +Install the dependencies... + +```bash +git clone +cd Gem_Cruncher +npm install +``` + +```bash +npm run dev +``` + +Navigate to [localhost:5000](http://localhost:5000). You should see the app running and start playing around. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Games/Gem_Cruncher/package-lock.json b/Games/Gem_Cruncher/package-lock.json new file mode 100644 index 0000000000..ab4070b8da --- /dev/null +++ b/Games/Gem_Cruncher/package-lock.json @@ -0,0 +1,795 @@ +{ + "name": "svelte-app", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "svelte-app", + "version": "1.0.0", + "dependencies": { + "sirv-cli": "^0.4.4" + }, + "devDependencies": { + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-node-resolve": "^7.0.0", + "rollup": "^1.20.0", + "rollup-plugin-livereload": "^1.0.0", + "rollup-plugin-svelte": "^5.0.3", + "rollup-plugin-terser": "^5.1.2", + "svelte": "^3.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.8.3" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", + "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==", + "dev": true + }, + "node_modules/@babel/highlight": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", + "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.9.0", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "node_modules/@polka/url": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-0.5.0.tgz", + "integrity": "sha512-oZLYFEAzUKyi3SKnXvj32ZCEGH6RDnao7COuCVhDydMS9NrCSVXhM79VaKyP5+Zc33m0QXEd2DN3UkU7OsHcfw==" + }, + "node_modules/@rollup/plugin-commonjs": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-11.0.2.tgz", + "integrity": "sha512-MPYGZr0qdbV5zZj8/2AuomVpnRVXRU5XKXb3HVniwRoRCreGlf5kOE081isNWeiLIi6IYkwTX9zE0/c7V8g81g==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^3.0.0", + "estree-walker": "^1.0.1", + "is-reference": "^1.1.2", + "magic-string": "^0.25.2", + "resolve": "^1.11.0" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0" + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz", + "integrity": "sha512-RxtSL3XmdTAE2byxekYLnx+98kEUOrPHF/KRVjLH+DEIHy6kjIw7YINQzn+NXiH/NTrQLAwYs0GWB+csWygA9Q==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^3.0.8", + "@types/resolve": "0.0.8", + "builtin-modules": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.14.2" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" + } + }, + "node_modules/@rollup/pluginutils": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.9.tgz", + "integrity": "sha512-TLZavlfPAZYI7v33wQh4mTP6zojne14yok3DNSLcjoG/Hirxfkonn6icP5rrNWRn8nZsirJBFFpijVOJzkUHDg==", + "dev": true, + "dependencies": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "micromatch": "^4.0.2" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" + } + }, + "node_modules/@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "13.13.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.4.tgz", + "integrity": "sha512-x26ur3dSXgv5AwKS0lNfbjpCakGIduWU1DU91Zz58ONRWrIKGunmZBNv4P7N+e27sJkiGDsw/3fT4AtsqQBrBA==", + "dev": true + }, + "node_modules/@types/resolve": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", + "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/acorn": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "node_modules/builtin-modules": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", + "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chokidar": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz", + "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.4.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.1.2" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/console-clear": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/console-clear/-/console-clear-1.1.1.tgz", + "integrity": "sha512-pMD+MVR538ipqkG5JXeOEbKWS5um1H4LUUccUQG68qpeqBYbzYy79Gh55jkd2TtPdRfUaLWdv6LPP//5Zt0aPQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "deprecated": "\"Please update to latest v2.3 or v2.2\"", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=", + "engines": { + "node": ">=4" + } + }, + "node_modules/glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-reference": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.4.tgz", + "integrity": "sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw==", + "dev": true, + "dependencies": { + "@types/estree": "0.0.39" + } + }, + "node_modules/jest-worker": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", + "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", + "dev": true, + "dependencies": { + "merge-stream": "^2.0.0", + "supports-color": "^6.1.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "engines": { + "node": ">=6" + } + }, + "node_modules/livereload": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/livereload/-/livereload-0.9.1.tgz", + "integrity": "sha512-9g7sua11kkyZNo2hLRCG3LuZZwqexoyEyecSlV8cAsfAVVCZqLzVir6XDqmH0r+Vzgnd5LrdHDMyjtFnJQLAYw==", + "dev": true, + "dependencies": { + "chokidar": "^3.3.0", + "livereload-js": "^3.1.0", + "opts": ">= 1.2.0", + "ws": "^6.2.1" + }, + "bin": { + "livereload": "bin/livereload.js" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/livereload-js": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-3.2.2.tgz", + "integrity": "sha512-xhScbNeC687ZINjEf/bD+BMiPx4s4q0mehcLb3zCc8+mykOtmaBR4vqzyIV9rIGdG9JjHaT0LiFdscvivCjX1Q==", + "dev": true + }, + "node_modules/local-access": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/local-access/-/local-access-1.0.1.tgz", + "integrity": "sha512-ykt2pgN0aqIy6KQC1CqdWTWkmUwNgaOS6dcpHVjyBJONA+Xi7AtSB1vuxC/U/0tjIP3wcRudwQk1YYzUvzk2bA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/magic-string": { + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "dev": true, + "dependencies": { + "sourcemap-codec": "^1.4.4" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "dependencies": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mime": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.5.tgz", + "integrity": "sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/mri": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.5.tgz", + "integrity": "sha512-d2RKzMD4JNyHMbnbWnznPaa8vbdlq/4pNZ3IgdaGrVbBhebBsGUUE/6qorTMYNS6TwuH3ilfOlD2bf4Igh8CKg==", + "engines": { + "node": ">=4" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/opts": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/opts/-/opts-1.2.7.tgz", + "integrity": "sha512-hwZhzGGG/GQ7igxAVFOEun2N4fWul31qE9nfBdCnZGQCB5+L7tN9xZ+94B4aUpLOJx/of3zZs5XsuubayQYQjA==", + "dev": true + }, + "node_modules/path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/readdirp": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", + "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/require-relative": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", + "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=", + "dev": true + }, + "node_modules/resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "dependencies": { + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/rollup": { + "version": "1.32.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.32.1.tgz", + "integrity": "sha512-/2HA0Ec70TvQnXdzynFffkjA6XN+1e2pEv/uKS5Ulca40g2L7KuOE3riasHoNVHOsFD5KKZgDsMk1CP3Tw9s+A==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/node": "*", + "acorn": "^7.1.0" + }, + "bin": { + "rollup": "dist/bin/rollup" + } + }, + "node_modules/rollup-plugin-livereload": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-livereload/-/rollup-plugin-livereload-1.3.0.tgz", + "integrity": "sha512-abyqXaB21+nFHo+vJULBqfzNx6zXABC19UyvqgDfdoxR/8pFAd041GO+GIUe8ZYC2DbuMUmioh1Lvbk14YLZgw==", + "dev": true, + "dependencies": { + "livereload": "^0.9.1" + } + }, + "node_modules/rollup-plugin-svelte": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-5.2.1.tgz", + "integrity": "sha512-wc93cN66sRpX6uFljVFqvWT6NU3V5ab/uLXKt2UiARuexFU/ctolzkmdXM7WM5iKdTX9scToS9sabJTJV4DUMA==", + "dev": true, + "dependencies": { + "require-relative": "^0.8.7", + "rollup-pluginutils": "^2.8.2", + "sourcemap-codec": "^1.4.8" + }, + "peerDependencies": { + "rollup": ">=0.60.0", + "svelte": "*" + } + }, + "node_modules/rollup-plugin-terser": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.3.0.tgz", + "integrity": "sha512-XGMJihTIO3eIBsVGq7jiNYOdDMb3pVxuzY0uhOE/FM4x/u9nQgr3+McsjzqBn3QfHIpNSZmFnpoKAwHBEcsT7g==", + "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.5.5", + "jest-worker": "^24.9.0", + "rollup-pluginutils": "^2.8.2", + "serialize-javascript": "^2.1.2", + "terser": "^4.6.2" + }, + "peerDependencies": { + "rollup": ">=0.66.0 <3" + } + }, + "node_modules/rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "dependencies": { + "estree-walker": "^0.6.1" + } + }, + "node_modules/rollup-pluginutils/node_modules/estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, + "node_modules/sade": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.7.3.tgz", + "integrity": "sha512-m4BctppMvJ60W1dXnHq7jMmFe3hPJZDAH85kQ3ACTo7XZNVUuTItCQ+2HfyaMeV5cKrbw7l4vD/6We3GBxvdJw==", + "dependencies": { + "mri": "^1.1.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/serialize-javascript": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", + "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", + "dev": true + }, + "node_modules/sirv": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-0.4.2.tgz", + "integrity": "sha512-dQbZnsMaIiTQPZmbGmktz+c74zt/hyrJEB4tdp2Jj0RNv9J6B/OWR5RyrZEvIn9fyh9Zlg2OlE2XzKz6wMKGAw==", + "dependencies": { + "@polka/url": "^0.5.0", + "mime": "^2.3.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/sirv-cli": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/sirv-cli/-/sirv-cli-0.4.5.tgz", + "integrity": "sha512-Fl6icSm0EwPrXSGid2xphMp//WNTSX2yENRAGnJuuZNmdc8LvE/BtdZD3MPn28ifAfDqTMwbB3dpcZojAIOiBg==", + "dependencies": { + "console-clear": "^1.1.0", + "get-port": "^3.2.0", + "kleur": "^3.0.0", + "local-access": "^1.0.1", + "sade": "^1.4.0", + "sirv": "^0.4.2", + "tinydate": "^1.0.0" + }, + "bin": { + "sirv": "index.js" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "deprecated": "Please use @jridgewell/sourcemap-codec instead", + "dev": true + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/svelte": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.21.0.tgz", + "integrity": "sha512-smh3LZKPCGJ+UXa0iZvUmuDctPYCwPY1opmClTWTm+l6e4y9FHLoCZMiue8YIeyc9JvlGT/EK0xry0diXjFDZQ==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/terser": { + "version": "4.6.13", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.13.tgz", + "integrity": "sha512-wMvqukYgVpQlymbnNbabVZbtM6PN63AzqexpwJL8tbh/mRT9LE5o+ruVduAGL7D6Fpjl+Q+06U5I9Ul82odAhw==", + "dev": true, + "dependencies": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/tinydate": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.2.0.tgz", + "integrity": "sha512-3GwPk8VhDFnUZ2TrgkhXJs6hcMAIIw4x/xkz+ayK6dGoQmp2nUwKzBXK0WnMsqkh6vfUhpqQicQF3rbshfyJkg==", + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ws": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", + "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", + "dev": true, + "dependencies": { + "async-limiter": "~1.0.0" + } + } + } +} diff --git a/Games/Gem_Cruncher/package.json b/Games/Gem_Cruncher/package.json new file mode 100644 index 0000000000..267b67028c --- /dev/null +++ b/Games/Gem_Cruncher/package.json @@ -0,0 +1,21 @@ +{ + "name": "svelte-app", + "version": "1.0.0", + "scripts": { + "build": "rollup -c", + "dev": "rollup -c -w", + "start": "sirv public" + }, + "devDependencies": { + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-node-resolve": "^7.0.0", + "rollup": "^1.20.0", + "rollup-plugin-livereload": "^1.0.0", + "rollup-plugin-svelte": "^5.0.3", + "rollup-plugin-terser": "^5.1.2", + "svelte": "^3.0.0" + }, + "dependencies": { + "sirv-cli": "^0.4.4" + } +} diff --git a/Games/Gem_Cruncher/public/Gem_Cruncher - Shortcut.lnk b/Games/Gem_Cruncher/public/Gem_Cruncher - Shortcut.lnk new file mode 100644 index 0000000000..234cc5eb94 Binary files /dev/null and b/Games/Gem_Cruncher/public/Gem_Cruncher - Shortcut.lnk differ diff --git a/Games/Gem_Cruncher/public/assets/bg-blured.png b/Games/Gem_Cruncher/public/assets/bg-blured.png new file mode 100644 index 0000000000..e4a5b9087f Binary files /dev/null and b/Games/Gem_Cruncher/public/assets/bg-blured.png differ diff --git a/Games/Gem_Cruncher/public/assets/match.wav b/Games/Gem_Cruncher/public/assets/match.wav new file mode 100644 index 0000000000..8af1ed8310 Binary files /dev/null and b/Games/Gem_Cruncher/public/assets/match.wav differ diff --git a/Games/Gem_Cruncher/public/assets/target.svg b/Games/Gem_Cruncher/public/assets/target.svg new file mode 100644 index 0000000000..eb7662211e --- /dev/null +++ b/Games/Gem_Cruncher/public/assets/target.svg @@ -0,0 +1 @@ + diff --git a/Games/Gem_Cruncher/public/assets/tilesheet.png b/Games/Gem_Cruncher/public/assets/tilesheet.png new file mode 100644 index 0000000000..92a6546d58 Binary files /dev/null and b/Games/Gem_Cruncher/public/assets/tilesheet.png differ diff --git a/Games/Gem_Cruncher/public/assets/tilesheet.webp b/Games/Gem_Cruncher/public/assets/tilesheet.webp new file mode 100644 index 0000000000..c401327764 Binary files /dev/null and b/Games/Gem_Cruncher/public/assets/tilesheet.webp differ diff --git a/Games/Gem_Cruncher/public/build/bundle.css b/Games/Gem_Cruncher/public/build/bundle.css new file mode 100644 index 0000000000..71b03ef115 --- /dev/null +++ b/Games/Gem_Cruncher/public/build/bundle.css @@ -0,0 +1,10 @@ +main.svelte-1bymns{background:url(/assets/bg-blured.png) no-repeat bottom center;background-size:cover;padding:40px;height:100%;overflow:hidden;display:flex;align-items:center;justify-content:center}@media screen and (max-width: 768px){main.svelte-1bymns{padding:0}} +main.svelte-lfzdol{flex:1;display:flex;align-items:center}.board.svelte-lfzdol{position:relative;margin:0 auto;background:rgba(0, 53, 103, 0.5);box-shadow:inset 0 0 8px rgba(0, 53, 103, 1);border-radius:5px}.cell.svelte-lfzdol{position:absolute;width:var(--tile-size);height:var(--tile-size);pointer-events:none}.cell.is-selected.svelte-lfzdol{background-image:url(/assets/target.svg);animation:svelte-lfzdol-pulse 1.2s infinite}.tile-wrapper.svelte-lfzdol{position:absolute;width:var(--tile-size);height:var(--tile-size)}@keyframes svelte-lfzdol-pulse{0%{transform:scale(1.15)}50%{transform:scale(1.3)}100%{transform:scale(1.15)}} +button.svelte-1m9iqve{transition:all 0.1s;padding:12px 30px;border-radius:12px;font-size:24px;color:#fff;text-decoration:none;letter-spacing:1px;text-transform:uppercase;cursor:pointer;background-color:#3498db;border-bottom:5px solid #2980b9;text-shadow:0px -2px #2980b9;height:70px}button.svelte-1m9iqve:active{transform:translate(0px, 5px);-webkit-transform:translate(0px, 5px);border-bottom:1px solid}button.svelte-1m9iqve:focus{outline:none}@media screen and (max-width: 768px){button.svelte-1m9iqve{font-size:18px;height:50px;padding:8px 24px}} +main.svelte-1vyypha{display:flex;flex-direction:column;height:100%;max-width:1200px;max-height:1000px;margin:0 auto}.please-rotate.svelte-1vyypha{color:white;padding:40px 20px;border-radius:20px;background:-webkit-linear-gradient(top, #ff5db1 0%, #ef017c 100%);text-transform:uppercase;letter-spacing:2px;text-shadow:1px 1px 2px rgba(0, 0, 0, 0.5);border:4px solid white;width:400px;text-align:center;font-size:30px;display:none}@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: landscape){main.svelte-1vyypha{display:none}.please-rotate.svelte-1vyypha{display:block}} +footer.svelte-1c81l3p{display:flex;justify-content:space-between;align-items:flex-end;padding:1rem 0} +header.svelte-87os51{height:100px;display:flex;align-items:flex-end;justify-content:space-between}.group.svelte-87os51{color:white;padding:10px 20px;border-radius:20px;background:-webkit-linear-gradient(top, #ff5db1 0%, #ef017c 100%);text-transform:uppercase;letter-spacing:1px;text-shadow:1px 1px 2px rgba(0, 0, 0, 0.5);border:4px solid white}.group-value.svelte-87os51{font-size:40px}.moves.svelte-87os51{margin-right:10px}.score.svelte-87os51{justify-self:end;min-width:200px;text-align:right}@media screen and (max-width: 768px){.group.svelte-87os51{padding:6px 12px;border-radius:12px}.group-value.svelte-87os51{font-size:30px}.score.svelte-87os51{min-width:150px}} +.overlay.svelte-1kzjg8m{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.4);padding:24px;display:none;justify-content:center;align-items:center}.overlay.visible.svelte-1kzjg8m{display:flex}.modal.svelte-1kzjg8m{color:white;padding:40px 20px;border-radius:20px;background:-webkit-linear-gradient(top, #ff5db1 0%, #ef017c 100%);text-transform:uppercase;letter-spacing:2px;text-shadow:1px 1px 2px rgba(0, 0, 0, 0.5);border:4px solid white;width:400px;text-align:center;font-size:30px}.title.svelte-1kzjg8m{font-size:38px}.score.svelte-1kzjg8m{font-size:50px;margin:18px 0}.best-score.svelte-1kzjg8m{margin-bottom:24px} +.tile.svelte-rudbdh{width:var(--tile-size);height:var(--tile-size);background-image:url(/assets/tilesheet.webp);background-size:calc(var(--tile-size) * 2);cursor:pointer}.tile-1.svelte-rudbdh{background-position-y:0}.tile-2.svelte-rudbdh{background-position-y:calc(var(--tile-size) * -1)}.tile-3.svelte-rudbdh{background-position-y:calc(var(--tile-size) * -2)}.tile-4.svelte-rudbdh{background-position-y:calc(var(--tile-size) * -3)}.tile-5.svelte-rudbdh{background-position-y:calc(var(--tile-size) * -4)}.is-selected.svelte-rudbdh{background-position-x:calc(var(--tile-size) * -1)} + +/*# sourceMappingURL=bundle.css.map */ \ No newline at end of file diff --git a/Games/Gem_Cruncher/public/build/bundle.css.map b/Games/Gem_Cruncher/public/build/bundle.css.map new file mode 100644 index 0000000000..9c1e9343a5 --- /dev/null +++ b/Games/Gem_Cruncher/public/build/bundle.css.map @@ -0,0 +1,26 @@ +{ + "version": 3, + "file": "bundle.css", + "sources": [ + "..\\..\\App.svelte", + "..\\..\\Board.svelte", + "..\\..\\Button.svelte", + "..\\..\\Game.svelte", + "..\\..\\GameFooter.svelte", + "..\\..\\GameHeader.svelte", + "..\\..\\GameOverModal.svelte", + "..\\..\\Tile.svelte" + ], + "sourcesContent": [ + "\n\n\n\n
\n \n
\n", + "\n\n\n\n
\n
\n {#each board as tile, i (tile.id)}\n \n {#if tile.type !== null}\n handleTileClick(i)}\n on:swipe={handleSwipe}\n selected={isTileSelected(i)} />\n {/if}\n \n {/each}\n {#each cells as cell, i}\n \n {/each}\n
\n
\n", + "\n\n\n", + "\n\n\n\n
\n \n \n \n \n
\n\n
Please rotate phone 😄
\n", + "\n\n\n\n\n", + "\n\n\n\n
\n
\n
Moves
\n
{$game.moves}
\n
\n
\n
Score
\n
{$game.score}
\n
\n \n \n
\n", + "\n\n\n\n
\n
\n
Game Over
\n
{score}
\n
Best: {bestScore}
\n \n
\n
\n", + "\n\n\n\n\n \n\n" + ], + "names": [], + "mappings": "AAKE,IAAI,cAAC,CAAC,AACJ,UAAU,CAAE,IAAI,qBAAqB,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAC9D,eAAe,CAAE,KAAK,CACtB,OAAO,CAAE,IAAI,CACb,MAAM,CAAE,IAAI,CACZ,QAAQ,CAAE,MAAM,CAChB,OAAO,CAAE,IA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AAK,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,AACpD,CAAC,AAED,OAAO,cAAC,CAAC,AACP,qBAAqB,CAAE,KAAK,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,AACpD,CAAC,AAED,YAAY,cAAC,CAAC,AACZ,qBAAqB,CAAE,KAAK,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,AACpD,CAAC" +} \ No newline at end of file diff --git a/Games/Gem_Cruncher/public/build/bundle.js b/Games/Gem_Cruncher/public/build/bundle.js new file mode 100644 index 0000000000..cbf3edef20 --- /dev/null +++ b/Games/Gem_Cruncher/public/build/bundle.js @@ -0,0 +1,3139 @@ + +(function(l, r) { if (l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (window.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(window.document); +var app = (function () { + 'use strict'; + + function noop() { } + const identity = x => x; + function assign(tar, src) { + // @ts-ignore + for (const k in src) + tar[k] = src[k]; + return tar; + } + function add_location(element, file, line, column, char) { + element.__svelte_meta = { + loc: { file, line, column, char } + }; + } + function run(fn) { + return fn(); + } + function blank_object() { + return Object.create(null); + } + function run_all(fns) { + fns.forEach(run); + } + function is_function(thing) { + return typeof thing === 'function'; + } + function safe_not_equal(a, b) { + return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); + } + function validate_store(store, name) { + if (store != null && typeof store.subscribe !== 'function') { + throw new Error(`'${name}' is not a store with a 'subscribe' method`); + } + } + function subscribe(store, ...callbacks) { + if (store == null) { + return noop; + } + const unsub = store.subscribe(...callbacks); + return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub; + } + function component_subscribe(component, store, callback) { + component.$$.on_destroy.push(subscribe(store, callback)); + } + function create_slot(definition, ctx, $$scope, fn) { + if (definition) { + const slot_ctx = get_slot_context(definition, ctx, $$scope, fn); + return definition[0](slot_ctx); + } + } + function get_slot_context(definition, ctx, $$scope, fn) { + return definition[1] && fn + ? assign($$scope.ctx.slice(), definition[1](fn(ctx))) + : $$scope.ctx; + } + function get_slot_changes(definition, $$scope, dirty, fn) { + if (definition[2] && fn) { + const lets = definition[2](fn(dirty)); + if ($$scope.dirty === undefined) { + return lets; + } + if (typeof lets === 'object') { + const merged = []; + const len = Math.max($$scope.dirty.length, lets.length); + for (let i = 0; i < len; i += 1) { + merged[i] = $$scope.dirty[i] | lets[i]; + } + return merged; + } + return $$scope.dirty | lets; + } + return $$scope.dirty; + } + + const is_client = typeof window !== 'undefined'; + let now = is_client + ? () => window.performance.now() + : () => Date.now(); + let raf = is_client ? cb => requestAnimationFrame(cb) : noop; + + const tasks = new Set(); + function run_tasks(now) { + tasks.forEach(task => { + if (!task.c(now)) { + tasks.delete(task); + task.f(); + } + }); + if (tasks.size !== 0) + raf(run_tasks); + } + /** + * Creates a new task that runs on each raf frame + * until it returns a falsy value or is aborted + */ + function loop(callback) { + let task; + if (tasks.size === 0) + raf(run_tasks); + return { + promise: new Promise(fulfill => { + tasks.add(task = { c: callback, f: fulfill }); + }), + abort() { + tasks.delete(task); + } + }; + } + + function append(target, node) { + target.appendChild(node); + } + function insert(target, node, anchor) { + target.insertBefore(node, anchor || null); + } + function detach(node) { + node.parentNode.removeChild(node); + } + function destroy_each(iterations, detaching) { + for (let i = 0; i < iterations.length; i += 1) { + if (iterations[i]) + iterations[i].d(detaching); + } + } + function element(name) { + return document.createElement(name); + } + function text(data) { + return document.createTextNode(data); + } + function space() { + return text(' '); + } + function listen(node, event, handler, options) { + node.addEventListener(event, handler, options); + return () => node.removeEventListener(event, handler, options); + } + function attr(node, attribute, value) { + if (value == null) + node.removeAttribute(attribute); + else if (node.getAttribute(attribute) !== value) + node.setAttribute(attribute, value); + } + function children(element) { + return Array.from(element.childNodes); + } + function set_style(node, key, value, important) { + node.style.setProperty(key, value, important ? 'important' : ''); + } + function toggle_class(element, name, toggle) { + element.classList[toggle ? 'add' : 'remove'](name); + } + function custom_event(type, detail) { + const e = document.createEvent('CustomEvent'); + e.initCustomEvent(type, false, false, detail); + return e; + } + + const active_docs = new Set(); + let active = 0; + // https://github.com/darkskyapp/string-hash/blob/master/index.js + function hash(str) { + let hash = 5381; + let i = str.length; + while (i--) + hash = ((hash << 5) - hash) ^ str.charCodeAt(i); + return hash >>> 0; + } + function create_rule(node, a, b, duration, delay, ease, fn, uid = 0) { + const step = 16.666 / duration; + let keyframes = '{\n'; + for (let p = 0; p <= 1; p += step) { + const t = a + (b - a) * ease(p); + keyframes += p * 100 + `%{${fn(t, 1 - t)}}\n`; + } + const rule = keyframes + `100% {${fn(b, 1 - b)}}\n}`; + const name = `__svelte_${hash(rule)}_${uid}`; + const doc = node.ownerDocument; + active_docs.add(doc); + const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet); + const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {}); + if (!current_rules[name]) { + current_rules[name] = true; + stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length); + } + const animation = node.style.animation || ''; + node.style.animation = `${animation ? `${animation}, ` : ``}${name} ${duration}ms linear ${delay}ms 1 both`; + active += 1; + return name; + } + function delete_rule(node, name) { + const previous = (node.style.animation || '').split(', '); + const next = previous.filter(name + ? anim => anim.indexOf(name) < 0 // remove specific animation + : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations + ); + const deleted = previous.length - next.length; + if (deleted) { + node.style.animation = next.join(', '); + active -= deleted; + if (!active) + clear_rules(); + } + } + function clear_rules() { + raf(() => { + if (active) + return; + active_docs.forEach(doc => { + const stylesheet = doc.__svelte_stylesheet; + let i = stylesheet.cssRules.length; + while (i--) + stylesheet.deleteRule(i); + doc.__svelte_rules = {}; + }); + active_docs.clear(); + }); + } + + function create_animation(node, from, fn, params) { + if (!from) + return noop; + const to = node.getBoundingClientRect(); + if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom) + return noop; + const { delay = 0, duration = 300, easing = identity, + // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation? + start: start_time = now() + delay, + // @ts-ignore todo: + end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params); + let running = true; + let started = false; + let name; + function start() { + if (css) { + name = create_rule(node, 0, 1, duration, delay, easing, css); + } + if (!delay) { + started = true; + } + } + function stop() { + if (css) + delete_rule(node, name); + running = false; + } + loop(now => { + if (!started && now >= start_time) { + started = true; + } + if (started && now >= end) { + tick(1, 0); + stop(); + } + if (!running) { + return false; + } + if (started) { + const p = now - start_time; + const t = 0 + 1 * easing(p / duration); + tick(t, 1 - t); + } + return true; + }); + start(); + tick(0, 1); + return stop; + } + function fix_position(node) { + const style = getComputedStyle(node); + if (style.position !== 'absolute' && style.position !== 'fixed') { + const { width, height } = style; + const a = node.getBoundingClientRect(); + node.style.position = 'absolute'; + node.style.width = width; + node.style.height = height; + add_transform(node, a); + } + } + function add_transform(node, a) { + const b = node.getBoundingClientRect(); + if (a.left !== b.left || a.top !== b.top) { + const style = getComputedStyle(node); + const transform = style.transform === 'none' ? '' : style.transform; + node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`; + } + } + + let current_component; + function set_current_component(component) { + current_component = component; + } + function get_current_component() { + if (!current_component) + throw new Error(`Function called outside component initialization`); + return current_component; + } + function onMount(fn) { + get_current_component().$$.on_mount.push(fn); + } + function createEventDispatcher() { + const component = get_current_component(); + return (type, detail) => { + const callbacks = component.$$.callbacks[type]; + if (callbacks) { + // TODO are there situations where events could be dispatched + // in a server (non-DOM) environment? + const event = custom_event(type, detail); + callbacks.slice().forEach(fn => { + fn.call(component, event); + }); + } + }; + } + // TODO figure out if we still want to support + // shorthand events, or if we want to implement + // a real bubbling mechanism + function bubble(component, event) { + const callbacks = component.$$.callbacks[event.type]; + if (callbacks) { + callbacks.slice().forEach(fn => fn(event)); + } + } + + const dirty_components = []; + const binding_callbacks = []; + const render_callbacks = []; + const flush_callbacks = []; + const resolved_promise = Promise.resolve(); + let update_scheduled = false; + function schedule_update() { + if (!update_scheduled) { + update_scheduled = true; + resolved_promise.then(flush); + } + } + function add_render_callback(fn) { + render_callbacks.push(fn); + } + let flushing = false; + const seen_callbacks = new Set(); + function flush() { + if (flushing) + return; + flushing = true; + do { + // first, call beforeUpdate functions + // and update components + for (let i = 0; i < dirty_components.length; i += 1) { + const component = dirty_components[i]; + set_current_component(component); + update(component.$$); + } + dirty_components.length = 0; + while (binding_callbacks.length) + binding_callbacks.pop()(); + // then, once components are updated, call + // afterUpdate functions. This may cause + // subsequent updates... + for (let i = 0; i < render_callbacks.length; i += 1) { + const callback = render_callbacks[i]; + if (!seen_callbacks.has(callback)) { + // ...so guard against infinite loops + seen_callbacks.add(callback); + callback(); + } + } + render_callbacks.length = 0; + } while (dirty_components.length); + while (flush_callbacks.length) { + flush_callbacks.pop()(); + } + update_scheduled = false; + flushing = false; + seen_callbacks.clear(); + } + function update($$) { + if ($$.fragment !== null) { + $$.update(); + run_all($$.before_update); + const dirty = $$.dirty; + $$.dirty = [-1]; + $$.fragment && $$.fragment.p($$.ctx, dirty); + $$.after_update.forEach(add_render_callback); + } + } + + let promise; + function wait() { + if (!promise) { + promise = Promise.resolve(); + promise.then(() => { + promise = null; + }); + } + return promise; + } + function dispatch(node, direction, kind) { + node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`)); + } + const outroing = new Set(); + let outros; + function group_outros() { + outros = { + r: 0, + c: [], + p: outros // parent group + }; + } + function check_outros() { + if (!outros.r) { + run_all(outros.c); + } + outros = outros.p; + } + function transition_in(block, local) { + if (block && block.i) { + outroing.delete(block); + block.i(local); + } + } + function transition_out(block, local, detach, callback) { + if (block && block.o) { + if (outroing.has(block)) + return; + outroing.add(block); + outros.c.push(() => { + outroing.delete(block); + if (callback) { + if (detach) + block.d(1); + callback(); + } + }); + block.o(local); + } + } + const null_transition = { duration: 0 }; + function create_in_transition(node, fn, params) { + let config = fn(node, params); + let running = false; + let animation_name; + let task; + let uid = 0; + function cleanup() { + if (animation_name) + delete_rule(node, animation_name); + } + function go() { + const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition; + if (css) + animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++); + tick(0, 1); + const start_time = now() + delay; + const end_time = start_time + duration; + if (task) + task.abort(); + running = true; + add_render_callback(() => dispatch(node, true, 'start')); + task = loop(now => { + if (running) { + if (now >= end_time) { + tick(1, 0); + dispatch(node, true, 'end'); + cleanup(); + return running = false; + } + if (now >= start_time) { + const t = easing((now - start_time) / duration); + tick(t, 1 - t); + } + } + return running; + }); + } + let started = false; + return { + start() { + if (started) + return; + delete_rule(node); + if (is_function(config)) { + config = config(); + wait().then(go); + } + else { + go(); + } + }, + invalidate() { + started = false; + }, + end() { + if (running) { + cleanup(); + running = false; + } + } + }; + } + function create_out_transition(node, fn, params) { + let config = fn(node, params); + let running = true; + let animation_name; + const group = outros; + group.r += 1; + function go() { + const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition; + if (css) + animation_name = create_rule(node, 1, 0, duration, delay, easing, css); + const start_time = now() + delay; + const end_time = start_time + duration; + add_render_callback(() => dispatch(node, false, 'start')); + loop(now => { + if (running) { + if (now >= end_time) { + tick(0, 1); + dispatch(node, false, 'end'); + if (!--group.r) { + // this will result in `end()` being called, + // so we don't need to clean up here + run_all(group.c); + } + return false; + } + if (now >= start_time) { + const t = easing((now - start_time) / duration); + tick(1 - t, t); + } + } + return running; + }); + } + if (is_function(config)) { + wait().then(() => { + // @ts-ignore + config = config(); + go(); + }); + } + else { + go(); + } + return { + end(reset) { + if (reset && config.tick) { + config.tick(1, 0); + } + if (running) { + if (animation_name) + delete_rule(node, animation_name); + running = false; + } + } + }; + } + function outro_and_destroy_block(block, lookup) { + transition_out(block, 1, 1, () => { + lookup.delete(block.key); + }); + } + function fix_and_outro_and_destroy_block(block, lookup) { + block.f(); + outro_and_destroy_block(block, lookup); + } + function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) { + let o = old_blocks.length; + let n = list.length; + let i = o; + const old_indexes = {}; + while (i--) + old_indexes[old_blocks[i].key] = i; + const new_blocks = []; + const new_lookup = new Map(); + const deltas = new Map(); + i = n; + while (i--) { + const child_ctx = get_context(ctx, list, i); + const key = get_key(child_ctx); + let block = lookup.get(key); + if (!block) { + block = create_each_block(key, child_ctx); + block.c(); + } + else if (dynamic) { + block.p(child_ctx, dirty); + } + new_lookup.set(key, new_blocks[i] = block); + if (key in old_indexes) + deltas.set(key, Math.abs(i - old_indexes[key])); + } + const will_move = new Set(); + const did_move = new Set(); + function insert(block) { + transition_in(block, 1); + block.m(node, next, lookup.has(block.key)); + lookup.set(block.key, block); + next = block.first; + n--; + } + while (o && n) { + const new_block = new_blocks[n - 1]; + const old_block = old_blocks[o - 1]; + const new_key = new_block.key; + const old_key = old_block.key; + if (new_block === old_block) { + // do nothing + next = new_block.first; + o--; + n--; + } + else if (!new_lookup.has(old_key)) { + // remove old block + destroy(old_block, lookup); + o--; + } + else if (!lookup.has(new_key) || will_move.has(new_key)) { + insert(new_block); + } + else if (did_move.has(old_key)) { + o--; + } + else if (deltas.get(new_key) > deltas.get(old_key)) { + did_move.add(new_key); + insert(new_block); + } + else { + will_move.add(old_key); + o--; + } + } + while (o--) { + const old_block = old_blocks[o]; + if (!new_lookup.has(old_block.key)) + destroy(old_block, lookup); + } + while (n) + insert(new_blocks[n - 1]); + return new_blocks; + } + function validate_each_keys(ctx, list, get_context, get_key) { + const keys = new Set(); + for (let i = 0; i < list.length; i++) { + const key = get_key(get_context(ctx, list, i)); + if (keys.has(key)) { + throw new Error(`Cannot have duplicate keys in a keyed each`); + } + keys.add(key); + } + } + function create_component(block) { + block && block.c(); + } + function mount_component(component, target, anchor) { + const { fragment, on_mount, on_destroy, after_update } = component.$$; + fragment && fragment.m(target, anchor); + // onMount happens before the initial afterUpdate + add_render_callback(() => { + const new_on_destroy = on_mount.map(run).filter(is_function); + if (on_destroy) { + on_destroy.push(...new_on_destroy); + } + else { + // Edge case - component was destroyed immediately, + // most likely as a result of a binding initialising + run_all(new_on_destroy); + } + component.$$.on_mount = []; + }); + after_update.forEach(add_render_callback); + } + function destroy_component(component, detaching) { + const $$ = component.$$; + if ($$.fragment !== null) { + run_all($$.on_destroy); + $$.fragment && $$.fragment.d(detaching); + // TODO null out other refs, including component.$$ (but need to + // preserve final state?) + $$.on_destroy = $$.fragment = null; + $$.ctx = []; + } + } + function make_dirty(component, i) { + if (component.$$.dirty[0] === -1) { + dirty_components.push(component); + schedule_update(); + component.$$.dirty.fill(0); + } + component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31)); + } + function init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) { + const parent_component = current_component; + set_current_component(component); + const prop_values = options.props || {}; + const $$ = component.$$ = { + fragment: null, + ctx: null, + // state + props, + update: noop, + not_equal, + bound: blank_object(), + // lifecycle + on_mount: [], + on_destroy: [], + before_update: [], + after_update: [], + context: new Map(parent_component ? parent_component.$$.context : []), + // everything else + callbacks: blank_object(), + dirty + }; + let ready = false; + $$.ctx = instance + ? instance(component, prop_values, (i, ret, ...rest) => { + const value = rest.length ? rest[0] : ret; + if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { + if ($$.bound[i]) + $$.bound[i](value); + if (ready) + make_dirty(component, i); + } + return ret; + }) + : []; + $$.update(); + ready = true; + run_all($$.before_update); + // `false` as a special case of no DOM component + $$.fragment = create_fragment ? create_fragment($$.ctx) : false; + if (options.target) { + if (options.hydrate) { + const nodes = children(options.target); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + $$.fragment && $$.fragment.l(nodes); + nodes.forEach(detach); + } + else { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + $$.fragment && $$.fragment.c(); + } + if (options.intro) + transition_in(component.$$.fragment); + mount_component(component, options.target, options.anchor); + flush(); + } + set_current_component(parent_component); + } + class SvelteComponent { + $destroy() { + destroy_component(this, 1); + this.$destroy = noop; + } + $on(type, callback) { + const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = [])); + callbacks.push(callback); + return () => { + const index = callbacks.indexOf(callback); + if (index !== -1) + callbacks.splice(index, 1); + }; + } + $set() { + // overridden by instance, if it has props + } + } + + function dispatch_dev(type, detail) { + document.dispatchEvent(custom_event(type, Object.assign({ version: '3.21.0' }, detail))); + } + function append_dev(target, node) { + dispatch_dev("SvelteDOMInsert", { target, node }); + append(target, node); + } + function insert_dev(target, node, anchor) { + dispatch_dev("SvelteDOMInsert", { target, node, anchor }); + insert(target, node, anchor); + } + function detach_dev(node) { + dispatch_dev("SvelteDOMRemove", { node }); + detach(node); + } + function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) { + const modifiers = options === true ? ["capture"] : options ? Array.from(Object.keys(options)) : []; + if (has_prevent_default) + modifiers.push('preventDefault'); + if (has_stop_propagation) + modifiers.push('stopPropagation'); + dispatch_dev("SvelteDOMAddEventListener", { node, event, handler, modifiers }); + const dispose = listen(node, event, handler, options); + return () => { + dispatch_dev("SvelteDOMRemoveEventListener", { node, event, handler, modifiers }); + dispose(); + }; + } + function attr_dev(node, attribute, value) { + attr(node, attribute, value); + if (value == null) + dispatch_dev("SvelteDOMRemoveAttribute", { node, attribute }); + else + dispatch_dev("SvelteDOMSetAttribute", { node, attribute, value }); + } + function set_data_dev(text, data) { + data = '' + data; + if (text.data === data) + return; + dispatch_dev("SvelteDOMSetData", { node: text, data }); + text.data = data; + } + function validate_each_argument(arg) { + if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) { + let msg = '{#each} only iterates over array-like objects.'; + if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) { + msg += ' You can use a spread to convert this iterable into an array.'; + } + throw new Error(msg); + } + } + function validate_slots(name, slot, keys) { + for (const slot_key of Object.keys(slot)) { + if (!~keys.indexOf(slot_key)) { + console.warn(`<${name}> received an unexpected slot "${slot_key}".`); + } + } + } + class SvelteComponentDev extends SvelteComponent { + constructor(options) { + if (!options || (!options.target && !options.$$inline)) { + throw new Error(`'target' is a required option`); + } + super(); + } + $destroy() { + super.$destroy(); + this.$destroy = () => { + console.warn(`Component was already destroyed`); // eslint-disable-line no-console + }; + } + $capture_state() { } + $inject_state() { } + } + + function cubicOut(t) { + const f = t - 1.0; + return f * f * f + 1.0; + } + function quintOut(t) { + return --t * t * t * t * t + 1; + } + + function flip(node, animation, params) { + const style = getComputedStyle(node); + const transform = style.transform === 'none' ? '' : style.transform; + const scaleX = animation.from.width / node.clientWidth; + const scaleY = animation.from.height / node.clientHeight; + const dx = (animation.from.left - animation.to.left) / scaleX; + const dy = (animation.from.top - animation.to.top) / scaleY; + const d = Math.sqrt(dx * dx + dy * dy); + const { delay = 0, duration = (d) => Math.sqrt(d) * 120, easing = cubicOut } = params; + return { + delay, + duration: is_function(duration) ? duration(d) : duration, + easing, + css: (_t, u) => `transform: ${transform} translate(${u * dx}px, ${u * dy}px);` + }; + } + + function fly(node, { delay = 0, duration = 400, easing = cubicOut, x = 0, y = 0, opacity = 0 }) { + const style = getComputedStyle(node); + const target_opacity = +style.opacity; + const transform = style.transform === 'none' ? '' : style.transform; + const od = target_opacity * (1 - opacity); + return { + delay, + duration, + easing, + css: (t, u) => ` + transform: ${transform} translate(${(1 - t) * x}px, ${(1 - t) * y}px); + opacity: ${target_opacity - (od * u)}` + }; + } + function scale(node, { delay = 0, duration = 400, easing = cubicOut, start = 0, opacity = 0 }) { + const style = getComputedStyle(node); + const target_opacity = +style.opacity; + const transform = style.transform === 'none' ? '' : style.transform; + const sd = 1 - start; + const od = target_opacity * (1 - opacity); + return { + delay, + duration, + easing, + css: (_t, u) => ` + transform: ${transform} scale(${1 - (sd * u)}); + opacity: ${target_opacity - (od * u)} + ` + }; + } + + /* src\components\Tile.svelte generated by Svelte v3.21.0 */ + const file = "src\\components\\Tile.svelte"; + + function create_fragment(ctx) { + let div; + let div_class_value; + let div_draggable_value; + let div_intro; + let div_outro; + let current; + let dispose; + const default_slot_template = /*$$slots*/ ctx[20].default; + const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[19], null); + + const block = { + c: function create() { + div = element("div"); + if (default_slot) default_slot.c(); + set_style(div, "--tile-size", /*size*/ ctx[1] + "px"); + attr_dev(div, "class", div_class_value = "tile tile-" + /*type*/ ctx[0] + " special-" + /*special*/ ctx[2] + " svelte-rudbdh"); + attr_dev(div, "draggable", div_draggable_value = true); + toggle_class(div, "is-selected", /*selected*/ ctx[3] || /*isSwiping*/ ctx[4]); + add_location(div, file, 109, 0, 2377); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor, remount) { + insert_dev(target, div, anchor); + + if (default_slot) { + default_slot.m(div, null); + } + + current = true; + if (remount) run_all(dispose); + + dispose = [ + listen_dev(div, "touchstart", /*handleTouchStart*/ ctx[5], false, false, false), + listen_dev(div, "touchmove", /*handleTouchMove*/ ctx[6], false, false, false), + listen_dev(div, "touchend", /*handleTouchEnd*/ ctx[7], { passive: true }, false, false), + listen_dev(div, "dragstart", /*handleDragStart*/ ctx[8], false, false, false), + listen_dev(div, "dragend", /*handleDragEnd*/ ctx[10], false, false, false), + listen_dev(div, "drag", /*handleDrag*/ ctx[9], false, false, false), + listen_dev(div, "click", /*click_handler*/ ctx[21], false, false, false) + ]; + }, + p: function update(ctx, [dirty]) { + if (default_slot) { + if (default_slot.p && dirty & /*$$scope*/ 524288) { + default_slot.p(get_slot_context(default_slot_template, ctx, /*$$scope*/ ctx[19], null), get_slot_changes(default_slot_template, /*$$scope*/ ctx[19], dirty, null)); + } + } + + if (!current || dirty & /*size*/ 2) { + set_style(div, "--tile-size", /*size*/ ctx[1] + "px"); + } + + if (!current || dirty & /*type, special*/ 5 && div_class_value !== (div_class_value = "tile tile-" + /*type*/ ctx[0] + " special-" + /*special*/ ctx[2] + " svelte-rudbdh")) { + attr_dev(div, "class", div_class_value); + } + + if (dirty & /*type, special, selected, isSwiping*/ 29) { + toggle_class(div, "is-selected", /*selected*/ ctx[3] || /*isSwiping*/ ctx[4]); + } + }, + i: function intro(local) { + if (current) return; + transition_in(default_slot, local); + + add_render_callback(() => { + if (div_outro) div_outro.end(1); + + if (!div_intro) div_intro = create_in_transition(div, fly, { + duration: 250, + delay: 100, + y: -100, + opacity: 0 + }); + + div_intro.start(); + }); + + current = true; + }, + o: function outro(local) { + transition_out(default_slot, local); + if (div_intro) div_intro.invalidate(); + div_outro = create_out_transition(div, scale, { duration: 200 }); + current = false; + }, + d: function destroy(detaching) { + if (detaching) detach_dev(div); + if (default_slot) default_slot.d(detaching); + if (detaching && div_outro) div_outro.end(); + run_all(dispose); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + function instance($$self, $$props, $$invalidate) { + let { type } = $$props; + let { index } = $$props; + let { size } = $$props; + let { special } = $$props; + let { selected = false } = $$props; + const dispatch = createEventDispatcher(); + const dragGhost = new Image(0, 0); + dragGhost.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"; + let SWIPE_THRESHOLD = size - 10; + let isSwiping = false; + let xDown; + let yDown; + let xDiff; + let yDiff; + + function handleTouchStart(event) { + $$invalidate(4, isSwiping = true); + xDown = event.touches ? event.touches[0].clientX : event.clientX; + yDown = event.touches ? event.touches[0].clientY : event.clientY; + xDiff = 0; + yDiff = 0; + } + + function handleTouchMove(event) { + if (!isSwiping) return; + const xUp = event.touches ? event.touches[0].clientX : event.clientX; + const yUp = event.touches ? event.touches[0].clientY : event.clientY; + let direction; + xDiff = xDown - xUp; + yDiff = yDown - yUp; + + if (xDiff < -SWIPE_THRESHOLD) { + direction = "right"; + } else if (xDiff > SWIPE_THRESHOLD) { + direction = "left"; + } else if (yDiff < -SWIPE_THRESHOLD) { + direction = "down"; + } else if (yDiff > SWIPE_THRESHOLD) { + direction = "up"; + } + + if (direction) { + dispatch("swipe", { direction, index }); + $$invalidate(4, isSwiping = false); + } + } + + function handleTouchEnd() { + $$invalidate(4, isSwiping = false); + } + + function handleDragStart(event) { + event.dataTransfer.setDragImage(dragGhost, 0, 0); + handleTouchStart(event); + } + + function handleDrag(event) { + handleTouchMove(event); + } + + function handleDragEnd() { + handleTouchEnd(); + } + + const writable_props = ["type", "index", "size", "special", "selected"]; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); + }); + + let { $$slots = {}, $$scope } = $$props; + validate_slots("Tile", $$slots, ['default']); + + function click_handler(event) { + bubble($$self, event); + } + + $$self.$set = $$props => { + if ("type" in $$props) $$invalidate(0, type = $$props.type); + if ("index" in $$props) $$invalidate(11, index = $$props.index); + if ("size" in $$props) $$invalidate(1, size = $$props.size); + if ("special" in $$props) $$invalidate(2, special = $$props.special); + if ("selected" in $$props) $$invalidate(3, selected = $$props.selected); + if ("$$scope" in $$props) $$invalidate(19, $$scope = $$props.$$scope); + }; + + $$self.$capture_state = () => ({ + createEventDispatcher, + fly, + scale, + type, + index, + size, + special, + selected, + dispatch, + dragGhost, + SWIPE_THRESHOLD, + isSwiping, + xDown, + yDown, + xDiff, + yDiff, + handleTouchStart, + handleTouchMove, + handleTouchEnd, + handleDragStart, + handleDrag, + handleDragEnd + }); + + $$self.$inject_state = $$props => { + if ("type" in $$props) $$invalidate(0, type = $$props.type); + if ("index" in $$props) $$invalidate(11, index = $$props.index); + if ("size" in $$props) $$invalidate(1, size = $$props.size); + if ("special" in $$props) $$invalidate(2, special = $$props.special); + if ("selected" in $$props) $$invalidate(3, selected = $$props.selected); + if ("SWIPE_THRESHOLD" in $$props) SWIPE_THRESHOLD = $$props.SWIPE_THRESHOLD; + if ("isSwiping" in $$props) $$invalidate(4, isSwiping = $$props.isSwiping); + if ("xDown" in $$props) xDown = $$props.xDown; + if ("yDown" in $$props) yDown = $$props.yDown; + if ("xDiff" in $$props) xDiff = $$props.xDiff; + if ("yDiff" in $$props) yDiff = $$props.yDiff; + }; + + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + + return [ + type, + size, + special, + selected, + isSwiping, + handleTouchStart, + handleTouchMove, + handleTouchEnd, + handleDragStart, + handleDrag, + handleDragEnd, + index, + dragGhost, + xDown, + yDown, + xDiff, + yDiff, + dispatch, + SWIPE_THRESHOLD, + $$scope, + $$slots, + click_handler + ]; + } + + class Tile extends SvelteComponentDev { + constructor(options) { + super(options); + + init(this, options, instance, create_fragment, safe_not_equal, { + type: 0, + index: 11, + size: 1, + special: 2, + selected: 3 + }); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "Tile", + options, + id: create_fragment.name + }); + + const { ctx } = this.$$; + const props = options.props || {}; + + if (/*type*/ ctx[0] === undefined && !("type" in props)) { + console.warn(" was created without expected prop 'type'"); + } + + if (/*index*/ ctx[11] === undefined && !("index" in props)) { + console.warn(" was created without expected prop 'index'"); + } + + if (/*size*/ ctx[1] === undefined && !("size" in props)) { + console.warn(" was created without expected prop 'size'"); + } + + if (/*special*/ ctx[2] === undefined && !("special" in props)) { + console.warn(" was created without expected prop 'special'"); + } + } + + get type() { + throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); + } + + set type(value) { + throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); + } + + get index() { + throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); + } + + set index(value) { + throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); + } + + get size() { + throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); + } + + set size(value) { + throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); + } + + get special() { + throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); + } + + set special(value) { + throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); + } + + get selected() { + throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); + } + + set selected(value) { + throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); + } + } + + const subscriber_queue = []; + /** + * Create a `Writable` store that allows both updating and reading by subscription. + * @param {*=}value initial value + * @param {StartStopNotifier=}start start and stop notifications for subscriptions + */ + function writable(value, start = noop) { + let stop; + const subscribers = []; + function set(new_value) { + if (safe_not_equal(value, new_value)) { + value = new_value; + if (stop) { // store is ready + const run_queue = !subscriber_queue.length; + for (let i = 0; i < subscribers.length; i += 1) { + const s = subscribers[i]; + s[1](); + subscriber_queue.push(s, value); + } + if (run_queue) { + for (let i = 0; i < subscriber_queue.length; i += 2) { + subscriber_queue[i][0](subscriber_queue[i + 1]); + } + subscriber_queue.length = 0; + } + } + } + } + function update(fn) { + set(fn(value)); + } + function subscribe(run, invalidate = noop) { + const subscriber = [run, invalidate]; + subscribers.push(subscriber); + if (subscribers.length === 1) { + stop = start(set) || noop; + } + run(value); + return () => { + const index = subscribers.indexOf(subscriber); + if (index !== -1) { + subscribers.splice(index, 1); + } + if (subscribers.length === 0) { + stop(); + stop = null; + } + }; + } + return { set, update, subscribe }; + } + + // TODO: Check if there's a better way to generate unique IDs without relying on this + // variable, which makes it basically a singleton. + let lastTileID = 0; + function generateRandomTile() { + lastTileID += 1; + + return { + id: lastTileID, + type: Math.floor(Math.random() * 5) + 1, + } + } + + /** + * Generates a game board as a flat array of rows * columns elements, + * each tile is randomly generated. + * + * @param {int} rows + * @param {int} columns + * @returns {array} + */ + function generateRandomBoard(rows, columns) { + const size = rows * columns; + let board = []; + + for (let i = 0; i < size; i += 1) { + board[i] = generateRandomTile(); + } + + let matches = getMatches(board, rows, columns); + + while (matches.length > 0) { + board = getResolvedBoard(board, rows, columns); + matches = getMatches(board, rows, columns); + } + + return board + } + + /** + * Returns x and y coordiates for tile at index. + * + * @param {int} index + * @param {int} columns + * @retunrs {object} + */ + function getCoordinates(index, columns) { + return { + x: index % columns, + y: Math.floor(index / columns), + } + } + + /** + * Returns true if the tiles at indexes p and q are adjacent. + * + * @param {int} p + * @param {int} q + * @param {int} columns + * @returns {boolean} + */ + function areTilesAdjacent(p, q, columns) { + const pCoords = getCoordinates(p, columns); + const qCoords = getCoordinates(q, columns); + + return ( + (pCoords.x === qCoords.x && Math.abs(pCoords.y - qCoords.y) === 1) || + (pCoords.y === qCoords.y && Math.abs(pCoords.x - qCoords.x) === 1) + ) + } + + const BASE_SCORE = 60; + + function getBoardScore(board, rows, columns, chainMultiplier) { + const matches = getMatches(board, rows, columns); + let score = 0; + + matches.forEach((match) => { + const tileMultiplier = match.indices.length - 2; + return (score += BASE_SCORE * tileMultiplier * chainMultiplier) + }); + + return score + } + + function getClearedBoard(board, rows, columns) { + const matches = getMatches(board, rows, columns); + const clearedBoard = [...board]; + + if (matches.length === 0) { + return board + } + + matches.forEach((match) => { + match.indices.forEach((index) => { + clearedBoard[index].type = null; + }); + }); + + return clearedBoard + } + + function getResolvedBoard(board, rows, columns) { + const clearedBoard = getClearedBoard(board, rows, columns); + const resolvedBoard = [...board]; + let emptyTiles = []; + + // Drop tiles to fill empty spaces + for (let i = 0; i < columns; i += 1) { + const colEmptyTiles = []; + for (let j = rows - 1; j > -1; j -= 1) { + const index = j * columns + i; + if (resolvedBoard[index].type === null) { + colEmptyTiles.push(index); + } else if (colEmptyTiles.length > 0) { + const firstEmptyTile = colEmptyTiles.shift(); + const aux = resolvedBoard[firstEmptyTile]; + resolvedBoard[firstEmptyTile] = resolvedBoard[index]; + resolvedBoard[index] = aux; + colEmptyTiles.push(index); + } + } + + emptyTiles = [...emptyTiles, ...colEmptyTiles]; + } + + emptyTiles.forEach((index) => { + resolvedBoard[index] = generateRandomTile(); + }); + + return resolvedBoard + } + + function getMatches(board, rows, columns, minMatch = 3) { + const hMatches = getHorizontalMatches(board, rows, columns, minMatch); + const vMatches = getVerticalMatches(board, rows, columns, minMatch); + + return [...hMatches, ...vMatches] + } + + function getHorizontalMatches(board, rows, columns, minMatch = 3) { + const matches = []; + + for (let i = 0; i < rows; i += 1) { + let matchLength = 1; + for (let j = 0; j < columns; j += 1) { + const index = i * columns + j; + let checkMatch = false; + + if (j === columns - 1) { + // Last tile in the row + checkMatch = true; + } else { + if (board[index].type === board[index + 1].type) { + matchLength += 1; + } else { + checkMatch = true; + } + } + + if (checkMatch) { + if (matchLength >= minMatch) { + // add match to arraw of matches + const start = index + 1 - matchLength; + const end = index; + matches.push({ + start, + end, + indices: getIndices(start, end), + length: matchLength, + orientation: 'horizontal', + }); + } + + matchLength = 1; + } + } + } + + return matches + } + + function getVerticalMatches(board, rows, columns, minMatch = 3) { + const matches = []; + + for (let i = 0; i < columns; i += 1) { + let matchLength = 1; + for (let j = 0; j < rows; j += 1) { + const index = j * columns + i; + let checkMatch = false; + + if (j === rows - 1) { + // Last tile in the column + checkMatch = true; + } else { + if (board[index].type === board[index + columns].type) { + matchLength += 1; + } else { + checkMatch = true; + } + } + + if (checkMatch) { + if (matchLength >= minMatch) { + // add match to arraw of matches + const start = index - (matchLength - 1) * columns; + const end = index; + matches.push({ + start, + end, + indices: getIndices(start, end, columns), + length: matchLength, + orientation: 'vertical', + }); + } + + matchLength = 1; + } + } + } + + return matches + } + + function getIndices(start, end, step = 1) { + const indices = []; + let index = start; + + while (index <= end) { + indices.push(index); + index += step; + } + + return indices + } + + const init$1 = (rows, columns, moves) => (state) => { + return { + rows, + columns, + board: generateRandomBoard(rows, columns), + startingMoves: moves, + moves, + score: 0, + } + }; + + const reset = () => (state) => { + return { + ...state, + board: generateRandomBoard(state.rows, state.columns), + moves: state.startingMoves, + score: 0, + } + }; + + const swapTiles = (p, q) => (state) => { + const { board } = state; + const aux = board[p]; + board[p] = board[q]; + board[q] = aux; + + return { + ...state, + board, + } + }; + + const decrementMoves = () => (state) => { + return { + ...state, + moves: state.moves - 1, + } + }; + + const clearBoard = () => (state) => { + const { board, rows, columns } = state; + const clearedBoard = getClearedBoard(board, rows, columns); + + return { + ...state, + board: clearedBoard, + } + }; + + const resolveBoard = () => (state) => { + const { board, rows, columns } = state; + const resolvedBoard = getResolvedBoard(board, rows, columns); + + return { + ...state, + board: resolvedBoard, + } + }; + + const scoreBoard = (chainMultiplier) => (state) => { + const { board, rows, columns, score } = state; + const newScore = getBoardScore(board, rows, columns, chainMultiplier) + score; + + return { + ...state, + score: newScore, + } + }; + + const checkMatchesAndResolve = (resolveCb, onMatch, onFinish, n) => ( + state + ) => { + const { board, rows, columns } = state; + const matches = getMatches(board, rows, columns); + if (matches.length > 0) { + resolveCb(onMatch, onFinish, n + 1); + } else { + onFinish(); + } + + return state + }; + + function createStore() { + const { subscribe, update } = writable({}); + + return { + subscribe, + update, + init: (rows, columns, moves) => update(init$1(rows, columns, moves)), + reset: () => update(reset()), + swapTiles: (p, q) => update(swapTiles(p, q)), + decrementMoves: () => update(decrementMoves()), + resolveBoard: function doResolve(onMatch, onFinish, n = 1) { + update(clearBoard()); + setTimeout(() => { + update(scoreBoard(n)); + update(resolveBoard()); + onMatch(); + setTimeout(() => { + update(checkMatchesAndResolve(doResolve, onMatch, onFinish, n)); + }, 350); + }, 200); + }, + } + } + + var game = createStore(); + + /* src\components\Board.svelte generated by Svelte v3.21.0 */ + const file$1 = "src\\components\\Board.svelte"; + + function get_each_context(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[18] = list[i]; + child_ctx[20] = i; + return child_ctx; + } + + function get_each_context_1(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[21] = list[i]; + child_ctx[20] = i; + return child_ctx; + } + + // (208:8) {#if tile.type !== null} + function create_if_block(ctx) { + let current; + + function click_handler(...args) { + return /*click_handler*/ ctx[17](/*i*/ ctx[20], ...args); + } + + const tile = new Tile({ + props: { + type: /*tile*/ ctx[21].type, + special: /*tile*/ ctx[21].special, + size: /*tileSize*/ ctx[0], + index: /*i*/ ctx[20], + selected: /*isTileSelected*/ ctx[3](/*i*/ ctx[20]) + }, + $$inline: true + }); + + tile.$on("click", click_handler); + tile.$on("swipe", /*handleSwipe*/ ctx[7]); + + const block = { + c: function create() { + create_component(tile.$$.fragment); + }, + m: function mount(target, anchor) { + mount_component(tile, target, anchor); + current = true; + }, + p: function update(new_ctx, dirty) { + ctx = new_ctx; + const tile_changes = {}; + if (dirty & /*board*/ 2) tile_changes.type = /*tile*/ ctx[21].type; + if (dirty & /*board*/ 2) tile_changes.special = /*tile*/ ctx[21].special; + if (dirty & /*tileSize*/ 1) tile_changes.size = /*tileSize*/ ctx[0]; + if (dirty & /*board*/ 2) tile_changes.index = /*i*/ ctx[20]; + if (dirty & /*isTileSelected, board*/ 10) tile_changes.selected = /*isTileSelected*/ ctx[3](/*i*/ ctx[20]); + tile.$set(tile_changes); + }, + i: function intro(local) { + if (current) return; + transition_in(tile.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(tile.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + destroy_component(tile, detaching); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block.name, + type: "if", + source: "(208:8) {#if tile.type !== null}", + ctx + }); + + return block; + } + + // (203:4) {#each board as tile, i (tile.id)} + function create_each_block_1(key_1, ctx) { + let span; + let span_style_value; + let rect; + let stop_animation = noop; + let current; + let if_block = /*tile*/ ctx[21].type !== null && create_if_block(ctx); + + const block = { + key: key_1, + first: null, + c: function create() { + span = element("span"); + if (if_block) if_block.c(); + attr_dev(span, "class", "tile-wrapper svelte-lfzdol"); + attr_dev(span, "style", span_style_value = /*getCellStyle*/ ctx[4](/*i*/ ctx[20])); + add_location(span, file$1, 203, 6, 4682); + this.first = span; + }, + m: function mount(target, anchor) { + insert_dev(target, span, anchor); + if (if_block) if_block.m(span, null); + current = true; + }, + p: function update(ctx, dirty) { + if (/*tile*/ ctx[21].type !== null) { + if (if_block) { + if_block.p(ctx, dirty); + + if (dirty & /*board*/ 2) { + transition_in(if_block, 1); + } + } else { + if_block = create_if_block(ctx); + if_block.c(); + transition_in(if_block, 1); + if_block.m(span, null); + } + } else if (if_block) { + group_outros(); + + transition_out(if_block, 1, 1, () => { + if_block = null; + }); + + check_outros(); + } + + if (!current || dirty & /*getCellStyle, board*/ 18 && span_style_value !== (span_style_value = /*getCellStyle*/ ctx[4](/*i*/ ctx[20]))) { + attr_dev(span, "style", span_style_value); + } + }, + r: function measure() { + rect = span.getBoundingClientRect(); + }, + f: function fix() { + fix_position(span); + stop_animation(); + }, + a: function animate() { + stop_animation(); + + stop_animation = create_animation(span, rect, flip, { + delay: 0, + duration: 250, + easing: quintOut + }); + }, + i: function intro(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o: function outro(local) { + transition_out(if_block); + current = false; + }, + d: function destroy(detaching) { + if (detaching) detach_dev(span); + if (if_block) if_block.d(); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_each_block_1.name, + type: "each", + source: "(203:4) {#each board as tile, i (tile.id)}", + ctx + }); + + return block; + } + + // (220:4) {#each cells as cell, i} + function create_each_block(ctx) { + let div; + let div_style_value; + + const block = { + c: function create() { + div = element("div"); + attr_dev(div, "class", "cell svelte-lfzdol"); + attr_dev(div, "style", div_style_value = /*getCellStyle*/ ctx[4](/*cell*/ ctx[18])); + toggle_class(div, "is-selected", /*isTileSelected*/ ctx[3](/*i*/ ctx[20])); + add_location(div, file$1, 220, 6, 5184); + }, + m: function mount(target, anchor) { + insert_dev(target, div, anchor); + }, + p: function update(ctx, dirty) { + if (dirty & /*getCellStyle, cells*/ 20 && div_style_value !== (div_style_value = /*getCellStyle*/ ctx[4](/*cell*/ ctx[18]))) { + attr_dev(div, "style", div_style_value); + } + + if (dirty & /*isTileSelected*/ 8) { + toggle_class(div, "is-selected", /*isTileSelected*/ ctx[3](/*i*/ ctx[20])); + } + }, + d: function destroy(detaching) { + if (detaching) detach_dev(div); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_each_block.name, + type: "each", + source: "(220:4) {#each cells as cell, i}", + ctx + }); + + return block; + } + + function create_fragment$1(ctx) { + let main; + let div; + let each_blocks_1 = []; + let each0_lookup = new Map(); + let t; + let current; + let each_value_1 = /*board*/ ctx[1]; + validate_each_argument(each_value_1); + const get_key = ctx => /*tile*/ ctx[21].id; + validate_each_keys(ctx, each_value_1, get_each_context_1, get_key); + + for (let i = 0; i < each_value_1.length; i += 1) { + let child_ctx = get_each_context_1(ctx, each_value_1, i); + let key = get_key(child_ctx); + each0_lookup.set(key, each_blocks_1[i] = create_each_block_1(key, child_ctx)); + } + + let each_value = /*cells*/ ctx[2]; + validate_each_argument(each_value); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); + } + + const block = { + c: function create() { + main = element("main"); + div = element("div"); + + for (let i = 0; i < each_blocks_1.length; i += 1) { + each_blocks_1[i].c(); + } + + t = space(); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + attr_dev(div, "class", "board svelte-lfzdol"); + attr_dev(div, "style", /*boardStyle*/ ctx[5]); + add_location(div, file$1, 201, 2, 4598); + attr_dev(main, "class", "svelte-lfzdol"); + add_location(main, file$1, 200, 0, 4589); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor) { + insert_dev(target, main, anchor); + append_dev(main, div); + + for (let i = 0; i < each_blocks_1.length; i += 1) { + each_blocks_1[i].m(div, null); + } + + append_dev(div, t); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].m(div, null); + } + + current = true; + }, + p: function update(ctx, [dirty]) { + if (dirty & /*getCellStyle, board, tileSize, isTileSelected, handleTileClick, handleSwipe*/ 219) { + const each_value_1 = /*board*/ ctx[1]; + validate_each_argument(each_value_1); + group_outros(); + for (let i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].r(); + validate_each_keys(ctx, each_value_1, get_each_context_1, get_key); + each_blocks_1 = update_keyed_each(each_blocks_1, dirty, get_key, 1, ctx, each_value_1, each0_lookup, div, fix_and_outro_and_destroy_block, create_each_block_1, t, get_each_context_1); + for (let i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].a(); + check_outros(); + } + + if (dirty & /*getCellStyle, cells, isTileSelected*/ 28) { + each_value = /*cells*/ ctx[2]; + validate_each_argument(each_value); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + } else { + each_blocks[i] = create_each_block(child_ctx); + each_blocks[i].c(); + each_blocks[i].m(div, null); + } + } + + for (; i < each_blocks.length; i += 1) { + each_blocks[i].d(1); + } + + each_blocks.length = each_value.length; + } + + if (!current || dirty & /*boardStyle*/ 32) { + attr_dev(div, "style", /*boardStyle*/ ctx[5]); + } + }, + i: function intro(local) { + if (current) return; + + for (let i = 0; i < each_value_1.length; i += 1) { + transition_in(each_blocks_1[i]); + } + + current = true; + }, + o: function outro(local) { + for (let i = 0; i < each_blocks_1.length; i += 1) { + transition_out(each_blocks_1[i]); + } + + current = false; + }, + d: function destroy(detaching) { + if (detaching) detach_dev(main); + + for (let i = 0; i < each_blocks_1.length; i += 1) { + each_blocks_1[i].d(); + } + + destroy_each(each_blocks, detaching); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment$1.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + const BOARD_PADDING = 10; + + function instance$1($$self, $$props, $$invalidate) { + let $game; + validate_store(game, "game"); + component_subscribe($$self, game, $$value => $$invalidate(10, $game = $$value)); + const dispatch = createEventDispatcher(); + const matchSound = new Audio("/assets/match.wav"); + let docWidth = document.body.clientWidth; + let tileSize = getTileSize($game.columns); + + function getTileSize(columns) { + docWidth = document.body.clientWidth; + let minWdth = BOARD_PADDING * 2 + 40 * 2 + columns * 60; + + if (docWidth >= minWdth) { + return 60; + } + + minWdth = BOARD_PADDING * 2 + 40 * 2 + columns * 50; + + if (docWidth >= minWdth) { + return 50; + } + + minWdth = BOARD_PADDING * 2 + 40 * 2 + columns * 40; + + if (docWidth >= minWdth) { + return 40; + } + + minWdth = BOARD_PADDING * 2 + 40 * 2 + columns * 30; + + if (docWidth >= minWdth) { + return 30; + } + + minWdth = BOARD_PADDING * 2 + 40 * 2 + columns * 20; + + if (docWidth >= minWdth) { + return 20; + } + + return 10; + } + + function swapTiles(p, q) { + game.swapTiles(p, q); + + setTimeout( + () => { + const matches = getMatches(board, rows, columns); + + if (matches.length === 0) { + game.swapTiles(p, q); + } else { + game.decrementMoves(); + + game.resolveBoard( + () => { + matchSound.currentTime = 0; + matchSound.play(); + }, + () => { + if ($game.moves === 0) { + dispatch("game-over", { score: $game.score }); + } + } + ); + } + }, + 250 - 50 + ); + + $$invalidate(13, selectedTile = null); + } + + function handleTileClick(i) { + if (isTileSelected(i)) { + return $$invalidate(13, selectedTile = null); + } + + if (selectedTile === null) { + return $$invalidate(13, selectedTile = i); + } + + if (!areTilesAdjacent(selectedTile, i, columns)) { + return $$invalidate(13, selectedTile = null); + } + + swapTiles(selectedTile, i); + } + + function handleSwipe(event) { + const { direction, index } = event.detail; + + switch (direction) { + case "left": + // can't swipe left from first column + if (index % columns === 0) { + return; + } + return swapTiles(index, index - 1); + case "right": + // can't swipe right from last column + if (index % columns === columns - 1) { + return; + } + return swapTiles(index, index + 1); + case "up": + // can't swipe up from first row + if (index < columns) { + return; + } + return swapTiles(index, index - columns); + case "down": + // can't swipe down from last row + if (index + columns >= board.length) { + return; + } + return swapTiles(index, index + columns); + default: + return; + } + } + + onMount(() => { + window.addEventListener("resize", () => { + requestAnimationFrame(() => { + const newTileSize = getTileSize($game.columns); + + if (newTileSize !== tileSize) { + $$invalidate(0, tileSize = newTileSize); + } + }); + }); + }); + + const writable_props = []; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); + }); + + let { $$slots = {}, $$scope } = $$props; + validate_slots("Board", $$slots, []); + const click_handler = i => handleTileClick(i); + + $$self.$capture_state = () => ({ + createEventDispatcher, + onMount, + flip, + quintOut, + Tile, + game, + areTilesAdjacent, + getMatches, + BOARD_PADDING, + dispatch, + matchSound, + docWidth, + tileSize, + getTileSize, + swapTiles, + handleTileClick, + handleSwipe, + $game, + board, + rows, + columns, + cells, + selectedTile, + isTileSelected, + getCellStyle, + boardStyle + }); + + $$self.$inject_state = $$props => { + if ("docWidth" in $$props) docWidth = $$props.docWidth; + if ("tileSize" in $$props) $$invalidate(0, tileSize = $$props.tileSize); + if ("board" in $$props) $$invalidate(1, board = $$props.board); + if ("rows" in $$props) $$invalidate(11, rows = $$props.rows); + if ("columns" in $$props) $$invalidate(12, columns = $$props.columns); + if ("cells" in $$props) $$invalidate(2, cells = $$props.cells); + if ("selectedTile" in $$props) $$invalidate(13, selectedTile = $$props.selectedTile); + if ("isTileSelected" in $$props) $$invalidate(3, isTileSelected = $$props.isTileSelected); + if ("getCellStyle" in $$props) $$invalidate(4, getCellStyle = $$props.getCellStyle); + if ("boardStyle" in $$props) $$invalidate(5, boardStyle = $$props.boardStyle); + }; + + let board; + let rows; + let columns; + let cells; + let selectedTile; + let isTileSelected; + let getCellStyle; + let boardStyle; + + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + + $$self.$$.update = () => { + if ($$self.$$.dirty & /*$game*/ 1024) { + $$invalidate(1, board = $game.board); + } + + if ($$self.$$.dirty & /*$game*/ 1024) { + $$invalidate(11, rows = $game.rows); + } + + if ($$self.$$.dirty & /*$game*/ 1024) { + $$invalidate(12, columns = $game.columns); + } + + if ($$self.$$.dirty & /*board*/ 2) { + $$invalidate(2, cells = [...Array(board.length).keys()]); + } + + if ($$self.$$.dirty & /*selectedTile*/ 8192) { + $$invalidate(3, isTileSelected = i => selectedTile === i); + } + + if ($$self.$$.dirty & /*columns, tileSize*/ 4097) { + $$invalidate(4, getCellStyle = i => { + const row = Math.floor(i / columns); + const col = i % columns; + + return ` + top: ${tileSize * row + BOARD_PADDING}px; + left: ${tileSize * col + BOARD_PADDING}px; + `; + }); + } + + if ($$self.$$.dirty & /*tileSize, columns, rows*/ 6145) { + $$invalidate(5, boardStyle = ` + width: ${tileSize * columns + BOARD_PADDING * 2}px; + height: ${tileSize * rows + BOARD_PADDING * 2}px; + --tile-size: ${tileSize}px; + `); + } + }; + + $$invalidate(13, selectedTile = null); + + return [ + tileSize, + board, + cells, + isTileSelected, + getCellStyle, + boardStyle, + handleTileClick, + handleSwipe, + matchSound, + docWidth, + $game, + rows, + columns, + selectedTile, + dispatch, + getTileSize, + swapTiles, + click_handler + ]; + } + + class Board extends SvelteComponentDev { + constructor(options) { + super(options); + init(this, options, instance$1, create_fragment$1, safe_not_equal, {}); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "Board", + options, + id: create_fragment$1.name + }); + } + } + + /* src\components\GameHeader.svelte generated by Svelte v3.21.0 */ + const file$2 = "src\\components\\GameHeader.svelte"; + + function create_fragment$2(ctx) { + let header; + let div2; + let div0; + let t1; + let div1; + let t2_value = /*$game*/ ctx[0].moves + ""; + let t2; + let t3; + let div5; + let div3; + let t5; + let div4; + let t6_value = /*$game*/ ctx[0].score + ""; + let t6; + + const block = { + c: function create() { + header = element("header"); + div2 = element("div"); + div0 = element("div"); + div0.textContent = "Moves"; + t1 = space(); + div1 = element("div"); + t2 = text(t2_value); + t3 = space(); + div5 = element("div"); + div3 = element("div"); + div3.textContent = "Score"; + t5 = space(); + div4 = element("div"); + t6 = text(t6_value); + attr_dev(div0, "class", "group-label"); + add_location(div0, file$2, 55, 4, 903); + attr_dev(div1, "class", "group-value svelte-87os51"); + add_location(div1, file$2, 56, 4, 944); + attr_dev(div2, "class", "group moves svelte-87os51"); + add_location(div2, file$2, 54, 2, 873); + attr_dev(div3, "class", "group-label"); + add_location(div3, file$2, 59, 4, 1030); + attr_dev(div4, "class", "group-value svelte-87os51"); + add_location(div4, file$2, 60, 4, 1071); + attr_dev(div5, "class", "group score svelte-87os51"); + add_location(div5, file$2, 58, 2, 1000); + attr_dev(header, "class", "svelte-87os51"); + add_location(header, file$2, 53, 0, 862); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor) { + insert_dev(target, header, anchor); + append_dev(header, div2); + append_dev(div2, div0); + append_dev(div2, t1); + append_dev(div2, div1); + append_dev(div1, t2); + append_dev(header, t3); + append_dev(header, div5); + append_dev(div5, div3); + append_dev(div5, t5); + append_dev(div5, div4); + append_dev(div4, t6); + }, + p: function update(ctx, [dirty]) { + if (dirty & /*$game*/ 1 && t2_value !== (t2_value = /*$game*/ ctx[0].moves + "")) set_data_dev(t2, t2_value); + if (dirty & /*$game*/ 1 && t6_value !== (t6_value = /*$game*/ ctx[0].score + "")) set_data_dev(t6, t6_value); + }, + i: noop, + o: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(header); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment$2.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + function instance$2($$self, $$props, $$invalidate) { + let $game; + validate_store(game, "game"); + component_subscribe($$self, game, $$value => $$invalidate(0, $game = $$value)); + const writable_props = []; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); + }); + + let { $$slots = {}, $$scope } = $$props; + validate_slots("GameHeader", $$slots, []); + $$self.$capture_state = () => ({ game, $game }); + return [$game]; + } + + class GameHeader extends SvelteComponentDev { + constructor(options) { + super(options); + init(this, options, instance$2, create_fragment$2, safe_not_equal, {}); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "GameHeader", + options, + id: create_fragment$2.name + }); + } + } + + /* src\components\Button.svelte generated by Svelte v3.21.0 */ + + const file$3 = "src\\components\\Button.svelte"; + + function create_fragment$3(ctx) { + let button; + let current; + let dispose; + const default_slot_template = /*$$slots*/ ctx[1].default; + const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[0], null); + + const block = { + c: function create() { + button = element("button"); + if (default_slot) default_slot.c(); + attr_dev(button, "class", "svelte-1m9iqve"); + add_location(button, file$3, 36, 0, 679); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor, remount) { + insert_dev(target, button, anchor); + + if (default_slot) { + default_slot.m(button, null); + } + + current = true; + if (remount) dispose(); + dispose = listen_dev(button, "click", /*click_handler*/ ctx[2], false, false, false); + }, + p: function update(ctx, [dirty]) { + if (default_slot) { + if (default_slot.p && dirty & /*$$scope*/ 1) { + default_slot.p(get_slot_context(default_slot_template, ctx, /*$$scope*/ ctx[0], null), get_slot_changes(default_slot_template, /*$$scope*/ ctx[0], dirty, null)); + } + } + }, + i: function intro(local) { + if (current) return; + transition_in(default_slot, local); + current = true; + }, + o: function outro(local) { + transition_out(default_slot, local); + current = false; + }, + d: function destroy(detaching) { + if (detaching) detach_dev(button); + if (default_slot) default_slot.d(detaching); + dispose(); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment$3.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + function instance$3($$self, $$props, $$invalidate) { + const writable_props = []; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`\n\n","\n\n\n\n
\n
\n
Game Over
\n
{score}
\n
Best: {bestScore}
\n \n
\n
\n","\n\n\n\n
\n \n \n \n \n
\n\n
Please rotate phone 😄
\n","import App from './components/App.svelte'\n\nconst app = new App({\n target: document.body,\n props: {\n // name: 'world'\n },\n})\n\nexport default app\n"],"names":["init"],"mappings":";;;;;IAAA,SAAS,IAAI,GAAG,GAAG;IACnB,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,CAAC;IACxB,SAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE;IAC1B;IACA,IAAI,KAAK,MAAM,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G,EAAE;gBACH,QAAQ,IAAI,GAAG;MACxB,OAAO,GAAG,CAAC;;;cAIX,IAAI,EACJ,OAAO;;;;;;;aAKH,IAAI,EAAE,OAAO,KAAK,mBAAmB;KAE7C,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK;SAE1B,SAAS,GAAG,KAAK;SACjB,SAAS;SACT,KAAK;;cAEA,cAAc,CAAC,KAAK;sBAC3B,KAAK,GAAG,KAAK,CAAC,KAAK;YACb,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,YAAY,KAAK,CAAC;YAClD,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE;MAErD,YAAY,CAAC,OAAO,CAAC,YAAY,EAAE,OAAO;sBAC1C,SAAS,GAAG,OAAO;sBACnB,SAAS,GAAG,IAAI;;;cAGT,eAAe;MACtB,IAAI,CAAC,KAAK;sBACV,SAAS,GAAG,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IC5CrB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC;IACpB,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI;IACvB,EAAE,KAAK,EAAE;IACT;IACA,GAAG;IACH,CAAC,CAAC;;;;;;;;"} \ No newline at end of file diff --git a/Games/Gem_Cruncher/public/global.css b/Games/Gem_Cruncher/public/global.css new file mode 100644 index 0000000000..a57a1c1e66 --- /dev/null +++ b/Games/Gem_Cruncher/public/global.css @@ -0,0 +1,46 @@ +@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap'); + +* { + box-sizing: border-box; +} + +html, +body { + position: relative; + width: 100%; + height: 100%; + overflow: hidden; +} + +body { + color: #333; + margin: 0; + padding: 0; + font-family: 'Fredoka One', -apple-system, BlinkMacSystemFont, 'Segoe UI', + Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; +} + +a { + color: rgb(0, 100, 200); + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +a:visited { + color: rgb(0, 80, 160); +} + +label { + display: block; +} + +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; +} diff --git a/Games/Gem_Cruncher/public/index.html b/Games/Gem_Cruncher/public/index.html new file mode 100644 index 0000000000..b7c84e429e --- /dev/null +++ b/Games/Gem_Cruncher/public/index.html @@ -0,0 +1,22 @@ + + + + + + + + + + + + + Gem Cruncher đŸŦ + + + + + + + + + diff --git a/Games/Gem_Cruncher/public/pic.png b/Games/Gem_Cruncher/public/pic.png new file mode 100644 index 0000000000..96ecf9dfb0 Binary files /dev/null and b/Games/Gem_Cruncher/public/pic.png differ diff --git a/Games/Gem_Cruncher/rollup.config.js b/Games/Gem_Cruncher/rollup.config.js new file mode 100644 index 0000000000..3b6bd909d6 --- /dev/null +++ b/Games/Gem_Cruncher/rollup.config.js @@ -0,0 +1,67 @@ +import svelte from 'rollup-plugin-svelte'; +import resolve from '@rollup/plugin-node-resolve'; +import commonjs from '@rollup/plugin-commonjs'; +import livereload from 'rollup-plugin-livereload'; +import { terser } from 'rollup-plugin-terser'; + +const production = !process.env.ROLLUP_WATCH; + +export default { + input: 'src/main.js', + output: { + sourcemap: true, + format: 'iife', + name: 'app', + file: 'public/build/bundle.js' + }, + plugins: [ + svelte({ + // enable run-time checks when not in production + dev: !production, + // we'll extract any component CSS out into + // a separate file - better for performance + css: css => { + css.write('public/build/bundle.css'); + } + }), + + + resolve({ + browser: true, + dedupe: ['svelte'] + }), + commonjs(), + + // In dev mode, call `npm run start` once + // the bundle has been generated + !production && serve(), + + // Watch the `public` directory and refresh the + // browser on changes when not in production + !production && livereload('public'), + + // If we're building for production (npm run build + // instead of npm run dev), minify + production && terser() + ], + watch: { + clearScreen: false + } +}; + +function serve() { + let started = false; + + return { + writeBundle() { + if (!started) { + started = true; + + require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], { + stdio: ['ignore', 'inherit', 'inherit'], + shell: true + }); + } + } + }; +} diff --git a/Games/Gem_Cruncher/src/components/App.svelte b/Games/Gem_Cruncher/src/components/App.svelte new file mode 100644 index 0000000000..0392305dcb --- /dev/null +++ b/Games/Gem_Cruncher/src/components/App.svelte @@ -0,0 +1,26 @@ + + + + +
+ +
diff --git a/Games/Gem_Cruncher/src/components/Board.svelte b/Games/Gem_Cruncher/src/components/Board.svelte new file mode 100644 index 0000000000..7be1bedfcb --- /dev/null +++ b/Games/Gem_Cruncher/src/components/Board.svelte @@ -0,0 +1,227 @@ + + + + +
+
+ {#each board as tile, i (tile.id)} + + {#if tile.type !== null} + handleTileClick(i)} + on:swipe={handleSwipe} + selected={isTileSelected(i)} /> + {/if} + + {/each} + {#each cells as cell, i} +
+ {/each} +
+
diff --git a/Games/Gem_Cruncher/src/components/Button.svelte b/Games/Gem_Cruncher/src/components/Button.svelte new file mode 100644 index 0000000000..d41cb678fd --- /dev/null +++ b/Games/Gem_Cruncher/src/components/Button.svelte @@ -0,0 +1,39 @@ + + + diff --git a/Games/Gem_Cruncher/src/components/Game.svelte b/Games/Gem_Cruncher/src/components/Game.svelte new file mode 100644 index 0000000000..49be1b1b6e --- /dev/null +++ b/Games/Gem_Cruncher/src/components/Game.svelte @@ -0,0 +1,98 @@ + + + + +
+ + + + +
+ +
Please rotate phone 😄
diff --git a/Games/Gem_Cruncher/src/components/GameFooter.svelte b/Games/Gem_Cruncher/src/components/GameFooter.svelte new file mode 100644 index 0000000000..08763484c3 --- /dev/null +++ b/Games/Gem_Cruncher/src/components/GameFooter.svelte @@ -0,0 +1,39 @@ + + + + +
+ +
diff --git a/Games/Gem_Cruncher/src/components/GameHeader.svelte b/Games/Gem_Cruncher/src/components/GameHeader.svelte new file mode 100644 index 0000000000..2625fbf85c --- /dev/null +++ b/Games/Gem_Cruncher/src/components/GameHeader.svelte @@ -0,0 +1,65 @@ + + + + +
+
+
Moves
+
{$game.moves}
+
+
+
Score
+
{$game.score}
+
+ + +
diff --git a/Games/Gem_Cruncher/src/components/GameOverModal.svelte b/Games/Gem_Cruncher/src/components/GameOverModal.svelte new file mode 100644 index 0000000000..d8e5e5a9b2 --- /dev/null +++ b/Games/Gem_Cruncher/src/components/GameOverModal.svelte @@ -0,0 +1,64 @@ + + + + +
+ +
diff --git a/Games/Gem_Cruncher/src/components/Tile.svelte b/Games/Gem_Cruncher/src/components/Tile.svelte new file mode 100644 index 0000000000..417270f46d --- /dev/null +++ b/Games/Gem_Cruncher/src/components/Tile.svelte @@ -0,0 +1,125 @@ + + + + +
+ +
diff --git a/Games/Gem_Cruncher/src/components/_GameHeader.svelte b/Games/Gem_Cruncher/src/components/_GameHeader.svelte new file mode 100644 index 0000000000..7d01cd94c4 --- /dev/null +++ b/Games/Gem_Cruncher/src/components/_GameHeader.svelte @@ -0,0 +1,70 @@ + + + + +
+
+
Moves
+
68
+
+
+
Target
+
+ +
+
+
+
Score
+
{$game.score}
+
+
diff --git a/Games/Gem_Cruncher/src/components/_LevelTarget.svelte b/Games/Gem_Cruncher/src/components/_LevelTarget.svelte new file mode 100644 index 0000000000..858dbe82e2 --- /dev/null +++ b/Games/Gem_Cruncher/src/components/_LevelTarget.svelte @@ -0,0 +1,45 @@ + + +
+
+ Red Tiles + 5/15 +
+
+ Red Tiles + 5/15 +
+
+ Red Tiles + 5/15 +
+
diff --git a/Games/Gem_Cruncher/src/main.js b/Games/Gem_Cruncher/src/main.js new file mode 100644 index 0000000000..bc3431038b --- /dev/null +++ b/Games/Gem_Cruncher/src/main.js @@ -0,0 +1,10 @@ +import App from './components/App.svelte' + +const app = new App({ + target: document.body, + props: { + // name: 'world' + }, +}) + +export default app diff --git a/Games/Gem_Cruncher/src/store/game.actions.js b/Games/Gem_Cruncher/src/store/game.actions.js new file mode 100644 index 0000000000..fee653b93a --- /dev/null +++ b/Games/Gem_Cruncher/src/store/game.actions.js @@ -0,0 +1,90 @@ +import { + generateRandomBoard, + getMatches, + getResolvedBoard, + getClearedBoard, + getBoardScore, +} from './game.utils' + +export const init = (rows, columns, moves) => (state) => { + return { + rows, + columns, + board: generateRandomBoard(rows, columns), + startingMoves: moves, + moves, + score: 0, + } +} + +export const reset = () => (state) => { + return { + ...state, + board: generateRandomBoard(state.rows, state.columns), + moves: state.startingMoves, + score: 0, + } +} + +export const swapTiles = (p, q) => (state) => { + const { board } = state + const aux = board[p] + board[p] = board[q] + board[q] = aux + + return { + ...state, + board, + } +} + +export const decrementMoves = () => (state) => { + return { + ...state, + moves: state.moves - 1, + } +} + +export const clearBoard = () => (state) => { + const { board, rows, columns } = state + const clearedBoard = getClearedBoard(board, rows, columns) + + return { + ...state, + board: clearedBoard, + } +} + +export const resolveBoard = () => (state) => { + const { board, rows, columns } = state + const resolvedBoard = getResolvedBoard(board, rows, columns) + + return { + ...state, + board: resolvedBoard, + } +} + +export const scoreBoard = (chainMultiplier) => (state) => { + const { board, rows, columns, score } = state + const newScore = getBoardScore(board, rows, columns, chainMultiplier) + score + + return { + ...state, + score: newScore, + } +} + +export const checkMatchesAndResolve = (resolveCb, onMatch, onFinish, n) => ( + state +) => { + const { board, rows, columns } = state + const matches = getMatches(board, rows, columns) + if (matches.length > 0) { + resolveCb(onMatch, onFinish, n + 1) + } else { + onFinish() + } + + return state +} diff --git a/Games/Gem_Cruncher/src/store/game.store.js b/Games/Gem_Cruncher/src/store/game.store.js new file mode 100644 index 0000000000..2dd680b855 --- /dev/null +++ b/Games/Gem_Cruncher/src/store/game.store.js @@ -0,0 +1,37 @@ +import { writable } from 'svelte/store' +import { + init, + reset, + swapTiles, + decrementMoves, + resolveBoard, + clearBoard, + scoreBoard, + checkMatchesAndResolve, +} from './game.actions' + +function createStore() { + const { subscribe, update } = writable({}) + + return { + subscribe, + update, + init: (rows, columns, moves) => update(init(rows, columns, moves)), + reset: () => update(reset()), + swapTiles: (p, q) => update(swapTiles(p, q)), + decrementMoves: () => update(decrementMoves()), + resolveBoard: function doResolve(onMatch, onFinish, n = 1) { + update(clearBoard()) + setTimeout(() => { + update(scoreBoard(n)) + update(resolveBoard()) + onMatch() + setTimeout(() => { + update(checkMatchesAndResolve(doResolve, onMatch, onFinish, n)) + }, 350) + }, 200) + }, + } +} + +export default createStore() diff --git a/Games/Gem_Cruncher/src/store/game.utils.js b/Games/Gem_Cruncher/src/store/game.utils.js new file mode 100644 index 0000000000..eb5d427246 --- /dev/null +++ b/Games/Gem_Cruncher/src/store/game.utils.js @@ -0,0 +1,234 @@ +// TODO: Check if there's a better way to generate unique IDs without relying on this +// variable, which makes it basically a singleton. +let lastTileID = 0 +export function generateRandomTile() { + lastTileID += 1 + + return { + id: lastTileID, + type: Math.floor(Math.random() * 5) + 1, + } +} + +/** + * Generates a game board as a flat array of rows * columns elements, + * each tile is randomly generated. + * + * @param {int} rows + * @param {int} columns + * @returns {array} + */ +export function generateRandomBoard(rows, columns) { + const size = rows * columns + let board = [] + + for (let i = 0; i < size; i += 1) { + board[i] = generateRandomTile() + } + + let matches = getMatches(board, rows, columns) + + while (matches.length > 0) { + board = getResolvedBoard(board, rows, columns) + matches = getMatches(board, rows, columns) + } + + return board +} + +/** + * Returns x and y coordiates for tile at index. + * + * @param {int} index + * @param {int} columns + * @retunrs {object} + */ +export function getCoordinates(index, columns) { + return { + x: index % columns, + y: Math.floor(index / columns), + } +} + +/** + * Returns true if the tiles at indexes p and q are adjacent. + * + * @param {int} p + * @param {int} q + * @param {int} columns + * @returns {boolean} + */ +export function areTilesAdjacent(p, q, columns) { + const pCoords = getCoordinates(p, columns) + const qCoords = getCoordinates(q, columns) + + return ( + (pCoords.x === qCoords.x && Math.abs(pCoords.y - qCoords.y) === 1) || + (pCoords.y === qCoords.y && Math.abs(pCoords.x - qCoords.x) === 1) + ) +} + +const BASE_SCORE = 60 + +export function getBoardScore(board, rows, columns, chainMultiplier) { + const matches = getMatches(board, rows, columns) + let score = 0 + + matches.forEach((match) => { + const tileMultiplier = match.indices.length - 2 + return (score += BASE_SCORE * tileMultiplier * chainMultiplier) + }) + + return score +} + +export function getClearedBoard(board, rows, columns) { + const matches = getMatches(board, rows, columns) + const clearedBoard = [...board] + + if (matches.length === 0) { + return board + } + + matches.forEach((match) => { + match.indices.forEach((index) => { + clearedBoard[index].type = null + }) + }) + + return clearedBoard +} + +export function getResolvedBoard(board, rows, columns) { + const clearedBoard = getClearedBoard(board, rows, columns) + const resolvedBoard = [...board] + let emptyTiles = [] + + // Drop tiles to fill empty spaces + for (let i = 0; i < columns; i += 1) { + const colEmptyTiles = [] + for (let j = rows - 1; j > -1; j -= 1) { + const index = j * columns + i + if (resolvedBoard[index].type === null) { + colEmptyTiles.push(index) + } else if (colEmptyTiles.length > 0) { + const firstEmptyTile = colEmptyTiles.shift() + const aux = resolvedBoard[firstEmptyTile] + resolvedBoard[firstEmptyTile] = resolvedBoard[index] + resolvedBoard[index] = aux + colEmptyTiles.push(index) + } + } + + emptyTiles = [...emptyTiles, ...colEmptyTiles] + } + + emptyTiles.forEach((index) => { + resolvedBoard[index] = generateRandomTile() + }) + + return resolvedBoard +} + +export function getMatches(board, rows, columns, minMatch = 3) { + const hMatches = getHorizontalMatches(board, rows, columns, minMatch) + const vMatches = getVerticalMatches(board, rows, columns, minMatch) + + return [...hMatches, ...vMatches] +} + +export function getHorizontalMatches(board, rows, columns, minMatch = 3) { + const matches = [] + + for (let i = 0; i < rows; i += 1) { + let matchLength = 1 + for (let j = 0; j < columns; j += 1) { + const index = i * columns + j + let checkMatch = false + + if (j === columns - 1) { + // Last tile in the row + checkMatch = true + } else { + if (board[index].type === board[index + 1].type) { + matchLength += 1 + } else { + checkMatch = true + } + } + + if (checkMatch) { + if (matchLength >= minMatch) { + // add match to arraw of matches + const start = index + 1 - matchLength + const end = index + matches.push({ + start, + end, + indices: getIndices(start, end), + length: matchLength, + orientation: 'horizontal', + }) + } + + matchLength = 1 + } + } + } + + return matches +} + +export function getVerticalMatches(board, rows, columns, minMatch = 3) { + const matches = [] + + for (let i = 0; i < columns; i += 1) { + let matchLength = 1 + for (let j = 0; j < rows; j += 1) { + const index = j * columns + i + let checkMatch = false + + if (j === rows - 1) { + // Last tile in the column + checkMatch = true + } else { + if (board[index].type === board[index + columns].type) { + matchLength += 1 + } else { + checkMatch = true + } + } + + if (checkMatch) { + if (matchLength >= minMatch) { + // add match to arraw of matches + const start = index - (matchLength - 1) * columns + const end = index + matches.push({ + start, + end, + indices: getIndices(start, end, columns), + length: matchLength, + orientation: 'vertical', + }) + } + + matchLength = 1 + } + } + } + + return matches +} + +export function getIndices(start, end, step = 1) { + const indices = [] + let index = start + + while (index <= end) { + indices.push(index) + index += step + } + + return indices +} diff --git a/README.md b/README.md index 200f2735aa..6d98595407 100644 --- a/README.md +++ b/README.md @@ -351,6 +351,7 @@ This repository also provides one such platforms where contributers come over an | [Number_Guessing_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Number_Guessing_Game) | | [Modulo_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Modulo_Game) | | [Airhockey_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Airhockey_Game) | +|[Gem_Cruncher](https://github.com/kunjgit/GameZone/tree/main/Games/Gem_Cruncher)|
@@ -1678,6 +1679,7 @@ This repository also provides one such platforms where contributers come over an |[Garden-Builder-game](https://github.com/kunjgit/GameZone/tree/main/Games/Garden-Builder-game)| | [Airhockey_game](https://github.com/kunjgit/GameZone/tree/main/Games/Airhockey_game)| +|[Gem_Cruncher](https://github.com/kunjgit/GameZone/tree/main/Games/Gem_Cruncher)|