{"_id":"24game","_rev":"2-2a3542cc4885bb2a4d5561e1431be91d","name":"24game","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"24game","version":"1.0.0","description":"The [24 Game](https://en.wikipedia.org/wiki/24_Game) tests one's mental arithmetic.","main":"bin/index.js","scripts":{"start":"node .","help":"node . --help","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/spaceteams/coding-seh.git"},"author":"","license":"ISC","bugs":{"url":"https://github.com/spaceteams/coding-seh/issues"},"homepage":"https://github.com/spaceteams/coding-seh#readme","devDependencies":{"jest":"^27.0.3"},"bin":{"24game":"bin/index.js"},"gitHead":"7ba2f08ab4f98db2666b9ba145e31f25d83df227","_id":"24game@1.0.0","_nodeVersion":"14.15.4","_npmVersion":"7.6.3","dist":{"integrity":"sha512-uypg1PlAet/lrgH58h8UZBP09T8PQiXKjULH7p15F8jXjjdsy5a97GcgrGcYVJxGjwm4ICdIG7qMytYUG/sVow==","shasum":"93ada5d1e6f8a9b5d75930b6adbad1724c523ff1","tarball":"https://registry.npmjs.org/24game/-/24game-1.0.0.tgz","fileCount":8,"unpackedSize":20062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvlQZCRA9TVsSAnZWagAAzuEP/1DcppbCTqauBsQqzBvT\nZZY7VcVGptzOvWvX6ntkKHKXzDhYrmcBRSeBxHQGRttoFDhwd1VhjOYt+Fxy\n7SYiEv0QMekmPLAjA7Jybf1u1bQsvW4MWbSqr2eHl87T2B4VWRCOx3yp4G2B\nElYoVo7GbA9wOgTnYJPljS4i8zToCxMBz+miQ9MLOjIbeMcotgyqKIgpj3xv\nshgGCTs41KVmfm2x3ABgqmY4XX62y2KOJ/rSQTi0fqsake7M0v55dVPzIVr6\nq3CfDHbGbMLxJptsb15PW0CGpymXR350Ikzqh0Dhtvmk/R0QgKLxiLvfaqQH\nmtO+gjftgrtAdA7TP9Cf5CY1IpumizJGtuuK5Y0rSUfHMEDKu6Tm07zhZ7Kw\n8NHTNozCm5ijEPEiYNZ2XZ7ya/kTYFm9ZyPwZLZonYhO4DqUi9lTXzPxppn9\nufQSHJOoXtcE1NSJWtConR+dzyWvn1YCHJU2nHH0XByXI7afrKMtHSgPqUGh\nEltDjju31y/t+KMytHEUhUP0pZb3+K9CDrJD02oXh6wGIEhik4AakcS3j0T9\nCLeZfjREaC+UjJxbvXadQqLjEXuAPcQmP2wfoyMRAPC8nSX2OPHfc11oha3C\nWotutK5UFd2Bg8Tf1Wu2bviamV3vXTS/PHd4R6f5SsPB8AI+ivoMT2kKBQCB\nKyUE\r\n=g3mg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB9TYKSk0CzZ8mMa6oE6tDr8InX/xEeI2dUIkYoNTTCwAiEAkTZx5bqCLWfdTXbM4+w0zepiXt6GPgn6vKiIrEF0BL4="}]},"_npmUser":{"name":"saadel","email":"saadelha@gmail.com"},"directories":{},"maintainers":[{"name":"saadel","email":"saadelha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/24game_1.0.0_1623086105021_0.6120031814075011"},"_hasShrinkwrap":false},"1.0.1":{"name":"24game","version":"1.0.1","description":"The [24 Game](https://en.wikipedia.org/wiki/24_Game) tests one's mental arithmetic.","main":"bin/index.js","scripts":{"start":"node .","help":"node . --help","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/spaceteams/coding-seh.git"},"author":"","license":"ISC","bugs":{"url":"https://github.com/spaceteams/coding-seh/issues"},"homepage":"https://github.com/spaceteams/coding-seh#readme","devDependencies":{"jest":"^27.0.3"},"bin":{"24game":"bin/index.js"},"dependencies":{"yargs":"^16.2.0"},"gitHead":"7ba2f08ab4f98db2666b9ba145e31f25d83df227","_id":"24game@1.0.1","_nodeVersion":"14.15.4","_npmVersion":"7.6.3","dist":{"integrity":"sha512-5dK1RR9A3wZxCCg+AN7Rt+fp0gUhHc1bbXTSGQhl/gVhLqkrRrQoTrdtn5kUWre3BTslXyaBz2sGC5Q8pcNlNw==","shasum":"d74cef3c62af9e0705e3ab9831f2fb4a4202580b","tarball":"https://registry.npmjs.org/24game/-/24game-1.0.1.tgz","fileCount":8,"unpackedSize":20342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvlV9CRA9TVsSAnZWagAAmasP/0TWAtkDY6QCJ7kJTdwt\nMAoJylrm5izVpJQyZdtw5wRlmtp4NkQWFpBwSf3EMG5j/QLXeEsx2QfP2nbc\nwYnBEeakz8dc8rDepTJUqb1gwjtcDzTRjZbG1ItffWKI67Ji9ryVt9YwLsgD\nlAmRPQaJYrjBiPVeW3AvQbUhKiiYkXCb5oNaT6nYkASXLKH93we42ghNNy60\n5DpN07t6Hgj0QnHd3iud1JfzrEHtTdyWdV1Q8RS6Ny8OFYMeLPriCksDf0bP\njdeuKdZUQxSXIpTGy69Xcj6bHQ4A8My0SP1brmKHjDW3v2Yvnp7M/DS8LbKT\nfp4lFULN16Bm4KrCs0/sNt2SZCBxJWAi/aY67RkIlVocnDqDgJIXa2we775Y\nKpeWbUDNvxjRU4muBpRfpl5kqXNwf4d2VsBxoNsrrqBCb9Waw268Vxxz6Aqr\nCoijjiIwYfYBBcLdvMfjB9Y7BvlqxwDgTXTj6wGu4cZcQ8zvwPsEmNrpqcdK\nxjrbMRzj4UVg9yF+T4lVMo7Vf9CUZdn5rrW+ngdTGGE/0wThNbY0UkTPCQ2F\nXgeyVBBUK9nuYlNJweGwmuED6ugqqQKVX57mXSZlH3/iHgZKk76sCMp9UDck\nzkTWFXKqRduMC684a0tPv1enJ982jpDPFnxTk5s0ppWua88gb1kNP9AMi5bI\n6s7t\r\n=uNPp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBXyzSGfyUV7cPbiLfG1JQeDoZQsSEPcZPPmbIiFGf6FAiEAuOGSdfQSRlZgEY9mlB9p0yU2TJfvvSCmXit1chVb0Ew="}]},"_npmUser":{"name":"saadel","email":"saadelha@gmail.com"},"directories":{},"maintainers":[{"name":"saadel","email":"saadelha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/24game_1.0.1_1623086461546_0.05015641655916481"},"_hasShrinkwrap":false}},"time":{"created":"2021-06-07T17:15:05.020Z","1.0.0":"2021-06-07T17:15:05.132Z","modified":"2022-04-04T10:18:26.298Z","1.0.1":"2021-06-07T17:21:01.684Z"},"maintainers":[{"name":"saadel","email":"saadelha@gmail.com"}],"description":"The [24 Game](https://en.wikipedia.org/wiki/24_Game) tests one's mental arithmetic.","homepage":"https://github.com/spaceteams/coding-seh#readme","repository":{"type":"git","url":"git+https://github.com/spaceteams/coding-seh.git"},"bugs":{"url":"https://github.com/spaceteams/coding-seh/issues"},"license":"ISC","readme":"# The 24 Game\nThe [24 Game](https://en.wikipedia.org/wiki/24_Game) tests one's mental arithmetic.\n\n## Task Description\n\n```\nWrite a program that randomly chooses and displays four digits, each from 1 ──► 9 (inclusive) with repetitions allowed.\n\nThe program should prompt for the player to enter an arithmetic expression using just those, and all of those four digits, used exactly once each. The program should check then evaluate the expression.\n\nThe goal is for the player to enter an expression that (numerically) evaluates to 24.\n\nOnly the following operators/functions are allowed: multiplication, division, addition, subtraction  \nDivision should use floating point or rational arithmetic, etc, to preserve remainders.  \nBrackets are allowed, if using an infix expression evaluator.  \nForming multiple digit numbers from the supplied digits is disallowed. (So an answer of 12+12 when given 1, 2, 2, and 1 is wrong).  \nThe order of the digits when given does not have to be preserved.\n```\n\n## Examples\n> solve: 1 2 3 4  \n> (4 * 3 * 2) + 1  \n> no, this is 25  \n\n> solve: 1 2 3 4  \n> 4 * 3 * (1 + 1)  \n> sorry, this is not a valid expression\n\n> solve: 1 2 1 1  \n> 12 * (1 + 1)  \n> sorry, this is not a valid expression\n\n> solve: 1 1 1 1  \n> (1 + 1 + 1 + 1)!  \n> sorry, this is not a valid expression\n\n> solve: 8 4 7 4  \n> (7 - (8 / 8)) * 4  \n> yes, this is indeed 24\n\n\n## Solution  \n\nProject overview:\n\n```\ncoding-seh\n├── .gitignore\n├── README.md\n├── src         \n│   ├── 24game.js               // main 24 game file\n│   ├── 24game.test.js          // main 24 game test file\n│   ├── evaluator.js            // rpn evaluator\n│   └── evaluator.test.js.js    // rpn evaluator tests\n├── bin         \n│   └── index.js                // executable game file\n├── package.json\n└── ...\n```\n\n### Usage\n\nFrom the repo you need to run:\n\n    $ npm install         // to install the dependencies\n    $ npm run start       // to start the game\n    \n    $ npm run help        // displays the help page\n\nAlternatively you can install the npm package globally using:\n\n    $ npm install -g 24game\n\nand then you can run it simply by running:\n    $ 24game\n\n    $ 24game --help       // displays the help page","readmeFilename":"README.md"}