Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meadsteve/cli-dice-game-code-along
🎲 code along for building a cli dice game
https://github.com/meadsteve/cli-dice-game-code-along
game javascript nodejs
Last synced: 5 days ago
JSON representation
🎲 code along for building a cli dice game
- Host: GitHub
- URL: https://github.com/meadsteve/cli-dice-game-code-along
- Owner: meadsteve
- Created: 2019-05-04T12:29:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-19T16:16:58.000Z (over 5 years ago)
- Last Synced: 2024-10-11T03:11:14.821Z (about 1 month ago)
- Topics: game, javascript, nodejs
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CLI Dice Game - Code Along
We'll build an interactive CLI for playing a dice game.
## Requirements
* Node >= 10
* An IDE or text editor you're happy using.
* An internet connection (for npm downloads).## Presentation
To go along with this repo: https://docs.google.com/presentation/d/1CuXuc9-akRitDGNkvB-fH2wUQTvgbaGxxBm-07u3fyE/edit?usp=sharing## Tech
We'll use the following NPM libraries:* inquirer - To power the interactive elements
* Axios - To make web requests to http://roll.diceapi.comBoth of these libraries return promises so the code will be a little simpler to read if we use [async/await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function) added in ES2017.
## Proposed game rules
* A number of players take in turns to roll dice.
* A player chooses how many dice they want to roll.
* If they roll any 6s and the player is out.
* At the end of the round any player who falls 25 points behind the leader is out.
* Repeat until only one player is left. This player wins.## Example solution
An example solution can be found on the solution branch here
https://github.com/meadsteve/cli-dice-game-code-along/blob/solution/index.js