{"_id":"@treasure-chess/chess-achievements","_rev":"38-322642adac75ae45281b8d63bd713709","name":"@treasure-chess/chess-achievements","dist-tags":{"latest":"0.1.5","dev":"0.1.3-dev.3c675ac.0"},"versions":{"0.0.4":{"name":"@treasure-chess/chess-achievements","version":"0.0.4","description":"Calculate chess achievements ","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"git+https://github.com/TreasureChess/chess-achievements.git"},"keywords":["chess","achievement"],"author":{"name":"Joseph Schiarizzi"},"license":"MIT","bugs":{"url":"https://github.com/TreasureChess/chess-achievements/issues"},"homepage":"https://github.com/TreasureChess/chess-achievements#readme","dependencies":{"chess.js":"^0.12.0"},"devDependencies":{},"gitHead":"21022664de6fcdca52421d54cffdb1628c374d82","_id":"@treasure-chess/chess-achievements@0.0.4","_nodeVersion":"14.17.4","_npmVersion":"7.23.0","dist":{"integrity":"sha512-XJ7ml+BjBdHCBbM0Z/ZwW07d8bYfQK1esRbo+PyEmpfJv0XViu8RrjKmPqgpBhR+/w4a5aU+oiYWQcv1H9Ghew==","shasum":"d0517c2b19e2cc3d2d8fab3d7aa939d8e333668a","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.4.tgz","fileCount":6,"unpackedSize":26810,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCM6VZz9P3VqI8R/s88R5ne3uF6dnot4Qqj+ahnDTgfQIgZ2snAjjrGjy7GWrbsc3Yvhr8rouArku176NWzViSsfQ="}]},"_npmUser":{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},"directories":{},"maintainers":[{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.4_1632373856026_0.5087866821458302"},"_hasShrinkwrap":false},"0.0.5":{"name":"@treasure-chess/chess-achievements","version":"0.0.5","description":"Calculate chess achievements ","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"git+https://github.com/TreasureChess/chess-achievements.git"},"keywords":["chess","achievement"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/TreasureChess/chess-achievements/issues"},"homepage":"https://github.com/TreasureChess/chess-achievements#readme","dependencies":{"chess.js":"^0.12.0"},"devDependencies":{},"gitHead":"23c9ae475d268828e320b5ef4867a265caac6b79","_id":"@treasure-chess/chess-achievements@0.0.5","_nodeVersion":"14.17.4","_npmVersion":"7.23.0","dist":{"integrity":"sha512-frrxE77+SbpPSluJ8RWx3k28Y4bN1UcaGWPUtH2WUzkHQdWKMpFMTo4TU3YUZMGGRAB6yhGEoP97nVnxDsPlWg==","shasum":"e37ee7ebb707835ad8629bbcac54b2910d0d0097","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.5.tgz","fileCount":6,"unpackedSize":30755,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZA0F+qRjkRs44YyZOyPoy4WhAYmDAb0N1AdruyyMNvgIgMLF90wV8LKg2n7u8DPJd1X4bMb3UKW+gAlmKpyqgSLE="}]},"_npmUser":{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.5_1632504178621_0.8530167894802199"},"_hasShrinkwrap":false},"0.0.6":{"name":"@treasure-chess/chess-achievements","version":"0.0.6","description":"Calculate chess achievements ","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"git+https://github.com/TreasureChess/chess-achievements.git"},"keywords":["chess","achievement"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/TreasureChess/chess-achievements/issues"},"homepage":"https://github.com/TreasureChess/chess-achievements#readme","dependencies":{"chess.js":"^0.12.0"},"devDependencies":{},"gitHead":"b5010155b4ddbd14fe965bdf1dc595dcc5d963b0","_id":"@treasure-chess/chess-achievements@0.0.6","_nodeVersion":"14.17.4","_npmVersion":"7.23.0","dist":{"integrity":"sha512-AkJoDSI3/1A/nRe8Dz7eq+HWOEREbfAKIqCWNr8VhWgJ5eUZIWVllyg6tCI45Sv0AwmqAJjTpdXE6JZuo8nBCg==","shasum":"399feebe5612eca4d5948121afe88067f3a92916","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.6.tgz","fileCount":7,"unpackedSize":99786,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDOFartZP6gPoPyjBZkgGsRY8cInuOqyqxdfcVGtM7KJAiAta4bgN8vjEZQx0kE7UwSTupW9Hakf+Y3Y1Y5pT55j/g=="}]},"_npmUser":{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.6_1632953819409_0.911906331529694"},"_hasShrinkwrap":false},"0.0.7":{"name":"@treasure-chess/chess-achievements","version":"0.0.7","description":"Calculate chess achievements ","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["chess","achievement"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","dependencies":{"chess.js":"^0.12.0"},"devDependencies":{},"gitHead":"5220e15f2debf6fcdcd2aa49697545e672131b78","_id":"@treasure-chess/chess-achievements@0.0.7","_nodeVersion":"14.17.4","_npmVersion":"7.24.1","dist":{"integrity":"sha512-ewEuCrf72amF6JXbPKCjd/YWYAxWqnrEJOx93koFJpCRPPB0AY/byLH3Yjn9N07xNuu2+94TneDUz3KIfvcd3A==","shasum":"1d8893276172baa2dabbd2e74f68d8a83790accb","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.7.tgz","fileCount":7,"unpackedSize":102999,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvmCnbucijoNOthfHq8i0lXjJNrc+MGcXS5tvrjNbkAQIgCg+pbkQpM1+Xy7z2kbcqR64wgutKcayA4f5lf/qix4g="}]},"_npmUser":{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.7_1634318507511_0.8461322717278899"},"_hasShrinkwrap":false},"0.0.8":{"name":"@treasure-chess/chess-achievements","version":"0.0.8","description":"Calculate chess achievements ","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["chess","achievement"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","dependencies":{"chess.js":"^0.12.0"},"devDependencies":{},"exports":{"achievements":{"require":"./achievementsList.json"}},"gitHead":"a1cd3c40156802764603428b703c76ef161a3811","_id":"@treasure-chess/chess-achievements@0.0.8","_nodeVersion":"14.17.4","_npmVersion":"7.24.1","dist":{"integrity":"sha512-7Uxs+r/j/dEfu3ihu3Fg9mjpVKmWvFAgcy7ZMSjaF0KIjXbZpoq1nwPtSwWdUV+b+9Tbe68rBNnV2/InMplfYQ==","shasum":"0f73dd60b3bea668fef3e77a7a9ecc925b1b2979","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.8.tgz","fileCount":8,"unpackedSize":103716,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHnvEZQI290buHxmX9JSMSul4NsFdobFzxyjs7gHxv8fAiA4TWQIRw24RIq6QENHERsN2KBvhHpVAi6brOItS4Cnqg=="}]},"_npmUser":{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.8_1635910376777_0.04719161089229629"},"_hasShrinkwrap":false},"0.0.9":{"name":"@treasure-chess/chess-achievements","version":"0.0.9","description":"Calculate chess achievements ","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["chess","achievement"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","dependencies":{"chess.js":"^0.12.0"},"devDependencies":{},"gitHead":"5b5881015c992169f05c4e3cfa4ae2f8941721fb","_id":"@treasure-chess/chess-achievements@0.0.9","_nodeVersion":"14.17.4","_npmVersion":"7.24.1","dist":{"integrity":"sha512-1IoJ59wrjpdYg9LbZmNL9r5aj0UqDEbH3KFSJEaguCifUqMpKFh4ZI5BhveU1cAqXaO2CcG6Ew5gwO+YkeYIhg==","shasum":"bd7273615b176113413ad922684b5e9bc3d4cd25","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.9.tgz","fileCount":5,"unpackedSize":25675,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0rDczxn9crQArUCHNLCu+Fa2x1Ajr5jJb/RtkRn0PxgIgeQFCECpmfOHL9dzkoKo91jeZUN5dw1bxMm711dSZpzM="}]},"_npmUser":{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.9_1635911276272_0.9197805956003988"},"_hasShrinkwrap":false},"0.0.10-dev.063ba4d.0":{"name":"@treasure-chess/chess-achievements","version":"0.0.10-dev.063ba4d.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["chess","achievement"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from \"@treasure-chess/chess-achievements\";\n\nconst { opening, achievements, score } = achievementsCalculator(\n  pgn,\n  playerColor\n);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n|number|name              |description                                        |points|\n|------|------------------|---------------------------------------------------|------|\n|0     |Winner            |Win a game                                         |2     |\n|1     |Player            |Play a game                                        |1     |\n|2     |750+ Winner       |Win a game against opponent rated 750+             |2     |\n|3     |Played 750+       |Play a game against opponent rated 750+            |1     |\n|4     |1500+ Winner      |Win a game against opponent rated 1500+            |3     |\n|5     |Played 1500+      |Play a game against opponent rated 1500+           |2     |\n|6     |Played 2000+      |Play a game against opponent rated 2000+           |3     |\n|7     |Big Winner        |Win a game against opponent rated 2000+            |4     |\n|8     |Strongest Opponent|Play a game against opponent rated 2250+           |4     |\n|9     |Mythic Winner     |Win a game against opponent rated 2250+            |5     |\n|10    |Defeat an IM      |Defeat an IM                                       |4     |\n|11    |Defeat a NM       |Defeat a NM                                        |3     |\n|12    |Defeat a GM       |Defeat a GM                                        |5     |\n|13    |Criss Cross       |Mate with a bishop                                 |4     |\n|14    |Jousting          |Mate with a knight                                 |4     |\n|15    |Utter Disrespect  |Mate with a pawn                                   |4     |\n|16    |Triple Digit Club |Complete a game with more than 100 moves           |3     |\n|17    |Excessive         |Complete a game with more than 150 moves           |4     |\n|18    |Ultramarathoners  |Complete a game with more than 250 moves           |5     |\n|19    |Opening Expert    |Win with checkmate in less than 10 moves           |2     |\n|20    |Don't Blink       |Win with checkmate in <5 moves                     |3     |\n|21    |Fool's Mate       |Win with checkmate in 2 moves                      |5     |\n|22    |Leveled Field     |Draw with a higher rated player                    |2     |\n|23    |Hello, m'lady     |Queen side castle                                  |1     |\n|24    |Horse Farmer      |Under-promote to a knight                          |3     |\n|25    |Holy Promotion    |Under-promote to a bishop                          |5     |\n|26    |The Sneaky Pawn   |En Passant                                         |2     |\n|27    |God-Mode Glitch   |Checkmate with an En Passant                       |5     |\n|28    |Cutting it Close  |Draw when opponent has a queen, without one        |4     |\n|29    |Déjà Vu           |Draw by repetition                                 |1     |\n|30    |The Underdog      |Defeat a higher rated player                       |3     |\n|31    |Checkin' You Out  |Put opponent in check                              |1     |\n|32    |Pawn Shy          |Capture <4 pawns                                   |1     |\n|33    |Pawn Shopper      |Capture all pawns                                  |2     |\n|34    |A Minor Problem   |Capture all knights and bishops without losing any.|5     |\n|35    |Mr. Marathon Man  |Move king >20 times                                |1     |\n|36    |Pawn Hoarder      |Capture all pawns without losing any               |5     |\n\n\n\n### This one is for testing, and verifying the achievements \n\n| Achievement | Description  | Example PGN | Color |\n|:-------------: |:-------------: |:-------------:|:-------------:|\n| Scrub Dub | Win a game | 11 | Black\n| Participation Medal | Play a game | 8 | White\n| Semi-Scrub Dub | Win a game against opponent rated 750+ | 7 | Black\n| Participation Medal | Play a game against opponent rated 750+ | 10 | White\n| Mediocre Dub | Win a game against opponent rated 1500+ | 9 | Black\n| Participation Medal | Play a game against opponent rated 1500+ | 6 | Black\n| Participation Medal | Play a game against opponent rated 2000+ | 22 | White\n| Decent Dub | Win a game against opponent rated 2000+ | 12 | Black\n| Participation Medal | Play a game against opponent rated 2250+ | 2 | Black\n| Poggers Dub | Win a game against opponent rated 2250+ | 2 | White\n| Criss Cross | Mate with a bishop | 24 | Black\n| Horsey Move in L | Mate with a knight | 6 | White\n| Utter Disrespect | Mate with a pawn | 20 | White\n| Triple Digit Club | Complete a game with more than 100 moves | 23 | White\n| Excessive | Complete a game with more than 150 moves | 16 | White\n| Nothing Better to Do | Complete a game with more than 250 moves | 15 | White\n| Yeah, I'm Good | Win with checkmate in less than 10 moves | 13 | Black\n| for real, bro? | Win with checkmate in <5 moves | 14 | White\n| Fool's Mate | Win with checkmate in 2 moves | 12 | Black\n| Emotional Dub | Draw with a higher rated player | 3 | White\n| Hello, m'lady | Queen side castle | 3 | White\n| Horse Farmer | Under-promote to a knight | 17 | Black\n| Troll Promotion | Under-promote to a bishop | 18 | White\n| The Game Glitched | En Passant | 5 | Black\n| God-Mode Glitch | Checkmate with an En Passant | 9 | Black\n| Cutting it Close | Draw when opponent has a queen, without one | 8 | Black\n| Déjà Vu | Draw by repetition | 3 | White\n| ELO is a Mindset | Defeat a higher rated player | 19 | White\n| Checkin' You Out | Put opponent in check | 2 | White\n| Pawn Shy | Capture <4 pawns | 3 | White\n| Pawn Shopper | Capture all pawns | 15 | White\n| A Minor Problem | Capture all knights and bishops without losing any | 24 | Black\n| Mr. Marathon Man | Move king >20 times | 5 | White\n| Pawn Hoarder | Capture all pawns without losing any | 21 | Black\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 [Treasure Chess <maintainers@niftychess.com>](https://github.com/Treasure-Chess).<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"063ba4d39c0960fc61b77c2bb171083eed5362d8","_id":"@treasure-chess/chess-achievements@0.0.10-dev.063ba4d.0","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-fYVjKhWMrP2OLrqkkLubq+dYCEtC6aUfD3e6NL2bpbBA66B2anxs4arW/sKo/L5J4AHYg1IiFOiov7k8Z6m1Kg==","shasum":"34441f69e7eb6d35377e6893ece8215cb1760d36","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.10-dev.063ba4d.0.tgz","fileCount":5,"unpackedSize":29369,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwVDk4wgd37myHCkGjh2htK8R+oFwHxjRqnrinbn8XaAIgENp04QoWRtDF3ypzxGC3whB0dAW5G2rAkCgo78SJzFU="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.10-dev.063ba4d.0_1636580298725_0.2357816235145327"},"_hasShrinkwrap":false},"0.0.10-dev.3dc7657.0":{"name":"@treasure-chess/chess-achievements","version":"0.0.10-dev.3dc7657.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["chess","achievement"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from \"@treasure-chess/chess-achievements\";\n\nconst { opening, achievements, score } = achievementsCalculator(\n  pgn,\n  playerColor\n);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n|number|name              |description                                        |points|\n|------|------------------|---------------------------------------------------|------|\n|0     |Winner            |Win a game                                         |2     |\n|1     |Player            |Play a game                                        |1     |\n|2     |750+ Winner       |Win a game against opponent rated 750+             |2     |\n|3     |Played 750+       |Play a game against opponent rated 750+            |1     |\n|4     |1500+ Winner      |Win a game against opponent rated 1500+            |3     |\n|5     |Played 1500+      |Play a game against opponent rated 1500+           |2     |\n|6     |Played 2000+      |Play a game against opponent rated 2000+           |3     |\n|7     |Big Winner        |Win a game against opponent rated 2000+            |4     |\n|8     |Strongest Opponent|Play a game against opponent rated 2250+           |4     |\n|9     |Mythic Winner     |Win a game against opponent rated 2250+            |5     |\n|10    |Defeat an IM      |Defeat an IM                                       |4     |\n|11    |Defeat a NM       |Defeat a NM                                        |3     |\n|12    |Defeat a GM       |Defeat a GM                                        |5     |\n|13    |Criss Cross       |Mate with a bishop                                 |4     |\n|14    |Jousting          |Mate with a knight                                 |4     |\n|15    |Utter Disrespect  |Mate with a pawn                                   |4     |\n|16    |Triple Digit Club |Complete a game with more than 100 moves           |3     |\n|17    |Excessive         |Complete a game with more than 150 moves           |4     |\n|18    |Ultramarathoners  |Complete a game with more than 250 moves           |5     |\n|19    |Opening Expert    |Win with checkmate in less than 10 moves           |2     |\n|20    |Don't Blink       |Win with checkmate in <5 moves                     |3     |\n|21    |Fool's Mate       |Win with checkmate in 2 moves                      |5     |\n|22    |Leveled Field     |Draw with a higher rated player                    |2     |\n|23    |Hello, m'lady     |Queen side castle                                  |1     |\n|24    |Horse Farmer      |Under-promote to a knight                          |3     |\n|25    |Holy Promotion    |Under-promote to a bishop                          |5     |\n|26    |The Sneaky Pawn   |En Passant                                         |2     |\n|27    |God-Mode Glitch   |Checkmate with an En Passant                       |5     |\n|28    |Cutting it Close  |Draw when opponent has a queen, without one        |4     |\n|29    |Déjà Vu           |Draw by repetition                                 |1     |\n|30    |The Underdog      |Defeat a higher rated player                       |3     |\n|31    |Checkin' You Out  |Put opponent in check                              |1     |\n|32    |Pawn Shy          |Capture <4 pawns                                   |1     |\n|33    |Pawn Shopper      |Capture all pawns                                  |2     |\n|34    |A Minor Problem   |Capture all knights and bishops without losing any.|5     |\n|35    |Mr. Marathon Man  |Move king >20 times                                |1     |\n|36    |Pawn Hoarder      |Capture all pawns without losing any               |5     |\n\n\n\n### This one is for testing, and verifying the achievements \n\n| Achievement | Description  | Example PGN | Color |\n|:-------------: |:-------------: |:-------------:|:-------------:|\n| Scrub Dub | Win a game | 11 | Black\n| Participation Medal | Play a game | 8 | White\n| Semi-Scrub Dub | Win a game against opponent rated 750+ | 7 | Black\n| Participation Medal | Play a game against opponent rated 750+ | 10 | White\n| Mediocre Dub | Win a game against opponent rated 1500+ | 9 | Black\n| Participation Medal | Play a game against opponent rated 1500+ | 6 | Black\n| Participation Medal | Play a game against opponent rated 2000+ | 22 | White\n| Decent Dub | Win a game against opponent rated 2000+ | 12 | Black\n| Participation Medal | Play a game against opponent rated 2250+ | 2 | Black\n| Poggers Dub | Win a game against opponent rated 2250+ | 2 | White\n| Criss Cross | Mate with a bishop | 24 | Black\n| Horsey Move in L | Mate with a knight | 6 | White\n| Utter Disrespect | Mate with a pawn | 20 | White\n| Triple Digit Club | Complete a game with more than 100 moves | 23 | White\n| Excessive | Complete a game with more than 150 moves | 16 | White\n| Nothing Better to Do | Complete a game with more than 250 moves | 15 | White\n| Yeah, I'm Good | Win with checkmate in less than 10 moves | 13 | Black\n| for real, bro? | Win with checkmate in <5 moves | 14 | White\n| Fool's Mate | Win with checkmate in 2 moves | 12 | Black\n| Emotional Dub | Draw with a higher rated player | 3 | White\n| Hello, m'lady | Queen side castle | 3 | White\n| Horse Farmer | Under-promote to a knight | 17 | Black\n| Troll Promotion | Under-promote to a bishop | 18 | White\n| The Game Glitched | En Passant | 5 | Black\n| God-Mode Glitch | Checkmate with an En Passant | 9 | Black\n| Cutting it Close | Draw when opponent has a queen, without one | 8 | Black\n| Déjà Vu | Draw by repetition | 3 | White\n| ELO is a Mindset | Defeat a higher rated player | 19 | White\n| Checkin' You Out | Put opponent in check | 2 | White\n| Pawn Shy | Capture <4 pawns | 3 | White\n| Pawn Shopper | Capture all pawns | 15 | White\n| A Minor Problem | Capture all knights and bishops without losing any | 24 | Black\n| Mr. Marathon Man | Move king >20 times | 5 | White\n| Pawn Hoarder | Capture all pawns without losing any | 21 | Black\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 [Treasure Chess <maintainers@niftychess.com>](https://github.com/Treasure-Chess).<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"3dc76576fd3f0553560768cea2e3808a63331d80","_id":"@treasure-chess/chess-achievements@0.0.10-dev.3dc7657.0","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-jLTw/8PRP5sjsk8qd1gDqJzale8eBA7wPeCkK8JzDMYVZWAYSgR4z7G5UvvW716VALNg2vu2wDjNYIaGOHbvow==","shasum":"a22d9a3eaceed35888be502d20ac61f165a4894b","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.10-dev.3dc7657.0.tgz","fileCount":5,"unpackedSize":29369,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBFtNmCaLS7JKi3OHdLestpGgnolKGwcxPUCrIeJtPTbAiA69ERHXT7oIA5Qp+HJjwoHUBWL/K2kkFw5s4l1QnXyBQ=="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.10-dev.3dc7657.0_1636586979804_0.9609172935772834"},"_hasShrinkwrap":false},"0.0.10-dev.f817be7.0":{"name":"@treasure-chess/chess-achievements","version":"0.0.10-dev.f817be7.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["chess","achievement"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | Winner             | Win a game                                          | 2      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 [Treasure Chess <maintainers@niftychess.com>](https://github.com/Treasure-Chess).<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"f817be7b9b53d6d788a8e2c0eaa673d4d2b6509d","_id":"@treasure-chess/chess-achievements@0.0.10-dev.f817be7.0","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-oQr8E4tE/LQVpz8bGZQR6Yruln30Ex83C24olsMfJRCRxCJRgFRuvZ3XnK5Paf09OrMGLB5tIBKT3vBYBn9VJA==","shasum":"fbb926242ab1a0d1c8d7e60d12ba49d27844711f","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.10-dev.f817be7.0.tgz","fileCount":5,"unpackedSize":31271,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFzgYyZTQhhmsr5gmGjvYXxMebeEjZeGAwXTSA9oh9xgIgLJWs0u+15YhBFpZ38gtQYxPpgsTI7ZZyMmeZQrP0tWE="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.10-dev.f817be7.0_1636592730488_0.03918113815505109"},"_hasShrinkwrap":false},"0.0.10-dev.2b8d20c.0":{"name":"@treasure-chess/chess-achievements","version":"0.0.10-dev.2b8d20c.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | Winner             | Win a game                                          | 2      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 [Treasure Chess <maintainers@niftychess.com>](https://github.com/Treasure-Chess).<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"2b8d20c5dfd8cac7c838b1f539a61ac108482d76","_id":"@treasure-chess/chess-achievements@0.0.10-dev.2b8d20c.0","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-N1tf1uyNbH+anyxQgjMeNoFYCNqu7pX8va56SNL5tiWf2g33DKAEoOKIozWNaEniMu3o7c37O6p/eyWyoGu6mw==","shasum":"3c29cc61283bf1711c46a47e3895680b27c425f8","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.10-dev.2b8d20c.0.tgz","fileCount":5,"unpackedSize":31304,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwzoSWzztBUby9f9ccSlh6yL36aUddtpjWjsMhtSfj+AIhAPxI6lmv6aMajMeYtTTQmZDfBNHUHayCXOm1okgjyhnw"}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.10-dev.2b8d20c.0_1636657688215_0.6045979102705059"},"_hasShrinkwrap":false},"0.0.10-dev.6b8a749.0":{"name":"@treasure-chess/chess-achievements","version":"0.0.10-dev.6b8a749.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | Winner             | Win a game                                          | 2      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"6b8a7498d7c5bdf50f7ae119016be12005cc11f9","_id":"@treasure-chess/chess-achievements@0.0.10-dev.6b8a749.0","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-v8yUh7dXk8JeibBSjuiwHjFAIDc73lrsdGdZceXH3nqwWRK77iarV20ymgWU5o06aJXORqGcpt4BBnzLAnMlzg==","shasum":"2db39644cb3ec118d2fe29c65f19644e5a9074e4","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.10-dev.6b8a749.0.tgz","fileCount":5,"unpackedSize":31266,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhppEICRA9TVsSAnZWagAAlgIP/Rn1U54cggHNIapxI/I8\nt3fyHwBL8UsZRIWzS9JLoNUkFOyLYAm4SMhfLX7fN/f0oF2QdxiG/CVYK/R0\nT9qlVtc9xQUQENMDGdml7czauY6S9OBXIrHifWzUZifrk6yFSRKpXESq88eg\naaggd7X1sy6GkG+eT6pC8fgKmfG3ECfkdnLsIfK/wwRUe19xK1Ww1GNrAClv\nyTN4QWQV+anrSw/6faBhE7l0U75tjXhN3ua/8halJGP/e0xLGBikHWVgjIvt\n0DsBqKSgz9wOi4DePyae2t/a/WWJPrYB5fRi0uPLEIqJNugOL8n/6PKAyRsM\nkD70I9fwE13wPLHtvUPpH4r0UuDzWLvYY7cqU/g7VqVgQ+qB+96CAFDDslt2\nCyymx2ILCXV3iY+Ghe2oHIQe9yCJBvQBxq0bZQNpn7SLvH3xBwmwHzjhllM8\nCo2hqL24qukQ4G8XjtaGfSkcp+YjncEM/avSyn8j93WHw3BIPXWgszz1jZKh\nrAiqClh4JZAW0uoj+58SMr1sqX/bPDJkkymeofoR2MToDqX39KPJ7e5ujmfT\nXwLSSBmsTi0GIHnnL/pjVpQErOg34el1u+if8MIf8q3XMOz415UyoubRifhE\nIAPTUkbtGg6jjftVyujNxenJYrUVOlmLxGHMfK/ciWsfwj9c2G/FkCnBSokl\n+WS6\r\n=DiMW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHCucxCyIYbaY/YYXgKpvu+RZQrpHd9slxspZ6OoxKtwIgNUAPooZwIUJVZ5YXXkctk1bHMwyWyjXNDFlg5KCSsXo="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.10-dev.6b8a749.0_1638306056330_0.877553419851667"},"_hasShrinkwrap":false},"0.0.10-dev.4bde2ba.0":{"name":"@treasure-chess/chess-achievements","version":"0.0.10-dev.4bde2ba.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | Winner             | Win a game                                          | 2      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"4bde2ba0d5b1208c085fefcce967a1be9d7c85eb","_id":"@treasure-chess/chess-achievements@0.0.10-dev.4bde2ba.0","_nodeVersion":"14.18.2","_npmVersion":"6.14.15","dist":{"integrity":"sha512-V8lS2b34+731++QDivZzBUjMKNW0fOhjgwsa/MTbGw8pL+qqZqsITFhxGRaxAq5TCbY4VckMR9d78aLEpDFpqw==","shasum":"4ba7b946976f6a2f829fb39ea0ea97c0fc469a3b","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.10-dev.4bde2ba.0.tgz","fileCount":24,"unpackedSize":123240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJht79RCRA9TVsSAnZWagAAIwwP/RwGVNciBD9wY0o4/DNb\ncC+sR46Jst3rsBiqKVo0zeSkVJy6953ZXmm1vts3YBM8BifLf/d6jN9+0rVq\nprYoMyCUw+ZpvHatD4/6LQghkBq3eIlgOcTTD2rWrgVdywXBRtFmgqmkwPLA\nQcfl3ugJABhkEpz2QU/8GCKWyIlYmuQ8tPhwZthCaW3700QOHCfukfcp6wc6\nJe8yxsU/9T64R/zrHNnf0qoVuDXQeffRCdM/kzf2aJ9DIN3uJH2Nf8Oo9zXf\nPAfIJlOva9y0mdytkM9gBi1twcq9+jbiflIhtsZW7xbXcVmIZC2hRPHitUn1\nMu6ZEfGEVJAjSu4/RmmU5ZrBlctZpxEa6o0snr+E8pyVcX/I8M25iymDj+c4\n8zXgV9E2dnKq9I0nm+eWos5pHlTFpOQD9mv8k+thLV1WgNanJJr9CXW6nsXt\nFKtsAXHV26EU3vaz0WSCaFmD1Cnm8NlMdy/XAZAxbZO6Q6HN0X/9Hx803aEh\nn7Hm8FgRK4zu5rNy0ZUZh/5ITEEmO+MX6YCB7CV7JQZWiN5jC2ghf44ayjKA\nj3lHCUu2t7uXgFQr9wWPWZRUe48RGqrhYsRI4tJOgFJVJKGQPL93pps/lzw5\nOO1tlJBgDETg2NyqghyaBDM1zBDgPPh8v3LlvBQl294nmjZ4QCOeT3/pSiWW\nae3t\r\n=tm3m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuVSPuS/227NDLqUmls9cI2xmiFUti+2rLzmACYAnNyAIhAPC6QR0qG6Mlt4oPgk8S+HghHM4q1PW/oIvHFdoRxyZQ"}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.10-dev.4bde2ba.0_1639432017061_0.6586199611608508"},"_hasShrinkwrap":false},"0.1.0":{"name":"@treasure-chess/chess-achievements","version":"0.1.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","gitHead":"bf4fec58585a2daee1834ea973ac23d8836ed7a8","_id":"@treasure-chess/chess-achievements@0.1.0","_nodeVersion":"14.18.2","_npmVersion":"6.14.15","dist":{"integrity":"sha512-LIycW3dkP9mpFfEEdaA/9t3mhetlHad4xMV/NBO3vhHh39GXbcBxR+LUI24UBVJjn8TOAYaednJVo8GWgfTfQQ==","shasum":"570efd4e46cc287893f693692398f766a21d9c39","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.1.0.tgz","fileCount":24,"unpackedSize":123403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJht9H+CRA9TVsSAnZWagAAAHcP/AuyADXJaWDRBH4AyWCy\nGhy8oVCSejmtKsHofk/S5NiPS/ZePO7r4BAVRkcMhRuCrA/zp8kso8yLlT1b\n5h1y44m3C1BPj8xhn4Tpe67qttngJcf7L9HHshe3Uu3eHXKb/NovTic3Ew4u\ngTVu5rk5Ac22x3h5oHCvQb/Ivi2CNySIfKSOmJQLerbS/SMPmqRab5oS3gfg\nwM7UipCTt5Kggje71/HlfVBfWJ1jx9yZYHMyvQwsXC4SpXVhaej8OMagXg1f\nri+dNepaDAl8rAtT2NXwbU7+uFFTWkJPhMcvLQFAIck9gWVT170WDQRPE7tt\ndeJFHFt9U2kcDomJfcx+XhnLfd96KgU366y63ZXLHP3D53+j2HuXAQRYrKfy\nNTEMgpnYQUIjoy4LXJaAmGfhEFSQ4inoke3Emz6o02RFK/xuzjQ8zwUaC1D0\nTdvrYvu+KrSxaTVbPQlBuBZbjqpAcPd6AqA/DmDfx6M7VL0WhliWFUuODuAW\ndoR7m6NiM8E9bmz+8NIeVDysvUUud/fE1JnZ0uYYcazBtu/SjvffTsqa/Icd\nnBGALLh8iVFW7NKcNayJAOVy/e1AdNrBIPyQ4kOSqpkT/NyQZ99JN8mnDESl\nYlR1T92pWGLLKSGftcL36N1J+LwYBrM2Hl5ZQ+nRlLvCgT3ahmsD10/td+Tu\n9Afa\r\n=VIQZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFeE+gNKnuNLVW2LcYvOyQFlQvuxlnsU+2WC99eqqk69AiAOvxzf9thKrmgI+QpuWZzccMjmLpnRMpW4AZpj5PzK1Q=="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.1.0_1639436798543_0.5617023930527225"},"_hasShrinkwrap":false},"0.0.10-dev.50ab757.0":{"name":"@treasure-chess/chess-achievements","version":"0.0.10-dev.50ab757.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | Winner             | Win a game                                          | 2      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"50ab75796f00428f24557a46726c99f2ae5e0b13","_id":"@treasure-chess/chess-achievements@0.0.10-dev.50ab757.0","_nodeVersion":"14.18.2","_npmVersion":"6.14.15","dist":{"integrity":"sha512-U91+1Ul8vfj1BdbOQ+IZ51qKSt19mfBSoJ7NmCADGlWqv4SjLz9oYQhx8GvKWaUOxXRqv/PQwdqxxuK5ighdnQ==","shasum":"8513afa30bcf9a1cbebde3294d3654c1f396f92c","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.10-dev.50ab757.0.tgz","fileCount":24,"unpackedSize":123494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJht9gsCRA9TVsSAnZWagAAc6MP/jA+oAWparXA6J6cRGnX\nsD7Ptqo0hyIs11/r0wepx64Cu4xmxDXqyxKGOJCFUvn8YIf93h6avi2FHoIb\nbYPASbUOAxABtsUtE/uMTPxX/L+adBcC/yhzmM6NLjfxfg7MQ1kiOEFbo63L\nd5zIVx/XhF7MVt9AYsx/PeQkH8WrgIRULflBZa3obZZqlQrBhqkyfTm4d1/U\nqz666DIQDj5TH2WmF/RqHBj9/os5kTp/KoKMiHun9v9+KNB+JXl1lPRTFzGM\nVeM+QYk6NE+4I43H0rft6clMTrO/sweXIBSotpvuYbxsBHBMOKsuKZOLMyDC\nUpUfezhiWQAMwCCb9X5dqxhibG0GKVTIgSq4KYvKMQzrk/4fle5BSF4Al9W8\nOoyh0wDA4KJTeP73BeW5a7DEt4PTCh+DDl1t6/l9hpSg8M61rpHXXZPUJgWA\nWtJBbPpwTjXX3Bh6Mnt+VGpfXji4Jrn3EdPfLH1puC6Nj246+LS2DoQTe0/i\n9FqagUXwLNeEFLtK0zpQ8Yep6/280PyAQpHkfR/MGZRNfnjrAxaAFrOgnP2O\n757azwdibetuWt7EQ0rN3MdGXUpdu9IXHxqksuEByAM+YnXkrdItVSN4QPcu\nW1RG4gXeT4NC5MxqXPMFIdTcP5+Pk5K9fZktJ2+BUy4glc/FuK8q6E611M+w\n3A/r\r\n=32/T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVfpsndp3pwuB7Rak9XeK2Rtawxcj6VFdf6TOpnXLqyQIgVxsBEvllIpfxQcAujmbneHm6/lE2WBHwNKTiL31xNZo="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.10-dev.50ab757.0_1639438380685_0.9984265606654026"},"_hasShrinkwrap":false},"0.0.10-dev.8898314.0":{"name":"@treasure-chess/chess-achievements","version":"0.0.10-dev.8898314.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | Winner             | Win a game                                          | 2      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"8898314b9ca76261326fa1c3fd820bfdc2689d0a","_id":"@treasure-chess/chess-achievements@0.0.10-dev.8898314.0","_nodeVersion":"14.18.2","_npmVersion":"6.14.15","dist":{"integrity":"sha512-jJaSJxtu1AvIKBER7oaIY+vebRXUt9L1KeV+KJMWMrXhD61rSazXvDVxZWz5JJffI8yOI9kyqUNRsiryIbSg5Q==","shasum":"713d81eb7339cceeda556387a1cefe9905c637c2","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.10-dev.8898314.0.tgz","fileCount":24,"unpackedSize":123494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJht9hoCRA9TVsSAnZWagAATRYQAJo239t9aA/QwbCbz/9r\nxp6as7lEBpyMsQVmPDGtVBx98RbGXMPZHhKAESZkSDGiFJTnh3Q1gHEagVcC\nqjOzHk2WUOf5nA5vDb8cg7iS89F36b3DHPjOO7GoTAQbCAmMglB/t8EmnT0g\n/6mBUurSek3FyTLGnlg0NJFXz3o0NuS+dlxlaNwS9ZEzlZkiIY2kHDttjOZ4\n/1p7b8B3uaaZrEpXaGSm/1WVGCkKKWPa+RE+cB883N9PQw2/YOzu8j10/Y/S\nK29mGqHfXv0V3Yv4sqVi3GEeSqlprktVeiZ8D/mai2UgWUyK4t4a4pb2Dwku\n75uyZON674xorOWVlXT2vLVECsobsCGBBGFu0huIIS6RXmR3EpyDkxc/Pr/t\nFsBq/nF3hERzcSdRmlGjgp7RJolsGz3afAWeZTAgfXo4mg5xMvB7j3YvnVyJ\nKab2pF0+dhPScP/SP+e6ZsP8Wy1cRh42ELSBP5eWS2IcYMMPqudKqkuFyFvE\nZ7HqeRVMc7uf1dzk0tBK5+OrNcYR8tzS2qz0rQw6GKdbgnWO7p+cbPT4+lX9\nifYLBw04/HJLsCO0Ruzu3X+14M9Ua6WBq5qPIwe+G8ctSxOMbluc0J80aOyd\nHOhTHaApZyPvHu7e3PNn5Ry5L5oN0gxKmrVVU8v85AomL3taq5aAG9gqQTit\naJ9l\r\n=6KVA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2hFp7JrStppoRpQlrsLcj7QrBITlQfPhpIWeMQ7GqZwIhAMpcrCYO5knPRaPeVSF+s+YDByELcivtjcvE1FNlnp6w"}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.10-dev.8898314.0_1639438440384_0.6334340010691244"},"_hasShrinkwrap":false},"0.1.1":{"name":"@treasure-chess/chess-achievements","version":"0.1.1","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","gitHead":"a21a851fa4ef146cf08486359a0e64945026eb8b","_id":"@treasure-chess/chess-achievements@0.1.1","_nodeVersion":"14.18.2","_npmVersion":"6.14.15","dist":{"integrity":"sha512-OV32lVU40oHo8hZsTkl150U75SARDxryyfPBpg+HIdH2iwaUYbGPJvMMByJD+zAYjzjw2frCFhigVICty/txYQ==","shasum":"552c73696e8bc196f19a8abbc47fad5e85a2d12b","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.1.1.tgz","fileCount":24,"unpackedSize":123456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJht9jNCRA9TVsSAnZWagAATeEQAIgp1iqMsO5p0CXsS/ul\nU5MfmNEzo7YV0HyDIC6Z57FhJ667ZuxovaCaRwPbjG0jBkhq4Vv77NTMiLIZ\na8Apijkv9iICrs4X98gRwmwi7O1u3RH5i48BVx8VB8pLesN4nVMd3tmM05Lt\nExGUHNCh8gSw041Sf31N0C9AGemx8wPuBGCFVeToP5VBGoml0y3v8OnKqv0I\na/ccMNYznFlU62ecpQZc5/7+WboHMwUa2YMbunhXR3Dgjbk3mBcMicXCFFGg\n0cENZ/le8VqMXcdPZrS07dtEv5CK2B/3HNMk2a43P6hzoaqRJwFmHX1v0b+z\nU/dwQfKN9U+E5WwOUr7gj4c1MytnUdGh5ZqnEnfgAfxx0l4VNAvPGe9XwEbc\n1KcNd+4MDFEo4thIlII5sjOAxIzGh2kljSEw8OuigVNV7bslVz/5xWjCH/D/\nnYPa0YFNqzFS100E/jJPOYLIfP4ZCoDkvbj8hwIfp4qaaRimxe38oKr5IHWz\nN/9CA7fIL9Syp/n3aQNQ2BfTEtk55Y35S4DpBrZuSIY9BkNB/O9iLb9GuaWI\nX3FzfcnEnkOMiO6B2RSRIn695TfhOU9d4wKQaEl0dRvyvd+Xph5pP8w2GbA6\nk9BlK+9iw3kr5wuCsFimYguMZ6mqhsoQJOS2WJpaBn3o9fYbPb4zpAva4NVf\noq5V\r\n=B9pL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICWRnsAJ3khLpDAp0MMUoW2UncdfZjh2cm3vUVnyXBrqAiB6njpOEY6bOqBNnJRhNn09feQcart0Rut1H8gwPZ9Z7w=="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.1.1_1639438541677_0.742920437610838"},"_hasShrinkwrap":false},"0.0.10-dev.3d26232.0":{"name":"@treasure-chess/chess-achievements","version":"0.0.10-dev.3d26232.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"3d262322c06353f7f198eb13136f5296675d2642","_id":"@treasure-chess/chess-achievements@0.0.10-dev.3d26232.0","_nodeVersion":"14.18.2","_npmVersion":"6.14.15","dist":{"integrity":"sha512-H2Eh0Rnux/vTmkGiAe8eEpDtXVF+y/F6a+WTTEuavUJnuw2hCkkITpdb14CnsQJUNGLyKbSdZbTShHoVcVvDBw==","shasum":"7c94c5f4f5f25cb53cd85f0f7f5daef48f8a6050","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.10-dev.3d26232.0.tgz","fileCount":24,"unpackedSize":123590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuEhLCRA9TVsSAnZWagAAlyMP/Ran/K4nHDK9sCH4M7pv\nVRhMv+cgAJKq8/KBewEowmqqPtA7ZkZ/Gd3pXgIFU844koDRset3A1K67aeh\nK9sWKnMX32IkQMJopQogJt9mNEP+L/5gsLAXU1AGhplta8tVtG9kviQFCJi3\nfNI1g1v8o8ZOsmM+2kAp5ODKnmwmowhoN2L2afV5egXnYITdqtKg5M1tvB29\n5GUCigTVgEFLP5plKVkKgvL0Bm3vf1iA9j529TfOQ9MBJa+bWJVYJwiiCrbd\nPdCWhYwbCTWZBz9BUAQMRGfuCfRSxvD2vwZJybYhIJvnlufz67wVJO9/VDQM\nj1XGi+eTH+EtO5gRPvztQbYHfGTaWTIvrCp/16TVPS+RgsrVMXikfQIh85ku\ndBa/3fqGGwYl5p5gWgGZf/aUZxFwxnalwHmii86RwtghjeqIvQ2jQwyfbDAQ\nlgG2LnsCDUFm5myKLCuZQcmaDS90ZbeLPMYSWnEf+pOwQqMrLyVaSjbPxuDw\njE6z0kX7El7ZcXP3FUzo+wknDfWpKzU4qdPKDpD7cuFJl8Ka8myG9/AyPMJd\nrL1DRJHb1ummuLFH1eJa9UCJJBD9R14y2vMdQ+Atdu+WRZCJ0oxOeeINDs+o\nRqz/5RqQMUdvk1K2kyS9KLdRs/K7WZW0MPZmrUKRALYAC+kmLanZ1Lmqhuof\n1tlo\r\n=fbJc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCedgHJapB6wukFiuJkTEvn/NH4EOxFneHUCxstI338eAIgdMXoUUPxsRr91s1U/YQfTT/qyHo70JNB4/bnye5N2z4="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.10-dev.3d26232.0_1639467083835_0.43213486537115187"},"_hasShrinkwrap":false},"0.0.10-dev.dea6181.0":{"name":"@treasure-chess/chess-achievements","version":"0.0.10-dev.dea6181.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"dea6181b91a2edcfb9298697d8d89d3ca74b3937","_id":"@treasure-chess/chess-achievements@0.0.10-dev.dea6181.0","_nodeVersion":"14.18.2","_npmVersion":"6.14.15","dist":{"integrity":"sha512-chhKQk0gwKGEYoDbRP08Sw14JIwGtQOnNSC0iUSeYIHvMLt0Kdn/8TkysGr+PRWW/G0dp4HDfoDsg6x/47KscA==","shasum":"4eef114b14eee7c67daca16ae8935061856a93fc","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.10-dev.dea6181.0.tgz","fileCount":24,"unpackedSize":123590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuE1MCRA9TVsSAnZWagAA1HQP/AwZeDmBUGTXtFRTAoVe\nxKeMstMz/8EP51Hdhg6hmA9GF+uod6HBc1d6Uw4p7BYH/y/fOTR6zl5+0c1v\n0hEu4Cqx0hvdoFKGIjP3/rLaukcKK4G5D7aAm9C5dXo8NRBHxrEgTHPFWo32\nA2KS3PdeQHnwyJE72dN+Rv1XVghAny1zvAYwV6luS5aHIf97/jfp+RGK1PvL\nTzVEYH+egubDOVBpsxeFcEATkhxSi6uKIj34yiF/E2wt7hMRcwRxChcKA4Ju\n+Izp4dtYdSCMJHzwiBtCqz+R/VgWTS0STmxuKMNBR8cXNygw37rRWjpv+hoK\nSajX1mH5h4ycWZQpK4enr1XrHXQNdDGn7rEtjy/CHZitqmMsCyktw25iZ2va\nrqIajjH4cU0mhIk7HTHKwFNZWNI7OFV0oTZKFkDjDsnEXbmtxd1GRLT93kLk\n93j9AXpnH+8umHjPOH8kz/METB2HTw0rY6b1WL47oV4CAreoIyaAOagWA6AS\nRJHD0PKwX4TioeXcsHeMZIJp2tl43D0vdnIOFVcZ+6/34jg6A/doYVqG00aM\n5/i63NIcfbDpaTv+yBHt14gog7eBnjy5d1VsALG2LZoulH/tstRbL4KoWLXa\ns49nPNgLe8PraVN/E9FGasRsqU+hlAXYEjz3dgEo/h/M8YATDTGm2Rb/LlG/\n7LKC\r\n=Ujjx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYas2IDBJoxl6gBa0c8fC0sl5qm9TeePezCHD1HdCkCwIgFBKcFVDrsdZhTooIJyvnBCURFHagRZlEhMsI8vBw680="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.10-dev.dea6181.0_1639468364265_0.08774350159492861"},"_hasShrinkwrap":false},"0.1.2":{"name":"@treasure-chess/chess-achievements","version":"0.1.2","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","gitHead":"400d6fe75f8b458039f71c2531bf0defe22bd868","_id":"@treasure-chess/chess-achievements@0.1.2","_nodeVersion":"14.18.2","_npmVersion":"6.14.15","dist":{"integrity":"sha512-twkCsX/IV91STbJNHB+rofflJF25ibDKk4DKXavuprYd3EiSu6q9yg335BX+EXf/7sQwlahiktn1b/UD3IYKKw==","shasum":"2828b49fecbde914cbaa5565818877c123ecb323","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.1.2.tgz","fileCount":24,"unpackedSize":123552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuE4tCRA9TVsSAnZWagAAbM4QAKH4VMYWDAZv5G206YxA\nO5aSdsr77WscZjwaUNPVWRtrp4ONnXaoSmTVKTIkytvWNmXfslw1ydAxS2wb\nsjwzpBSahgfyaZ6i2HtAsSTW5EM0J4QUkqrs1aqeMiFiRnHUIaEFltKY6FOP\n/Ins/T6hV+T+/riYNwFXNzPvUOFR5tZIEZewccg+D1uVPHQhNvTEHcXxgAdq\nih8hEOIJrT+5ZezTG/mkjS1imenz8mDTWX187ZkbREISw8RClriE5SOXi51l\nAs9PVtRdsIyNjLSW2J5fw6797q+F+uj3n2GHHaGpEzQJ3A5pC8lqwgR4j68j\nEvGlHxjUbalxtO/W4W7G1EzKR8vzKWVoibWv5b1ekHHGUo8eDlBLRTD3vmza\nba7Co8Asot0/mlGlqbEou+E3Tmphgh2Sx+beB6i8hH6S4/8Z5u/4Pv0+V9PA\nx8gTwp9UnwJLxiAKqH4/Ssf5ankMPyyaqI9GO6ZoO3Ns4l6TPgxpXxd8L16n\nVhVPowFmkPVMDbo42azSKjm+jopgXBCVJTTzcVDarCQgH0y5moBzhYljp3o2\n6jUe3P7nt82ARRftHQShHc33yFqgHwnDwzUc9zZhuwBjtM3+D9f+EMtvgI+Z\nMLSXEfaCoq2PZd1vRb9mQDAq4RM8wqYu23dIkpZcA/1Jun2L0J4Hd6QTCZY2\nkBrm\r\n=udGD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjdl1vNrPlcUwN5JSzV7b4YIsVuxQbWLCFTWOpnG5D6QIgHzQruWIoi9eumsSWw7PkR0FbEcYfItwc9XyHxzL6yp8="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.1.2_1639468589767_0.9504446969352036"},"_hasShrinkwrap":false},"0.0.10-dev.56f9a9b.0":{"name":"@treasure-chess/chess-achievements","version":"0.0.10-dev.56f9a9b.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"@treasure-chess/chess-achievements":"^0.0.10-dev.56f9a9b.0","chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"56f9a9bb7df6ec8750990727a7e51cf5ab64b6b3","_id":"@treasure-chess/chess-achievements@0.0.10-dev.56f9a9b.0","_nodeVersion":"14.18.2","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Mh9PPoIPRPRkqx+ouqdx3CibYAgTGMaeYPdJtXeEhqq0BoW7MxNOSLGVvDDh+VbZ44PZ5oKhOMGhULdw0VPO2A==","shasum":"0080c47e9f55556d20c703c84403a80cd544de2f","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.10-dev.56f9a9b.0.tgz","fileCount":24,"unpackedSize":136168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3hnzCRA9TVsSAnZWagAAvGAQAJhJ9OyH8LxP1LxbdG37\nUCOYUpuhCvXJqu0eWKh64qm6DCnOg4Mt2EX1gd/f6QHg/EiEO61J6n4ZX05/\ny5Wx8TU9iwLYymq05F3k4lgBKeNxmMCGKtvBBFOZBm2jlGySsFQ3MeNq7Pge\ny6njaAF1bKml4dhv0jFhg/Pi1DmP/x2fD3yfS9dOwI3E44irC4U4fblQZ45i\n5NaRH6q2RquuA9E6XIX+N6xnbdl5i0witcajlC177fpuWJL6iHUT/6zQnkj9\np6armQtjLIQdco7w0rbaFfATEeW08t6ColYEGApGCNQ/BqwnjJsbojlPqtby\nYNsPL1WHbu7U384GEXz5GpeuhU4VYEY9wJo1AKmCV8fshSKKvn8/DdxZKeds\nQCPt0ulLML+A/9uBHCsM6OWUcwodYMp0DbIsgceWR1wIeQG/+4/PdH/hG5i+\n/+1vM6f19rf3ra6laJBpmFnHPh3O57G64Sj4fnjvgy6KSC3Z4Se/8z1CnRoj\n/qx+DGhWL5t9GOjgcAKYzkVM5qWmyVL/4tlQ8p0l84BoK7ZEBCDNpdRkeVWP\ny0MCcvitYnPzJRSeODHNixgQox1vHqbBVLB76KiMaBFrmkSR1satVhClojBr\n76gdUPR0ZiHQ+BMKHYSfYOaHPKLrSecgLltIr5t9PnZ7Jp2qDZ6C4zMmOIwT\n41Bm\r\n=25wQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICIZ0fI0PvvZIaq03jxIZobPJKCNk68TJmYXnhPnkM8HAiAb+bapEv0K5aN8NufnZD1V9dvRYrNl3yeufhYz9YgW2w=="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.10-dev.56f9a9b.0_1641945586906_0.14454485959104146"},"_hasShrinkwrap":false},"0.0.10-dev.0234ede.0":{"name":"@treasure-chess/chess-achievements","version":"0.0.10-dev.0234ede.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"0234ede9bc39828b16b06628cb674f9ed546e196","_id":"@treasure-chess/chess-achievements@0.0.10-dev.0234ede.0","_nodeVersion":"14.18.2","_npmVersion":"6.14.15","dist":{"integrity":"sha512-uSgJLH8SHhHTL7atoGd9R0QtjoLu9OHfg123H1eftnn1IoRDrMFFmILqbgCOzW9p/idBiCdTszyxCNH7GIZWZQ==","shasum":"1475480bd6c35f33f7ffe40530f25c1719799c8e","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.10-dev.0234ede.0.tgz","fileCount":24,"unpackedSize":136101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3hqhCRA9TVsSAnZWagAARrsP/0b8Vh/P3eEeGL/oTxL2\nLlD+LrV3894UxeXsxm6X+uhrSbYryk+T/kIzp+d96dYpagACpHEWNFSVRbvU\nt19clO0LofVsKxoTTvnjDATHpUp+XjOMlgeOVj0Vikzxapy5lf2xV9vmA/Zk\nMjv84sV8hDzY5IM4hFQU3OB1OzPazh7jlfQRUfwGv4fqipnlsNk8m+YUjE8r\nrukBdd7KCzy3agXK+k+IoZT/v92aj/OcSgg07NV6bimIHM1jzC54V1JTvmHM\nMDZiWMxb84OjfBdfobDGCOLZfSIfaCv9uOkbmeKun/wo+X7AqNI6umBcIeHS\nwvCVWXV768kL/tBLjnvPVOoltw/kDR5+bYvvLX7by9qq/H0cxom1AX7+S/x7\nYI8TVxD/P0EwktuHlQtmdVdZ/VANXTXJOKBQUGCrJgsKNAyZJhq3raXxARLJ\nmbnn1m7DBYH15VPbfkyulSxKMcyZqPOFmxUrTw+IqpcjB9NEGNilU/Spbg0C\nrmuyND/YfSsrnUKmS/p/qOk/j6VmoGfuHLnKVw6RnRwhrCgq8o8cdRoob7Ee\nnY82/Xv4fDrkLAzn5dX1e/GypEi0P/YlrKwzpQad7laeW4fHPM7qtzaxAb00\ni5rtTCARZJXKNFZQFFANb/fmUCIFkz2YLZq7Q3oBidQg7UTcWEafiyTKr9g2\nL/dW\r\n=25vM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB7DmKBPNiDQzjyIr2uKAZchPk9GJdTEAUWmlYGUk1TGAiAbgaJ4QHbEHcH9/PiKNHB43z64n60OCfSqk4zjQqdN2Q=="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.10-dev.0234ede.0_1641945761708_0.7226359432619238"},"_hasShrinkwrap":false},"0.0.10-dev.46ff28d.0":{"name":"@treasure-chess/chess-achievements","version":"0.0.10-dev.46ff28d.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"@treasure-chess/chess-achievements":"^0.0.10-dev.46ff28d.0","chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"46ff28d0574e1124bc023773c794a26d42e3c6ac","_id":"@treasure-chess/chess-achievements@0.0.10-dev.46ff28d.0","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"integrity":"sha512-qSkCzhFsPTrO4FhD7rgqyIbk0lvEnYb0YEXbbb26PjEQUkx2cxtRVSCGay26tstEQGVLRQNfOdGrPrvm/DMPNQ==","shasum":"d1f9bcb91905b098cbe5f078ee1df8ce6976f0de","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.10-dev.46ff28d.0.tgz","fileCount":24,"unpackedSize":136349,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8HMRCRA9TVsSAnZWagAAAi8P/12upwPefnvTQCPsXn+Q\nIDLjPjfbRUZ9r4ZTcuBTcc5SimY6ZH6SX9hEjV+42BdS5s1wgg52HiiNJWsh\nX20Bif4dWHvuju9zL9jyDXoNUL11TOdpj7zcXvkVN0ZPGRps9WGC7FFqY9Nw\n1sPKgaODmKSQtxOd6nm3753Pl+F8VhTyIA8Kz1R4ER2cTua2/Z2CdmHjsobN\naL3LJV9JQ0gyufp6QGmwH6wozmjTWeblfGx8OH6+aNHBRF8Yv5EpGKz+/kOo\nnKME1fy1tglkliDFKWjWd3avn2JvJgEHhuOYWT18q4CRjmP0tt54207xPfhZ\n4sTIdl13JkhnFZKHMiMXYerk10sdKNafgmKpHprjmCx30P3nptuW85duUql9\n3+Sa+aJPVG1GyJPyg2poi+YXaWRsN7T8BdHm0zhCxceaonBFQfajgpGlW3mE\ndEHCVBIHsnLOZEwqkKTxfJfaV62msi3D6jtARC0tt0zRtEP3Q5n+wWaT/Iaz\nrKAhjPIZ9VZMI/iBZ5xHb2f1MgSMfUiuiMOVNDVsRiwzofaNBE9mGV2MUT2o\np5Gsw5+wWxwiOpsT+inuoIUp+oNQJm4tMctyGG+r1a2Mj9tYStOansuG3MOR\nZnt8UX9eYJCe/HoRu+xkyiCK0DwWwj/rKE4xrHgyslwfAu7Ll//3MIyZHHDH\nQpKY\r\n=+/Gv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClpATPun49bUKQm1DuTRfPNqrw1w6/g4kYiFusTrKQ6gIgWxnApAHrarB2cZNz4xjTbOA1w0fm3ntm5BrgiqqihDo="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.10-dev.46ff28d.0_1643148049704_0.6162508847875687"},"_hasShrinkwrap":false},"0.0.10-dev.03d1d7d.0":{"name":"@treasure-chess/chess-achievements","version":"0.0.10-dev.03d1d7d.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"03d1d7d0286177fddf66cab74347db65e8d19691","_id":"@treasure-chess/chess-achievements@0.0.10-dev.03d1d7d.0","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"integrity":"sha512-W95mTXuo58yxBqnmh6rIwxDxkhRtruPxehK8SEz4gaZvJZ2p7iiUVKs0+iJOcDO7eTYI/rjKa632arwa320KsQ==","shasum":"a88b9b13fa60c43af2a65297df8b1f971ec11d1d","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.10-dev.03d1d7d.0.tgz","fileCount":24,"unpackedSize":136101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8Hn0CRA9TVsSAnZWagAAKt0P/1T1VtPhZP1JVET2ZYRx\nQIPpbInAlQfVheFZE41lkC2+GdKrPTdpuDx1D8sWK5Pu5JZ1e1Zzs1P9/l/A\n7allyEMg1ZbuumAntDeYCsXnfVyVmqHKtqZ7qNFOc3F9qQm9FUICgbPscWrr\nawK/mStasOl3GggudLxe9oBo9jgR6MrLLzWYpZ3zJ/FOusFzTjI2inwVQna6\nZLulHTOlpvnPWZ4Y5K6+MHZnYWZoefMYDe2omWngpkgFpJeRBP/EmONfnRf+\nSuoCXQq4dGW4rxQK8a+fWVlIt5YoGARgzMnMrJeSlij9/4xDS3pVzFB6prmJ\nIKaOO9IHn6qzYujuNGrBkgKPWovS8HnkFT5f2VMtbKqHnJaHBZViGKg2q6Jq\nv/z+lyhqb+ECwo3QX9ipXwHCHRClHCgU/evnFJ2LfEicD+kQYxKlXRgCqLTT\ngrDi3WjeexVdBEkthsR7EQKycIlFU11mWpFoV8dassF4fPk9vV4R/Ce4UYp7\nRSG1bWhUDnmZN543fo0OLabRbN9+Ep7cEff4kruIboxZUY5cXDcKy9QpgXng\nnT7IJcxElzqnZYf0cuc43l4tiYHZUw7ZR963zXbPnQOK7+5K0Gu1ZUTJRwCK\ncF2VIGTUV/tAfohJVw0Add4QEVwf70OP5vvT054bH8qMo9A/eN7fIn40rSQd\nVqC7\r\n=qaFP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGHrW/xT7MVbccgYvkiYF2pJh5BoRp/yhOkveQ8NM9huAiEA6wCrfinx1N65QdWB+7iJVM5izgX8hhmfDTS3YP9+8Zc="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.10-dev.03d1d7d.0_1643149812326_0.4045901636906235"},"_hasShrinkwrap":false},"0.0.10-dev.64a0c70.0":{"name":"@treasure-chess/chess-achievements","version":"0.0.10-dev.64a0c70.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"@treasure-chess/chess-achievements":"^0.0.10-dev.64a0c70.0","chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"64a0c701c504eacf9e9bde7eedf1d43b064a3cbb","_id":"@treasure-chess/chess-achievements@0.0.10-dev.64a0c70.0","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"integrity":"sha512-gIA593PuNXztPpe2JC3HBUXeP98lVkZcskKu8MgnDFrclAL5pE8mTK8vCs2O7BW+/O411ig7088dL0FJNbMWWw==","shasum":"aecd3d70a90c72142fbf792adfc3f4dfb7b3fdd3","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.10-dev.64a0c70.0.tgz","fileCount":24,"unpackedSize":136448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8JJ3CRA9TVsSAnZWagAA77MP/3AiwfHw92mo7PGj683P\n2nHVMnmyhVpJqH+o2P3iy7hUlb5TKqKGMNcxdbGZm2SVxWmk78M5/Kg2jKSS\nUNygWUN5SF1iq2F3EPr6BeTXWLKGVHNkO1iLz/S/1scF1XioYfc8lN64nyVz\nMV/S+RzOOVFQ8qsdQNm0a6eMNiR6NbfZq4VbaJq9kkQC7tZjBR8IdjYQmlaK\nyGT2rUUIOVUD8OKkL5jY1zdJZGsWVMtXzw/rWYmGyRHdzygORXCC6jYHiEzP\nS0vDq9h6mcR5kQ2gzLuQfkzO3qjPVENa9LW37YyJDa4RoQgjSgJ+xCn3MjQA\nyXzWost/B3QXhUFw2Th1yWtqCRMM3w6//ILWH3DMOROTBd35z1nEn59pyN/f\nGftCSHpM93PoYn5nwpN2jGrd7FONSN/dc1Zw9U2OEGlrecU57ibmTxvJENkg\nVI6nD0D/+1rZyK1tQGuXZ9RvJ+qyea8EG1FFdhwYkj6OJB9tYRxFqFEcgKQj\nkEOoTMl6qeBIfCNVC9Nt8AlP1PJID40UyFaJGq17noVfAx9YADKKskSSrQ2S\nL/7RGdoshrFlcVlsrAYFMePMiPN6vV4MKAVQIkR18S5PvJ4u3HRORORtFLSX\nW6EiFDywX7xVIDSfVSk7v0nwPYpZL5DejI8ir3BKljvbo2Mv/YFFvggcxQHi\n2rhk\r\n=ehAM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRRqfCv9QQEeI4mUIGuaSKxxD110LM4Gr5p1Ox25VkCwIgH/1wWnE0CdKrlR6OLXrnqK2L2nDV/ij/PWb9wJVEbPA="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.10-dev.64a0c70.0_1643156086810_0.10003782953158868"},"_hasShrinkwrap":false},"0.0.10-dev.71abf84.0":{"name":"@treasure-chess/chess-achievements","version":"0.0.10-dev.71abf84.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"@treasure-chess/chess-achievements":"^0.0.10-dev.71abf84.0","chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"71abf849b282b1ffe2efcf70989dd13f7ec26920","_id":"@treasure-chess/chess-achievements@0.0.10-dev.71abf84.0","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"integrity":"sha512-iBLR0Xv0sKju2H8hSmALicqQcZ45UfNQnl+DiZJ8+i11/y+DfR+D5PLYLKov7dAhPBTqinGLQHO47tKixe+o7w==","shasum":"998bae441e46fa7868a346a28417fbc2a1a3c46b","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.10-dev.71abf84.0.tgz","fileCount":24,"unpackedSize":136448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9CVCCRA9TVsSAnZWagAAx4gP/RHHRtXQlH0EufCXUFy6\nKyUB6qUDKslnP86bWs/QZl/6v62tZZdYPU6kY1Igf2oECwM5Fw4GySsGe56R\njvwD585EBlHuvwtKvre2CGFrbJUMH2hoFwTqpMz2Gbg4oJJMOCBpJNB7NgYg\nVWiDw+tj0rssX4nKRVDwqq4Kfd7HVl/kKSTG8jL635KXsVkV3CJw5KIpbaUC\nWVKiPbHhnTzm7g/U0NFkZbI/vzj+MIUhshePpd9oCgP/Qisz46lHcueHBv1/\ndHBHNvJoGG7hEWDAjRNxbEjDjsv+qRNYgTYlPJ1575WR6Cf9EUS/VU9ApKmR\nfywbcPDZhzv092XjbtHQ3ddPQtOi77TtM6FquoCEk9MYULVu/RSEQiEnKa8a\nYPI7i1XobTzbn8C8caeRFX2xDAv+dl3CetjayUVz8rA/ZXkSTq7XptcRBB+L\nIehsv/S8gVswbe31VSuqTnSANOyurKYF5wxm6NYz15o87rAetJ8qqXKWGwdp\n577ro2Q1QaSsyv06E8vbbE3X2wbopA0xV4yW+mM4BjKneENRPO37GkRhxVOO\ncVosLTaUznGQ/rxneycCHqho/3EsEM+/camg/s8EueaWaG7PM17dg7oHigdZ\nz5kuI+5qDbgs2Z2ZqWKOktbKxIhQKwEOC4y4qySc521drqgywwwFgdPGi+gv\nUNgp\r\n=fOOQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAS0jkbgoZd362FbKZAeeGJtqFaBBtY2PdbYHksBjXfyAiEA8KeyKK2tc73e+rEfBuOdIeP2G4M6QqwEJamyFpmXvEo="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.10-dev.71abf84.0_1643390274549_0.62175349797073"},"_hasShrinkwrap":false},"0.0.10-dev.fd36291.0":{"name":"@treasure-chess/chess-achievements","version":"0.0.10-dev.fd36291.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"@treasure-chess/chess-achievements":"^0.0.10-dev.fd36291.0","chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"fd3629104b19c38579c27a3a85d24414acbb8ca2","_id":"@treasure-chess/chess-achievements@0.0.10-dev.fd36291.0","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"integrity":"sha512-FyO1d9GITgCQf1/mR/bxqNUZpmJfWbvQAi/6i3UKieA8Qzdu3ldGjb0QyonaOhIbHqym/2dqZyc4X2WSnKROsw==","shasum":"a46e2b80c3d62e3d4301d751516ce61b1626a476","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.0.10-dev.fd36291.0.tgz","fileCount":24,"unpackedSize":137153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9XL6CRA9TVsSAnZWagAAIGsP/1DImKmcSsVxbOXkVyqD\n/GozTDk2H2ApCM3XcidpYVCYypF1br+jXRIn/y8OgwLe+4PNTE+N7yg0mnSu\n71beVvLDQrrq9sSkN8r9lj1PR17H8VW+V+u9+Hrd8G4bOJgl8ypW8X4Qi0OH\nQMxZYbgpNVztmhpp4zfQ9YtUa0636RE8RqfLoftPtp/J33RPUsecObs7B0AT\n6JAEBI95tBoMik334VvHd7n6lNEDOs/zBOL/gGkEmvui/IvcJS8vs+oxPenz\n8MkLyTObI4QSWYEHcOeEhdTz4lVbh/e8XpLa/uMYfVOsUB/fULdRaOuXpiay\n3VnB4GEsGfL/puR3ADbw9GxhPQW3byAEQryXaETwChF7Tr47FjbSkYykKixP\nt8fKjVhywsbJG9oCy4mEyz+9XHSJYa6UTKNIMQQdRummXzuhzsIVZqUD4sUC\nsdA3KBVCsj9cuTpClnhNtkuashHabDAwIFml5JOm6W0AiwG9uFkMVXAVO+WL\nLuIZeTYfZaOYQoEd/cTD5teksB2CMUaC1w2cxKwJ0Dr0YjJntsTbx6qBcr+A\ndFI0KXbfMqop452oZBNcsxnCvsCTu8VGY2j7qURZhIIN26+XQgOInHCUEpbP\nxTbbQSh+yKqFnkP6vP8Nv+GVqHlapMETo3/ehB+BXuTSuqBoVwI+Wnlc8A6+\n5jgh\r\n=b+Sr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEbCDPNp+ssAsyVZsC9re8ROgRHRhVlBkHP3gBQjwR5dAiEAo5FWU/j0pAMglvo+2//SYJUDay5AoKTTQ6Y2YaWVMCk="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"niftychess","email":"team@niftychess.com"},{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.0.10-dev.fd36291.0_1643475706121_0.6808793874013368"},"_hasShrinkwrap":false},"0.1.3-dev.3eb5757.0":{"name":"@treasure-chess/chess-achievements","version":"0.1.3-dev.3eb5757.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"@treasure-chess/chess-achievements":"^0.1.3-dev.3eb5757.0","chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"3eb5757ca72b1959db896f9a8976a351b47e3491","_id":"@treasure-chess/chess-achievements@0.1.3-dev.3eb5757.0","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"integrity":"sha512-90cOXzdlc76Fm9GXhcgOTCmjhnNus6jRYNSUax9AbvWwjdIm38HBlqvGglvuHolI4OahxLhCXzG0QPQ6kPyUOw==","shasum":"c7e277376feaad0891d6095ea5411403c1e87c00","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.1.3-dev.3eb5757.0.tgz","fileCount":24,"unpackedSize":137150,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9Xf+CRA9TVsSAnZWagAAfUQP/312ZJR2Re1E+B+1TmwG\nYP5yFJFCnBtnH0ZoPB5pJfNVyGbnl4x1crlKFV16qFcbxiyYW145ddxJ0j+U\nw/upeuOiHQdXUeRadKcnE71tsUJJaZqou9iN0105wH4Erl/LIGZYJ10ClBAQ\n0XOlujtxRXH6ptiJ5GpoPgTKopVcVAK5orulb70LR63aeO9CnF7kjfZZ/btE\nxTYMYzD8dWu8sofnl4KGidBSVJEinBDgZeDeUdflOKvp300StmL17cz+Y2iF\ndOfh+41cx9jYfbU9VB8XLb/CmBy/LGsl6BH2PEH0OuGcx/70u5iHZnIDh/JC\nT7E9Z/tfau3gNb0bPsbOEhkDYirTKFipWR5Vlz4LfndFpTht362bnI+BDmR/\nZTRDsW763XVNdoKga/rSkBAHN8DFaP/t9BwnBdOkUYKr/Dz9MTX6H/mwiGYC\nMRFDyXRIMGjteHNUce/wJWqciZMKnYV4AIxYJvirZbrccyvHh/mamfbutspY\nRtED1EZuzJrLilSx2B7l9MIBRINwy5tBPzIEQSLsl0K5E4WrVr5RHi2O8nop\nVypIXXWSHM6CmQYommQ5iZ/zJYX9Acmmt/3LNylInV1oSfMstPEoK/T9aKQF\ngUEZvbmMvya/G33tg8cht+oCSwRMLiprtfQbnAM6LH7RTY9+SZSY/RhLuAj6\ncF8x\r\n=aBjn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClnH7iBgBmqBzKKf79zsts7kpAbPZbZ9SsNaJGnvhbFAIhAOEuV64XYat+dGVchuu4FwhYduuoJqOC7Kx4SZNSzGNA"}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"niftychess","email":"team@niftychess.com"},{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.1.3-dev.3eb5757.0_1643476989839_0.00891136570288853"},"_hasShrinkwrap":false},"0.1.3-dev.89f81ed.0":{"name":"@treasure-chess/chess-achievements","version":"0.1.3-dev.89f81ed.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"@treasure-chess/chess-achievements":"^0.1.3-dev.89f81ed.0","chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"89f81ed609f5cd24bfbd2e690fe323b80eab89b2","_id":"@treasure-chess/chess-achievements@0.1.3-dev.89f81ed.0","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"integrity":"sha512-n8Epvy+WaH84QMRYc83YpvXm9VyH/f3Gw4HAly8tJlf6wnC5CPd5WdpySGAorKUtYZk4yJeVACaoboAhf0qyzw==","shasum":"2ffbaa412a2a448d6268344bbb3b081f3e3297c5","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.1.3-dev.89f81ed.0.tgz","fileCount":25,"unpackedSize":147485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9fnKCRA9TVsSAnZWagAALTsP/A6J7reEzq84ucTOD3uT\n+D4TlW/dO1Qj8QNMpNjZV88Vma3eopK7X+2UAfrOK7QsP3vNusMTF+prAybJ\nAUpEbdpllyXanziFefJJxKAMDKsDEjpDzHMcX5H6GS/+hPQ3g0JXhTYqCNtU\nyKKiq2mfB+giWFx0kTjqvD95wG6VYCzOPwAE/zCas/4vq4JZ0y9mioeFCMdD\nkOeaXyCZnexzaXboCAK3HI5luLRaQQkNZ2NN3R/A/TaJ4fzHT0g/1MEWLQ18\nZlmE9pt9N4i/EG6enaJ7ZN15q/UQsHVfo/c5IKDDxvnm4Xz52bh0Rx14SU+Y\ncmB4xii11dXobJqbOeCNt9Ui1vDaR3Gq2/AMQogeXrW+rH/S+SbijyadDG42\n5hEWZNbJBTCfvh30DuGaZAoUd1hND3H0oppD3YtkzT1I3FmsoHu9qn81jgEd\nBn2pPfKteWDu5FXGaPBA5OjiqWdi/AZ4pOLS4qpD6fcafpvJBirFqsHCzpGW\nWXs0DLsRceNt6IqHnuxsT2Th6l/dVlAGGnmKPTdN8UOwqKUspbV01lOxHr/i\nyDTaaVD+RqlO/LjTwZt6pn00fMorVUSS6zUB9b7KLDK0caAX3UTeIK86Fz5J\nsQSujR6Zu8BUETP4tgE3WQEoel4AC2p0JN6A6/N7GephsTk5CrnkeP1/1sAN\nhFPb\r\n=68SL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDh2r1jZALnha8VGfqF3jG6ujHclOnXWaDQu0N82nVGTgIhAIQCsZfClaWJlKI9EubTcwzUsC/s/doRZUaA52Bft8OZ"}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"niftychess","email":"team@niftychess.com"},{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.1.3-dev.89f81ed.0_1643510218378_0.3132941687923094"},"_hasShrinkwrap":false},"0.1.3-dev.0a8cd01.0":{"name":"@treasure-chess/chess-achievements","version":"0.1.3-dev.0a8cd01.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"0a8cd019472f6506b114ea03d09fb2155fbdd40e","_id":"@treasure-chess/chess-achievements@0.1.3-dev.0a8cd01.0","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Imb86AwEA/BMcxfyKLfRZiLJt3IYSj0JEtDFD6IzshFqucIgjW3TR4rq9pAYVd5qHWI+z2/DFAqjkSuF6sY9mA==","shasum":"dce2b431f66af384045c54e394b642628b12f5b3","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.1.3-dev.0a8cd01.0.tgz","fileCount":25,"unpackedSize":147419,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9fx7CRA9TVsSAnZWagAAM5wP/RcnVmejQW5lEgAqYwtn\n6dQmi+4FyHACXhE8DhqxqLgEWB2B5OIYOJD2j/rk6q3bLggcPkDC5oCYlsFN\n4hG3QFu00CuIFv/NKX6zbszdomPv2fhmrpP9aoC3OsnGMZInkx1jt//Pl/3S\nVHL517FQKfAbFpuhp8/pR/+7pS3pM5oSbqMSKykvem04BioYjlg1IF71Dx2X\nIrSn/Ogmu0JCgcDbr5unwHY3RRy/pxDizoZ2dDOvNqUlTRZX/c9/lZaoGahI\n+l+sF+6XZ31QkuyZizr/09GbnLuJ0dYQ1WQb5VIa0zRRkLcsCRmDeiCCeZDP\nXe5py6bd8h5R87Xuik92lt8LSfrJer7i97Ud6WYg3WhyOAUJB3vWRFvTEniV\nutld8Zg7MhUVnz42eeRRQoqabdWPEUmdnvx5JTGI2cIKsxSNNhJZ8braULnt\nSBiZ6OwzaDwPAfvdq+SOWnc4NIPIpK+JrsthFPPT01ZeGSMWUwijok38S4T/\nRCJkrXVtLd83gxHFpkJ17BSvk578Z2fs8xawFfGxIK66Vebo8zv4+xkSXROL\nMuaRM7bzjiDMFekhjT0XBOzNMnk2+9WrkxR2scsqsR2eMN0zPR5aeKTImQVN\nTpRxh0mKTLa+Aq65dLDDUoC+GqXquVOQXvH5JJotiZWWnKzUxvQCkRCx9b4+\na2rQ\r\n=raSa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjnbfxKN8w1gsfWsETaha4nX0P46Tjin/puIR5QMjhfAIgfxKpiR0ThKcJdZyLpfKVaoyRV6gHKraGNNT/GHB24ds="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"niftychess","email":"team@niftychess.com"},{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.1.3-dev.0a8cd01.0_1643510907292_0.08280217515374355"},"_hasShrinkwrap":false},"0.1.3-dev.571e76a.0":{"name":"@treasure-chess/chess-achievements","version":"0.1.3-dev.571e76a.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"571e76afca14f323c07d82fefd3e304af31af731","_id":"@treasure-chess/chess-achievements@0.1.3-dev.571e76a.0","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"integrity":"sha512-b0xsvFje7jOatO6FO93RP2M0iAwYOtPbD4f4elqTr8Fbk5JoxZPMA+Jpkn3xehBciefRktSGtK3W6kJrYYPzRA==","shasum":"a577179e497259f940a9a71ffb805ec2be7f4cf7","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.1.3-dev.571e76a.0.tgz","fileCount":25,"unpackedSize":147419,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9f8pCRA9TVsSAnZWagAAvGkQAIpum5NgwOBI6KLsophh\nNDxraaNy6n6HMb0Ou2RACOnT0ZuYisEIDxRI9luCsDqmFC4VeRv1lVAZ6j19\n+jZxwMUu9QVNIUjsx5ijanNOIOzAjvhOXZGflm0S4O92C+kaAyQsyO/YPu2P\n9icUaDvWULIjIqrPLMnP48s0TEd3UP49k2oygouZ9Q84rAWGiVFn543rVupS\nhM8j3/r2k/o/ypTjs5H0HmiNnLF91CHmdPKbh0RLjtQ/EZbKONJmA4aNsNF0\n6xk1Ko+Gdpm0zgZ3yOlEVS4KJ2K86zQM7CSchgaJjrvMVTMgEQMikYYIMnxq\n7LcyAnHI8L8yYzJfG4Hbr88rR1YmxG5O9lsSB78Fgerl0DO9JsFlojCYPiIO\nTzuJIGckjdnxSpczNl93czko/eNJlA5tCAyAwFRVlL5hYyfUHkU9+J51ZhUY\nPqrCeM1Q6cve0naaI50tLoZCPe7nYZmvRHsKoST01k9sXJkqQtPe3ywyG9aT\n8o9wSB0PAMcdGbLA742RC/HJhVeDvFtl+3pbx5Iq4bPugY8A5p0/fKs5sfhY\nR7Bens+9bvtV0O/2mX/GyxZAgKp7g6ETTqV8Q6yKZI9dFJqfeKiKyS3X484r\n4d9UAY064LfacaxWcFu4A1HB7qNKoeUSEE4NLpDrwtwzo6zJDWiwmPRjnG+4\nnUx8\r\n=DKuT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEb7pHarnoxfni5bGThe9mZN4Vm156M9+0fUyi7jWjHYAiEAz736077kuX3Xi55XzKLMXPGkhG8xlUSoqaECe9Z8WS4="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"niftychess","email":"team@niftychess.com"},{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.1.3-dev.571e76a.0_1643511593100_0.07645738679810199"},"_hasShrinkwrap":false},"0.1.3":{"name":"@treasure-chess/chess-achievements","version":"0.1.3","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","gitHead":"085e4d6e58c31f2b6d19c37e10dcd1d8d6c2c26c","_id":"@treasure-chess/chess-achievements@0.1.3","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"integrity":"sha512-zgyk5/5z9fm8WDWZPIvexH51vDkjDL5GY+iRgJ5xEtmKQJqJoGuCHlne2KA/z1eDx7nXi1ofy70sn31GUNgSeg==","shasum":"1682c22b19bb07a190289310aa81bd582e7eb083","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.1.3.tgz","fileCount":25,"unpackedSize":147383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9gUZCRA9TVsSAnZWagAAfIIP/0zUIvjMOJakjTnqqHjX\npwU5x1eO6EVQBJaXiz9zkTiIorJLklDgGKgFX/jC6T9rGLpR4ku/RL/er+xI\nRYEBIgSIsEJH5jrSJ6NBMEe9mzNQxEntptgLQvzM+BHAHwLO9MIhSfWckQOO\nA2HqagWvYpWmRVMt6gh9BwqwR1oA14HoMRYGz/oIHd5EUl950ibwdjcRBT2D\n9TPzHiHEgXHvxNUj4lYACoN1ddpQGw1wNZSnLgZ7TbUuOHvBDMj1EQ33gib8\nJtZS4pvRT8jEFz4hfR3PqV7ECU7q7qzmAAOneDyK0eFRloyIC9qPPhuaKcDx\nGKHPCORn+7SsDDE1NU3hh/x3O03UAlSjZOq5eIcqpQt2eIvqxv3axn4L0ufr\n5UCpigufD54dmRAPg6YFc/2QM8Zj+RJ/0B4h2kvP2V37sCthHaHe6HPmmaN7\nrH87Ro3ABnslShPsYm21wbmF3c0S0jq0pgIVnDfm2e0XlFE/8eTUTxaK8vn+\nqHWB19koJHYG19uELlIrHAdt0AnAOXLcAyKZdI9Z9CPOFCOnlp9mb2VV/L3K\notY5ZAMBiiFzBXf9tFPmD0hEh84wT1PGuj+86goBi6+ae/XQfKXL+edZjqrQ\nZREaW3Vu7LyILqQ7T8G6XPfbGOzhh1HLezzH+yaMNW6VPomPx4RQisTSd7mm\n5f8s\r\n=Zqp5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAkQNZMO+7u2AfCcqzSe5rY4QJb0sALGTVwUOfclKW3wAiEAtrgl5PaEaawqiYTrp9X/g2OpWCFUx9jRKyrIW+vuGTg="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"niftychess","email":"team@niftychess.com"},{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.1.3_1643513113653_0.5725831075479197"},"_hasShrinkwrap":false},"0.1.3-dev.bd2abbc.0":{"name":"@treasure-chess/chess-achievements","version":"0.1.3-dev.bd2abbc.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"bd2abbc84a5c831acecd049329c380a07516bdf1","_id":"@treasure-chess/chess-achievements@0.1.3-dev.bd2abbc.0","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"integrity":"sha512-QY4z3NzHOqOfpjec6dB90g9df1BBKsxnxmZXdUpUqYUENFg08pzb8OJ0MnAi3CqRQVdIcdWzcv6pcMCAlABDoQ==","shasum":"f6d3e7c4a883a6ba7f7d6355c3a5621eafada915","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.1.3-dev.bd2abbc.0.tgz","fileCount":25,"unpackedSize":147418,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+IHlCRA9TVsSAnZWagAAUMwP/3yV8mmECRfXjwNlMu/D\n8aY0XMizik3kaSKxzwsUnUcFfo0ZbFRhsHqN7H3UGnqnijL9FomRNTinTfFW\n3M7PSweDEiy8Tgn3+vWCnD2vUnn/ySv2kRCbk1HJGxaslzW1tDcJaxLmlMir\njsemqtJsuzLU2isdI36UT2U3Dac/DrB/2Lswgy48J90gMRsQWkXSSDCocKl8\nxyJZbqzPiJs5a+7hQOT8hW9QUpftfLzNq4O+e4sObcovdk5TiopGqIzhZS5B\ndD23FU6Idp8anwAsoshR6M7wQMBHql+P1+OfwT+iyuv2oJXGEDFgiWFsjpNo\n1k4FHSMpwasGwCDuaRJFXyQY/zE/XSrlD3bFFuVdFQ57gwWgsZTpLfJXJBLr\nY1MTykAe7D68AwtEd3+2h3TYKsRICff2peaVusUPmawPD2qmhwPuhkwjiVkG\nnyEBKLtadUG3Jg1W9Yf03LIY0QCw8A9RR17tScZYpTUsewYYV5YTPO9H7+M2\nYxQtsvT10z7WyERBjtRZZcLuyRFBmFNbZlapkYzYXkPLn641eOgJBoh1v9PH\nQzUAaS9L95wZHDQrUQT5HD0UDQ/fbYxKaq1sMATa/5sgEn236SDokIOTa7C3\ntSRxIpptDHQPrJN0Vfh3hE+uFypwImu/4WZO8p/jEOAhhcBYbShcrt+8FWoj\nXF8U\r\n=JNgG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHrL9DHV4A5jDuTtFULZxgewyI2mDpQsGj33IGdsXHeWAiAotjdUzWxpQOkSbPFwohxrqFK/O3M4Jegl0PsInvyUCQ=="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"niftychess","email":"team@niftychess.com"},{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.1.3-dev.bd2abbc.0_1643676133785_0.9231122931303859"},"_hasShrinkwrap":false},"0.1.3-dev.c2a7c56.0":{"name":"@treasure-chess/chess-achievements","version":"0.1.3-dev.c2a7c56.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"c2a7c56c7b0986d800e30416241c9ddfb323253c","_id":"@treasure-chess/chess-achievements@0.1.3-dev.c2a7c56.0","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"integrity":"sha512-ldrmRXr7Q25gfQt3iPsFjMglvzAepa6j2eE4pW7SKCQBKzdK6wWvbdmPQIAaJJNL8i3GwQJLqxDOhsVlhqGj7Q==","shasum":"8a681ab033b3d98c8b695638f8fb8749e1dd0ae2","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.1.3-dev.c2a7c56.0.tgz","fileCount":25,"unpackedSize":147418,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+IMyCRA9TVsSAnZWagAAKh4P/j4IiIp0Ax2qspt8Byu8\n4Gb22kl88rhh2SM+K3HcEyVZhGOe1YRm7Uo4VLEAz4qjpqwcRdSJt+f4Zsv6\n9TuLwYYcJQX+RE8C7ZbnidtYu4iVRt9XR2MOOE1gfomaSfXY8k5enW2gCNMB\nOSawUe2kxnnGWm3Ko4xP8iN9OQGqKseeDIDkVgGUyawuKxzKue1q3lmCxTsB\nnrQDQUnk+eF0t4X0QYmECBkeYipwkjo7sAFymfwMUHyUBqpn9RpYPq4xuf2j\np1Rrll8Ck4XE+n5wksafu5ksm8e9yfMaIBrclqOD1oRGVjyUJjPIt+t11JHf\nKV/1mkLDc60JbCA+zeaAUeTom1bLuLDQyF1hmorakRZVWp/JTiOhtocuhSST\nGd2EMpJ3uOjtiVpUjEsMgkG+IOJD2WcqdvFERIVd6f+VEpIwShgZd7ZkGk5p\n0F12GyCSeg6D18lQkSr+sAvWvWc4pFd5xYMuUUwaprxDUVfMXgqMivqG0wsK\nG6kvTxn9zYUFQsBYR5jAWt01LyX6tVC8z8uQr3b10+S5zEkvpE/uVPjdTW+/\nFEIY4LZ/F3hKSnrImRRebB+B24mGXSnzLdJhw3xWIZf7iBDXb0h7x9UT5TxW\nPe71MVBld03twKhSzRwxB0F63IZbaLrSaoPnMm3f27AZJHUVAvEN4oH6BnjM\n3f9R\r\n=wUO4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqfwUy8zkBq1uthL4GhQWlpIkiq4xa2AsxVMtwTX5WxgIhAI6UiN455W7V7s+oK5/ZpyC4dsHc+G1sUjBm4zw7bhA7"}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"niftychess","email":"team@niftychess.com"},{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.1.3-dev.c2a7c56.0_1643676466419_0.8823659588231183"},"_hasShrinkwrap":false},"0.1.4":{"name":"@treasure-chess/chess-achievements","version":"0.1.4","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","gitHead":"c2a7c56c7b0986d800e30416241c9ddfb323253c","_id":"@treasure-chess/chess-achievements@0.1.4","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"integrity":"sha512-vQSODOwGkB6Umk7KjWDft4aM28Dw00kgRLUejeXasDifFl3Y5cY8rXAdMXztrL9bIN0Mzsvqo9rj60KWzKMFeQ==","shasum":"cd3ee32e3a0d521011102540bc23d9a78b5cd2d5","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.1.4.tgz","fileCount":25,"unpackedSize":147382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+IPpCRA9TVsSAnZWagAA49oP/R7XScjEihFoCNJWdVxx\ni4HxXaxqi0aw0I87RntFBOge93vDXpf68uAGgquucQWfN8XDioh3jP7PBsbL\nHc1CH8yNVIbwlkZ1j3uk4+xGXvGoohVV6pHkLnNAOW1hS0SbVgVc+P9ZzO5y\nvq9v6J4XQITR/7dovK38JrLkqKRC9t5ezKGxVjuZ86lgs42UfDapWCYrbkzs\nI4Z+Ywlekb/7dss+VGoJhgAo073Gh/pkNNo0G9mWVkD0YTR2kW+4fFQG+zoL\nu4AZnPENb3X7d223aHvc9MRxBp3TqgfpqqHKGDIU3+uzSx+HAzPnEgPTOVL6\ndB34IQMeYNBLufe948D30kYL0cXLHXB5kkeh83LeXqciACt0xgUZo6WKSMRh\nWdgb3bTN21Ky41cEGRJRFrQ3R+mcBm91EhbvDxaaKXnmhjd7uma7HeW3RT4o\nDNyxRrOgIeb426WD3XJSoeGl/gHghOjPaiaUEA/+ETfxLn1TwgKIK9fBuCaI\nc2HNxTanlEGpQKaE4SOXY+UBjOhpW12VJTbp3zFkRutTg/IV3hESQ9dJUG9h\nYB/fMFlvkO/iYiPrk54xdhQa0latup6xWhaJzch3S7KzZ59MRqTP/NUhU5ra\ncmaifh2DDus8zQ5o+ahGfuBW9Nzm8q9Tn+EVNTqDOHgp5tCKJ6Y53ltUVeAk\niXmv\r\n=1Pzv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMFAHK41xkF0Ao22vNgudAQ4vP1YlWe2rCdPWdXcnvKgIhAM+9vOeVzh908G9MZRTcciIXPcGpM17gROB2pHiPHtYW"}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"niftychess","email":"team@niftychess.com"},{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.1.4_1643676648915_0.008352325860940368"},"_hasShrinkwrap":false},"0.1.3-dev.c1f5215.0":{"name":"@treasure-chess/chess-achievements","version":"0.1.3-dev.c1f5215.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src","debug":"node --inspect-brk tests/full.test.js"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"c1f5215e6220d02cec965ced4098b2cb03d5b6ca","_id":"@treasure-chess/chess-achievements@0.1.3-dev.c1f5215.0","_nodeVersion":"14.19.0","_npmVersion":"6.14.16","dist":{"integrity":"sha512-JPCbQtH+w5J+We9pbgkgPX6T032QHlXIIM2WGUfFHJ/amuLFTSarppxRzJMlNZCdCR0eVEqaR019jyYW5PWYnA==","shasum":"134852c24f2319524721bfc8e8f36522c9673bd7","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.1.3-dev.c1f5215.0.tgz","fileCount":25,"unpackedSize":175259,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiD+voACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr3Vg/9Hnqngb9VXudkR3WYBQJ1YYIqJ89MHXXIPFkMvOPca1zOIvbR\r\nfFjN3d6OgsF/4sZ3wDu8uiFX5PDRP3h33ywfyVgtK42/0dFY4HGYsRSx6ls9\r\n2F049SWm1sN2bw535OkqeNUiSqfMyMhN9ZmJCdApLamlvFBlp/qXrMbtCf6u\r\nxuvmI0kmWPcIiW8+lbxcw4AS+KUC4V8OxoIo1zqMoCUY5kqVPFxx1UABbgdS\r\n2mT9LsgMx2zkN2iWn81u3cFB5wKawAVs3ppUB/pWyJHAdWn6MmLOaELcEN/k\r\nUc0yf3nm3C5otMAkeZrnYD4DEqRkqypbXPikwYBq1CcraV4w4PCns+I7sYRm\r\njN3T43HEp77ebjiqs0WU7sF/87HQkFq7dytrBTjdRDjlUa9X2hG/HvXuIhB2\r\nCC2koheypew70J9Q5r/UifBTJDf5wHFcVXBx68tLiWy8GiIEfXBaSpX/5TxX\r\nVDYESjXhsxXPPCWdlsliI8ygGfFiimmc01+1oqwZz/S+iBx1saaoApmpNASK\r\nE9UUQXYkFsOYXKBqFRcCXukEt1t6ONbPrtHe5ElrtJToTbP6ZtbW26ouEck8\r\nnR4WZVLJMC8fdN3Y3IgtjTNQU4crjjI3JBgYfDV/EXjAf/slF/att6gmuqDK\r\nqlWjYMtTVXLZA9IdNtIV7Ifxac3S+9sO6uY=\r\n=LXyp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwA9ewtj4CxvyejU6vzyjwi4h5fu/kKyY8t3G59ZKpzQIhAKquz7B5mqQkQpIW2LqHFcAD6UHwYEhBbBGgIkk512CN"}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"niftychess","email":"team@niftychess.com"},{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.1.3-dev.c1f5215.0_1645210600320_0.3204043966824148"},"_hasShrinkwrap":false},"0.1.3-dev.3c675ac.0":{"name":"@treasure-chess/chess-achievements","version":"0.1.3-dev.3c675ac.0","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src","debug":"node --inspect-brk tests/full.test.js"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md","gitHead":"3c675ac68c1731160dc67caae210b66e0298d2ac","_id":"@treasure-chess/chess-achievements@0.1.3-dev.3c675ac.0","_nodeVersion":"14.19.0","_npmVersion":"6.14.16","dist":{"integrity":"sha512-0pVJANWeGa1xO3Mm6eDx/8r0cZV4ljKQ+wDPZ6DqKvI9zsA2VasdsLG1UbYecDuA+gjegBI2/S5qkF/aWxSpzA==","shasum":"8a48b19c50dedb9edc6395b569668bd849bb8ef4","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.1.3-dev.3c675ac.0.tgz","fileCount":25,"unpackedSize":175259,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiD+2UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqo0g//doGOiE1mbut0f2fi6z42oV8yXxKjcbII3AQjhCxBxnWVnUyI\r\n/vcJhY0nc1vCti5yuxR4Wu8CbGg2WIkL67v64zVDzb5pj88Un5gDzsitIvtm\r\n8TqxX79pQcPCekmnFb8QXcWiuxOsc2fTNX4QjQLOl61zedrNMIhg6PE9U6CZ\r\ndpAI+bXdP7ziWKCRsb1aerao2xOSibRoKa05dglQYQBZrIW9qf7xL6S58pbh\r\nbDoNN86ZLT38fdGOjLWxqqAUxOVj7w6iJNoCsD1C2zACsXbYe+GKnm8hmRZJ\r\nj6AAM2uWi0Fs5DnH391GujUG4hFYY1331aoGbkUiIyujMixjBXgUM5ME5tE6\r\naMXVEB/3BbcyXNUiOWr6HXgSZ+dZZOcBRkTT6eztLSQx7hqxw8NHeZj1Sf49\r\n+HE+mNXymY1TkzYj8C92/LJE11tCmUxDIR/ynmP0p/xFXeyInsQqh4TQQhqo\r\neFePF3bqRIMrBOWeqgwamxK1vo6i7m6YjK/qwSauH0LFes5H65Lr2eES0Fxs\r\n9TL+P1dySP3j7z7/GdIrbn+y2EybB6eAcWC5IjQkIqKQSQjc5q/0Q8FoC0/w\r\nMJ4uzZ/MyIygP40eVgiFnhYPVRM+OGynLqQQR6NiVHidJ1p044b7dfgWZDZk\r\nTnueH0sTdSgQSav1J6vykvgJc1sf/GJtUmg=\r\n=7s+X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHH+d76yboClxIzc1yTjSxRZ/xsYWg71sdPxB3oZ/vclAiBgk2t/RcPAQrajC9uFP7eS3LfDejYS4xiRoF3THUxZYA=="}]},"_npmUser":{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"},"directories":{},"maintainers":[{"name":"niftychess","email":"team@niftychess.com"},{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.1.3-dev.3c675ac.0_1645211028368_0.05075832049773621"},"_hasShrinkwrap":false},"0.1.5":{"name":"@treasure-chess/chess-achievements","version":"0.1.5","description":"Calculate chess achievements based on moves ","main":"src/index.js","scripts":{"test":"node tests/full.test.js","lint":"eslint ./src","debug":"node --inspect-brk tests/full.test.js"},"dependencies":{"chess.js":"^0.12.0"},"devDependencies":{"babel-eslint":"^10.1.0","eslint":"^7.1.0","eslint-config-airbnb":"^18.0.1","eslint-config-prettier":"^6.9.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-unicorn":"^20.1.0","lerna":"^4.0.0","prettier":"^1.19.1","prettier-eslint":"^9.0.0"},"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"keywords":["treasure","chess","achievement","chess.com","smart contract"],"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"license":"MIT","bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","licenseText":"MIT License\n\nCopyright (c) 2021 Nifty Chess, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@treasure-chess/chess-achievements@0.1.5","dist":{"shasum":"de1b5a77f1e1b8c373d6bf1d2607842f14006389","integrity":"sha512-1HmZxBhRvzMkafuPcAgxbmutx1p7Fa+dy39KpWXgCv5GMxIn+X2UvBjtZjuQ28IrbZRftn9U3LGLqcgy4+SS0A==","tarball":"https://registry.npmjs.org/@treasure-chess/chess-achievements/-/chess-achievements-0.1.5.tgz","fileCount":31,"unpackedSize":175223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIPtKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp50xAAgSnHRt0qnOpXawB1z5v6OywNqPEt8AjRV/fvBYDRD+zqfdEI\r\n9aOZG8lEHuT4prAqMXdL3F9bdwENSagLhcIxFFAL5TQCd85L35m/dh7DA7h1\r\n0vDf8cbjgcQXRLbQvbeFvPjW5fCuln7JMQfJMums7PCkDmDpTjyhs9xbsTb7\r\n4VljmKHuTANAoNSgoP065YKyvUbmifkwxe9J332l9qoRagvEst2aMdT20tLx\r\n8hhrLX5u+O15Er4h1jde6jEzz3+BfyUjXxCQ7101kqgqYlkoRargBZU8jGSU\r\noADS9LULzjgsqLhEdoVA+gTlkaRpfhppGRpgPvdtQik6WzBSC3HilvStNQFV\r\nwmE5q50DNeyMaEB128iwXF/Jvpk/DxcGhEwJTrAS3wbvVa8NrPB2HfIe8PlJ\r\n3XeD1+nxkBGfV/pdm2rSaO1/FK3OMndMaQE7IKZ/wfCvxg71W2rR5gwVEadD\r\nJ4+ANs1WvdrupsaDg7+oH53WNCMKBa0z1iB6F6L3oUwDbBxA5yDAityJDiYb\r\nCDRDLMhiuP6GO/nXXbr+ejW/qKbHqyf45Czbmis5XonmC0DQFkyjBzVuJ6dl\r\n7/pQn/MyG/GvEyXOylkWMzQCXYU+tkQaH4UKr/8gRP5kkAATZvZHjCKs//cy\r\ns1KdAu6G1lVUKIVGyIJ5QndCsd4rNcDmQbY=\r\n=7dwQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCN/FTM5hXmmb+Tv0H/ZGiD+tFGxGn19IC9rGfKQCUN8wIgCzrCqIZHh8uPh/rOsoWuL1jAXCXp4p+uHyGQr4loSdg="}]},"_npmUser":{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},"directories":{},"maintainers":[{"name":"niftychess","email":"team@niftychess.com"},{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chess-achievements_0.1.5_1646328650637_0.032991744232998554"},"_hasShrinkwrap":false}},"time":{"created":"2021-09-23T05:10:55.947Z","0.0.4":"2021-09-23T05:10:56.162Z","modified":"2022-04-07T07:30:22.190Z","0.0.5":"2021-09-24T17:22:58.762Z","0.0.6":"2021-09-29T22:16:59.550Z","0.0.7":"2021-10-15T17:21:47.694Z","0.0.8":"2021-11-03T03:32:56.974Z","0.0.9":"2021-11-03T03:47:56.403Z","0.0.10-dev.063ba4d.0":"2021-11-10T21:38:18.859Z","0.0.10-dev.3dc7657.0":"2021-11-10T23:29:39.950Z","0.0.10-dev.f817be7.0":"2021-11-11T01:05:30.645Z","0.0.10-dev.2b8d20c.0":"2021-11-11T19:08:08.356Z","0.0.10-dev.6b8a749.0":"2021-11-30T21:00:56.475Z","0.0.10-dev.4bde2ba.0":"2021-12-13T21:46:57.250Z","0.1.0":"2021-12-13T23:06:38.674Z","0.0.10-dev.50ab757.0":"2021-12-13T23:33:00.866Z","0.0.10-dev.8898314.0":"2021-12-13T23:34:00.541Z","0.1.1":"2021-12-13T23:35:41.855Z","0.0.10-dev.3d26232.0":"2021-12-14T07:31:23.992Z","0.0.10-dev.dea6181.0":"2021-12-14T07:52:44.387Z","0.1.2":"2021-12-14T07:56:29.923Z","0.0.10-dev.56f9a9b.0":"2022-01-11T23:59:47.092Z","0.0.10-dev.0234ede.0":"2022-01-12T00:02:41.856Z","0.0.10-dev.46ff28d.0":"2022-01-25T22:00:49.923Z","0.0.10-dev.03d1d7d.0":"2022-01-25T22:30:12.490Z","0.0.10-dev.64a0c70.0":"2022-01-26T00:14:47.021Z","0.0.10-dev.71abf84.0":"2022-01-28T17:17:54.734Z","0.0.10-dev.fd36291.0":"2022-01-29T17:01:46.253Z","0.1.3-dev.3eb5757.0":"2022-01-29T17:23:10.032Z","0.1.3-dev.89f81ed.0":"2022-01-30T02:36:58.731Z","0.1.3-dev.0a8cd01.0":"2022-01-30T02:48:27.457Z","0.1.3-dev.571e76a.0":"2022-01-30T02:59:53.448Z","0.1.3":"2022-01-30T03:25:13.872Z","0.1.3-dev.bd2abbc.0":"2022-02-01T00:42:13.980Z","0.1.3-dev.c2a7c56.0":"2022-02-01T00:47:46.557Z","0.1.4":"2022-02-01T00:50:49.067Z","0.1.3-dev.c1f5215.0":"2022-02-18T18:56:40.424Z","0.1.3-dev.3c675ac.0":"2022-02-18T19:03:48.569Z","0.1.5":"2022-03-03T17:30:50.768Z"},"maintainers":[{"name":"niftychess","email":"team@niftychess.com"},{"name":"jschiarizzi","email":"joseph@fourthwavestudios.com"},{"name":"pi0neerpat","email":"blockchainbuddha@gmail.com"}],"description":"Calculate chess achievements based on moves ","homepage":"https://github.com/Treasure-Chess/chess-achievements#readme","keywords":["treasure","chess","achievement","chess.com","smart contract"],"repository":{"type":"git","url":"git+https://github.com/Treasure-Chess/chess-achievements.git"},"author":{"name":"Treasure Chess Community","email":"maintainers@niftychess.com"},"bugs":{"url":"https://github.com/Treasure-Chess/chess-achievements/issues"},"license":"MIT","readme":"<h1 align=\"center\">Welcome to @treasure-chess/chess-achievements 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@treasure-chess/chess-achievements\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/@treasure-chess/chess-achievements.svg\">\n  </a>\n  <a href=\"https://twitter.com/niftychess\" target=\"_blank\">\n    <img alt=\"Twitter: niftychess\" src=\"https://img.shields.io/twitter/follow/niftychess.svg?style=social\" />\n  </a>\n</p>\n\n> Calculate achievements for a chess game.\n\n## Install\n\n```sh\nyarn add @treasure-chess/chess-achievements\n\nnpm i @treasure-chess/chess-achievements\n```\n\n## Usage\n\n> Note: only the \"Standard\" game rule variant is supported.\n\n#### Arguments:\n\n- `pgn` - pocket game notation for the game.\n- `playerColor` - Either \"white\" or \"black\".\n\n```js\nimport achievementsCalculator from '@treasure-chess/chess-achievements';\n\nconst {\n  opening,\n  score,\n  achievements,\n  allAchievements\n} = achievementsCalculator(pgn, playerColor);\n```\n\n#### Returns:\n\n- `opening` - See `/eco-codes.json` for the full list.\n- `score` - Sum of points for the top 3 achievements earned by `playerColor`.\n- `achievements` - Top 3 achievements earned by `playerColor`.\n- `allAchievements` - All achievements earned by `playerColor`.\n\n## Achievements and Tested Sample PGNs\n\n| number | name               | description                                         | points |\n| ------ | ------------------ | --------------------------------------------------- | ------ |\n| 0      | n/a                | (empty achievement)                                 | 0      |\n| 1      | Player             | Play a game                                         | 1      |\n| 2      | 750+ Winner        | Win a game against opponent rated 750+              | 2      |\n| 3      | Played 750+        | Play a game against opponent rated 750+             | 1      |\n| 4      | 1500+ Winner       | Win a game against opponent rated 1500+             | 3      |\n| 5      | Played 1500+       | Play a game against opponent rated 1500+            | 2      |\n| 6      | Played 2000+       | Play a game against opponent rated 2000+            | 3      |\n| 7      | Big Winner         | Win a game against opponent rated 2000+             | 4      |\n| 8      | Strongest Opponent | Play a game against opponent rated 2250+            | 4      |\n| 9      | Mythic Winner      | Win a game against opponent rated 2250+             | 5      |\n| 10     | Defeat an IM       | Defeat an IM                                        | 4      |\n| 11     | Defeat a NM        | Defeat a NM                                         | 3      |\n| 12     | Defeat a GM        | Defeat a GM                                         | 5      |\n| 13     | Criss Cross        | Mate with a bishop                                  | 4      |\n| 14     | Jousting           | Mate with a knight                                  | 4      |\n| 15     | Utter Disrespect   | Mate with a pawn                                    | 4      |\n| 16     | Triple Digit Club  | Complete a game with more than 100 moves            | 3      |\n| 17     | Excessive          | Complete a game with more than 150 moves            | 4      |\n| 18     | Ultramarathoners   | Complete a game with more than 250 moves            | 5      |\n| 19     | Opening Expert     | Win with checkmate in less than 10 moves            | 2      |\n| 20     | Don't Blink        | Win with checkmate in <5 moves                      | 3      |\n| 21     | Fool's Mate        | Win with checkmate in 2 moves                       | 5      |\n| 22     | Leveled Field      | Draw with a higher rated player                     | 2      |\n| 23     | Hello, m'lady      | Queen side castle                                   | 1      |\n| 24     | Horse Farmer       | Under-promote to a knight                           | 3      |\n| 25     | Holy Promotion     | Under-promote to a bishop                           | 5      |\n| 26     | The Sneaky Pawn    | En Passant                                          | 2      |\n| 27     | God-Mode Glitch    | Checkmate with an En Passant                        | 5      |\n| 28     | Cutting it Close   | Draw when opponent has a queen, without one         | 4      |\n| 29     | Déjà Vu            | Draw by repetition                                  | 1      |\n| 30     | The Underdog       | Defeat a higher rated player                        | 3      |\n| 31     | Checkin' You Out   | Put opponent in check                               | 1      |\n| 32     | Pawn Shy           | Capture <4 pawns                                    | 1      |\n| 33     | Pawn Shopper       | Capture all pawns                                   | 2      |\n| 34     | A Minor Problem    | Capture all knights and bishops without losing any. | 5      |\n| 35     | Mr. Marathon Man   | Move king >20 times                                 | 1      |\n| 36     | Pawn Hoarder       | Capture all pawns without losing any                | 5      |\n| 37     | Winner             | Win a game                                          | 2      |\n\n### This one is for testing, and verifying the achievements\n\n|     Achievement      |                    Description                     | Example PGN | Color |\n| :------------------: | :------------------------------------------------: | :---------: | :---: |\n|      Scrub Dub       |                     Win a game                     |     11      | Black |\n| Participation Medal  |                    Play a game                     |      8      | White |\n|    Semi-Scrub Dub    |       Win a game against opponent rated 750+       |      7      | Black |\n| Participation Medal  |      Play a game against opponent rated 750+       |     10      | White |\n|     Mediocre Dub     |      Win a game against opponent rated 1500+       |      9      | Black |\n| Participation Medal  |      Play a game against opponent rated 1500+      |      6      | Black |\n| Participation Medal  |      Play a game against opponent rated 2000+      |     22      | White |\n|      Decent Dub      |      Win a game against opponent rated 2000+       |     12      | Black |\n| Participation Medal  |      Play a game against opponent rated 2250+      |      2      | Black |\n|     Poggers Dub      |      Win a game against opponent rated 2250+       |      2      | White |\n|     Criss Cross      |                 Mate with a bishop                 |     24      | Black |\n|   Horsey Move in L   |                 Mate with a knight                 |      6      | White |\n|   Utter Disrespect   |                  Mate with a pawn                  |     20      | White |\n|  Triple Digit Club   |      Complete a game with more than 100 moves      |     23      | White |\n|      Excessive       |      Complete a game with more than 150 moves      |     16      | White |\n| Nothing Better to Do |      Complete a game with more than 250 moves      |     15      | White |\n|    Yeah, I'm Good    |      Win with checkmate in less than 10 moves      |     13      | Black |\n|    for real, bro?    |           Win with checkmate in <5 moves           |     14      | White |\n|     Fool's Mate      |           Win with checkmate in 2 moves            |     12      | Black |\n|    Emotional Dub     |          Draw with a higher rated player           |      3      | White |\n|    Hello, m'lady     |                 Queen side castle                  |      3      | White |\n|     Horse Farmer     |             Under-promote to a knight              |     17      | Black |\n|   Troll Promotion    |             Under-promote to a bishop              |     18      | White |\n|  The Game Glitched   |                     En Passant                     |      5      | Black |\n|   God-Mode Glitch    |            Checkmate with an En Passant            |      9      | Black |\n|   Cutting it Close   |    Draw when opponent has a queen, without one     |      8      | Black |\n|       Déjà Vu        |                 Draw by repetition                 |      3      | White |\n|   ELO is a Mindset   |            Defeat a higher rated player            |     19      | White |\n|   Checkin' You Out   |               Put opponent in check                |      2      | White |\n|       Pawn Shy       |                  Capture <4 pawns                  |      3      | White |\n|     Pawn Shopper     |                 Capture all pawns                  |     15      | White |\n|   A Minor Problem    | Capture all knights and bishops without losing any |     24      | Black |\n|   Mr. Marathon Man   |                Move king >20 times                 |      5      | White |\n|     Pawn Hoarder     |        Capture all pawns without losing any        |     21      | Black |\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome! Please adhere the rToken project community [code of conduct](https://github.com/rtoken-project/rtoken-monorepo/blob/master/code-of-conduct.md).\n\nAdd achievements, in order, to the list in `index.js`. Run tests with the command:\n\n```sh\nnpm run test\n```\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## Contributors ✨\n\n👤 **Treasure Chess Community <maintainers@niftychess.com>**\n\n- Website: https://niftychess.com\n  - Twitter: [@https:\\/\\/twitter.com\\/niftychess](https://twitter.com/https://twitter.com/niftychess)\n  - GitHub: [@Treasure-Chess](https://github.com/Treasure-Chess)\n\n## 📝 License\n\nCopyright © 2021 Nifty Chess, Inc.<br />\nThis project is [MIT](https://github.com/Treasure-Chess/chess-achievements/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","readmeFilename":"README.md"}