{"_id":"2048-tea","name":"2048-tea","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"2048-tea","version":"1.0.0","description":"This project is a Node.js implementation of the popular game 2048. It includes the core game logic for initializing the game board, adding new tiles, sliding and merging tiles based on player input, and checking for game over conditions.","main":"index.js","scripts":{"test":"jest"},"keywords":[],"author":"","license":"ISC","devDependencies":{"jest":"^29.7.0","puppeteer":"^22.4.1"},"repository":{"type":"git","url":"git+https://github.com/JerryXun0311/2048-tea.git"},"bugs":{"url":"https://github.com/JerryXun0311/2048-tea/issues"},"homepage":"https://github.com/JerryXun0311/2048-tea/blob/main/README.md","gitHead":"38848df5867e956f8758518c42ac563bcadd9381","_id":"2048-tea@1.0.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-csCVDRXA0CQFGKLsJ80wpmNk8+IT2W3noEAeZ+T4wihZtVb+fxtJdmzH8Gao5Qg3CUDVypXg9LHtj1bRqon74g==","shasum":"7404dfe6cef2b8dc83b75e3dafaf2f55ea6edd63","tarball":"https://registry.npmjs.org/2048-tea/-/2048-tea-1.0.0.tgz","fileCount":5,"unpackedSize":4876,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCE0mp7xCiw2DWEus0DcBC3OrSg7CcAcNyEHRlwNd5zJwIhAPvw6rPEYlCptxOTISiFaI7h5mxzMblxIqppB5yMUJcS"}]},"_npmUser":{"name":"xuanbui031195","email":"xuanbui031195@gmail.com"},"directories":{},"maintainers":[{"name":"xuanbui031195","email":"xuanbui031195@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/2048-tea_1.0.0_1710402275351_0.1101898055369277"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-14T07:44:35.350Z","1.0.0":"2024-03-14T07:44:35.611Z","modified":"2024-03-14T07:44:36.163Z"},"maintainers":[{"name":"xuanbui031195","email":"xuanbui031195@gmail.com"}],"description":"This project is a Node.js implementation of the popular game 2048. It includes the core game logic for initializing the game board, adding new tiles, sliding and merging tiles based on player input, and checking for game over conditions.","homepage":"https://github.com/JerryXun0311/2048-tea/blob/main/README.md","keywords":[],"repository":{"type":"git","url":"git+https://github.com/JerryXun0311/2048-tea.git"},"bugs":{"url":"https://github.com/JerryXun0311/2048-tea/issues"},"license":"ISC","readme":"# 2048 Game in Node.js\r\n\r\nThis project is a Node.js implementation of the popular game 2048. It includes the core game logic for initializing the game board, adding new tiles, sliding and merging tiles based on player input, and checking for game over conditions.\r\n\r\n## Features\r\n\r\n- Initialize a 4x4 game board.\r\n- Randomly add new tiles (2 or 4) to the board.\r\n- Slide and merge tiles when the player inputs a direction (up, down, left, right).\r\n- Check for game over condition.\r\n- Console-based UI to play the game in a terminal.\r\n\r\n## Installation\r\n\r\nTo run this project, you will need Node.js installed on your system. If you don't have Node.js installed, you can download it from [Node.js website](https://nodejs.org/).\r\n\r\nOnce Node.js is installed, clone the repository to your local machine:\r\n\r\nnpm install\r\n\r\n```bash\r\ngit clone https://github.com/JerryXun0311/2048-tea.git\r\ncd 2048-nodejs\r\n```\r\n\r\n## How to Play\r\nnode src/game.js\r\n\r\n\r\nUse the following keys to move the tiles:\r\n\r\nW or w for UP\r\nS or s for DOWN\r\nA or a for LEFT\r\nD or d for RIGHT\r\nAfter each move, a new tile (2 or 4) will appear randomly on the board. The goal is to combine tiles with the same numbers to increase their value and try to reach the 2048 tile.","readmeFilename":"README.md"}